content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Pizza:
def __init__(self, ingredients):
self.ingredients = ingredients
def __repr__(self):
return f"Pizza({self.ingredients!r})"
print(Pizza(["cheese", "tomatoes"]))
| class Pizza:
def __init__(self, ingredients):
self.ingredients = ingredients
def __repr__(self):
return f'Pizza({self.ingredients!r})'
print(pizza(['cheese', 'tomatoes'])) |
#setting
RPPpath = r"D:\document\python projects\Autolipsync\scripttest2.rpp"
TEMPLATEPath = r"D:\document\python projects\Autolipsync\template.exo"
LIPPath = r"D:\document\python projects\Autolipsync\*.avi"
ExportPath = "RPPtoEXO(Lyric).exo"
FPS = 60
| rp_ppath = 'D:\\document\\python projects\\Autolipsync\\scripttest2.rpp'
template_path = 'D:\\document\\python projects\\Autolipsync\\template.exo'
lip_path = 'D:\\document\\python projects\\Autolipsync\\*.avi'
export_path = 'RPPtoEXO(Lyric).exo'
fps = 60 |
# %%
def isprime(n):
if n == 1:
return False
i = 2
while i*i <= n:
if n % i == 0:
return False
i += 1
return True
def solution(n, k):
enc = []
while n != 0:
enc.append(n % k)
n = n // k
curr = enc[-1]
answer = 0
for v in enc[-2::-1]:
if v == 0:
if curr != 0:
if isprime(curr):
answer += 1
curr = 0
else:
curr = curr * 10 + v
if enc[0] != 0:
if curr != 0:
if isprime(curr):
answer += 1
curr = 0
#
return answer
print(solution(437674, 3))
# print(solution(1000000, 3))
# print(solution(11001100, 10))
# print(print(isprime(211)))
# print(solution(110011, 10))
| def isprime(n):
if n == 1:
return False
i = 2
while i * i <= n:
if n % i == 0:
return False
i += 1
return True
def solution(n, k):
enc = []
while n != 0:
enc.append(n % k)
n = n // k
curr = enc[-1]
answer = 0
for v in enc[-2::-1]:
if v == 0:
if curr != 0:
if isprime(curr):
answer += 1
curr = 0
else:
curr = curr * 10 + v
if enc[0] != 0:
if curr != 0:
if isprime(curr):
answer += 1
curr = 0
return answer
print(solution(437674, 3)) |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftANDleftGLOBALUNTILleftNEGleftLPARENRPARENATOMICLBRACKRBRACKNUMBER COMMA LPAREN RPAREN LBRACK RBRACK AND NEG ATOMIC GLOBAL UNTIL\n\texpression \t: expression AND expression\n\t\t\t\t| NEG expression\n\t\t\t\t| GLOBAL LBRACK NUMBER RBRACK expression\n\t\t\t\t| GLOBAL LBRACK NUMBER COMMA NUMBER RBRACK expression\n\t\t\t\t| expression UNTIL LBRACK NUMBER RBRACK expression\n\t\t\t\t| expression UNTIL LBRACK NUMBER COMMA NUMBER RBRACK expression\t\t\t\t\n\texpression : LPAREN expression RPARENexpression : ATOMIC'
_lr_action_items = {'NEG':([0,2,4,6,16,18,24,25,],[2,2,2,2,2,2,2,2,]),'GLOBAL':([0,2,4,6,16,18,24,25,],[3,3,3,3,3,3,3,3,]),'LPAREN':([0,2,4,6,16,18,24,25,],[4,4,4,4,4,4,4,4,]),'ATOMIC':([0,2,4,6,16,18,24,25,],[5,5,5,5,5,5,5,5,]),'$end':([1,5,8,11,14,20,22,26,27,],[0,-8,-2,-1,-7,-3,-5,-4,-6,]),'AND':([1,5,8,10,11,14,20,22,26,27,],[6,-8,-2,6,-1,-7,-3,-5,-4,-6,]),'UNTIL':([1,5,8,10,11,14,20,22,26,27,],[7,-8,-2,7,7,-7,-3,-5,-4,-6,]),'LBRACK':([3,7,],[9,12,]),'RPAREN':([5,8,10,11,14,20,22,26,27,],[-8,-2,14,-1,-7,-3,-5,-4,-6,]),'NUMBER':([9,12,17,19,],[13,15,21,23,]),'RBRACK':([13,15,21,23,],[16,18,24,25,]),'COMMA':([13,15,],[17,19,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'expression':([0,2,4,6,16,18,24,25,],[1,8,10,11,20,22,26,27,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> expression","S'",1,None,None,None),
('expression -> expression AND expression','expression',3,'p_TL_operators','TLparse.py',25),
('expression -> NEG expression','expression',2,'p_TL_operators','TLparse.py',26),
('expression -> GLOBAL LBRACK NUMBER RBRACK expression','expression',5,'p_TL_operators','TLparse.py',27),
('expression -> GLOBAL LBRACK NUMBER COMMA NUMBER RBRACK expression','expression',7,'p_TL_operators','TLparse.py',28),
('expression -> expression UNTIL LBRACK NUMBER RBRACK expression','expression',6,'p_TL_operators','TLparse.py',29),
('expression -> expression UNTIL LBRACK NUMBER COMMA NUMBER RBRACK expression','expression',8,'p_TL_operators','TLparse.py',30),
('expression -> LPAREN expression RPAREN','expression',3,'p_paren_token','TLparse.py',50),
('expression -> ATOMIC','expression',1,'p_atomic_token','TLparse.py',54),
]
| _tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftANDleftGLOBALUNTILleftNEGleftLPARENRPARENATOMICLBRACKRBRACKNUMBER COMMA LPAREN RPAREN LBRACK RBRACK AND NEG ATOMIC GLOBAL UNTIL\n\texpression \t: expression AND expression\n\t\t\t\t| NEG expression\n\t\t\t\t| GLOBAL LBRACK NUMBER RBRACK expression\n\t\t\t\t| GLOBAL LBRACK NUMBER COMMA NUMBER RBRACK expression\n\t\t\t\t| expression UNTIL LBRACK NUMBER RBRACK expression\n\t\t\t\t| expression UNTIL LBRACK NUMBER COMMA NUMBER RBRACK expression\t\t\t\t\n\texpression : LPAREN expression RPARENexpression : ATOMIC'
_lr_action_items = {'NEG': ([0, 2, 4, 6, 16, 18, 24, 25], [2, 2, 2, 2, 2, 2, 2, 2]), 'GLOBAL': ([0, 2, 4, 6, 16, 18, 24, 25], [3, 3, 3, 3, 3, 3, 3, 3]), 'LPAREN': ([0, 2, 4, 6, 16, 18, 24, 25], [4, 4, 4, 4, 4, 4, 4, 4]), 'ATOMIC': ([0, 2, 4, 6, 16, 18, 24, 25], [5, 5, 5, 5, 5, 5, 5, 5]), '$end': ([1, 5, 8, 11, 14, 20, 22, 26, 27], [0, -8, -2, -1, -7, -3, -5, -4, -6]), 'AND': ([1, 5, 8, 10, 11, 14, 20, 22, 26, 27], [6, -8, -2, 6, -1, -7, -3, -5, -4, -6]), 'UNTIL': ([1, 5, 8, 10, 11, 14, 20, 22, 26, 27], [7, -8, -2, 7, 7, -7, -3, -5, -4, -6]), 'LBRACK': ([3, 7], [9, 12]), 'RPAREN': ([5, 8, 10, 11, 14, 20, 22, 26, 27], [-8, -2, 14, -1, -7, -3, -5, -4, -6]), 'NUMBER': ([9, 12, 17, 19], [13, 15, 21, 23]), 'RBRACK': ([13, 15, 21, 23], [16, 18, 24, 25]), 'COMMA': ([13, 15], [17, 19])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'expression': ([0, 2, 4, 6, 16, 18, 24, 25], [1, 8, 10, 11, 20, 22, 26, 27])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> expression", "S'", 1, None, None, None), ('expression -> expression AND expression', 'expression', 3, 'p_TL_operators', 'TLparse.py', 25), ('expression -> NEG expression', 'expression', 2, 'p_TL_operators', 'TLparse.py', 26), ('expression -> GLOBAL LBRACK NUMBER RBRACK expression', 'expression', 5, 'p_TL_operators', 'TLparse.py', 27), ('expression -> GLOBAL LBRACK NUMBER COMMA NUMBER RBRACK expression', 'expression', 7, 'p_TL_operators', 'TLparse.py', 28), ('expression -> expression UNTIL LBRACK NUMBER RBRACK expression', 'expression', 6, 'p_TL_operators', 'TLparse.py', 29), ('expression -> expression UNTIL LBRACK NUMBER COMMA NUMBER RBRACK expression', 'expression', 8, 'p_TL_operators', 'TLparse.py', 30), ('expression -> LPAREN expression RPAREN', 'expression', 3, 'p_paren_token', 'TLparse.py', 50), ('expression -> ATOMIC', 'expression', 1, 'p_atomic_token', 'TLparse.py', 54)] |
''' Polynomials are given as a list i.e.
2x^3 - 6x^2 + 2x - 1 = [2, -6, 2, -1]
'''
def polynomial():
coefficients = []
n = int(input("Enter number of coefficients: \n"))
print("Enter coefficients: \n")
for i in range(0, n):
element = int(input())
coefficients.append(element)
x = float(input("Value to evaluate for: \n"))
return horner_algorithm(coefficients, n, x)
def horner_algorithm(poly, n, x):
result = poly[0]
''' Algorithm handles a polynomial like a sequence of form:
poly[1]x(n-2) + .. + poly[n-1]
'''
for i in range(1, n):
result = result*x + poly[i]
return result
def main():
result = polynomial()
print("Evaluated to: ", result)
main() | """ Polynomials are given as a list i.e.
2x^3 - 6x^2 + 2x - 1 = [2, -6, 2, -1]
"""
def polynomial():
coefficients = []
n = int(input('Enter number of coefficients: \n'))
print('Enter coefficients: \n')
for i in range(0, n):
element = int(input())
coefficients.append(element)
x = float(input('Value to evaluate for: \n'))
return horner_algorithm(coefficients, n, x)
def horner_algorithm(poly, n, x):
result = poly[0]
'\tAlgorithm handles a polynomial like a sequence of form:\n\t\t\t\t\tpoly[1]x(n-2) + .. + poly[n-1]\n\t'
for i in range(1, n):
result = result * x + poly[i]
return result
def main():
result = polynomial()
print('Evaluated to: ', result)
main() |
class Router(object):
def db_for_read(self, model, **hints):
return 'read'
def db_for_write(self, model, **hints):
return 'default'
| class Router(object):
def db_for_read(self, model, **hints):
return 'read'
def db_for_write(self, model, **hints):
return 'default' |
state_data = [{'id': 'AL',
'name': 'Alabama',
'code': 'AL',
'electoral_votes': 9,
'campaign_cost': 18,
'popular_vote': 2.1,
'groups': ['AA', 'OS']},
{'id': 'AK',
'name': 'Alaska',
'code': 'AK',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.3,
'groups': ['OG']},
{'id': 'AZ', 'name': 'Arizona',
'code': 'AZ',
'electoral_votes': 11,
'campaign_cost': 24,
'popular_vote': 2.6,
'groups': ['AA', 'L', 'SS', 'TG']},
{'id': 'AR', 'name': 'Arkansas',
'code': 'AR',
'electoral_votes': 6,
'campaign_cost': 15,
'popular_vote': 1.1,
'groups': ['OS']},
{'id': 'CA', 'name': 'California',
'code': 'CA',
'electoral_votes': 55,
'campaign_cost': 200,
'popular_vote': 14,
'groups': ['L', 'OG', 'HT', 'A', 'ED']},
{'id': 'CO',
'name': 'Colorado',
'code': 'CO',
'electoral_votes': 9,
'campaign_cost': 18,
'popular_vote': 2.8,
'groups': ['L', 'OG', 'SS']},
{'id': 'CT',
'name': 'Connecticut',
'code': 'CT',
'electoral_votes': 7,
'campaign_cost': 15,
'popular_vote': 1.6,
'groups': ['HT']},
{'id': 'DC', 'name': 'District of Columbia',
'code': 'DC',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.3,
'groups': ['AA', 'TG']},
{'id': 'DE', 'name': 'Delaware',
'code': 'DE',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.4,
'groups': ['AA', 'HT']},
{'id': 'FL', 'name': 'Florida',
'code': 'FL',
'electoral_votes': 29,
'campaign_cost': 100,
'popular_vote': 9.4,
'groups': ['AA', 'L', 'A', 'ED', 'SS']},
{'id': 'GA', 'name': 'Georgia',
'code': 'GA',
'electoral_votes': 16,
'campaign_cost': 37.5,
'popular_vote': 4.1,
'groups': ['AA', 'OS']},
{'id': 'HI', 'name': 'Hawaii',
'code': 'HI',
'electoral_votes': 4,
'campaign_cost': 12.5,
'popular_vote': 0.4,
'groups': ['A']},
{'id': 'ID', 'name': 'Idaho',
'code': 'ID',
'electoral_votes': 4,
'campaign_cost': 12.5,
'popular_vote': 0.7,
'groups': []},
{'id': 'IL', 'name': 'Illinois',
'code': 'IL',
'electoral_votes': 20,
'campaign_cost': 50,
'popular_vote': 5.5,
'groups': ['AA', 'L', 'A', 'MB', 'ED']},
{'id': 'IN', 'name': 'Indiana',
'code': 'IN',
'electoral_votes': 11,
'campaign_cost': 25,
'popular_vote': 2.7,
'groups': ['MB']},
{'id': 'IA', 'name': 'Iowa',
'code': 'IA',
'electoral_votes': 6,
'campaign_cost': 20,
'popular_vote': 1.6,
'groups': ['A', 'SS', 'TG']},
{'id': 'KS', 'name': 'Kansas',
'code': 'KS',
'electoral_votes': 6,
'campaign_cost': 20,
'popular_vote': 1.2,
'groups': ['A']},
{'id': 'KY', 'name': 'Kentucky',
'code': 'KY',
'electoral_votes': 8,
'campaign_cost': 25,
'popular_vote': 1.2,
'groups': []},
{'id': 'LA', 'name': 'Louisiana',
'code': 'LA',
'electoral_votes': 8,
'campaign_cost': 25,
'popular_vote': 2,
'groups': ['AA', 'OG', 'OS', 'ED']},
{'id': 'ME', 'name': 'Maine',
'code': 'ME',
'electoral_votes': 4,
'campaign_cost': 12.5,
'popular_vote': 0.7,
'groups': ['TG']},
{'id': 'MD', 'name': 'Maryland',
'code': 'MD',
'electoral_votes': 10,
'campaign_cost': 35,
'popular_vote': 2.8,
'groups': ['AA', 'HT', 'OS']},
{'id': 'MA', 'name': 'Massachusetts',
'code': 'MA',
'electoral_votes': 11,
'campaign_cost': 37.5,
'popular_vote': 3.3,
'groups': ['HT', 'TG']},
{'id': 'MI', 'name': 'Michigan',
'code': 'MI',
'electoral_votes': 16,
'campaign_cost': 45,
'popular_vote': 4.8,
'groups': ['AA', 'HT', 'MB', 'ED']},
{'id': 'MN', 'name': 'Minnesota',
'code': 'MN',
'electoral_votes': 10,
'campaign_cost': 35,
'popular_vote': 2.9,
'groups': ['A', 'TG']},
{'id': 'MS', 'name': 'Mississippi',
'code': 'MS',
'electoral_votes': 6,
'campaign_cost': 20,
'popular_vote': 1.2,
'groups': ['AA', 'OS']},
{'id': 'MO', 'name': 'Missouri',
'code': 'MO',
'electoral_votes': 10,
'campaign_cost': 35,
'popular_vote': 2.8,
'groups': ['TG']},
{'id': 'MT', 'name': 'Montana',
'code': 'MT',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.5,
'groups': []},
{'id': 'NE', 'name': 'Nebraska',
'code': 'NE',
'electoral_votes': 5,
'campaign_cost': 15,
'popular_vote': 0.8,
'groups': ['A', 'TG']},
{'id': 'NV', 'name': 'Nevada',
'code': 'NV',
'electoral_votes': 6,
'campaign_cost': 17.5,
'popular_vote': 1.1,
'groups': ['L']},
{'id': 'NH', 'name': 'New Hampshire',
'code': 'NH',
'electoral_votes': 4,
'campaign_cost': 12.5,
'popular_vote': 0.7,
'groups': ['HT', 'SS', 'TG']},
{'id': 'NJ', 'name': 'New Jersey',
'code': 'NJ',
'electoral_votes': 14,
'campaign_cost': 42.5,
'popular_vote': 3.9,
'groups': ['L']},
{'id': 'NM', 'name': 'New Mexico',
'code': 'NM',
'electoral_votes': 5,
'campaign_cost': 15,
'popular_vote': 0.8,
'groups': ['L', 'OS', 'SS']},
{'id': 'NY', 'name': 'New York',
'code': 'NY',
'electoral_votes': 29,
'campaign_cost': 150,
'popular_vote': 7.7,
'groups': ['AA', 'L', 'HT', 'ED', 'TG']},
{'id': 'NC', 'name': 'North Carolina',
'code': 'NC',
'electoral_votes': 15,
'campaign_cost': 42.5,
'popular_vote': 4.7,
'groups': ['AA', 'A', 'MB', 'OS', 'SS']},
{'id': 'ND', 'name': 'North Dakota',
'code': 'ND',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.3,
'groups': ['OG', 'TG']},
{'id': 'OH', 'name': 'Ohio',
'code': 'OH',
'electoral_votes': 18,
'campaign_cost': 50,
'popular_vote': 5.5,
'groups': ['MB', 'ED', 'SS']},
{'id': 'OK', 'name': 'Oklahoma',
'code': 'OK',
'electoral_votes': 7,
'campaign_cost': 20,
'popular_vote': 1.5,
'groups': ['OG']},
{'id': 'OR', 'name': 'Oregon',
'code': 'OR',
'electoral_votes': 7,
'campaign_cost': 22.5,
'popular_vote': 2,
'groups': ['ED']},
{'id': 'PA', 'name': 'Pennsylvania',
'code': 'PA',
'electoral_votes': 20,
'campaign_cost': 60,
'popular_vote': 6.1,
'groups': ['HT', 'MB', 'ED', 'SS']},
{'id': 'RI', 'name': 'Rhode Island',
'code': 'RI',
'electoral_votes': 4,
'campaign_cost': 12.5,
'popular_vote': 0.5,
'groups': ['TG']},
{'id': 'SC', 'name': 'South Carolina',
'code': 'SC',
'electoral_votes': 9,
'campaign_cost': 32.5,
'popular_vote': 2.1,
'groups': ['AA', 'OS']},
{'id': 'SD', 'name': 'South Dakota',
'code': 'SD',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.4,
'groups': ['OG']},
{'id': 'TN', 'name': 'Tennessee',
'code': 'TN',
'electoral_votes': 11,
'campaign_cost': 37.5,
'popular_vote': 2.5,
'groups': ['AA']},
{'id': 'TX', 'name': 'Texas',
'code': 'TX',
'electoral_votes': 38,
'campaign_cost': 200,
'popular_vote': 9,
'groups': ['L', 'OG', 'A', 'MB', 'ED']},
{'id': 'UT', 'name': 'Utah',
'code': 'UT',
'electoral_votes': 6,
'campaign_cost': 20,
'popular_vote': 1.1,
'groups': ['HT', 'TG']},
{'id': 'VT', 'name': 'Vermont',
'code': 'VT',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.3,
'groups': ['TG']},
{'id': 'VA', 'name': 'Virginia',
'code': 'VA',
'electoral_votes': 13,
'campaign_cost': 22.5,
'popular_vote': 4,
'groups': ['AA', 'HT', 'OS', 'SS']},
{'id': 'WA', 'name': 'Washington',
'code': 'WA',
'electoral_votes': 12,
'campaign_cost': 25,
'popular_vote': 3.2,
'groups': ['HT', 'ED']},
{'id': 'WV', 'name': 'West Virginia',
'code': 'WV',
'electoral_votes': 5,
'campaign_cost': 17.5,
'popular_vote': 0.7,
'groups': ['OG']},
{'id': 'WI', 'name': 'Wisconsin',
'code': 'WI',
'electoral_votes': 10,
'campaign_cost': 35,
'popular_vote': 3,
'groups': ['A', 'MB', 'SS']},
{'id': 'WY', 'name': 'Wyoming',
'code': 'WY',
'electoral_votes': 3,
'campaign_cost': 10,
'popular_vote': 0.3,
'groups': ['OG']}]
| state_data = [{'id': 'AL', 'name': 'Alabama', 'code': 'AL', 'electoral_votes': 9, 'campaign_cost': 18, 'popular_vote': 2.1, 'groups': ['AA', 'OS']}, {'id': 'AK', 'name': 'Alaska', 'code': 'AK', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.3, 'groups': ['OG']}, {'id': 'AZ', 'name': 'Arizona', 'code': 'AZ', 'electoral_votes': 11, 'campaign_cost': 24, 'popular_vote': 2.6, 'groups': ['AA', 'L', 'SS', 'TG']}, {'id': 'AR', 'name': 'Arkansas', 'code': 'AR', 'electoral_votes': 6, 'campaign_cost': 15, 'popular_vote': 1.1, 'groups': ['OS']}, {'id': 'CA', 'name': 'California', 'code': 'CA', 'electoral_votes': 55, 'campaign_cost': 200, 'popular_vote': 14, 'groups': ['L', 'OG', 'HT', 'A', 'ED']}, {'id': 'CO', 'name': 'Colorado', 'code': 'CO', 'electoral_votes': 9, 'campaign_cost': 18, 'popular_vote': 2.8, 'groups': ['L', 'OG', 'SS']}, {'id': 'CT', 'name': 'Connecticut', 'code': 'CT', 'electoral_votes': 7, 'campaign_cost': 15, 'popular_vote': 1.6, 'groups': ['HT']}, {'id': 'DC', 'name': 'District of Columbia', 'code': 'DC', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.3, 'groups': ['AA', 'TG']}, {'id': 'DE', 'name': 'Delaware', 'code': 'DE', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.4, 'groups': ['AA', 'HT']}, {'id': 'FL', 'name': 'Florida', 'code': 'FL', 'electoral_votes': 29, 'campaign_cost': 100, 'popular_vote': 9.4, 'groups': ['AA', 'L', 'A', 'ED', 'SS']}, {'id': 'GA', 'name': 'Georgia', 'code': 'GA', 'electoral_votes': 16, 'campaign_cost': 37.5, 'popular_vote': 4.1, 'groups': ['AA', 'OS']}, {'id': 'HI', 'name': 'Hawaii', 'code': 'HI', 'electoral_votes': 4, 'campaign_cost': 12.5, 'popular_vote': 0.4, 'groups': ['A']}, {'id': 'ID', 'name': 'Idaho', 'code': 'ID', 'electoral_votes': 4, 'campaign_cost': 12.5, 'popular_vote': 0.7, 'groups': []}, {'id': 'IL', 'name': 'Illinois', 'code': 'IL', 'electoral_votes': 20, 'campaign_cost': 50, 'popular_vote': 5.5, 'groups': ['AA', 'L', 'A', 'MB', 'ED']}, {'id': 'IN', 'name': 'Indiana', 'code': 'IN', 'electoral_votes': 11, 'campaign_cost': 25, 'popular_vote': 2.7, 'groups': ['MB']}, {'id': 'IA', 'name': 'Iowa', 'code': 'IA', 'electoral_votes': 6, 'campaign_cost': 20, 'popular_vote': 1.6, 'groups': ['A', 'SS', 'TG']}, {'id': 'KS', 'name': 'Kansas', 'code': 'KS', 'electoral_votes': 6, 'campaign_cost': 20, 'popular_vote': 1.2, 'groups': ['A']}, {'id': 'KY', 'name': 'Kentucky', 'code': 'KY', 'electoral_votes': 8, 'campaign_cost': 25, 'popular_vote': 1.2, 'groups': []}, {'id': 'LA', 'name': 'Louisiana', 'code': 'LA', 'electoral_votes': 8, 'campaign_cost': 25, 'popular_vote': 2, 'groups': ['AA', 'OG', 'OS', 'ED']}, {'id': 'ME', 'name': 'Maine', 'code': 'ME', 'electoral_votes': 4, 'campaign_cost': 12.5, 'popular_vote': 0.7, 'groups': ['TG']}, {'id': 'MD', 'name': 'Maryland', 'code': 'MD', 'electoral_votes': 10, 'campaign_cost': 35, 'popular_vote': 2.8, 'groups': ['AA', 'HT', 'OS']}, {'id': 'MA', 'name': 'Massachusetts', 'code': 'MA', 'electoral_votes': 11, 'campaign_cost': 37.5, 'popular_vote': 3.3, 'groups': ['HT', 'TG']}, {'id': 'MI', 'name': 'Michigan', 'code': 'MI', 'electoral_votes': 16, 'campaign_cost': 45, 'popular_vote': 4.8, 'groups': ['AA', 'HT', 'MB', 'ED']}, {'id': 'MN', 'name': 'Minnesota', 'code': 'MN', 'electoral_votes': 10, 'campaign_cost': 35, 'popular_vote': 2.9, 'groups': ['A', 'TG']}, {'id': 'MS', 'name': 'Mississippi', 'code': 'MS', 'electoral_votes': 6, 'campaign_cost': 20, 'popular_vote': 1.2, 'groups': ['AA', 'OS']}, {'id': 'MO', 'name': 'Missouri', 'code': 'MO', 'electoral_votes': 10, 'campaign_cost': 35, 'popular_vote': 2.8, 'groups': ['TG']}, {'id': 'MT', 'name': 'Montana', 'code': 'MT', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.5, 'groups': []}, {'id': 'NE', 'name': 'Nebraska', 'code': 'NE', 'electoral_votes': 5, 'campaign_cost': 15, 'popular_vote': 0.8, 'groups': ['A', 'TG']}, {'id': 'NV', 'name': 'Nevada', 'code': 'NV', 'electoral_votes': 6, 'campaign_cost': 17.5, 'popular_vote': 1.1, 'groups': ['L']}, {'id': 'NH', 'name': 'New Hampshire', 'code': 'NH', 'electoral_votes': 4, 'campaign_cost': 12.5, 'popular_vote': 0.7, 'groups': ['HT', 'SS', 'TG']}, {'id': 'NJ', 'name': 'New Jersey', 'code': 'NJ', 'electoral_votes': 14, 'campaign_cost': 42.5, 'popular_vote': 3.9, 'groups': ['L']}, {'id': 'NM', 'name': 'New Mexico', 'code': 'NM', 'electoral_votes': 5, 'campaign_cost': 15, 'popular_vote': 0.8, 'groups': ['L', 'OS', 'SS']}, {'id': 'NY', 'name': 'New York', 'code': 'NY', 'electoral_votes': 29, 'campaign_cost': 150, 'popular_vote': 7.7, 'groups': ['AA', 'L', 'HT', 'ED', 'TG']}, {'id': 'NC', 'name': 'North Carolina', 'code': 'NC', 'electoral_votes': 15, 'campaign_cost': 42.5, 'popular_vote': 4.7, 'groups': ['AA', 'A', 'MB', 'OS', 'SS']}, {'id': 'ND', 'name': 'North Dakota', 'code': 'ND', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.3, 'groups': ['OG', 'TG']}, {'id': 'OH', 'name': 'Ohio', 'code': 'OH', 'electoral_votes': 18, 'campaign_cost': 50, 'popular_vote': 5.5, 'groups': ['MB', 'ED', 'SS']}, {'id': 'OK', 'name': 'Oklahoma', 'code': 'OK', 'electoral_votes': 7, 'campaign_cost': 20, 'popular_vote': 1.5, 'groups': ['OG']}, {'id': 'OR', 'name': 'Oregon', 'code': 'OR', 'electoral_votes': 7, 'campaign_cost': 22.5, 'popular_vote': 2, 'groups': ['ED']}, {'id': 'PA', 'name': 'Pennsylvania', 'code': 'PA', 'electoral_votes': 20, 'campaign_cost': 60, 'popular_vote': 6.1, 'groups': ['HT', 'MB', 'ED', 'SS']}, {'id': 'RI', 'name': 'Rhode Island', 'code': 'RI', 'electoral_votes': 4, 'campaign_cost': 12.5, 'popular_vote': 0.5, 'groups': ['TG']}, {'id': 'SC', 'name': 'South Carolina', 'code': 'SC', 'electoral_votes': 9, 'campaign_cost': 32.5, 'popular_vote': 2.1, 'groups': ['AA', 'OS']}, {'id': 'SD', 'name': 'South Dakota', 'code': 'SD', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.4, 'groups': ['OG']}, {'id': 'TN', 'name': 'Tennessee', 'code': 'TN', 'electoral_votes': 11, 'campaign_cost': 37.5, 'popular_vote': 2.5, 'groups': ['AA']}, {'id': 'TX', 'name': 'Texas', 'code': 'TX', 'electoral_votes': 38, 'campaign_cost': 200, 'popular_vote': 9, 'groups': ['L', 'OG', 'A', 'MB', 'ED']}, {'id': 'UT', 'name': 'Utah', 'code': 'UT', 'electoral_votes': 6, 'campaign_cost': 20, 'popular_vote': 1.1, 'groups': ['HT', 'TG']}, {'id': 'VT', 'name': 'Vermont', 'code': 'VT', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.3, 'groups': ['TG']}, {'id': 'VA', 'name': 'Virginia', 'code': 'VA', 'electoral_votes': 13, 'campaign_cost': 22.5, 'popular_vote': 4, 'groups': ['AA', 'HT', 'OS', 'SS']}, {'id': 'WA', 'name': 'Washington', 'code': 'WA', 'electoral_votes': 12, 'campaign_cost': 25, 'popular_vote': 3.2, 'groups': ['HT', 'ED']}, {'id': 'WV', 'name': 'West Virginia', 'code': 'WV', 'electoral_votes': 5, 'campaign_cost': 17.5, 'popular_vote': 0.7, 'groups': ['OG']}, {'id': 'WI', 'name': 'Wisconsin', 'code': 'WI', 'electoral_votes': 10, 'campaign_cost': 35, 'popular_vote': 3, 'groups': ['A', 'MB', 'SS']}, {'id': 'WY', 'name': 'Wyoming', 'code': 'WY', 'electoral_votes': 3, 'campaign_cost': 10, 'popular_vote': 0.3, 'groups': ['OG']}] |
#!/usr/bin/python
# function
def my_function():
print("Hello world!")
# call function
def call_function():
print("Hello world!")
call_function()
# output:
# Hello world!
# parameters
def pa_function(param):
print("Hello", param)
pa_function("Emily")
pa_function("John")
# output:
# Hello Emily
# Hello John
# default parameters
def de_function(name = "Cat"):
print("Hello" + name)
de_function()
de_function("Dog")
# output:
# Hello Cat
# Hello Dog
# return value
def ret_function(x):
return x * 2
print(ret_function(5))
print(ret_function(6))
print(ret_function(2))
# output:
# 10
# 12
# 4
# recursion
def rec_function(x):
if x > 0:
result = x + rec_function(x - 1)
print(result)
else:
result = 0
return result
rec_function(5)
# output:
# 1
# 3
# 6
# 10
# 15
# passing a list as a parameter
numbers = ["one", "two", "three"]
def pas_function(x):
for x in numbers:
print("This is number", x)
pas_function(numbers)
# output:
# This is number one
# This is number two
# This is number three | def my_function():
print('Hello world!')
def call_function():
print('Hello world!')
call_function()
def pa_function(param):
print('Hello', param)
pa_function('Emily')
pa_function('John')
def de_function(name='Cat'):
print('Hello' + name)
de_function()
de_function('Dog')
def ret_function(x):
return x * 2
print(ret_function(5))
print(ret_function(6))
print(ret_function(2))
def rec_function(x):
if x > 0:
result = x + rec_function(x - 1)
print(result)
else:
result = 0
return result
rec_function(5)
numbers = ['one', 'two', 'three']
def pas_function(x):
for x in numbers:
print('This is number', x)
pas_function(numbers) |
words=['Wednesday',
'a lot',
'absence',
'accept',
'acceptable',
'accessible',
'accidentally',
'accommodate',
'accompanied',
'accomplish',
'accumulate',
'accuracy',
'achievement',
'acknowledgment',
'acquaintance',
'acquire',
'acquitted',
'across',
'actually',
'address',
'admission',
'adolescent',
'advice',
'advise',
'advised',
'affected',
'affectionate',
'aggravate',
'aggressive',
'alcohol',
'all right',
'allotted',
'allusion',
'always',
'amateur',
'annual',
'argument',
'arrangement',
'beginning',
'believe',
'business',
'capital',
'capitol',
'coming',
'committee',
'complement',
'compliment',
'decide',
'definite',
'desert',
'dessert',
'divide',
'embarrass',
'exaggerate',
'existence',
'explanation',
'financially',
'forehead',
'foreign',
'forfeit',
'forty',
'forward',
'friend',
'fulfillment',
'gauge',
'generally',
'government',
'governor',
'grammar',
'grammatically',
'grief',
'guaranteed',
'guard',
'guidance',
'happened',
'harass',
'height',
'hero',
'heroes',
'humor',
'hypocrisy',
'hypocrite',
'ignorant',
'illogical',
'imaginary',
'imagine',
'imitate',
'immediately',
'immense',
'incidentally',
'incredible',
'independent',
'indispensable',
'inevitable',
'infinite',
'influential',
'initiative',
'innocence',
'intellectual',
'intelligence',
'intelligent',
'interest',
'interpret',
'interrupt',
'introduce',
'irrelevant',
'irresistible',
'irritable',
'irritated',
"it's",
'its',
'knowledge',
'laboratory',
'legitimate',
'leisure',
'liable',
'library',
'license',
'lightning',
'literature',
'lively',
'loneliness',
'lonely',
'lose',
'lying',
'magazine',
'maintenance',
'maneuver',
'manual',
'manufacture',
'marriage',
'material',
'mathematics',
'meant',
'medicine',
'mere',
'messenger',
'miniature',
'minutes',
'mischievous',
'missile',
'morning',
'mortgage',
'muscles',
'mysterious',
'naturally',
'necessary',
'nickel',
'niece',
'ninety',
'ninth',
'noticeable',
'noticing',
'nuclear',
'nuisance',
'obstacle',
'occasionally',
'occur',
'occurred',
'occurrence',
'omission',
'omitted',
'opinion',
'opponent',
'opportunity',
'opposite',
'optimism',
'organize',
'origin',
'original',
'paid',
'pamphlet',
'parallel',
'particular',
'pastime',
'peculiar',
'performance',
'perhaps',
'permanent',
'permissible',
'personal',
'physical',
'physician',
'piece',
'planned',
'pleasant',
'poison',
'possess',
'possession',
'possible',
'possibly',
'practically',
'prairie',
'precede',
'preferred',
'prejudiced',
'preparation',
'prepare',
'presence',
'prevalent',
'principal',
'principle',
'privilege',
'probably',
'procedure',
'proceed',
'profession',
'professor',
'prominent',
'pronunciation',
'propaganda',
'prophecy',
'prophesy',
'psychology',
'publicly',
'pumpkin',
'purpose',
'pursue',
'quantity',
'quiet',
'quite',
'quizzes',
'realize',
'really',
'receipt',
'receive',
'receiving',
'recognize',
'recommend',
'reference',
'referred',
'referring',
'regular',
'relieve',
'remembrance',
'repetition',
'representative',
'reproduce',
'restaurant',
'rhythm',
'ridiculous',
'roommate',
'sacrifice',
'safety',
'salary',
'schedule',
'secretary',
'seize',
'separate',
'sergeant',
'severely',
'sheriff',
'shining',
'similar',
'simply',
'since',
'sincerely',
'skiing',
'sophomore',
'specimen',
'speech',
'sponsor',
'strength',
'strict',
'stubbornness',
'studying',
'subtlety',
'succeed',
'successful',
'succession',
'sufficient',
'suicide',
'summary',
'superintendent',
'supersede',
'suppose',
'suppress',
'surely',
'surprise',
'surround',
'susceptible',
'suspicious',
'swimming',
'symbol',
'sympathize',
'technique',
'temperament',
'temperature',
'tendency',
'than',
'their',
'themselves',
'then',
'there',
'therefore',
"they're",
'thorough',
'thought',
'through',
'till',
'to',
'tobacco',
'together',
'tomorrow',
'too',
'tournament',
'traffic',
'trafficked',
'tragedy',
'transferred',
'tremendous',
'tried',
'tries',
'trouble',
'truly',
'twelfth',
'two',
'tyranny',
'unanimous',
'unconscious',
'undoubtedly',
'unmistakably',
'unnecessary',
'until',
'usage',
'useful',
'useless',
'using',
'usually',
'vacuum',
'valuable',
'varies',
'various',
'vegetable',
'vengeance',
'venomous',
'vice',
'view',
'vigilance',
'villain',
'violence',
'visible',
'vitamins',
'waive',
'warrant',
'warring',
'weather',
'weird',
'where',
'wherever',
'whether',
'whichever',
"who's",
'wholly',
'whose',
'wield',
'wintry',
'withdrawal',
'woman',
'women',
'worshiped',
'wreck',
'write',
'writing',
'written',
'yield'] | words = ['Wednesday', 'a lot', 'absence', 'accept', 'acceptable', 'accessible', 'accidentally', 'accommodate', 'accompanied', 'accomplish', 'accumulate', 'accuracy', 'achievement', 'acknowledgment', 'acquaintance', 'acquire', 'acquitted', 'across', 'actually', 'address', 'admission', 'adolescent', 'advice', 'advise', 'advised', 'affected', 'affectionate', 'aggravate', 'aggressive', 'alcohol', 'all right', 'allotted', 'allusion', 'always', 'amateur', 'annual', 'argument', 'arrangement', 'beginning', 'believe', 'business', 'capital', 'capitol', 'coming', 'committee', 'complement', 'compliment', 'decide', 'definite', 'desert', 'dessert', 'divide', 'embarrass', 'exaggerate', 'existence', 'explanation', 'financially', 'forehead', 'foreign', 'forfeit', 'forty', 'forward', 'friend', 'fulfillment', 'gauge', 'generally', 'government', 'governor', 'grammar', 'grammatically', 'grief', 'guaranteed', 'guard', 'guidance', 'happened', 'harass', 'height', 'hero', 'heroes', 'humor', 'hypocrisy', 'hypocrite', 'ignorant', 'illogical', 'imaginary', 'imagine', 'imitate', 'immediately', 'immense', 'incidentally', 'incredible', 'independent', 'indispensable', 'inevitable', 'infinite', 'influential', 'initiative', 'innocence', 'intellectual', 'intelligence', 'intelligent', 'interest', 'interpret', 'interrupt', 'introduce', 'irrelevant', 'irresistible', 'irritable', 'irritated', "it's", 'its', 'knowledge', 'laboratory', 'legitimate', 'leisure', 'liable', 'library', 'license', 'lightning', 'literature', 'lively', 'loneliness', 'lonely', 'lose', 'lying', 'magazine', 'maintenance', 'maneuver', 'manual', 'manufacture', 'marriage', 'material', 'mathematics', 'meant', 'medicine', 'mere', 'messenger', 'miniature', 'minutes', 'mischievous', 'missile', 'morning', 'mortgage', 'muscles', 'mysterious', 'naturally', 'necessary', 'nickel', 'niece', 'ninety', 'ninth', 'noticeable', 'noticing', 'nuclear', 'nuisance', 'obstacle', 'occasionally', 'occur', 'occurred', 'occurrence', 'omission', 'omitted', 'opinion', 'opponent', 'opportunity', 'opposite', 'optimism', 'organize', 'origin', 'original', 'paid', 'pamphlet', 'parallel', 'particular', 'pastime', 'peculiar', 'performance', 'perhaps', 'permanent', 'permissible', 'personal', 'physical', 'physician', 'piece', 'planned', 'pleasant', 'poison', 'possess', 'possession', 'possible', 'possibly', 'practically', 'prairie', 'precede', 'preferred', 'prejudiced', 'preparation', 'prepare', 'presence', 'prevalent', 'principal', 'principle', 'privilege', 'probably', 'procedure', 'proceed', 'profession', 'professor', 'prominent', 'pronunciation', 'propaganda', 'prophecy', 'prophesy', 'psychology', 'publicly', 'pumpkin', 'purpose', 'pursue', 'quantity', 'quiet', 'quite', 'quizzes', 'realize', 'really', 'receipt', 'receive', 'receiving', 'recognize', 'recommend', 'reference', 'referred', 'referring', 'regular', 'relieve', 'remembrance', 'repetition', 'representative', 'reproduce', 'restaurant', 'rhythm', 'ridiculous', 'roommate', 'sacrifice', 'safety', 'salary', 'schedule', 'secretary', 'seize', 'separate', 'sergeant', 'severely', 'sheriff', 'shining', 'similar', 'simply', 'since', 'sincerely', 'skiing', 'sophomore', 'specimen', 'speech', 'sponsor', 'strength', 'strict', 'stubbornness', 'studying', 'subtlety', 'succeed', 'successful', 'succession', 'sufficient', 'suicide', 'summary', 'superintendent', 'supersede', 'suppose', 'suppress', 'surely', 'surprise', 'surround', 'susceptible', 'suspicious', 'swimming', 'symbol', 'sympathize', 'technique', 'temperament', 'temperature', 'tendency', 'than', 'their', 'themselves', 'then', 'there', 'therefore', "they're", 'thorough', 'thought', 'through', 'till', 'to', 'tobacco', 'together', 'tomorrow', 'too', 'tournament', 'traffic', 'trafficked', 'tragedy', 'transferred', 'tremendous', 'tried', 'tries', 'trouble', 'truly', 'twelfth', 'two', 'tyranny', 'unanimous', 'unconscious', 'undoubtedly', 'unmistakably', 'unnecessary', 'until', 'usage', 'useful', 'useless', 'using', 'usually', 'vacuum', 'valuable', 'varies', 'various', 'vegetable', 'vengeance', 'venomous', 'vice', 'view', 'vigilance', 'villain', 'violence', 'visible', 'vitamins', 'waive', 'warrant', 'warring', 'weather', 'weird', 'where', 'wherever', 'whether', 'whichever', "who's", 'wholly', 'whose', 'wield', 'wintry', 'withdrawal', 'woman', 'women', 'worshiped', 'wreck', 'write', 'writing', 'written', 'yield'] |
#-*- coding:utf-8
class Restaurant():
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print(self.restaurant_name.title() + "'s cuisine type is " + self.cuisine_type + ".")
def open_restaurant(self):
print(self.restaurant_name.title() + " opens.") | class Restaurant:
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print(self.restaurant_name.title() + "'s cuisine type is " + self.cuisine_type + '.')
def open_restaurant(self):
print(self.restaurant_name.title() + ' opens.') |
# -*- coding: utf-8 -*-
# @Time : 2021/1/3
# @Author : handsomezhou
#start:setting
table_setting="setting"
INDEX_ID=int(0)
INDEX_KEY=int(1)
INDEX_VALUE=int(2)
INDEX_CREATE_TIME=int(3)
INDEX_UPDATE_TIME=int(4)
id = "id"
key = "key"
value = "value"
create_time = "create_time"
update_time = "update_time"
CREATE_TABLE_SETTING = "CREATE TABLE IF NOT EXISTS "+table_setting+"("+id+" INTEGER PRIMARY KEY,"+key+" TEXT NOT NULL,"+value+" TEXT NOT NULL,"+create_time+" TEXT NOT NULL,"+update_time+" TEXT NOT NULL);"
INSERT_TABLE_SETTING_ITEM="INSERT INTO "+table_setting+" ("+id+","+key+","+value+","+create_time+","+update_time+") VALUES (?, ?, ?, ?, ? );"
UPDATE_TABLE_SETTING_ITEM = "UPDATE "+table_setting+" SET "+value+" = ?,"+update_time+" = ? WHERE "+key+" = ?;"
FIND_TABLE_SETTING_ITEM_BY_KEY = "SELECT * FROM " +table_setting + " WHERE "+key+" = ? ;"
FIND_TABLE_SETTING_ITEM_ID_KEY_VALUE_CREATE_TIME_UPDATE_TIME_BY_KEY = "SELECT " + id + "," + key + "," + value + "," + create_time + "," + update_time + " FROM " + table_setting + " WHERE " + key + " = ? ;"
FIND_TABLE_SETTING_ITEM_ID_KEY_VALUE_CREATE_TIME_UPDATE_TIME = "SELECT " + id + "," + key + "," + value + "," + create_time + "," + update_time + " FROM " + table_setting + " ;"
FIND_TABLE_SETTING_VALUE_BY_KEY = "SELECT "+value+" FROM " +table_setting + " WHERE "+key+" = ? ;"
#end:setting
| table_setting = 'setting'
index_id = int(0)
index_key = int(1)
index_value = int(2)
index_create_time = int(3)
index_update_time = int(4)
id = 'id'
key = 'key'
value = 'value'
create_time = 'create_time'
update_time = 'update_time'
create_table_setting = 'CREATE TABLE IF NOT EXISTS ' + table_setting + '(' + id + ' INTEGER PRIMARY KEY,' + key + ' TEXT NOT NULL,' + value + ' TEXT NOT NULL,' + create_time + ' TEXT NOT NULL,' + update_time + ' TEXT NOT NULL);'
insert_table_setting_item = 'INSERT INTO ' + table_setting + ' (' + id + ',' + key + ',' + value + ',' + create_time + ',' + update_time + ') VALUES (?, ?, ?, ?, ? );'
update_table_setting_item = 'UPDATE ' + table_setting + ' SET ' + value + ' = ?,' + update_time + ' = ? WHERE ' + key + ' = ?;'
find_table_setting_item_by_key = 'SELECT * FROM ' + table_setting + ' WHERE ' + key + ' = ? ;'
find_table_setting_item_id_key_value_create_time_update_time_by_key = 'SELECT ' + id + ',' + key + ',' + value + ',' + create_time + ',' + update_time + ' FROM ' + table_setting + ' WHERE ' + key + ' = ? ;'
find_table_setting_item_id_key_value_create_time_update_time = 'SELECT ' + id + ',' + key + ',' + value + ',' + create_time + ',' + update_time + ' FROM ' + table_setting + ' ;'
find_table_setting_value_by_key = 'SELECT ' + value + ' FROM ' + table_setting + ' WHERE ' + key + ' = ? ;' |
def convert(num):
num = int(num)
new = bin(num)[2:]
new = ((32 - len(new)) * '0') + new
return new
def maping_one(num, indexs):
for i in range(len(num)):
if (i not in indexs):
indexs[i] = [0, []]
if (num[i] == '1'):
indexs[i][0] += 1
indexs[i][1].append(num)
return indexs
def mapping_all(nums, indexs):
for num in nums:
maping_one(num, indexs)
return indexs
def find_it(nums, k, start):
indexs = dict()
indexs = mapping_all(nums, indexs)
for i in range(start, 32):
if (indexs[i][0] == k):
return AND(indexs[i][1])
elif(indexs[i][0] > k):
return find_it(indexs[i][1], k, i + 1)
if (indexs[i][0] < k and i == 31):
return AND(nums)
if (len(nums) > k or start >= 31):
return AND(nums[:k])
return '0'
def AND(nums):
result = '0'
if (len(nums) > 0):
result = nums[0]
for i in range(1, len(nums)):
aux = ''
for j in range(len(nums[i])):
if (nums[i][j] == result[j] and nums[i][j] == '1'):
aux += '1'
else:
aux += '0'
result = aux
return result
tests = int(input())
for i in range(tests):
n, k = map(int, input().split())
conj = list(map(convert, input().split()))
bin_set = dict()
indexs = dict()
if (n < k):
print(0)
else:
sume = find_it(conj, k, 0)
print(int(sume, 2))
| def convert(num):
num = int(num)
new = bin(num)[2:]
new = (32 - len(new)) * '0' + new
return new
def maping_one(num, indexs):
for i in range(len(num)):
if i not in indexs:
indexs[i] = [0, []]
if num[i] == '1':
indexs[i][0] += 1
indexs[i][1].append(num)
return indexs
def mapping_all(nums, indexs):
for num in nums:
maping_one(num, indexs)
return indexs
def find_it(nums, k, start):
indexs = dict()
indexs = mapping_all(nums, indexs)
for i in range(start, 32):
if indexs[i][0] == k:
return and(indexs[i][1])
elif indexs[i][0] > k:
return find_it(indexs[i][1], k, i + 1)
if indexs[i][0] < k and i == 31:
return and(nums)
if len(nums) > k or start >= 31:
return and(nums[:k])
return '0'
def and(nums):
result = '0'
if len(nums) > 0:
result = nums[0]
for i in range(1, len(nums)):
aux = ''
for j in range(len(nums[i])):
if nums[i][j] == result[j] and nums[i][j] == '1':
aux += '1'
else:
aux += '0'
result = aux
return result
tests = int(input())
for i in range(tests):
(n, k) = map(int, input().split())
conj = list(map(convert, input().split()))
bin_set = dict()
indexs = dict()
if n < k:
print(0)
else:
sume = find_it(conj, k, 0)
print(int(sume, 2)) |
def add_up(a, b):
return a + b
def test_add_up_succeed():
assert add_up(1, 2) == 3
def test_add_up_fail():
assert add_up(1, 2) == 4
def ignore_me():
assert "I will be" == "completely ignored"
| def add_up(a, b):
return a + b
def test_add_up_succeed():
assert add_up(1, 2) == 3
def test_add_up_fail():
assert add_up(1, 2) == 4
def ignore_me():
assert 'I will be' == 'completely ignored' |
destination = input()
while destination != "End":
needed_money = float(input())
saved_money = 0
while saved_money < needed_money:
saved_money += float(input())
print(f"Going to {destination}!")
destination = input()
| destination = input()
while destination != 'End':
needed_money = float(input())
saved_money = 0
while saved_money < needed_money:
saved_money += float(input())
print(f'Going to {destination}!')
destination = input() |
while True:
try:
# get an integer for age
age = int(input('What is your age? '))
10/age
print('You are',age, 'years old.')
except ValueError as err:
#if anything accept an int is enter print following error
print(f'''
please enter a number for your age.
Error 10001
{err}
''')
#keep going
continue
except ArithmeticError as err:
print(f'''
Math Error
Error 10002
{err}
''')
#exit out of the try
break
else:
print('Thank you')
break
#runs always at the end of everything no matter what
finally:
print('Everything else completed')
print('Can you hear me?')
| while True:
try:
age = int(input('What is your age? '))
10 / age
print('You are', age, 'years old.')
except ValueError as err:
print(f'\n please enter a number for your age.\n Error 10001\n {err}\n ')
continue
except ArithmeticError as err:
print(f'\n Math Error\n Error 10002\n {err}\n ')
break
else:
print('Thank you')
break
finally:
print('Everything else completed')
print('Can you hear me?') |
# Return the remainder
def remainder(x: int, y: int) -> int:
return x % y
# remainder_lambda = lambda x, y: x % y
if __name__ == "__main__":
print(remainder(1, 3))
| def remainder(x: int, y: int) -> int:
return x % y
if __name__ == '__main__':
print(remainder(1, 3)) |
nombreFichero = "fases.txt";
print("Ingresa los datos solicitados");
f1 = input("Ingresa la primera frase: ");
f2 = input("Ingresa la segunda frase: ");
f3 = input("Ingresa la tercera frase: ");
fichero = open(nombreFichero, "w");
fichero.write("%s\n" % f1);
fichero.write("%s\n" % f2);
fichero.write("%s\n" % f3);
fichero.close();
print("Datos guardados correctamente");
fichero = open(nombreFichero, "a");
fichero.write("Nueva frase agregada");
fichero.close();
fichero = open(nombreFichero, "r");
result = fichero.readlines();
for x in result:
print(x);
fichero.close();
# otra forma
nombreFichero = "fases2.txt";
lineas = [];
for x in range(0,3):
frase = input("Ingresa la fresa numero %d: " % int(x+1));
lineas.append(frase+"\n");
fichero_dos = open(nombreFichero, "w");
fichero_dos.writelines(lineas);
fichero_dos.close();
fichero_dos = open(nombreFichero, "a");
fichero_dos.write(input("Ingresa una nueva frase: ") + "\n");
fichero_dos.close();
fichero_dos = open(nombreFichero, "r");
result = fichero_dos.readlines();
fichero_dos.close();
for x in range(0, len(result)):
print(str(x+1),":", result[x].rstrip());
print("Datos guardados correctamente"); | nombre_fichero = 'fases.txt'
print('Ingresa los datos solicitados')
f1 = input('Ingresa la primera frase: ')
f2 = input('Ingresa la segunda frase: ')
f3 = input('Ingresa la tercera frase: ')
fichero = open(nombreFichero, 'w')
fichero.write('%s\n' % f1)
fichero.write('%s\n' % f2)
fichero.write('%s\n' % f3)
fichero.close()
print('Datos guardados correctamente')
fichero = open(nombreFichero, 'a')
fichero.write('Nueva frase agregada')
fichero.close()
fichero = open(nombreFichero, 'r')
result = fichero.readlines()
for x in result:
print(x)
fichero.close()
nombre_fichero = 'fases2.txt'
lineas = []
for x in range(0, 3):
frase = input('Ingresa la fresa numero %d: ' % int(x + 1))
lineas.append(frase + '\n')
fichero_dos = open(nombreFichero, 'w')
fichero_dos.writelines(lineas)
fichero_dos.close()
fichero_dos = open(nombreFichero, 'a')
fichero_dos.write(input('Ingresa una nueva frase: ') + '\n')
fichero_dos.close()
fichero_dos = open(nombreFichero, 'r')
result = fichero_dos.readlines()
fichero_dos.close()
for x in range(0, len(result)):
print(str(x + 1), ':', result[x].rstrip())
print('Datos guardados correctamente') |
expected_output = {
"rollback_timer_reason": "no ISSU operation is in progress",
"rollback_timer_state": "inactive",
}
| expected_output = {'rollback_timer_reason': 'no ISSU operation is in progress', 'rollback_timer_state': 'inactive'} |
class VerificateInterface:
def __init__(self, inputfile, outputfile, correctoutput):
self.inputfile = inputfile
self.outputfile = outputfile
self.correctoutput = correctoutput
self._status = None
self._message = None
def verificate(self, isolator):
raise NotImplementedError
def get_status(self):
return self._status
def get_message(self):
return self._message | class Verificateinterface:
def __init__(self, inputfile, outputfile, correctoutput):
self.inputfile = inputfile
self.outputfile = outputfile
self.correctoutput = correctoutput
self._status = None
self._message = None
def verificate(self, isolator):
raise NotImplementedError
def get_status(self):
return self._status
def get_message(self):
return self._message |
haarcascade_frontalface_Path = "./faceApi/models/OpenCV/haarcascade_frontalface_default.xml" # for cascade method
# 8 bit Quantized version using Tensorflow ( 2.7 MB )
TFmodelFile = "./faceApi/models/OpenCV/tensorflow/TF_faceDetectorModel_uint8.pb"
TFconfigFile = "./faceApi/models/OpenCV/tensorflow/TF_faceDetectorConfig.pbtxt"
# FP16 version of the original caffe implementation ( 5.4 MB )
CAFFEmodelFile = "./faceApi/models/OpenCV/caffe/FaceDetect_Res10_300x300_ssd_iter_140000_fp16.caffemodel"
CAFFEconfigFile = "./faceApi/models/OpenCV/caffe/FaceDetect_Deploy.prototxt"
dlib_mmod_model_Path = "./faceApi/models/Dlib/mmod_human_face_detector.dat" # for Dlib MMOD
dlib_5_face_landmarks_path = './faceApi/models/Dlib/shape_predictor_5_face_landmarks.dat'
ultra_light_640_onnx_model_path = './faceApi/models/UltraLight/ultra_light_640.onnx'
ultra_light_320_onnx_model_path = './faceApi/models/UltraLight/ultra_light_320.onnx'
yoloV3FacePretrainedWeightsPath = './faceApi/models/Yolo/yolo_weights/yolov3-wider_16000.weights'
yoloV3FaceConfigFilePath = './faceApi/models/Yolo/yolo_models_config/yolov3-face.cfg'
yoloV3FaceClassesFilePath = './faceApi/models/Yolo/yolo_labels/face_classes.txt'
known_faces_encodes_npy_file_path = './faceApi/FACEDB/known_faces_encodes.npy'
known_faces_ids_npy_file_path= './faceApi/FACEDB/known_faces_ids.npy'
emotion_model_path = './faceApi/models/emotion_models/emotions_model.h5'
gender_model_path = './faceApi/models/gender_models/gender_model.h5'
faceTageModelPath = './faceApi/models/sklearn/face_model.pkl'
| haarcascade_frontalface__path = './faceApi/models/OpenCV/haarcascade_frontalface_default.xml'
t_fmodel_file = './faceApi/models/OpenCV/tensorflow/TF_faceDetectorModel_uint8.pb'
t_fconfig_file = './faceApi/models/OpenCV/tensorflow/TF_faceDetectorConfig.pbtxt'
caff_emodel_file = './faceApi/models/OpenCV/caffe/FaceDetect_Res10_300x300_ssd_iter_140000_fp16.caffemodel'
caff_econfig_file = './faceApi/models/OpenCV/caffe/FaceDetect_Deploy.prototxt'
dlib_mmod_model__path = './faceApi/models/Dlib/mmod_human_face_detector.dat'
dlib_5_face_landmarks_path = './faceApi/models/Dlib/shape_predictor_5_face_landmarks.dat'
ultra_light_640_onnx_model_path = './faceApi/models/UltraLight/ultra_light_640.onnx'
ultra_light_320_onnx_model_path = './faceApi/models/UltraLight/ultra_light_320.onnx'
yolo_v3_face_pretrained_weights_path = './faceApi/models/Yolo/yolo_weights/yolov3-wider_16000.weights'
yolo_v3_face_config_file_path = './faceApi/models/Yolo/yolo_models_config/yolov3-face.cfg'
yolo_v3_face_classes_file_path = './faceApi/models/Yolo/yolo_labels/face_classes.txt'
known_faces_encodes_npy_file_path = './faceApi/FACEDB/known_faces_encodes.npy'
known_faces_ids_npy_file_path = './faceApi/FACEDB/known_faces_ids.npy'
emotion_model_path = './faceApi/models/emotion_models/emotions_model.h5'
gender_model_path = './faceApi/models/gender_models/gender_model.h5'
face_tage_model_path = './faceApi/models/sklearn/face_model.pkl' |
# Series data
tune_series = ["open", "high", "low", "close", "volume"]
# Parameters to tune
tune_params = [
"acceleration",
"accelerationlong",
"accelerationshort",
"atr_length",
"atr_period",
"average_lenght",
"average_length",
"bb_length",
"channel_lenght",
"channel_length",
"chikou_period",
"d",
"ddof",
"ema_fast",
"ema_slow",
"er",
"fast",
"fast_period",
"fastd_period",
"fastk_period",
"fastperiod",
"high_length",
"jaw",
"k",
"k_period",
"kc_length",
"kijun",
"kijun_period",
"length",
"lensig",
"lips",
"long",
"long_period",
"lookback",
"low_length",
"lower_length",
"lower_period",
"ma_length",
"max_lookback",
"maxperiod",
"medium",
"min_lookback",
"minperiod",
"mom_length",
"mom_smooth",
"p",
"period",
"period_fast",
"period_slow",
"q",
"r1",
"r2",
"r3",
"r4",
"roc1",
"roc2",
"roc3",
"roc4",
"rsi_length",
"rsi_period",
"run_length",
"rvi_length",
"senkou",
"senkou_period",
"short",
"short_period",
"signal",
"signalperiod",
"slow",
"slow_period",
"slowd_period",
"slowk_period",
"slowperiod",
"sma1",
"sma2",
"sma3",
"sma4",
"smooth",
"smooth_k",
"stoch_period",
"swma_length",
"tclength",
"teeth",
"tenkan",
"tenkan_period",
"timeperiod",
"timeperiod1",
"timeperiod2",
"timeperiod3",
"upper_length",
"upper_period",
"width",
"wma_period",
]
talib_indicators = [
"tta.BBANDS",
"tta.DEMA",
"tta.EMA",
"tta.HT_TRENDLINE",
"tta.KAMA",
"tta.MA",
"tta.MIDPOINT",
"tta.MIDPRICE",
"tta.SAR",
"tta.SAREXT",
"tta.SMA",
"tta.T3",
"tta.TEMA",
"tta.TRIMA",
"tta.WMA",
"tta.ADX",
"tta.ADXR",
"tta.APO",
"tta.AROON",
"tta.AROONOSC",
"tta.BOP",
"tta.CCI",
"tta.CMO",
"tta.DX",
"tta.MACD",
"tta.MACDEXT",
"tta.MACDFIX",
"tta.MFI",
"tta.MINUS_DI",
"tta.MINUS_DM",
"tta.MOM",
"tta.PLUS_DI",
"tta.PLUS_DM",
"tta.PPO",
"tta.ROC",
"tta.ROCP",
"tta.ROCR",
"tta.ROCR100",
"tta.RSI",
"tta.STOCH",
"tta.STOCHF",
"tta.STOCHRSI",
"tta.TRIX",
"tta.ULTOSC",
"tta.WILLR",
"tta.AD",
"tta.ADOSC",
"tta.OBV",
"tta.HT_DCPERIOD",
"tta.HT_DCPHASE",
"tta.HT_PHASOR",
"tta.HT_SINE",
"tta.HT_TRENDMODE",
"tta.AVGPRICE",
"tta.MEDPRICE",
"tta.TYPPRICE",
"tta.WCLPRICE",
"tta.ATR",
"tta.NATR",
"tta.TRANGE",
"tta.CDL2CROWS",
"tta.CDL3BLACKCROWS",
"tta.CDL3INSIDE",
"tta.CDL3LINESTRIKE",
"tta.CDL3OUTSIDE",
"tta.CDL3STARSINSOUTH",
"tta.CDL3WHITESOLDIERS",
"tta.CDLABANDONEDBABY",
"tta.CDLADVANCEBLOCK",
"tta.CDLBELTHOLD",
"tta.CDLBREAKAWAY",
"tta.CDLCLOSINGMARUBOZU",
"tta.CDLCONCEALBABYSWALL",
"tta.CDLCOUNTERATTACK",
"tta.CDLDARKCLOUDCOVER",
"tta.CDLDOJI",
"tta.CDLDOJISTAR",
"tta.CDLDRAGONFLYDOJI",
"tta.CDLENGULFING",
"tta.CDLEVENINGDOJISTAR",
"tta.CDLEVENINGSTAR",
"tta.CDLGAPSIDESIDEWHITE",
"tta.CDLGRAVESTONEDOJI",
"tta.CDLHAMMER",
"tta.CDLHANGINGMAN",
"tta.CDLHARAMI",
"tta.CDLHARAMICROSS",
"tta.CDLHIGHWAVE",
"tta.CDLHIKKAKE",
"tta.CDLHIKKAKEMOD",
"tta.CDLHOMINGPIGEON",
"tta.CDLIDENTICAL3CROWS",
"tta.CDLINNECK",
"tta.CDLINVERTEDHAMMER",
"tta.CDLKICKING",
"tta.CDLKICKINGBYLENGTH",
"tta.CDLLADDERBOTTOM",
"tta.CDLLONGLEGGEDDOJI",
"tta.CDLLONGLINE",
"tta.CDLMARUBOZU",
"tta.CDLMATCHINGLOW",
"tta.CDLMATHOLD",
"tta.CDLMORNINGDOJISTAR",
"tta.CDLMORNINGSTAR",
"tta.CDLONNECK",
"tta.CDLPIERCING",
"tta.CDLRICKSHAWMAN",
"tta.CDLRISEFALL3METHODS",
"tta.CDLSEPARATINGLINES",
"tta.CDLSHOOTINGSTAR",
"tta.CDLSHORTLINE",
"tta.CDLSPINNINGTOP",
"tta.CDLSTALLEDPATTERN",
"tta.CDLSTICKSANDWICH",
"tta.CDLTAKURI",
"tta.CDLTASUKIGAP",
"tta.CDLTHRUSTING",
"tta.CDLTRISTAR",
"tta.CDLUNIQUE3RIVER",
"tta.CDLUPSIDEGAP2CROWS",
"tta.CDLXSIDEGAP3METHODS",
"tta.LINEARREG",
"tta.LINEARREG_ANGLE",
"tta.LINEARREG_INTERCEPT",
"tta.LINEARREG_SLOPE",
"tta.STDDEV",
"tta.TSF",
"tta.VAR",
]
pandas_ta_indicators = [
"pta.ao",
"pta.apo",
"pta.bias",
"pta.bop",
"pta.brar",
"pta.cci",
"pta.cfo",
"pta.cg",
"pta.cmo",
"pta.coppock",
"pta.cti",
"pta.dm",
"pta.er",
"pta.eri",
"pta.fisher",
"pta.inertia",
"pta.kdj",
"pta.kst",
"pta.macd",
"pta.mom",
"pta.pgo",
"pta.ppo",
"pta.psl",
"pta.qqe",
"pta.roc",
"pta.rsi",
"pta.rsx",
"pta.rvgi",
"pta.stc",
"pta.slope",
"pta.smi",
"pta.squeeze",
"pta.squeeze_pro",
"pta.stoch",
# "pta.stochf", # remove when pandas-ta development is merged
"pta.stochrsi",
"pta.td_seq",
"pta.trix",
"pta.tsi",
"pta.uo",
"pta.willr",
# "pta.alligator", # remove when pandas-ta development is merged
"pta.alma",
"pta.dema",
"pta.ema",
"pta.fwma",
"pta.hilo",
"pta.hl2",
"pta.hlc3",
# "pta.hma", # remove when pandas-ta development is merged
"pta.hwma",
"pta.ichimoku",
"pta.jma",
"pta.kama",
"pta.linreg",
# "pta.mama", # remove when pandas-ta development is merged
"pta.mcgd",
"pta.midpoint",
"pta.midprice",
"pta.ohlc4",
"pta.pwma",
"pta.rma",
"pta.sinwma",
"pta.sma",
# "pta.smma", # remove when pandas-ta development is merged
"pta.ssf",
# "pta.ssf3", # remove when pandas-ta development is merged
"pta.supertrend",
"pta.swma",
"pta.t3",
"pta.tema",
"pta.trima",
"pta.vidya",
"pta.wcp",
"pta.wma",
"pta.zlma",
"pta.entropy",
"pta.kurtosis",
"pta.mad",
"pta.median",
"pta.quantile",
"pta.skew",
"pta.stdev",
# "pta.tos_stdevall", # remove when pandas-ta development is merged
"pta.variance",
"pta.zscore",
"pta.adx",
"pta.amat",
"pta.aroon",
"pta.chop",
"pta.cksp",
"pta.decay",
"pta.decreasing",
"pta.dpo",
"pta.increasing",
"pta.psar",
"pta.qstick",
# "pta.trendflex", # remove when pandas-ta development is merged
"pta.ttm_trend",
"pta.vhf",
"pta.vortex",
"pta.aberration",
"pta.accbands",
"pta.atr",
# "pta.atrts", # remove when pandas-ta development is merged
"pta.bbands",
"pta.donchian",
"pta.hwc",
"pta.kc",
"pta.massi",
"pta.natr",
"pta.pdist",
"pta.rvi",
"pta.thermo",
"pta.true_range",
"pta.ui",
"pta.ad",
"pta.adosc",
"pta.aobv",
"pta.cmf",
"pta.efi",
"pta.eom",
"pta.kvo",
"pta.mfi",
"pta.nvi",
"pta.obv",
"pta.pvi",
"pta.pvo",
"pta.pvol",
# "pta.pvr", # needs **kwargs added to the function in pandas-ta
"pta.pvt",
"pta.vp",
"pta.vwap",
# "pta.vwma", # remove when pandas-ta development is merged
# "pta.wb_tsv", # remove when pandas-ta development is merged
]
finta_indicatrs = [
"fta.SMA",
"fta.SMM",
"fta.SSMA",
"fta.EMA",
"fta.DEMA",
"fta.TEMA",
"fta.TRIMA",
"fta.TRIX",
"fta.VAMA",
"fta.ER",
"fta.KAMA",
"fta.ZLEMA",
"fta.WMA",
"fta.HMA",
"fta.EVWMA",
"fta.VWAP",
"fta.SMMA",
# 'fta.FRAMA', # Requires even parameters (not implemented)
"fta.MACD",
"fta.PPO",
"fta.VW_MACD",
"fta.EV_MACD",
"fta.MOM",
"fta.ROC",
"fta.RSI",
"fta.IFT_RSI",
"fta.TR",
"fta.ATR",
"fta.SAR",
"fta.BBANDS",
"fta.BBWIDTH",
"fta.MOBO",
"fta.PERCENT_B",
"fta.KC",
"fta.DO",
"fta.DMI",
"fta.ADX",
"fta.PIVOT",
"fta.PIVOT_FIB",
"fta.STOCH",
"fta.STOCHD",
"fta.STOCHRSI",
"fta.WILLIAMS",
"fta.UO",
"fta.AO",
"fta.MI",
"fta.VORTEX",
"fta.KST",
"fta.TSI",
"fta.TP",
"fta.ADL",
"fta.CHAIKIN",
"fta.MFI",
"fta.OBV",
"fta.WOBV",
"fta.VZO",
"fta.PZO",
"fta.EFI",
"fta.CFI",
"fta.EBBP",
"fta.EMV",
"fta.CCI",
"fta.COPP",
"fta.BASP",
"fta.BASPN",
"fta.CMO",
"fta.CHANDELIER",
"fta.QSTICK",
# 'fta.TMF', # Not implemented
"fta.WTO",
"fta.FISH",
"fta.ICHIMOKU",
"fta.APZ",
"fta.SQZMI",
"fta.VPT",
"fta.FVE",
"fta.VFI",
"fta.MSD",
"fta.STC",
# 'fta.WAVEPM' # No attribute error
]
| tune_series = ['open', 'high', 'low', 'close', 'volume']
tune_params = ['acceleration', 'accelerationlong', 'accelerationshort', 'atr_length', 'atr_period', 'average_lenght', 'average_length', 'bb_length', 'channel_lenght', 'channel_length', 'chikou_period', 'd', 'ddof', 'ema_fast', 'ema_slow', 'er', 'fast', 'fast_period', 'fastd_period', 'fastk_period', 'fastperiod', 'high_length', 'jaw', 'k', 'k_period', 'kc_length', 'kijun', 'kijun_period', 'length', 'lensig', 'lips', 'long', 'long_period', 'lookback', 'low_length', 'lower_length', 'lower_period', 'ma_length', 'max_lookback', 'maxperiod', 'medium', 'min_lookback', 'minperiod', 'mom_length', 'mom_smooth', 'p', 'period', 'period_fast', 'period_slow', 'q', 'r1', 'r2', 'r3', 'r4', 'roc1', 'roc2', 'roc3', 'roc4', 'rsi_length', 'rsi_period', 'run_length', 'rvi_length', 'senkou', 'senkou_period', 'short', 'short_period', 'signal', 'signalperiod', 'slow', 'slow_period', 'slowd_period', 'slowk_period', 'slowperiod', 'sma1', 'sma2', 'sma3', 'sma4', 'smooth', 'smooth_k', 'stoch_period', 'swma_length', 'tclength', 'teeth', 'tenkan', 'tenkan_period', 'timeperiod', 'timeperiod1', 'timeperiod2', 'timeperiod3', 'upper_length', 'upper_period', 'width', 'wma_period']
talib_indicators = ['tta.BBANDS', 'tta.DEMA', 'tta.EMA', 'tta.HT_TRENDLINE', 'tta.KAMA', 'tta.MA', 'tta.MIDPOINT', 'tta.MIDPRICE', 'tta.SAR', 'tta.SAREXT', 'tta.SMA', 'tta.T3', 'tta.TEMA', 'tta.TRIMA', 'tta.WMA', 'tta.ADX', 'tta.ADXR', 'tta.APO', 'tta.AROON', 'tta.AROONOSC', 'tta.BOP', 'tta.CCI', 'tta.CMO', 'tta.DX', 'tta.MACD', 'tta.MACDEXT', 'tta.MACDFIX', 'tta.MFI', 'tta.MINUS_DI', 'tta.MINUS_DM', 'tta.MOM', 'tta.PLUS_DI', 'tta.PLUS_DM', 'tta.PPO', 'tta.ROC', 'tta.ROCP', 'tta.ROCR', 'tta.ROCR100', 'tta.RSI', 'tta.STOCH', 'tta.STOCHF', 'tta.STOCHRSI', 'tta.TRIX', 'tta.ULTOSC', 'tta.WILLR', 'tta.AD', 'tta.ADOSC', 'tta.OBV', 'tta.HT_DCPERIOD', 'tta.HT_DCPHASE', 'tta.HT_PHASOR', 'tta.HT_SINE', 'tta.HT_TRENDMODE', 'tta.AVGPRICE', 'tta.MEDPRICE', 'tta.TYPPRICE', 'tta.WCLPRICE', 'tta.ATR', 'tta.NATR', 'tta.TRANGE', 'tta.CDL2CROWS', 'tta.CDL3BLACKCROWS', 'tta.CDL3INSIDE', 'tta.CDL3LINESTRIKE', 'tta.CDL3OUTSIDE', 'tta.CDL3STARSINSOUTH', 'tta.CDL3WHITESOLDIERS', 'tta.CDLABANDONEDBABY', 'tta.CDLADVANCEBLOCK', 'tta.CDLBELTHOLD', 'tta.CDLBREAKAWAY', 'tta.CDLCLOSINGMARUBOZU', 'tta.CDLCONCEALBABYSWALL', 'tta.CDLCOUNTERATTACK', 'tta.CDLDARKCLOUDCOVER', 'tta.CDLDOJI', 'tta.CDLDOJISTAR', 'tta.CDLDRAGONFLYDOJI', 'tta.CDLENGULFING', 'tta.CDLEVENINGDOJISTAR', 'tta.CDLEVENINGSTAR', 'tta.CDLGAPSIDESIDEWHITE', 'tta.CDLGRAVESTONEDOJI', 'tta.CDLHAMMER', 'tta.CDLHANGINGMAN', 'tta.CDLHARAMI', 'tta.CDLHARAMICROSS', 'tta.CDLHIGHWAVE', 'tta.CDLHIKKAKE', 'tta.CDLHIKKAKEMOD', 'tta.CDLHOMINGPIGEON', 'tta.CDLIDENTICAL3CROWS', 'tta.CDLINNECK', 'tta.CDLINVERTEDHAMMER', 'tta.CDLKICKING', 'tta.CDLKICKINGBYLENGTH', 'tta.CDLLADDERBOTTOM', 'tta.CDLLONGLEGGEDDOJI', 'tta.CDLLONGLINE', 'tta.CDLMARUBOZU', 'tta.CDLMATCHINGLOW', 'tta.CDLMATHOLD', 'tta.CDLMORNINGDOJISTAR', 'tta.CDLMORNINGSTAR', 'tta.CDLONNECK', 'tta.CDLPIERCING', 'tta.CDLRICKSHAWMAN', 'tta.CDLRISEFALL3METHODS', 'tta.CDLSEPARATINGLINES', 'tta.CDLSHOOTINGSTAR', 'tta.CDLSHORTLINE', 'tta.CDLSPINNINGTOP', 'tta.CDLSTALLEDPATTERN', 'tta.CDLSTICKSANDWICH', 'tta.CDLTAKURI', 'tta.CDLTASUKIGAP', 'tta.CDLTHRUSTING', 'tta.CDLTRISTAR', 'tta.CDLUNIQUE3RIVER', 'tta.CDLUPSIDEGAP2CROWS', 'tta.CDLXSIDEGAP3METHODS', 'tta.LINEARREG', 'tta.LINEARREG_ANGLE', 'tta.LINEARREG_INTERCEPT', 'tta.LINEARREG_SLOPE', 'tta.STDDEV', 'tta.TSF', 'tta.VAR']
pandas_ta_indicators = ['pta.ao', 'pta.apo', 'pta.bias', 'pta.bop', 'pta.brar', 'pta.cci', 'pta.cfo', 'pta.cg', 'pta.cmo', 'pta.coppock', 'pta.cti', 'pta.dm', 'pta.er', 'pta.eri', 'pta.fisher', 'pta.inertia', 'pta.kdj', 'pta.kst', 'pta.macd', 'pta.mom', 'pta.pgo', 'pta.ppo', 'pta.psl', 'pta.qqe', 'pta.roc', 'pta.rsi', 'pta.rsx', 'pta.rvgi', 'pta.stc', 'pta.slope', 'pta.smi', 'pta.squeeze', 'pta.squeeze_pro', 'pta.stoch', 'pta.stochrsi', 'pta.td_seq', 'pta.trix', 'pta.tsi', 'pta.uo', 'pta.willr', 'pta.alma', 'pta.dema', 'pta.ema', 'pta.fwma', 'pta.hilo', 'pta.hl2', 'pta.hlc3', 'pta.hwma', 'pta.ichimoku', 'pta.jma', 'pta.kama', 'pta.linreg', 'pta.mcgd', 'pta.midpoint', 'pta.midprice', 'pta.ohlc4', 'pta.pwma', 'pta.rma', 'pta.sinwma', 'pta.sma', 'pta.ssf', 'pta.supertrend', 'pta.swma', 'pta.t3', 'pta.tema', 'pta.trima', 'pta.vidya', 'pta.wcp', 'pta.wma', 'pta.zlma', 'pta.entropy', 'pta.kurtosis', 'pta.mad', 'pta.median', 'pta.quantile', 'pta.skew', 'pta.stdev', 'pta.variance', 'pta.zscore', 'pta.adx', 'pta.amat', 'pta.aroon', 'pta.chop', 'pta.cksp', 'pta.decay', 'pta.decreasing', 'pta.dpo', 'pta.increasing', 'pta.psar', 'pta.qstick', 'pta.ttm_trend', 'pta.vhf', 'pta.vortex', 'pta.aberration', 'pta.accbands', 'pta.atr', 'pta.bbands', 'pta.donchian', 'pta.hwc', 'pta.kc', 'pta.massi', 'pta.natr', 'pta.pdist', 'pta.rvi', 'pta.thermo', 'pta.true_range', 'pta.ui', 'pta.ad', 'pta.adosc', 'pta.aobv', 'pta.cmf', 'pta.efi', 'pta.eom', 'pta.kvo', 'pta.mfi', 'pta.nvi', 'pta.obv', 'pta.pvi', 'pta.pvo', 'pta.pvol', 'pta.pvt', 'pta.vp', 'pta.vwap']
finta_indicatrs = ['fta.SMA', 'fta.SMM', 'fta.SSMA', 'fta.EMA', 'fta.DEMA', 'fta.TEMA', 'fta.TRIMA', 'fta.TRIX', 'fta.VAMA', 'fta.ER', 'fta.KAMA', 'fta.ZLEMA', 'fta.WMA', 'fta.HMA', 'fta.EVWMA', 'fta.VWAP', 'fta.SMMA', 'fta.MACD', 'fta.PPO', 'fta.VW_MACD', 'fta.EV_MACD', 'fta.MOM', 'fta.ROC', 'fta.RSI', 'fta.IFT_RSI', 'fta.TR', 'fta.ATR', 'fta.SAR', 'fta.BBANDS', 'fta.BBWIDTH', 'fta.MOBO', 'fta.PERCENT_B', 'fta.KC', 'fta.DO', 'fta.DMI', 'fta.ADX', 'fta.PIVOT', 'fta.PIVOT_FIB', 'fta.STOCH', 'fta.STOCHD', 'fta.STOCHRSI', 'fta.WILLIAMS', 'fta.UO', 'fta.AO', 'fta.MI', 'fta.VORTEX', 'fta.KST', 'fta.TSI', 'fta.TP', 'fta.ADL', 'fta.CHAIKIN', 'fta.MFI', 'fta.OBV', 'fta.WOBV', 'fta.VZO', 'fta.PZO', 'fta.EFI', 'fta.CFI', 'fta.EBBP', 'fta.EMV', 'fta.CCI', 'fta.COPP', 'fta.BASP', 'fta.BASPN', 'fta.CMO', 'fta.CHANDELIER', 'fta.QSTICK', 'fta.WTO', 'fta.FISH', 'fta.ICHIMOKU', 'fta.APZ', 'fta.SQZMI', 'fta.VPT', 'fta.FVE', 'fta.VFI', 'fta.MSD', 'fta.STC'] |
class UltrasonicRegisterTypes:
CONFIG = 0
DATA = 1
UltrasonicA1 = {
UltrasonicRegisterTypes.CONFIG: 0x0C,
UltrasonicRegisterTypes.DATA: 0x0E,
}
UltrasonicA3 = {
UltrasonicRegisterTypes.CONFIG: 0x0D,
UltrasonicRegisterTypes.DATA: 0x0F,
}
UltrasonicRegisters = {
"A1": UltrasonicA1,
"A3": UltrasonicA3,
}
UltrasonicConfigSettings = {
"A1": 0xA1,
"A3": 0xA3,
}
| class Ultrasonicregistertypes:
config = 0
data = 1
ultrasonic_a1 = {UltrasonicRegisterTypes.CONFIG: 12, UltrasonicRegisterTypes.DATA: 14}
ultrasonic_a3 = {UltrasonicRegisterTypes.CONFIG: 13, UltrasonicRegisterTypes.DATA: 15}
ultrasonic_registers = {'A1': UltrasonicA1, 'A3': UltrasonicA3}
ultrasonic_config_settings = {'A1': 161, 'A3': 163} |
expected_output = {
'vrf': {
'default': {
'address_family': {
'ipv6': {
'routes': {
'2001:db8:1234::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1234::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:1579::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1579::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:1981::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1981::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:2222::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:2222::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:3456::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:3456::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:4021::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:4021::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:5354::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:5354::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:5555::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:5555::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:6666::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:6666::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:7654::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:7654::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:7777::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:7777::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:9843::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:9843::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:abcd::/64': {
'active': True,
'next_hop': {
'outgoing_interface': {
'GigabitEthernet0/0/0/1': {
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:07:43'
}
}
},
'route': '2001:db8:abcd::/64',
'source_protocol': 'connected',
'source_protocol_codes': 'C'
},
'2001:db8:abcd::1/128': {
'active': True,
'next_hop': {
'outgoing_interface': {
'GigabitEthernet0/0/0/1': {
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:07:43'
}
}
},
'route': '2001:db8:abcd::1/128',
'source_protocol': 'local',
'source_protocol_codes': 'L'
},
'2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128': {
'active': True,
'next_hop': {
'outgoing_interface': {
'MgmtEth0/RP0/CPU0/0': {
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128',
'source_protocol': 'local',
'source_protocol_codes': 'L'
},
'2001:db8:50e0:7b33::/64': {
'active': True,
'next_hop': {
'outgoing_interface': {
'MgmtEth0/RP0/CPU0/0': {
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '2001:db8:50e0:7b33::/64',
'source_protocol': 'connected',
'source_protocol_codes': 'C'
},
'::/0': {
'active': True,
'metric': 0,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::10ff:fe04:209e',
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '::/0',
'route_preference': 2,
'source_protocol': 'application route',
'source_protocol_codes': 'a*'
}
}
},
},
'last_resort': {
'gateway': 'fe80::10ff:fe04:209e',
'to_network': '::'
},
},
}
}
| expected_output = {'vrf': {'default': {'address_family': {'ipv6': {'routes': {'2001:db8:1234::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1234::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:1579::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1579::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:1981::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1981::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:2222::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:2222::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:3456::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:3456::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:4021::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:4021::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:5354::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:5354::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:5555::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:5555::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:6666::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:6666::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:7654::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:7654::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:7777::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:7777::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:9843::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:9843::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:abcd::/64': {'active': True, 'next_hop': {'outgoing_interface': {'GigabitEthernet0/0/0/1': {'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:07:43'}}}, 'route': '2001:db8:abcd::/64', 'source_protocol': 'connected', 'source_protocol_codes': 'C'}, '2001:db8:abcd::1/128': {'active': True, 'next_hop': {'outgoing_interface': {'GigabitEthernet0/0/0/1': {'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:07:43'}}}, 'route': '2001:db8:abcd::1/128', 'source_protocol': 'local', 'source_protocol_codes': 'L'}, '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128': {'active': True, 'next_hop': {'outgoing_interface': {'MgmtEth0/RP0/CPU0/0': {'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128', 'source_protocol': 'local', 'source_protocol_codes': 'L'}, '2001:db8:50e0:7b33::/64': {'active': True, 'next_hop': {'outgoing_interface': {'MgmtEth0/RP0/CPU0/0': {'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '2001:db8:50e0:7b33::/64', 'source_protocol': 'connected', 'source_protocol_codes': 'C'}, '::/0': {'active': True, 'metric': 0, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::10ff:fe04:209e', 'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '::/0', 'route_preference': 2, 'source_protocol': 'application route', 'source_protocol_codes': 'a*'}}}}, 'last_resort': {'gateway': 'fe80::10ff:fe04:209e', 'to_network': '::'}}}} |
DNA_TO_RNA_MAPPER = {
'G' : 'C',
'C' : 'G',
'T' : 'A',
'A' : 'U'
}
def to_rna(dna_strand):
return ''.join([DNA_TO_RNA_MAPPER[letter] for letter in dna_strand])
| dna_to_rna_mapper = {'G': 'C', 'C': 'G', 'T': 'A', 'A': 'U'}
def to_rna(dna_strand):
return ''.join([DNA_TO_RNA_MAPPER[letter] for letter in dna_strand]) |
#program to check whether a given integer is a palindrome or not.
def is_Palindrome(n):
return str(n) == str(n)[::-1]
print(is_Palindrome(100))
print(is_Palindrome(252))
print(is_Palindrome(-838))
print(is_Palindrome('swims'))
print(is_Palindrome(1001)) | def is__palindrome(n):
return str(n) == str(n)[::-1]
print(is__palindrome(100))
print(is__palindrome(252))
print(is__palindrome(-838))
print(is__palindrome('swims'))
print(is__palindrome(1001)) |
class CardType(object):
NUMBER_CARD = 'number_card'
PLUS = 'plus'
PLUS_2 = 'plus_2'
STOP = 'stop'
CHANGE_DIRECTION = 'change_direction'
CHANGE_COLOR = 'change_color'
TAKI = 'taki'
SUPER_TAKI = 'super_taki'
| class Cardtype(object):
number_card = 'number_card'
plus = 'plus'
plus_2 = 'plus_2'
stop = 'stop'
change_direction = 'change_direction'
change_color = 'change_color'
taki = 'taki'
super_taki = 'super_taki' |
#Define Class
class Student:
__name = ""
__math = 0
__science = 0
__english = 0
__grade_average = 0
__grade_status = ""
__status = True
def __init__(self, name, math, science, english):
try:
self.__name = str(name)
self.__math = float(math)
self.__science = float(science)
self.__english = float(english)
except Exception:
self.__status = False
print("Something went wrong.")
def calculate_average(self):
try:
grade_sum = self.__math + self.__science + self.__english
self.__grade_average = grade_sum / 3
self.__grade_status = ""
if(self.__grade_average >= 75):
self.__grade_status = "Passed"
else:
self.__grade_status = "Failed"
except ZeroDivisionError:
print("Zero division error had occured")
self.__status = False
except ArithmeticError:
print("Something went wrong about your numbers supplied")
self.__status = False
except OverflowError:
print("Calculation had exceeded the maximum limit")
self.__status = False
except Exception:
print("Something went wrong")
self.__status = False
def display(self):
self.calculate_average()
if self.__status:
print("\nName: {}".format(self.__name))
print("Math: {}\nScience: {}\nEnglish: {}".format(self.__math, self.__science, self.__english))
print("Average: {} ({})".format(self.__grade_average, self.__grade_status))
else:
print("Unable to calculate")
while True:
action = str(input("\nWould you like to to do \n[A] Calculate Grade\n[B] Exit Application?")).lower()
if(action == 'a'):
name = input("Enter Name:")
math = input("Enter Math Grade:")
science = input("Enter Science Grade:")
english = input("Enter English Grade")
student_instance = Student(name, math, science, english)
student_instance.display()
elif(action == 'b'):
print("Application Exited")
break
else:
continue
| class Student:
__name = ''
__math = 0
__science = 0
__english = 0
__grade_average = 0
__grade_status = ''
__status = True
def __init__(self, name, math, science, english):
try:
self.__name = str(name)
self.__math = float(math)
self.__science = float(science)
self.__english = float(english)
except Exception:
self.__status = False
print('Something went wrong.')
def calculate_average(self):
try:
grade_sum = self.__math + self.__science + self.__english
self.__grade_average = grade_sum / 3
self.__grade_status = ''
if self.__grade_average >= 75:
self.__grade_status = 'Passed'
else:
self.__grade_status = 'Failed'
except ZeroDivisionError:
print('Zero division error had occured')
self.__status = False
except ArithmeticError:
print('Something went wrong about your numbers supplied')
self.__status = False
except OverflowError:
print('Calculation had exceeded the maximum limit')
self.__status = False
except Exception:
print('Something went wrong')
self.__status = False
def display(self):
self.calculate_average()
if self.__status:
print('\nName: {}'.format(self.__name))
print('Math: {}\nScience: {}\nEnglish: {}'.format(self.__math, self.__science, self.__english))
print('Average: {} ({})'.format(self.__grade_average, self.__grade_status))
else:
print('Unable to calculate')
while True:
action = str(input('\nWould you like to to do \n[A] Calculate Grade\n[B] Exit Application?')).lower()
if action == 'a':
name = input('Enter Name:')
math = input('Enter Math Grade:')
science = input('Enter Science Grade:')
english = input('Enter English Grade')
student_instance = student(name, math, science, english)
student_instance.display()
elif action == 'b':
print('Application Exited')
break
else:
continue |
def sync_consume():
while True:
print(q.get())
q.task_done()
def sync_produce():
consumer = Thread(target=sync_consume, daemon=True)
consumer.start()
for i in range(10):
q.put(i)
q.join()
sync_produce() | def sync_consume():
while True:
print(q.get())
q.task_done()
def sync_produce():
consumer = thread(target=sync_consume, daemon=True)
consumer.start()
for i in range(10):
q.put(i)
q.join()
sync_produce() |
list1 = [15, -1, 11, -5, -5, 5, 3, -1, -7, 13, -11, -11, 7, 13] # Base list
even_list = [] # Creates blank list
# Problem 3 code
for i in list1: # Iterates through list1 assigning i to the next value each time through
if i % 2 == 0: # If 'i' is divisible by 2 (even) then:
even_list.append(i) # Add the value of 'i' to a new list 'even_list'
print(even_list) # Print the value of 'even_list'
# New code
smallest = even_list[0] # Set smallest variable to the 0 index of even_list
for x in even_list: # Iterates through even_list assigning 'x' to the next value each time through
if x < smallest: # if 'x' is less than the current value of 'smallest'
smallest = x # re-assign 'smallest' to the value of x, as x is smaller
else: # else if 'x' is not less than smallest
pass # do nothing
print(smallest) # finally, print the value of smallest
| list1 = [15, -1, 11, -5, -5, 5, 3, -1, -7, 13, -11, -11, 7, 13]
even_list = []
for i in list1:
if i % 2 == 0:
even_list.append(i)
print(even_list)
smallest = even_list[0]
for x in even_list:
if x < smallest:
smallest = x
else:
pass
print(smallest) |
#* Asked in Microsoft
#? You 2 integers n and m representing an n by m grid, determine the number of ways you can get
#? from the top-left to the bottom-right of the matrix y going only right or down.
#? Example:
#? n = 2, m = 2
#? This should return 2, since the only possible routes are:
#? Right, down
#? Down, right.
#* Good Old Recursive way, slow but good for start
def num_ways(n, m):
if n == 1 or m == 1:
return 1
else:
count = 0
count += num_ways(n-1,m)
count += num_ways(n,m-1)
return count
#* Using memory stack for faster execution
#* First create a function that creates hash and passes it to the function
def num_ways_hm(n,m):
# Hash = [[0*m]*n] #! wrong
#!Note: We can create 2D array like [[0]*m]*n,
#! but under the hood python creates shallow arrays(Go on geeks for geeks for deep understanding)
#! in which every multiplied value points to one single value which is fast & memory eff. but it will work weirdly in some situations
#! Copy below 4 lines and Uncomment & execute them somewhere to see this weird phenomena(data structures) called shallow arrays in action
#! Geeks for Geeks article link (https://www.geeksforgeeks.org/python-using-2d-arrays-lists-the-right-way/)
#A = [[0]*3]*3
#print(*A,sep='\n')
#A[0][2] = 1
#print(*A,sep='\n')
#Creating arrays the right way, pretty slow, but we are using python so anyways... XD
hash = [[0 for i in range(m+1)] for j in range(n+1)]
return nw(n,m,hash)
def nw(n,m,hash):
if not hash[n][m] == 0:
return hash[n][m]
else:
if n == 1 or m == 1:
hash[n][m] = 1
#* print(*hash, sep='\n', end='\n\n') For Dynamic prog purpose
return hash[n][m]
else:
hash[n][m] += nw(n-1,m,hash)
hash[n][m] += nw(n,m-1,hash)
#* Hmmm, Got any hints for dynamic programming from these 2 steps ???
#* print(*hash, sep='\n', end='\n\n') For Dynamic Prog Purpose
return hash[n][m]
#* Summoning the all mighty dynamic programing
#? From looking at the stack from above implementation, we can see that first row and first column will be initialized as 1 and every other-
#? element will be a sum of left and top element, lets implement that
def num_ways_dy(n,m):
hash = [[1 for i in range(m)] for j in range(n)] #creating a 2D array of 1s
for i in range(1,n):
for j in range(1,m):
hash[i][j] = hash[i-1][j] + hash[i][j-1]
#? hash[i-1][j] = 0 The above element will not be needed again, so if you want to save some memory than uncomment this step
#* print(*hash, sep='\n', end='\n\n') Dynamicly created array, which will look similar to Recursively created stack
return hash[n-1][m-1]
#* Through Dynamic programing we were able to solve this problem in O(nm) time complexity which will be lowest achievable among all the logics (I guess!!!)
# print(num_ways(2,2))
# #2
# print(num_ways(3,3))
# #6 => get a pen & paper and manually solve how it has 6 ways
# print(num_ways(3, 4))
# # 10
#print(num_ways_hm(2,2))
#2
#print(num_ways_hm(3,3))
#6
#print(num_ways_hm(3, 4))
# 10
print(num_ways_dy(3,3))
# 6
print(num_ways_dy(5,10))
#715
#* We Have implemented dynamic solution so lets go for some absurd grid ;)
#print(num_ways_dy(687,959))
#OUTPUT: 2376990657380170053335691334607333533984188811812145631345039134790343911332428159642142725013610144831574663950650791844562303940291288943131712399908785320572180121301527964878686469921472563748160377794556248126136438009091645386901302323125285511796001262231197322291699018878239824629596965126202851549969922822893518436959566965967970997767013243911713063425734204847252348410514703595845536361680009281489202826487766379681533036147234992632179195481815907027828023578917041920
#* Now try solving this grid using the first simple recursive function.. XDXD Kidding!!! | def num_ways(n, m):
if n == 1 or m == 1:
return 1
else:
count = 0
count += num_ways(n - 1, m)
count += num_ways(n, m - 1)
return count
def num_ways_hm(n, m):
hash = [[0 for i in range(m + 1)] for j in range(n + 1)]
return nw(n, m, hash)
def nw(n, m, hash):
if not hash[n][m] == 0:
return hash[n][m]
elif n == 1 or m == 1:
hash[n][m] = 1
return hash[n][m]
else:
hash[n][m] += nw(n - 1, m, hash)
hash[n][m] += nw(n, m - 1, hash)
return hash[n][m]
def num_ways_dy(n, m):
hash = [[1 for i in range(m)] for j in range(n)]
for i in range(1, n):
for j in range(1, m):
hash[i][j] = hash[i - 1][j] + hash[i][j - 1]
return hash[n - 1][m - 1]
print(num_ways_dy(3, 3))
print(num_ways_dy(5, 10)) |
#
# PySNMP MIB module Juniper-IPsec-Tunnel-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IPsec-Tunnel-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:03:12 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, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs")
JuniNextIfIndex, JuniName = mibBuilder.importSymbols("Juniper-TC", "JuniNextIfIndex", "JuniName")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
IpAddress, Counter64, Bits, ObjectIdentity, NotificationType, Gauge32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, Integer32, Counter32, MibIdentifier, TimeTicks, iso = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Counter64", "Bits", "ObjectIdentity", "NotificationType", "Gauge32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "Integer32", "Counter32", "MibIdentifier", "TimeTicks", "iso")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
juniIpsecTunnelMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70))
juniIpsecTunnelMIB.setRevisions(('2004-04-06 22:26',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setLastUpdated('200404062226Z')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886-3146 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setDescription('The IPsec Tunnel MIB for the Juniper Networks enterprise.')
class JuniIpsecIdentityType(TextualConvention, Integer32):
description = 'The type of IPsec Phase-1 identity. The Phase-1 identity may be identified by one of the ID types defined in IPSEC DOI.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
namedValues = NamedValues(("reserved", 0), ("idIpv4Addr", 1), ("idFqdn", 2), ("idUserFqdn", 3), ("idIpv4AddrSubnet", 4), ("idIpv6Addr", 5), ("idIpv6AddrSubnet", 6), ("idIpv4AddrRange", 7), ("idIpv6AddrRange", 8), ("idDn", 9), ("idDerAsn1Gn", 10), ("idKeyId", 11))
class JuniIpsecTransformType(TextualConvention, Integer32):
description = 'The transform algorithm for the IPsec tunnel.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("reserved", 0), ("ahMd5", 1), ("ahSha", 2), ("espDesMd5", 3), ("esp3DesMd5", 4), ("espDesSha", 5), ("esp3DesSha", 6), ("espNullMd5", 7), ("espNullSha", 8), ("espDesNullAuth", 9), ("esp3DesNullAuth", 10))
class JuniIpsecPfsGroup(TextualConvention, Integer32):
description = 'The perfect forward secrecy group. Group1 - 768-bit DH prime modulus group. Group2 - 1024-bit DH prime modulus group. Group5 - 1536-bit DH prime modulus group.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 5))
namedValues = NamedValues(("noGroup", 0), ("group1", 1), ("group2", 2), ("group5", 5))
class JuniIpsecTunnelType(TextualConvention, Integer32):
description = 'The ipsec tunnel type.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("signaledTunnel", 0), ("manualTunnel", 1))
class Spi(TextualConvention, Unsigned32):
description = 'The type of the SPI associated with IPsec Phase-2 security associations.'
status = 'current'
displayHint = 'x'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295)
juniIpsecObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1))
juniIpsecTunnel = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1))
juniIpsecSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2))
juniIpsecTunnelNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 1), JuniNextIfIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelNextIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelNextIfIndex.setDescription('Coordinate ifIndex value allocation for entries in the juniIpsecTunnelIfTable. A GET of this object returns the next available ifIndex value to be used to create an entry in the associated interface table; or zero, if no valid ifIndex value is available. This object also returns a value of zero when it is the lexicographic successor of a varbind presented in an SNMP GETNEXT or GETBULK request, for which circumstance it is assumed that ifIndex allocation is unintended. Successive GETs will typically return different values, thus avoiding collisions among cooperating management clients seeking to create table entries simultaneously.')
juniIpsecTunnelInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2), )
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceTable.setDescription('This table contains entries of IPsec Tunnel interfaces.')
juniIpsecTunnelInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelIfIndex"))
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceEntry.setDescription('Each entry describes the characteristics of a single IPsec Tunnel interface. Creating/deleting entries in this table causes corresponding entries for be created/deleted in ifTable/ifXTable/juniIfTable.')
juniIpsecTunnelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: juniIpsecTunnelIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelIfIndex.setDescription('The ifIndex of the IPsec tunnel interface. When creating entries in this table, suitable values for this object are determined by reading juniIpsecTunnelNextIfIndex.')
juniIpsecTunnelName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelName.setDescription('The administratively assigned name for this IPsec Tunnel interface. Before configuring other tunnel attributes, IPsec tunnel has to be created with minimum attributes (tunnel name and rowStatus).')
juniIpsecTunnelType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 3), JuniIpsecTunnelType().clone('signaledTunnel')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelType.setDescription('The configured mode for this IPsec Tunnel interface.')
juniIpsecTunnelTransportVirtualRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 4), JuniName().clone('default')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransportVirtualRouter.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransportVirtualRouter.setDescription('The transport virtual router associated with this IPsec tunnel interface. This object need not be set when creating row entries. Note that the default when this object is not specified is the router associated with the agent acting on the management request.')
juniIpsecTunnelLocalEndPt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 5), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelLocalEndPt.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalEndPt.setDescription('The tunnel local endpoint.')
juniIpsecTunnelRemoteEndPt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 6), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteEndPt.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteEndPt.setDescription('The tunnel remote endpoint.')
juniIpsecTunnelTransformSet = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransformSet.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSet.setDescription('The transform set. It refers to a transform set that is defined in the transform set table.')
juniIpsecTunnelSrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 8), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcType.setDescription('The tunnel source type. The tunnel source may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juniIpsecTunnelSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 9), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcAddr.setDescription('The tunnel source IP(V4) address.')
juniIpsecTunnelSrcName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcName.setDescription('The tunnel source Name.')
juniIpsecTunnelDstType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 11), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstType.setDescription('The tunnel destination type. The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juniIpsecTunnelDstAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 12), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstAddr.setDescription('The tunnel destination IP(V4) address.')
juniIpsecTunnelDstName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstName.setDescription('The tunnel destination Name.')
juniIpsecTunnelBackupDstType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 14), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstType.setDescription('The tunnel backup destination type. The tunnel backup destination type has to be the same as the tunnel destination type The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, 3. a user fully qualified domain name string.')
juniIpsecTunnelBackupDstAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 15), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstAddr.setDescription('The tunnel backup destination IP(V4) address.')
juniIpsecTunnelBackupDstName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstName.setDescription('The tunnel backup destination Name.')
juniIpsecTunnelLocalIdType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 17), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdType.setDescription('The tunnel phase-2 local identity type. The tunnel local identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juniIpsecTunnelLocalIdAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 18), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr1.setDescription('The tunnel local phase-2 identity IP address 1.')
juniIpsecTunnelLocalIdAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 19), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr2.setDescription('The tunnel local phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel local phase-2 identity netmask in the case the identity type is an IP address subnet.')
juniIpsecTunnelRemoteIdType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 20), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdType.setDescription('The tunnel phase-2 remote identity type. The tunnel remote identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juniIpsecTunnelRemoteIdAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 21), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr1.setDescription('The tunnel remote phase-2 identity IP address 1.')
juniIpsecTunnelRemoteIdAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 22), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr2.setDescription('The tunnel remote phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel remote phase-2 identity netmask in the case the identity type is an IP address subnet.')
juniIpsecTunnelLifeTimeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 23), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1800, 864000))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeSecs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeSecs.setDescription('The tunnel lifetime in seconds.')
juniIpsecTunnelLifeTimeKBs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(102400, 4294967295))).setUnits('kilobytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeKBs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeKBs.setDescription('The tunnel lifetime in kilobytes.')
juniIpsecTunnelPfsGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 25), JuniIpsecPfsGroup()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelPfsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelPfsGroup.setDescription('The tunnel perfect forward secrecty group.')
juniIpsecTunnelMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(160, 9000))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelMtu.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelMtu.setDescription('The tunnel MTU.')
juniIpsecTunnelInboundSpi1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 27), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi1.setDescription('The tunnel inbound SPI 1.')
juniIpsecTunnelInboundTransform1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 28), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform1.setDescription('The tunnel inbound transform 1.')
juniIpsecTunnelInboundSpi2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 29), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi2.setDescription('The tunnel inbound SPI 2.')
juniIpsecTunnelInboundTransform2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 30), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform2.setDescription('The tunnel inbound transform 2.')
juniIpsecTunnelInboundSpi3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 31), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi3.setDescription('The tunnel inbound SPI 3.')
juniIpsecTunnelInboundTransform3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 32), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform3.setDescription('The tunnel inbound transform 3.')
juniIpsecTunnelInboundSpi4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 33), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi4.setDescription('The tunnel inbound SPI 4.')
juniIpsecTunnelInboundTransform4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 34), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform4.setDescription('The tunnel inbound transform 4.')
juniIpsecTunnelOutboundSpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 35), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutboundSpi.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutboundSpi.setDescription('The tunnel outbound SPI.')
juniIpsecTunnelOutboundTransform = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 36), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutboundTransform.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutboundTransform.setDescription('The tunnel outbound transform.')
juniIpsecTunnelRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 37), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelIfRowStatus juniIpsecTunnelName In addition, when creating an entry the following condition must hold: A value for juniIpsecTunnelIfIndex must have been determined previously, typically by reading juniIpsecTunnelNextIfIndex. Once created, the following objects may not be modified: juniIpsecTunnelName juniIpsecTunnelVirtualRouter A corresponding entry in ifTable/ifXTable/juniIfTable is created/ destroyed as a result of creating/destroying an entry in this table.')
juniIpsecTunnelStatTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3), )
if mibBuilder.loadTexts: juniIpsecTunnelStatTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatTable.setDescription('The IPsec tunnel interface statistics table. Describes the IPsec tunnel inbound/outbound statistics on IPsec de/encapsulation, de/encryption, and related error statistics.')
juniIpsecTunnelStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatIfIndex"))
if mibBuilder.loadTexts: juniIpsecTunnelStatEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatEntry.setDescription('Describes the ipsec traffic statistics of the ipsec tunnel interface.')
juniIpsecTunnelStatIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: juniIpsecTunnelStatIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatIfIndex.setDescription('Same value as ifIndex for the corresponding entry in Interfaces MIB ifTable.')
juniIpsecTunnelStatInbUserRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvPkts.setDescription('The total number of inbound user packets (non-error) received for this IPsec tunnel.')
juniIpsecTunnelStatInbUserRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvOctets.setDescription('The total number of inbound user octets (non-error) received for this IPsec tunnel.')
juniIpsecTunnelStatInbAccRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvPkts.setDescription('The total number of inbound encapsulated packets received for this IPsec tunnel.')
juniIpsecTunnelStatInbAccRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvOctets.setDescription('The total number of inbound encapsulated octets received for this IPsec tunnel.')
juniIpsecTunnelStatInbAuthErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAuthErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAuthErrs.setDescription('The total number of inbound packets with authentication errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbReplayErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbReplayErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbReplayErrs.setDescription('The total number of inbound packets with replay errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbPolicyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPolicyErrs.setDescription('The total number of inbound packets with inbound policy errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbOtherRecvErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbOtherRecvErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbOtherRecvErrs.setDescription('The total number of inbound packets with other Rx errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbDecryptErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbDecryptErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbDecryptErrs.setDescription('The total number of inbound packets with decryption errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbPadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPadErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPadErrs.setDescription('The total number of inbound packets with pad errors received for this IPsec tunnel.')
juniIpsecTunnelStatOutbUserRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvPkts.setDescription('The total number of outbound user packets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbUserRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvOctets.setDescription('The total number of outbound user octets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbAccRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvPkts.setDescription('The total number of encapsulated outbound packets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbAccRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvOctets.setDescription('The total number of encapsulated outbound octets received for this IPsec tunnel.')
juniIpsecTunnelOutbOtherTxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutbOtherTxErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutbOtherTxErrs.setDescription('The total number of outbound packets with other TX errors for this IPsec tunnel.')
juniIpsecTunnelOutbPolicyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutbPolicyErrs.setDescription('The total number of outbound packets with outbound policy errors for this IPsec tunnel.')
juniIpsecTunnelTransformSetTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4), )
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetTable.setDescription('This table contains entries of IPsec transform sets defined for this router.')
juniIpsecTunnelTransformSetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSetName"))
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetEntry.setDescription('Each entry describes a transform set that contains up to 6 IPsec transforms. The transform set name is referenced by the IPsec tunnel as its local IPsec policy.')
juniIpsecTunnelTransformSetName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64)))
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetName.setDescription('The name of the IPsec tunnel transform set.')
juniIpsecTunnelTransform1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 2), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform1.setDescription('The first IPsec transform in the transform set.')
juniIpsecTunnelTransform2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 3), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform2.setDescription('The second IPsec transform in the transform set.')
juniIpsecTunnelTransform3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 4), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform3.setDescription('The third IPsec transform in the transform set.')
juniIpsecTunnelTransform4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 5), JuniIpsecTransformType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform4.setDescription('The fourth IPsec transform in the transform set.')
juniIpsecTunnelTransform5 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 6), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform5.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform5.setDescription('The fifth IPsec transform in the transform set.')
juniIpsecTunnelTransform6 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 7), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform6.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform6.setDescription('The sixth IPsec transform in the transform set.')
juniIpsecTunnelTransformSetRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 8), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelTransformSetRowStatus juniIpsecTunnelTransformSetName juniIpsecTunnelTransform1.')
juniIpsecTunnelGlobalLocalEndpointTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5), )
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointTable.setDescription('This table contains entries of global local endpoint for the IPsec tunnel. There is one global local endpoint for each transport virtual router if configured.')
juniIpsecTunnelGlobalLocalEndpointEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransportVrRouterIdx"))
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointEntry.setDescription('Each entry defines the global local endpoint for the transport virtual router.')
juniIpsecTunnelTransportVrRouterIdx = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 1), Unsigned32())
if mibBuilder.loadTexts: juniIpsecTunnelTransportVrRouterIdx.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransportVrRouterIdx.setDescription('The transport virtual router for the global local endpoint.')
juniIpsecTunnelGlobalLocalEndpoint = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpoint.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpoint.setDescription('The global local endpoint for the transport virtual router.')
juniIpsecTunnelGlobalLocalEndpointRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelGlobalLocalEndpoint juniIpsecTunnelTransportVrRouterIdx Once created, the global local endpoint can not be changed unless there is no IPsec tunnel references to the local endpoint.')
juniIpsecTunnelSystemStats = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1))
juniIpsecSummaryStatsTotalTunnels = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsTotalTunnels.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsTotalTunnels.setDescription('The total number of tunnels')
juniIpsecSummaryStatsAdminStatusEnabled = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusEnabled.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusEnabled.setDescription('The total number of tunnels with administrative status enabled')
juniIpsecSummaryStatsAdminStatusDisabled = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusDisabled.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusDisabled.setDescription('The total number of tunnels with administrative status disabled')
juniIpsecSummaryStatsOperStatusUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusUp.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusUp.setDescription('The total number of tunnels with operational status up')
juniIpsecSummaryStatsOperStatusDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusDown.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusDown.setDescription('The total number of tunnels with operational status down')
juniIpsecSummaryStatsOperStatusNotPresent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusNotPresent.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusNotPresent.setDescription('The total number of tunnels with operational status not-present')
juniIpsecTunnelMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2))
juniIpsecTunnelMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1))
juniIpsecTunnelMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2))
juniIpsecTunnelCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 1)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelConfigGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTransformSetGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecGlobalLocalEndpointGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelCompliance = juniIpsecTunnelCompliance.setStatus('obsolete')
if mibBuilder.loadTexts: juniIpsecTunnelCompliance.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juniIpsecTunnelCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 2)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelConfigGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTransformSetGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecGlobalLocalEndpointGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSystemStatsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelCompliance2 = juniIpsecTunnelCompliance2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelCompliance2.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juniIpsecTunnelConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 1)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelNextIfIndex"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransportVirtualRouter"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalEndPt"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteEndPt"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSet"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdAddr1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdAddr2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdAddr1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdAddr2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLifeTimeSecs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLifeTimeKBs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelPfsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelMtu"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutboundSpi"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutboundTransform"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelConfigGroup = juniIpsecTunnelConfigGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelConfigGroup.setDescription('A collection of objects providing configuration information of the IPsec tunnel.')
juniIpsecTunnelStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 2)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbUserRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbUserRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAccRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAccRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAuthErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbReplayErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbPolicyErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbOtherRecvErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbDecryptErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbPadErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbUserRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbUserRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbAccRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbAccRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutbOtherTxErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutbPolicyErrs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelStatsGroup = juniIpsecTunnelStatsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatsGroup.setDescription('A collection of objects providing satistics information of the IPsec tunnel.')
juniIpsecTransformSetGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 3)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform5"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform6"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSetRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTransformSetGroup = juniIpsecTransformSetGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTransformSetGroup.setDescription('A collection of objects providing transform set information of the IPsec tunnel.')
juniIpsecGlobalLocalEndpointGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 4)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelGlobalLocalEndpoint"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelGlobalLocalEndpointRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecGlobalLocalEndpointGroup = juniIpsecGlobalLocalEndpointGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecGlobalLocalEndpointGroup.setDescription('A collection of objects providing the global local endpoint for the IPsec tunnel.')
juniIpsecTunnelSystemStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 5)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsTotalTunnels"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsAdminStatusEnabled"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsAdminStatusDisabled"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusUp"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusDown"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusNotPresent"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelSystemStatsGroup = juniIpsecTunnelSystemStatsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSystemStatsGroup.setDescription('A collection of objects providing summary statistics information for IPsec tunnels in one system.')
mibBuilder.exportSymbols("Juniper-IPsec-Tunnel-MIB", juniIpsecTunnelInboundSpi3=juniIpsecTunnelInboundSpi3, juniIpsecTunnelTransformSetRowStatus=juniIpsecTunnelTransformSetRowStatus, juniIpsecTunnelTransform5=juniIpsecTunnelTransform5, juniIpsecSummaryStatsAdminStatusEnabled=juniIpsecSummaryStatsAdminStatusEnabled, juniIpsecTunnelStatInbAccRecvPkts=juniIpsecTunnelStatInbAccRecvPkts, juniIpsecTunnelMtu=juniIpsecTunnelMtu, juniIpsecTunnelTransformSetTable=juniIpsecTunnelTransformSetTable, juniIpsecTunnelSrcType=juniIpsecTunnelSrcType, juniIpsecTunnelInboundSpi4=juniIpsecTunnelInboundSpi4, juniIpsecTunnelOutbOtherTxErrs=juniIpsecTunnelOutbOtherTxErrs, juniIpsecTunnelSrcAddr=juniIpsecTunnelSrcAddr, juniIpsecTunnelInboundTransform3=juniIpsecTunnelInboundTransform3, PYSNMP_MODULE_ID=juniIpsecTunnelMIB, juniIpsecSummaryStatsAdminStatusDisabled=juniIpsecSummaryStatsAdminStatusDisabled, JuniIpsecIdentityType=JuniIpsecIdentityType, juniIpsecTunnelInboundSpi1=juniIpsecTunnelInboundSpi1, juniIpsecTunnelStatOutbAccRecvOctets=juniIpsecTunnelStatOutbAccRecvOctets, juniIpsecTunnelDstName=juniIpsecTunnelDstName, juniIpsecTunnelMIB=juniIpsecTunnelMIB, juniIpsecTunnelStatInbAccRecvOctets=juniIpsecTunnelStatInbAccRecvOctets, juniIpsecTunnelMIBConformance=juniIpsecTunnelMIBConformance, juniIpsecTunnelTransform2=juniIpsecTunnelTransform2, juniIpsecTunnelGlobalLocalEndpointEntry=juniIpsecTunnelGlobalLocalEndpointEntry, juniIpsecSummaryStatsTotalTunnels=juniIpsecSummaryStatsTotalTunnels, juniIpsecTunnelStatInbPolicyErrs=juniIpsecTunnelStatInbPolicyErrs, juniIpsecTunnelStatOutbUserRecvPkts=juniIpsecTunnelStatOutbUserRecvPkts, juniIpsecTunnelInterfaceTable=juniIpsecTunnelInterfaceTable, juniIpsecTunnelStatInbUserRecvPkts=juniIpsecTunnelStatInbUserRecvPkts, juniIpsecTunnelGlobalLocalEndpoint=juniIpsecTunnelGlobalLocalEndpoint, juniIpsecTunnelStatInbOtherRecvErrs=juniIpsecTunnelStatInbOtherRecvErrs, juniIpsecSummaryStatsOperStatusDown=juniIpsecSummaryStatsOperStatusDown, juniIpsecTunnelLocalEndPt=juniIpsecTunnelLocalEndPt, juniIpsecTunnelMIBGroups=juniIpsecTunnelMIBGroups, juniIpsecTunnelConfigGroup=juniIpsecTunnelConfigGroup, juniIpsecTunnelDstType=juniIpsecTunnelDstType, juniIpsecTunnelStatIfIndex=juniIpsecTunnelStatIfIndex, juniIpsecTunnelInboundSpi2=juniIpsecTunnelInboundSpi2, juniIpsecTunnelOutboundTransform=juniIpsecTunnelOutboundTransform, juniIpsecTunnelSystemStats=juniIpsecTunnelSystemStats, juniIpsecTunnelTransform3=juniIpsecTunnelTransform3, juniIpsecTunnelOutboundSpi=juniIpsecTunnelOutboundSpi, juniIpsecGlobalLocalEndpointGroup=juniIpsecGlobalLocalEndpointGroup, juniIpsecTunnelSystemStatsGroup=juniIpsecTunnelSystemStatsGroup, juniIpsecTunnelName=juniIpsecTunnelName, juniIpsecTunnelStatInbAuthErrs=juniIpsecTunnelStatInbAuthErrs, juniIpsecTunnelTransformSetName=juniIpsecTunnelTransformSetName, juniIpsecTunnelBackupDstName=juniIpsecTunnelBackupDstName, juniIpsecTunnelStatInbUserRecvOctets=juniIpsecTunnelStatInbUserRecvOctets, juniIpsecTunnelStatOutbAccRecvPkts=juniIpsecTunnelStatOutbAccRecvPkts, juniIpsecObjects=juniIpsecObjects, JuniIpsecTransformType=JuniIpsecTransformType, juniIpsecTunnelLocalIdAddr1=juniIpsecTunnelLocalIdAddr1, juniIpsecTunnelTransform6=juniIpsecTunnelTransform6, juniIpsecTunnelTransform1=juniIpsecTunnelTransform1, juniIpsecSummaryStatsOperStatusNotPresent=juniIpsecSummaryStatsOperStatusNotPresent, juniIpsecTunnelPfsGroup=juniIpsecTunnelPfsGroup, juniIpsecTunnelType=juniIpsecTunnelType, juniIpsecTunnelStatTable=juniIpsecTunnelStatTable, juniIpsecTunnelRemoteEndPt=juniIpsecTunnelRemoteEndPt, juniIpsecTunnelSrcName=juniIpsecTunnelSrcName, juniIpsecTunnelTransform4=juniIpsecTunnelTransform4, juniIpsecTunnelInboundTransform1=juniIpsecTunnelInboundTransform1, juniIpsecTunnelStatInbDecryptErrs=juniIpsecTunnelStatInbDecryptErrs, juniIpsecTunnelStatInbPadErrs=juniIpsecTunnelStatInbPadErrs, juniIpsecTunnelInterfaceEntry=juniIpsecTunnelInterfaceEntry, Spi=Spi, juniIpsecTunnelStatEntry=juniIpsecTunnelStatEntry, juniIpsecTunnelMIBCompliances=juniIpsecTunnelMIBCompliances, juniIpsecTunnelLifeTimeSecs=juniIpsecTunnelLifeTimeSecs, juniIpsecTunnelBackupDstAddr=juniIpsecTunnelBackupDstAddr, juniIpsecTunnel=juniIpsecTunnel, juniIpsecTunnelNextIfIndex=juniIpsecTunnelNextIfIndex, juniIpsecTransformSetGroup=juniIpsecTransformSetGroup, JuniIpsecPfsGroup=JuniIpsecPfsGroup, juniIpsecTunnelCompliance=juniIpsecTunnelCompliance, JuniIpsecTunnelType=JuniIpsecTunnelType, juniIpsecTunnelGlobalLocalEndpointTable=juniIpsecTunnelGlobalLocalEndpointTable, juniIpsecTunnelCompliance2=juniIpsecTunnelCompliance2, juniIpsecTunnelTransportVirtualRouter=juniIpsecTunnelTransportVirtualRouter, juniIpsecTunnelTransformSetEntry=juniIpsecTunnelTransformSetEntry, juniIpsecSystem=juniIpsecSystem, juniIpsecTunnelRemoteIdAddr1=juniIpsecTunnelRemoteIdAddr1, juniIpsecTunnelInboundTransform2=juniIpsecTunnelInboundTransform2, juniIpsecTunnelLifeTimeKBs=juniIpsecTunnelLifeTimeKBs, juniIpsecTunnelBackupDstType=juniIpsecTunnelBackupDstType, juniIpsecTunnelStatInbReplayErrs=juniIpsecTunnelStatInbReplayErrs, juniIpsecTunnelStatOutbUserRecvOctets=juniIpsecTunnelStatOutbUserRecvOctets, juniIpsecTunnelTransformSet=juniIpsecTunnelTransformSet, juniIpsecTunnelTransportVrRouterIdx=juniIpsecTunnelTransportVrRouterIdx, juniIpsecSummaryStatsOperStatusUp=juniIpsecSummaryStatsOperStatusUp, juniIpsecTunnelRemoteIdAddr2=juniIpsecTunnelRemoteIdAddr2, juniIpsecTunnelDstAddr=juniIpsecTunnelDstAddr, juniIpsecTunnelLocalIdAddr2=juniIpsecTunnelLocalIdAddr2, juniIpsecTunnelLocalIdType=juniIpsecTunnelLocalIdType, juniIpsecTunnelRemoteIdType=juniIpsecTunnelRemoteIdType, juniIpsecTunnelIfIndex=juniIpsecTunnelIfIndex, juniIpsecTunnelInboundTransform4=juniIpsecTunnelInboundTransform4, juniIpsecTunnelOutbPolicyErrs=juniIpsecTunnelOutbPolicyErrs, juniIpsecTunnelStatsGroup=juniIpsecTunnelStatsGroup, juniIpsecTunnelRowStatus=juniIpsecTunnelRowStatus, juniIpsecTunnelGlobalLocalEndpointRowStatus=juniIpsecTunnelGlobalLocalEndpointRowStatus)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(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')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs')
(juni_next_if_index, juni_name) = mibBuilder.importSymbols('Juniper-TC', 'JuniNextIfIndex', 'JuniName')
(module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup')
(ip_address, counter64, bits, object_identity, notification_type, gauge32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, integer32, counter32, mib_identifier, time_ticks, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Counter64', 'Bits', 'ObjectIdentity', 'NotificationType', 'Gauge32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'Integer32', 'Counter32', 'MibIdentifier', 'TimeTicks', 'iso')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
juni_ipsec_tunnel_mib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70))
juniIpsecTunnelMIB.setRevisions(('2004-04-06 22:26',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setLastUpdated('200404062226Z')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886-3146 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setDescription('The IPsec Tunnel MIB for the Juniper Networks enterprise.')
class Juniipsecidentitytype(TextualConvention, Integer32):
description = 'The type of IPsec Phase-1 identity. The Phase-1 identity may be identified by one of the ID types defined in IPSEC DOI.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
named_values = named_values(('reserved', 0), ('idIpv4Addr', 1), ('idFqdn', 2), ('idUserFqdn', 3), ('idIpv4AddrSubnet', 4), ('idIpv6Addr', 5), ('idIpv6AddrSubnet', 6), ('idIpv4AddrRange', 7), ('idIpv6AddrRange', 8), ('idDn', 9), ('idDerAsn1Gn', 10), ('idKeyId', 11))
class Juniipsectransformtype(TextualConvention, Integer32):
description = 'The transform algorithm for the IPsec tunnel.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
named_values = named_values(('reserved', 0), ('ahMd5', 1), ('ahSha', 2), ('espDesMd5', 3), ('esp3DesMd5', 4), ('espDesSha', 5), ('esp3DesSha', 6), ('espNullMd5', 7), ('espNullSha', 8), ('espDesNullAuth', 9), ('esp3DesNullAuth', 10))
class Juniipsecpfsgroup(TextualConvention, Integer32):
description = 'The perfect forward secrecy group. Group1 - 768-bit DH prime modulus group. Group2 - 1024-bit DH prime modulus group. Group5 - 1536-bit DH prime modulus group.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 5))
named_values = named_values(('noGroup', 0), ('group1', 1), ('group2', 2), ('group5', 5))
class Juniipsectunneltype(TextualConvention, Integer32):
description = 'The ipsec tunnel type.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('signaledTunnel', 0), ('manualTunnel', 1))
class Spi(TextualConvention, Unsigned32):
description = 'The type of the SPI associated with IPsec Phase-2 security associations.'
status = 'current'
display_hint = 'x'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4294967295)
juni_ipsec_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1))
juni_ipsec_tunnel = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1))
juni_ipsec_system = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2))
juni_ipsec_tunnel_next_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 1), juni_next_if_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelNextIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelNextIfIndex.setDescription('Coordinate ifIndex value allocation for entries in the juniIpsecTunnelIfTable. A GET of this object returns the next available ifIndex value to be used to create an entry in the associated interface table; or zero, if no valid ifIndex value is available. This object also returns a value of zero when it is the lexicographic successor of a varbind presented in an SNMP GETNEXT or GETBULK request, for which circumstance it is assumed that ifIndex allocation is unintended. Successive GETs will typically return different values, thus avoiding collisions among cooperating management clients seeking to create table entries simultaneously.')
juni_ipsec_tunnel_interface_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2))
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceTable.setDescription('This table contains entries of IPsec Tunnel interfaces.')
juni_ipsec_tunnel_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelIfIndex'))
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceEntry.setDescription('Each entry describes the characteristics of a single IPsec Tunnel interface. Creating/deleting entries in this table causes corresponding entries for be created/deleted in ifTable/ifXTable/juniIfTable.')
juni_ipsec_tunnel_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 1), interface_index())
if mibBuilder.loadTexts:
juniIpsecTunnelIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelIfIndex.setDescription('The ifIndex of the IPsec tunnel interface. When creating entries in this table, suitable values for this object are determined by reading juniIpsecTunnelNextIfIndex.')
juni_ipsec_tunnel_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelName.setDescription('The administratively assigned name for this IPsec Tunnel interface. Before configuring other tunnel attributes, IPsec tunnel has to be created with minimum attributes (tunnel name and rowStatus).')
juni_ipsec_tunnel_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 3), juni_ipsec_tunnel_type().clone('signaledTunnel')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelType.setDescription('The configured mode for this IPsec Tunnel interface.')
juni_ipsec_tunnel_transport_virtual_router = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 4), juni_name().clone('default')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVirtualRouter.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVirtualRouter.setDescription('The transport virtual router associated with this IPsec tunnel interface. This object need not be set when creating row entries. Note that the default when this object is not specified is the router associated with the agent acting on the management request.')
juni_ipsec_tunnel_local_end_pt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 5), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalEndPt.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalEndPt.setDescription('The tunnel local endpoint.')
juni_ipsec_tunnel_remote_end_pt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 6), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteEndPt.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteEndPt.setDescription('The tunnel remote endpoint.')
juni_ipsec_tunnel_transform_set = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSet.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSet.setDescription('The transform set. It refers to a transform set that is defined in the transform set table.')
juni_ipsec_tunnel_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 8), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcType.setDescription('The tunnel source type. The tunnel source may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 9), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcAddr.setDescription('The tunnel source IP(V4) address.')
juni_ipsec_tunnel_src_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcName.setDescription('The tunnel source Name.')
juni_ipsec_tunnel_dst_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 11), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstType.setDescription('The tunnel destination type. The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_dst_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 12), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstAddr.setDescription('The tunnel destination IP(V4) address.')
juni_ipsec_tunnel_dst_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstName.setDescription('The tunnel destination Name.')
juni_ipsec_tunnel_backup_dst_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 14), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstType.setDescription('The tunnel backup destination type. The tunnel backup destination type has to be the same as the tunnel destination type The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_backup_dst_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 15), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstAddr.setDescription('The tunnel backup destination IP(V4) address.')
juni_ipsec_tunnel_backup_dst_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 16), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstName.setDescription('The tunnel backup destination Name.')
juni_ipsec_tunnel_local_id_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 17), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdType.setDescription('The tunnel phase-2 local identity type. The tunnel local identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juni_ipsec_tunnel_local_id_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 18), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr1.setDescription('The tunnel local phase-2 identity IP address 1.')
juni_ipsec_tunnel_local_id_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 19), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr2.setDescription('The tunnel local phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel local phase-2 identity netmask in the case the identity type is an IP address subnet.')
juni_ipsec_tunnel_remote_id_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 20), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdType.setDescription('The tunnel phase-2 remote identity type. The tunnel remote identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juni_ipsec_tunnel_remote_id_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 21), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr1.setDescription('The tunnel remote phase-2 identity IP address 1.')
juni_ipsec_tunnel_remote_id_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 22), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr2.setDescription('The tunnel remote phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel remote phase-2 identity netmask in the case the identity type is an IP address subnet.')
juni_ipsec_tunnel_life_time_secs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 23), unsigned32().subtype(subtypeSpec=value_range_constraint(1800, 864000))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeSecs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeSecs.setDescription('The tunnel lifetime in seconds.')
juni_ipsec_tunnel_life_time_k_bs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(102400, 4294967295))).setUnits('kilobytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeKBs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeKBs.setDescription('The tunnel lifetime in kilobytes.')
juni_ipsec_tunnel_pfs_group = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 25), juni_ipsec_pfs_group()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelPfsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelPfsGroup.setDescription('The tunnel perfect forward secrecty group.')
juni_ipsec_tunnel_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(160, 9000))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelMtu.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelMtu.setDescription('The tunnel MTU.')
juni_ipsec_tunnel_inbound_spi1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 27), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi1.setDescription('The tunnel inbound SPI 1.')
juni_ipsec_tunnel_inbound_transform1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 28), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform1.setDescription('The tunnel inbound transform 1.')
juni_ipsec_tunnel_inbound_spi2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 29), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi2.setDescription('The tunnel inbound SPI 2.')
juni_ipsec_tunnel_inbound_transform2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 30), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform2.setDescription('The tunnel inbound transform 2.')
juni_ipsec_tunnel_inbound_spi3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 31), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi3.setDescription('The tunnel inbound SPI 3.')
juni_ipsec_tunnel_inbound_transform3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 32), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform3.setDescription('The tunnel inbound transform 3.')
juni_ipsec_tunnel_inbound_spi4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 33), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi4.setDescription('The tunnel inbound SPI 4.')
juni_ipsec_tunnel_inbound_transform4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 34), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform4.setDescription('The tunnel inbound transform 4.')
juni_ipsec_tunnel_outbound_spi = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 35), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundSpi.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundSpi.setDescription('The tunnel outbound SPI.')
juni_ipsec_tunnel_outbound_transform = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 36), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundTransform.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundTransform.setDescription('The tunnel outbound transform.')
juni_ipsec_tunnel_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 37), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelIfRowStatus juniIpsecTunnelName In addition, when creating an entry the following condition must hold: A value for juniIpsecTunnelIfIndex must have been determined previously, typically by reading juniIpsecTunnelNextIfIndex. Once created, the following objects may not be modified: juniIpsecTunnelName juniIpsecTunnelVirtualRouter A corresponding entry in ifTable/ifXTable/juniIfTable is created/ destroyed as a result of creating/destroying an entry in this table.')
juni_ipsec_tunnel_stat_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3))
if mibBuilder.loadTexts:
juniIpsecTunnelStatTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatTable.setDescription('The IPsec tunnel interface statistics table. Describes the IPsec tunnel inbound/outbound statistics on IPsec de/encapsulation, de/encryption, and related error statistics.')
juni_ipsec_tunnel_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatIfIndex'))
if mibBuilder.loadTexts:
juniIpsecTunnelStatEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatEntry.setDescription('Describes the ipsec traffic statistics of the ipsec tunnel interface.')
juni_ipsec_tunnel_stat_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 1), interface_index())
if mibBuilder.loadTexts:
juniIpsecTunnelStatIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatIfIndex.setDescription('Same value as ifIndex for the corresponding entry in Interfaces MIB ifTable.')
juni_ipsec_tunnel_stat_inb_user_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvPkts.setDescription('The total number of inbound user packets (non-error) received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_user_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvOctets.setDescription('The total number of inbound user octets (non-error) received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_acc_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvPkts.setDescription('The total number of inbound encapsulated packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_acc_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvOctets.setDescription('The total number of inbound encapsulated octets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_auth_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAuthErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAuthErrs.setDescription('The total number of inbound packets with authentication errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_replay_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbReplayErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbReplayErrs.setDescription('The total number of inbound packets with replay errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_policy_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPolicyErrs.setDescription('The total number of inbound packets with inbound policy errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_other_recv_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbOtherRecvErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbOtherRecvErrs.setDescription('The total number of inbound packets with other Rx errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_decrypt_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbDecryptErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbDecryptErrs.setDescription('The total number of inbound packets with decryption errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_pad_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPadErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPadErrs.setDescription('The total number of inbound packets with pad errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_user_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvPkts.setDescription('The total number of outbound user packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_user_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvOctets.setDescription('The total number of outbound user octets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_acc_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvPkts.setDescription('The total number of encapsulated outbound packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_acc_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 15), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvOctets.setDescription('The total number of encapsulated outbound octets received for this IPsec tunnel.')
juni_ipsec_tunnel_outb_other_tx_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbOtherTxErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbOtherTxErrs.setDescription('The total number of outbound packets with other TX errors for this IPsec tunnel.')
juni_ipsec_tunnel_outb_policy_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbPolicyErrs.setDescription('The total number of outbound packets with outbound policy errors for this IPsec tunnel.')
juni_ipsec_tunnel_transform_set_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetTable.setDescription('This table contains entries of IPsec transform sets defined for this router.')
juni_ipsec_tunnel_transform_set_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSetName'))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetEntry.setDescription('Each entry describes a transform set that contains up to 6 IPsec transforms. The transform set name is referenced by the IPsec tunnel as its local IPsec policy.')
juni_ipsec_tunnel_transform_set_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 64)))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetName.setDescription('The name of the IPsec tunnel transform set.')
juni_ipsec_tunnel_transform1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 2), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform1.setDescription('The first IPsec transform in the transform set.')
juni_ipsec_tunnel_transform2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 3), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform2.setDescription('The second IPsec transform in the transform set.')
juni_ipsec_tunnel_transform3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 4), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform3.setDescription('The third IPsec transform in the transform set.')
juni_ipsec_tunnel_transform4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 5), juni_ipsec_transform_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform4.setDescription('The fourth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform5 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 6), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform5.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform5.setDescription('The fifth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform6 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 7), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform6.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform6.setDescription('The sixth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform_set_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 8), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelTransformSetRowStatus juniIpsecTunnelTransformSetName juniIpsecTunnelTransform1.')
juni_ipsec_tunnel_global_local_endpoint_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5))
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointTable.setDescription('This table contains entries of global local endpoint for the IPsec tunnel. There is one global local endpoint for each transport virtual router if configured.')
juni_ipsec_tunnel_global_local_endpoint_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransportVrRouterIdx'))
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointEntry.setDescription('Each entry defines the global local endpoint for the transport virtual router.')
juni_ipsec_tunnel_transport_vr_router_idx = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 1), unsigned32())
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVrRouterIdx.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVrRouterIdx.setDescription('The transport virtual router for the global local endpoint.')
juni_ipsec_tunnel_global_local_endpoint = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpoint.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpoint.setDescription('The global local endpoint for the transport virtual router.')
juni_ipsec_tunnel_global_local_endpoint_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelGlobalLocalEndpoint juniIpsecTunnelTransportVrRouterIdx Once created, the global local endpoint can not be changed unless there is no IPsec tunnel references to the local endpoint.')
juni_ipsec_tunnel_system_stats = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1))
juni_ipsec_summary_stats_total_tunnels = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsTotalTunnels.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsTotalTunnels.setDescription('The total number of tunnels')
juni_ipsec_summary_stats_admin_status_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusEnabled.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusEnabled.setDescription('The total number of tunnels with administrative status enabled')
juni_ipsec_summary_stats_admin_status_disabled = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusDisabled.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusDisabled.setDescription('The total number of tunnels with administrative status disabled')
juni_ipsec_summary_stats_oper_status_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusUp.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusUp.setDescription('The total number of tunnels with operational status up')
juni_ipsec_summary_stats_oper_status_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusDown.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusDown.setDescription('The total number of tunnels with operational status down')
juni_ipsec_summary_stats_oper_status_not_present = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusNotPresent.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusNotPresent.setDescription('The total number of tunnels with operational status not-present')
juni_ipsec_tunnel_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2))
juni_ipsec_tunnel_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1))
juni_ipsec_tunnel_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2))
juni_ipsec_tunnel_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 1)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelConfigGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTransformSetGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecGlobalLocalEndpointGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_compliance = juniIpsecTunnelCompliance.setStatus('obsolete')
if mibBuilder.loadTexts:
juniIpsecTunnelCompliance.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juni_ipsec_tunnel_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 2)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelConfigGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTransformSetGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecGlobalLocalEndpointGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSystemStatsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_compliance2 = juniIpsecTunnelCompliance2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelCompliance2.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juni_ipsec_tunnel_config_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 1)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelNextIfIndex'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransportVirtualRouter'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalEndPt'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteEndPt'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSet'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdAddr1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdAddr2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdAddr1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdAddr2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLifeTimeSecs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLifeTimeKBs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelPfsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelMtu'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutboundSpi'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutboundTransform'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_config_group = juniIpsecTunnelConfigGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelConfigGroup.setDescription('A collection of objects providing configuration information of the IPsec tunnel.')
juni_ipsec_tunnel_stats_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 2)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbUserRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbUserRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAccRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAccRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAuthErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbReplayErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbPolicyErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbOtherRecvErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbDecryptErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbPadErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbUserRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbUserRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbAccRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbAccRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutbOtherTxErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutbPolicyErrs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_stats_group = juniIpsecTunnelStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatsGroup.setDescription('A collection of objects providing satistics information of the IPsec tunnel.')
juni_ipsec_transform_set_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 3)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform5'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform6'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSetRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_transform_set_group = juniIpsecTransformSetGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTransformSetGroup.setDescription('A collection of objects providing transform set information of the IPsec tunnel.')
juni_ipsec_global_local_endpoint_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 4)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelGlobalLocalEndpoint'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelGlobalLocalEndpointRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_global_local_endpoint_group = juniIpsecGlobalLocalEndpointGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecGlobalLocalEndpointGroup.setDescription('A collection of objects providing the global local endpoint for the IPsec tunnel.')
juni_ipsec_tunnel_system_stats_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 5)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsTotalTunnels'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsAdminStatusEnabled'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsAdminStatusDisabled'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusUp'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusDown'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusNotPresent'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_system_stats_group = juniIpsecTunnelSystemStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSystemStatsGroup.setDescription('A collection of objects providing summary statistics information for IPsec tunnels in one system.')
mibBuilder.exportSymbols('Juniper-IPsec-Tunnel-MIB', juniIpsecTunnelInboundSpi3=juniIpsecTunnelInboundSpi3, juniIpsecTunnelTransformSetRowStatus=juniIpsecTunnelTransformSetRowStatus, juniIpsecTunnelTransform5=juniIpsecTunnelTransform5, juniIpsecSummaryStatsAdminStatusEnabled=juniIpsecSummaryStatsAdminStatusEnabled, juniIpsecTunnelStatInbAccRecvPkts=juniIpsecTunnelStatInbAccRecvPkts, juniIpsecTunnelMtu=juniIpsecTunnelMtu, juniIpsecTunnelTransformSetTable=juniIpsecTunnelTransformSetTable, juniIpsecTunnelSrcType=juniIpsecTunnelSrcType, juniIpsecTunnelInboundSpi4=juniIpsecTunnelInboundSpi4, juniIpsecTunnelOutbOtherTxErrs=juniIpsecTunnelOutbOtherTxErrs, juniIpsecTunnelSrcAddr=juniIpsecTunnelSrcAddr, juniIpsecTunnelInboundTransform3=juniIpsecTunnelInboundTransform3, PYSNMP_MODULE_ID=juniIpsecTunnelMIB, juniIpsecSummaryStatsAdminStatusDisabled=juniIpsecSummaryStatsAdminStatusDisabled, JuniIpsecIdentityType=JuniIpsecIdentityType, juniIpsecTunnelInboundSpi1=juniIpsecTunnelInboundSpi1, juniIpsecTunnelStatOutbAccRecvOctets=juniIpsecTunnelStatOutbAccRecvOctets, juniIpsecTunnelDstName=juniIpsecTunnelDstName, juniIpsecTunnelMIB=juniIpsecTunnelMIB, juniIpsecTunnelStatInbAccRecvOctets=juniIpsecTunnelStatInbAccRecvOctets, juniIpsecTunnelMIBConformance=juniIpsecTunnelMIBConformance, juniIpsecTunnelTransform2=juniIpsecTunnelTransform2, juniIpsecTunnelGlobalLocalEndpointEntry=juniIpsecTunnelGlobalLocalEndpointEntry, juniIpsecSummaryStatsTotalTunnels=juniIpsecSummaryStatsTotalTunnels, juniIpsecTunnelStatInbPolicyErrs=juniIpsecTunnelStatInbPolicyErrs, juniIpsecTunnelStatOutbUserRecvPkts=juniIpsecTunnelStatOutbUserRecvPkts, juniIpsecTunnelInterfaceTable=juniIpsecTunnelInterfaceTable, juniIpsecTunnelStatInbUserRecvPkts=juniIpsecTunnelStatInbUserRecvPkts, juniIpsecTunnelGlobalLocalEndpoint=juniIpsecTunnelGlobalLocalEndpoint, juniIpsecTunnelStatInbOtherRecvErrs=juniIpsecTunnelStatInbOtherRecvErrs, juniIpsecSummaryStatsOperStatusDown=juniIpsecSummaryStatsOperStatusDown, juniIpsecTunnelLocalEndPt=juniIpsecTunnelLocalEndPt, juniIpsecTunnelMIBGroups=juniIpsecTunnelMIBGroups, juniIpsecTunnelConfigGroup=juniIpsecTunnelConfigGroup, juniIpsecTunnelDstType=juniIpsecTunnelDstType, juniIpsecTunnelStatIfIndex=juniIpsecTunnelStatIfIndex, juniIpsecTunnelInboundSpi2=juniIpsecTunnelInboundSpi2, juniIpsecTunnelOutboundTransform=juniIpsecTunnelOutboundTransform, juniIpsecTunnelSystemStats=juniIpsecTunnelSystemStats, juniIpsecTunnelTransform3=juniIpsecTunnelTransform3, juniIpsecTunnelOutboundSpi=juniIpsecTunnelOutboundSpi, juniIpsecGlobalLocalEndpointGroup=juniIpsecGlobalLocalEndpointGroup, juniIpsecTunnelSystemStatsGroup=juniIpsecTunnelSystemStatsGroup, juniIpsecTunnelName=juniIpsecTunnelName, juniIpsecTunnelStatInbAuthErrs=juniIpsecTunnelStatInbAuthErrs, juniIpsecTunnelTransformSetName=juniIpsecTunnelTransformSetName, juniIpsecTunnelBackupDstName=juniIpsecTunnelBackupDstName, juniIpsecTunnelStatInbUserRecvOctets=juniIpsecTunnelStatInbUserRecvOctets, juniIpsecTunnelStatOutbAccRecvPkts=juniIpsecTunnelStatOutbAccRecvPkts, juniIpsecObjects=juniIpsecObjects, JuniIpsecTransformType=JuniIpsecTransformType, juniIpsecTunnelLocalIdAddr1=juniIpsecTunnelLocalIdAddr1, juniIpsecTunnelTransform6=juniIpsecTunnelTransform6, juniIpsecTunnelTransform1=juniIpsecTunnelTransform1, juniIpsecSummaryStatsOperStatusNotPresent=juniIpsecSummaryStatsOperStatusNotPresent, juniIpsecTunnelPfsGroup=juniIpsecTunnelPfsGroup, juniIpsecTunnelType=juniIpsecTunnelType, juniIpsecTunnelStatTable=juniIpsecTunnelStatTable, juniIpsecTunnelRemoteEndPt=juniIpsecTunnelRemoteEndPt, juniIpsecTunnelSrcName=juniIpsecTunnelSrcName, juniIpsecTunnelTransform4=juniIpsecTunnelTransform4, juniIpsecTunnelInboundTransform1=juniIpsecTunnelInboundTransform1, juniIpsecTunnelStatInbDecryptErrs=juniIpsecTunnelStatInbDecryptErrs, juniIpsecTunnelStatInbPadErrs=juniIpsecTunnelStatInbPadErrs, juniIpsecTunnelInterfaceEntry=juniIpsecTunnelInterfaceEntry, Spi=Spi, juniIpsecTunnelStatEntry=juniIpsecTunnelStatEntry, juniIpsecTunnelMIBCompliances=juniIpsecTunnelMIBCompliances, juniIpsecTunnelLifeTimeSecs=juniIpsecTunnelLifeTimeSecs, juniIpsecTunnelBackupDstAddr=juniIpsecTunnelBackupDstAddr, juniIpsecTunnel=juniIpsecTunnel, juniIpsecTunnelNextIfIndex=juniIpsecTunnelNextIfIndex, juniIpsecTransformSetGroup=juniIpsecTransformSetGroup, JuniIpsecPfsGroup=JuniIpsecPfsGroup, juniIpsecTunnelCompliance=juniIpsecTunnelCompliance, JuniIpsecTunnelType=JuniIpsecTunnelType, juniIpsecTunnelGlobalLocalEndpointTable=juniIpsecTunnelGlobalLocalEndpointTable, juniIpsecTunnelCompliance2=juniIpsecTunnelCompliance2, juniIpsecTunnelTransportVirtualRouter=juniIpsecTunnelTransportVirtualRouter, juniIpsecTunnelTransformSetEntry=juniIpsecTunnelTransformSetEntry, juniIpsecSystem=juniIpsecSystem, juniIpsecTunnelRemoteIdAddr1=juniIpsecTunnelRemoteIdAddr1, juniIpsecTunnelInboundTransform2=juniIpsecTunnelInboundTransform2, juniIpsecTunnelLifeTimeKBs=juniIpsecTunnelLifeTimeKBs, juniIpsecTunnelBackupDstType=juniIpsecTunnelBackupDstType, juniIpsecTunnelStatInbReplayErrs=juniIpsecTunnelStatInbReplayErrs, juniIpsecTunnelStatOutbUserRecvOctets=juniIpsecTunnelStatOutbUserRecvOctets, juniIpsecTunnelTransformSet=juniIpsecTunnelTransformSet, juniIpsecTunnelTransportVrRouterIdx=juniIpsecTunnelTransportVrRouterIdx, juniIpsecSummaryStatsOperStatusUp=juniIpsecSummaryStatsOperStatusUp, juniIpsecTunnelRemoteIdAddr2=juniIpsecTunnelRemoteIdAddr2, juniIpsecTunnelDstAddr=juniIpsecTunnelDstAddr, juniIpsecTunnelLocalIdAddr2=juniIpsecTunnelLocalIdAddr2, juniIpsecTunnelLocalIdType=juniIpsecTunnelLocalIdType, juniIpsecTunnelRemoteIdType=juniIpsecTunnelRemoteIdType, juniIpsecTunnelIfIndex=juniIpsecTunnelIfIndex, juniIpsecTunnelInboundTransform4=juniIpsecTunnelInboundTransform4, juniIpsecTunnelOutbPolicyErrs=juniIpsecTunnelOutbPolicyErrs, juniIpsecTunnelStatsGroup=juniIpsecTunnelStatsGroup, juniIpsecTunnelRowStatus=juniIpsecTunnelRowStatus, juniIpsecTunnelGlobalLocalEndpointRowStatus=juniIpsecTunnelGlobalLocalEndpointRowStatus) |
n = int(input())
give = list(map(int, input().split()))
take = [0]*n
for i in range(n):
take[i] = give.index(i+1) + 1
print(*take, sep = " ") | n = int(input())
give = list(map(int, input().split()))
take = [0] * n
for i in range(n):
take[i] = give.index(i + 1) + 1
print(*take, sep=' ') |
count = 0
while True:
index = int(input())
if index == 0: break
aldo, beto = 0, 0
count += 1
for i in range(index):
x, y = map(int, input().split(' '))
beto += y
aldo += x
print("Teste %d" % count)
if beto > aldo:
print("Beto\n")
else:
print("Aldo\n") | count = 0
while True:
index = int(input())
if index == 0:
break
(aldo, beto) = (0, 0)
count += 1
for i in range(index):
(x, y) = map(int, input().split(' '))
beto += y
aldo += x
print('Teste %d' % count)
if beto > aldo:
print('Beto\n')
else:
print('Aldo\n') |
#
# Copyright (c) 2017-2018 Joy Diamond. All rights reserved.
#
@gem('Pearl.Atom')
def gem():
require_gem('Pearl.ClassOrder')
require_gem('Pearl.Method')
require_gem('Pearl.Nub')
lookup_atom = lookup_normal_token
provide_atom = provide_normal_token
def count_newlines__zero(t):
assert (t.ends_in_newline is t.line_marker is false) and (t.newlines is 0)
assert (t.s is intern_string(t.s))
return 0
@export
class PearlToken(Object):
__slots__ = ((
's',
))
ends_in_newline = false
herd_estimate = 0
is_comma = false
is_comment_line = false
is_comment__or__empty_line = false
is_empty_line = false
is_end_of_data = false
is_end_of_data__or__unknown_line = false
is_herd = false
is_identifier = false
is_indentation = false
is_keyword = false
is_keyword_return = false
is_right_parenthesis = false
is_right_square_bracket = false
line_marker = false
newlines = 0
def __init__(t, s):
t.s = s
def __repr__(t):
return arrange('<%s %r>', t.__class__.__name__, t.s)
count_newlines = count_newlines__zero
def display_short_token(t):
return arrange('{%s}', portray_string(t.s)[1:-1])
def display_full_token(t):
return arrange('<%s %s>', t.display_name, portray_string(t.s))
def dump_token(t, f, newline = true):
if t.ends_in_newline:
if t.newlines is 1:
f.partial('{%s}', portray_string(t.s)[1:-1])
else:
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
if newline:
f.line()
return false
return true
if t.newlines is 0:
f.partial('{%s}', portray_string(t.s)[1:-1])
return
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
display_token = __repr__
is_name = is_name__0
nub = static_conjure_nub
order = order__s
def write(t, w):
w(t.s)
@export
class Identifier(PearlToken):
__slots__ = (())
class_order = CLASS_ORDER__NORMAL_TOKEN
display_name = 'Identifier'
is__atom__or__special_operator = true
is_atom = true
is_colon = false
is_identifier = true
is_right_brace = false
is_special_operator = false
def add_parameters(t, art):
art.add_parameter(t)
def display_token(t):
return t.s
find_identifier = return_self
def is_name(t, s):
return t.s == s
mutate = mutate__self
scout_default_values = scout_default_values__0
def scout_variables(t, art):
art.fetch_variable(t)
transform = transform__self
def write_variables(t, art):
art.write_variable(t)
write_import = write_variables
@export
def produce_conjure_atom(name, Meta):
assert type(name) is String
assert type(Meta) is Type
@rename('conjure_%s', name)
def conjure_atom(s):
r = lookup_atom(s)
if r is not none:
return r
assert s.count('\n') is 0
s = intern_string(s)
return provide_atom(s, Meta(s))
return conjure_atom
conjure_name = produce_conjure_atom('name', Identifier)
export(
'conjure_name', conjure_name,
)
| @gem('Pearl.Atom')
def gem():
require_gem('Pearl.ClassOrder')
require_gem('Pearl.Method')
require_gem('Pearl.Nub')
lookup_atom = lookup_normal_token
provide_atom = provide_normal_token
def count_newlines__zero(t):
assert t.ends_in_newline is t.line_marker is false and t.newlines is 0
assert t.s is intern_string(t.s)
return 0
@export
class Pearltoken(Object):
__slots__ = ('s',)
ends_in_newline = false
herd_estimate = 0
is_comma = false
is_comment_line = false
is_comment__or__empty_line = false
is_empty_line = false
is_end_of_data = false
is_end_of_data__or__unknown_line = false
is_herd = false
is_identifier = false
is_indentation = false
is_keyword = false
is_keyword_return = false
is_right_parenthesis = false
is_right_square_bracket = false
line_marker = false
newlines = 0
def __init__(t, s):
t.s = s
def __repr__(t):
return arrange('<%s %r>', t.__class__.__name__, t.s)
count_newlines = count_newlines__zero
def display_short_token(t):
return arrange('{%s}', portray_string(t.s)[1:-1])
def display_full_token(t):
return arrange('<%s %s>', t.display_name, portray_string(t.s))
def dump_token(t, f, newline=true):
if t.ends_in_newline:
if t.newlines is 1:
f.partial('{%s}', portray_string(t.s)[1:-1])
else:
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
if newline:
f.line()
return false
return true
if t.newlines is 0:
f.partial('{%s}', portray_string(t.s)[1:-1])
return
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
display_token = __repr__
is_name = is_name__0
nub = static_conjure_nub
order = order__s
def write(t, w):
w(t.s)
@export
class Identifier(PearlToken):
__slots__ = ()
class_order = CLASS_ORDER__NORMAL_TOKEN
display_name = 'Identifier'
is__atom__or__special_operator = true
is_atom = true
is_colon = false
is_identifier = true
is_right_brace = false
is_special_operator = false
def add_parameters(t, art):
art.add_parameter(t)
def display_token(t):
return t.s
find_identifier = return_self
def is_name(t, s):
return t.s == s
mutate = mutate__self
scout_default_values = scout_default_values__0
def scout_variables(t, art):
art.fetch_variable(t)
transform = transform__self
def write_variables(t, art):
art.write_variable(t)
write_import = write_variables
@export
def produce_conjure_atom(name, Meta):
assert type(name) is String
assert type(Meta) is Type
@rename('conjure_%s', name)
def conjure_atom(s):
r = lookup_atom(s)
if r is not none:
return r
assert s.count('\n') is 0
s = intern_string(s)
return provide_atom(s, meta(s))
return conjure_atom
conjure_name = produce_conjure_atom('name', Identifier)
export('conjure_name', conjure_name) |
routes = []
def list_gizmos():
return 'Listing Gizmos'
routes.append(dict(
rule='/gizmos',
view_func=list_gizmos))
def add_gizmo():
return 'Add Gizmo'
routes.append(dict(
rule='/gizmo',
view_func=add_gizmo,
options=dict(methods=['POST'])))
def update_gizmo():
return 'Update Gizmo'
routes.append(dict(
rule='/gizmo',
view_func=update_gizmo,
options=dict(methods=['PUT'])))
def delete_gizmo():
return 'Delete Gadget'
routes.append(dict(
rule='/gadget',
view_func=delete_gizmo,
options=dict(methods=['DELETE'])))
| routes = []
def list_gizmos():
return 'Listing Gizmos'
routes.append(dict(rule='/gizmos', view_func=list_gizmos))
def add_gizmo():
return 'Add Gizmo'
routes.append(dict(rule='/gizmo', view_func=add_gizmo, options=dict(methods=['POST'])))
def update_gizmo():
return 'Update Gizmo'
routes.append(dict(rule='/gizmo', view_func=update_gizmo, options=dict(methods=['PUT'])))
def delete_gizmo():
return 'Delete Gadget'
routes.append(dict(rule='/gadget', view_func=delete_gizmo, options=dict(methods=['DELETE']))) |
SOFTWARE_DEVELOPMENT = "Software Development"
ELECTRICAL_ENGINEERING = "Electrical Engineering"
IT_OPERATIONS = "IT Operations & Helpdesk"
INFORMATION_DESIGN_AND_DOCUMENTATION = "Information Design & Documentation"
PROJECT_MANAGEMENT = "Project Management"
| software_development = 'Software Development'
electrical_engineering = 'Electrical Engineering'
it_operations = 'IT Operations & Helpdesk'
information_design_and_documentation = 'Information Design & Documentation'
project_management = 'Project Management' |
N, *p = map(int, open(0).read().split())
for x in p:
if x == 2:
print(2)
else:
print((x - 1) * (x - 1))
| (n, *p) = map(int, open(0).read().split())
for x in p:
if x == 2:
print(2)
else:
print((x - 1) * (x - 1)) |
def parse_cds_header(header_str):
data = header_str.split('|')
data_count = len(data)
data_dict = dict(zip(data[0:data_count:2], data[1:data_count:2]))
return data_dict
def parse_nt_header(header_str):
data = header_str.split('|')
data_dict = {}
data_dict['gi'] = int(data[1])
data_dict['accession'] = data[3]
data_dict['description'] = data[4].strip()
return data_dict
def parse_genome_header(header_str):
hdata = header_str.split()
data = parse_cds_header(hdata[0])
if len(hdata) == 2:
data['description'] = hdata[1]
else:
data['description'] = ''
return data
def get_cds_id(cds_header_data):
return '{0}_{1}'.format(cds_header_data['gb'], cds_header_data['cds'])
| def parse_cds_header(header_str):
data = header_str.split('|')
data_count = len(data)
data_dict = dict(zip(data[0:data_count:2], data[1:data_count:2]))
return data_dict
def parse_nt_header(header_str):
data = header_str.split('|')
data_dict = {}
data_dict['gi'] = int(data[1])
data_dict['accession'] = data[3]
data_dict['description'] = data[4].strip()
return data_dict
def parse_genome_header(header_str):
hdata = header_str.split()
data = parse_cds_header(hdata[0])
if len(hdata) == 2:
data['description'] = hdata[1]
else:
data['description'] = ''
return data
def get_cds_id(cds_header_data):
return '{0}_{1}'.format(cds_header_data['gb'], cds_header_data['cds']) |
# Count Binary Substrings: https://leetcode.com/problems/count-binary-substrings/
# Give a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively.
# Substrings that occur multiple times are counted the number of times they occur.
# We can move across the array and keep track off the number of values before that are the same and every time we switch check how many were before and take that as our count
class Solution:
def countBinarySubstrings(self, s: str) -> int:
prevCount, result, curCount = 0, 0, 1
for index in range(1, len(s)):
if s[index-1] != s[index]:
result += min(curCount, prevCount)
prevCount, curCount = curCount, 1
else:
curCount += 1
return result + min(curCount, prevCount)
# The above actually works really well and is actually the most optimal as it runs in o(n) and o(1). My initial thought was exactly on.
# This problem was actually a lot easier when I thought of it as a dynamic programming problem even though it really is more of a
# slidding window problem where you reset your count by alternating the counts
# Score Card
# Did I need hints? N
# Did you finish within 30 min? 13 min
# Was the solution optimal? See the above
# Were there any bugs? I accidently started my curcount at 0 when it should have been at 1 because we always
# start where it switches
# 5 5 5 3 = 4.5
| class Solution:
def count_binary_substrings(self, s: str) -> int:
(prev_count, result, cur_count) = (0, 0, 1)
for index in range(1, len(s)):
if s[index - 1] != s[index]:
result += min(curCount, prevCount)
(prev_count, cur_count) = (curCount, 1)
else:
cur_count += 1
return result + min(curCount, prevCount) |
# create he following pattern
# ['h']
# ['h', 'e']
# ['h', 'e', 'l']
# ['h', 'e', 'l', 'l']
# ['h', 'e', 'l', 'l', 'o']
text='hello'
my_list=[]
for char in text:
my_list.append(char)
print(my_list) | text = 'hello'
my_list = []
for char in text:
my_list.append(char)
print(my_list) |
# Basic Addition Calculator Program
# Takes input from the user and outputs the sum of those two numbers.
num1 = input("Enter a number: ")
num2 = input("Enter another number: ")
# Python by default converts inputs into strings a function is used to convert them into numbers.
# Float is used to allow the use of decimals.
result = float(num1) + float(num2)
print(result)
| num1 = input('Enter a number: ')
num2 = input('Enter another number: ')
result = float(num1) + float(num2)
print(result) |
def append_file(password, file_path):
try:
password_file = open(file_path, "a+")
password_file.write(password + "\r\n")
password_file.close()
except PermissionError as Err:
print("Error creating file: {}".format(Err))
| def append_file(password, file_path):
try:
password_file = open(file_path, 'a+')
password_file.write(password + '\r\n')
password_file.close()
except PermissionError as Err:
print('Error creating file: {}'.format(Err)) |
LANGUAGES = ['cs', 'da', 'de', 'en', 'es', 'et', 'fi',
'fr', 'it', 'nl', 'ro', 'pt', 'el', 'lt', 'lv']
LANGUAGE_DICTIONARY = {'cs' : 'Czech',
'da' : 'Danish',
'de' : 'German',
'en' : 'English',
'es' : 'Spanish',
'et' : 'Estonian',
'fi' : 'Finnish',
'fr' : 'French',
'it' : 'Italian',
'nl' : 'Dutch',
'ro' : 'Romanian',
'pt' : 'Portuguese',
'el' : 'Greek',
'lt' : 'Lithuanian',
'lv' : 'Latvian'} | languages = ['cs', 'da', 'de', 'en', 'es', 'et', 'fi', 'fr', 'it', 'nl', 'ro', 'pt', 'el', 'lt', 'lv']
language_dictionary = {'cs': 'Czech', 'da': 'Danish', 'de': 'German', 'en': 'English', 'es': 'Spanish', 'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'it': 'Italian', 'nl': 'Dutch', 'ro': 'Romanian', 'pt': 'Portuguese', 'el': 'Greek', 'lt': 'Lithuanian', 'lv': 'Latvian'} |
class MacOsJob:
def __init__(self, os_version, is_build=False, is_test=False, extra_props=tuple()):
# extra_props is tuple type, because mutable data structures for argument defaults
# is not recommended.
self.os_version = os_version
self.is_build = is_build
self.is_test = is_test
self.extra_props = dict(extra_props)
def gen_tree(self):
non_phase_parts = ["pytorch", "macos", self.os_version, "py3"]
extra_name_list = [name for name, exist in self.extra_props.items() if exist]
full_job_name_list = non_phase_parts + extra_name_list + [
'build' if self.is_build else None,
'test' if self.is_test else None,
]
full_job_name = "_".join(list(filter(None, full_job_name_list)))
test_build_dependency = "_".join(non_phase_parts + ["build"])
extra_dependencies = [test_build_dependency] if self.is_test else []
job_dependencies = extra_dependencies
# Yes we name the job after itself, it needs a non-empty value in here
# for the YAML output to work.
props_dict = {"requires": job_dependencies, "name": full_job_name}
return [{full_job_name: props_dict}]
WORKFLOW_DATA = [
MacOsJob("10_15", is_build=True),
MacOsJob("10_13", is_build=True),
MacOsJob(
"10_13",
is_build=False,
is_test=True,
),
MacOsJob(
"10_13",
is_build=True,
is_test=True,
extra_props=tuple({
"lite_interpreter": True
}.items()),
)
]
def get_workflow_jobs():
return [item.gen_tree() for item in WORKFLOW_DATA]
| class Macosjob:
def __init__(self, os_version, is_build=False, is_test=False, extra_props=tuple()):
self.os_version = os_version
self.is_build = is_build
self.is_test = is_test
self.extra_props = dict(extra_props)
def gen_tree(self):
non_phase_parts = ['pytorch', 'macos', self.os_version, 'py3']
extra_name_list = [name for (name, exist) in self.extra_props.items() if exist]
full_job_name_list = non_phase_parts + extra_name_list + ['build' if self.is_build else None, 'test' if self.is_test else None]
full_job_name = '_'.join(list(filter(None, full_job_name_list)))
test_build_dependency = '_'.join(non_phase_parts + ['build'])
extra_dependencies = [test_build_dependency] if self.is_test else []
job_dependencies = extra_dependencies
props_dict = {'requires': job_dependencies, 'name': full_job_name}
return [{full_job_name: props_dict}]
workflow_data = [mac_os_job('10_15', is_build=True), mac_os_job('10_13', is_build=True), mac_os_job('10_13', is_build=False, is_test=True), mac_os_job('10_13', is_build=True, is_test=True, extra_props=tuple({'lite_interpreter': True}.items()))]
def get_workflow_jobs():
return [item.gen_tree() for item in WORKFLOW_DATA] |
__all__ = [
"job_poll",
"single_job",
]
| __all__ = ['job_poll', 'single_job'] |
class Solution:
def generateTheString(self, n):
ans=[]
if n%2==0:
ans=['a' for i in range(n-1)]
ans.append('b')
else:
ans=['a' for i in range(n)]
return ans | class Solution:
def generate_the_string(self, n):
ans = []
if n % 2 == 0:
ans = ['a' for i in range(n - 1)]
ans.append('b')
else:
ans = ['a' for i in range(n)]
return ans |
# singleton tuple <- singleton tuple
x, = 0,
print(x)
# singleton tuple <- singleton list
x, = [-1]
print(x)
# binary tuple <- binary tuple
x,y = 1,2
print(x,y)
# binary tuple swap
x,y = y,x
print(x,y)
# ternary tuple <- ternary tuple
x,y,z = 3,4,5
print(x,y,z)
# singleton list <- singleton list
[x] = [42]
print(x)
# singleton list <- singleton tuple
[x] = 43,
print(x)
# binary list <- binary list
[x,y] = [6,7]
# binary list <- binary tuple
[x,y] = [44,45]
print(x,y)
# binary tuple (parens) <- binary list
(x,y) = [7,8]
print(x,y)
# binary tuple <- result of function call
(x,y) = (lambda: (9,10))()
print(x,y)
# nested binary tuple (parens) <- nested binary tuple (parens)
((x,y),z) = ((11,12),13)
print(x,y,z)
# nested binary tuple <- nested binary tuple
(x,y),z = (14,15),16
print(x,y,z)
| (x,) = (0,)
print(x)
(x,) = [-1]
print(x)
(x, y) = (1, 2)
print(x, y)
(x, y) = (y, x)
print(x, y)
(x, y, z) = (3, 4, 5)
print(x, y, z)
[x] = [42]
print(x)
[x] = (43,)
print(x)
[x, y] = [6, 7]
[x, y] = [44, 45]
print(x, y)
(x, y) = [7, 8]
print(x, y)
(x, y) = (lambda : (9, 10))()
print(x, y)
((x, y), z) = ((11, 12), 13)
print(x, y, z)
((x, y), z) = ((14, 15), 16)
print(x, y, z) |
def f1():
pass
def f2():
pass
def f3():
def f35():
pass
| def f1():
pass
def f2():
pass
def f3():
def f35():
pass |
n = int(input())
print('*'*n)
for _ in range(n-2):
print(f'*{" " * (n - 2)}*')
print('*'*n)
| n = int(input())
print('*' * n)
for _ in range(n - 2):
print(f"*{' ' * (n - 2)}*")
print('*' * n) |
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'ceee_ie_all',
'type': 'none',
'dependencies': [
'common/common.gyp:*',
'broker/broker.gyp:*',
'plugin/bho/bho.gyp:*',
'plugin/scripting/scripting.gyp:*',
'plugin/toolband/toolband.gyp:*',
'ie_unittests',
'mediumtest_ie',
]
},
{
'target_name': 'testing_invoke_executor',
'type': 'executable',
'sources': [
'plugin/bho/testing_invoke_executor.cc',
],
'dependencies': [
'../../base/base.gyp:base',
'../common/common.gyp:ceee_common',
'common/common.gyp:ie_guids',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
],
'libraries': [
'rpcrt4.lib',
],
},
{
'target_name': 'ie_unittests',
'type': 'executable',
'sources': [
'broker/api_dispatcher_unittest.cc',
'broker/broker_rpc_unittest.cc',
'broker/broker_unittest.cc',
'broker/cookie_api_module_unittest.cc',
'broker/executors_manager_unittest.cc',
'broker/infobar_api_module_unittest.cc',
'broker/tab_api_module_unittest.cc',
'broker/window_api_module_unittest.cc',
'broker/window_events_funnel_unittest.cc',
'common/ceee_module_util_unittest.cc',
'common/ceee_util_unittest.cc',
'common/chrome_frame_host_unittest.cc',
'common/crash_reporter_unittest.cc',
'common/extension_manifest_unittest.cc',
'common/ie_util_unittest.cc',
'common/metrics_util_unittest.cc',
'plugin/bho/browser_helper_object_unittest.cc',
'plugin/bho/cookie_accountant_unittest.cc',
'plugin/bho/cookie_events_funnel_unittest.cc',
'plugin/bho/dom_utils_unittest.cc',
'plugin/bho/events_funnel_unittest.cc',
'plugin/bho/executor_unittest.cc',
'plugin/bho/executor_com_unittest.cc',
'plugin/bho/extension_port_manager.cc',
'plugin/bho/frame_event_handler_unittest.cc',
'plugin/bho/infobar_events_funnel_unittest.cc',
'plugin/bho/infobar_manager_unittest.cc',
'plugin/bho/infobar_window_unittest.cc',
'plugin/bho/tab_events_funnel_unittest.cc',
'plugin/bho/tool_band_visibility_unittest.cc',
'plugin/bho/webnavigation_events_funnel_unittest.cc',
'plugin/bho/webrequest_events_funnel_unittest.cc',
'plugin/bho/webrequest_notifier_unittest.cc',
'plugin/bho/web_progress_notifier_unittest.cc',
'plugin/scripting/content_script_manager.rc',
'plugin/scripting/content_script_manager_unittest.cc',
'plugin/scripting/content_script_native_api_unittest.cc',
'plugin/scripting/renderer_extension_bindings_unittest.cc',
'plugin/scripting/renderer_extension_bindings_unittest.rc',
'plugin/scripting/script_host_unittest.cc',
'plugin/scripting/userscripts_librarian_unittest.cc',
'plugin/toolband/tool_band_unittest.cc',
'plugin/toolband/toolband_module_reporting_unittest.cc',
'testing/ie_unittest_main.cc',
'testing/mock_broker_and_friends.h',
'testing/mock_chrome_frame_host.h',
'testing/mock_browser_and_friends.h',
],
'msvs_settings': {
'VCCLCompilerTool': {
# Many symbols generated by GMock and GTest,
# we need /bigobj to cope.
'AdditionalOptions': ['/bigobj'],
},
},
'dependencies': [
'testing_invoke_executor',
'common/common.gyp:ie_common',
'common/common.gyp:ie_common_settings',
'common/common.gyp:ie_guids',
'broker/broker.gyp:broker',
'broker/broker.gyp:broker_rpc_lib',
'plugin/bho/bho.gyp:bho',
'plugin/scripting/scripting.gyp:javascript_bindings',
'plugin/scripting/scripting.gyp:scripting',
'plugin/toolband/toolband.gyp:ceee_ie_lib',
'plugin/toolband/toolband.gyp:ie_toolband_common',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
'../../base/base.gyp:base',
'../../breakpad/breakpad.gyp:breakpad_handler',
'../testing/sidestep/sidestep.gyp:sidestep',
'../testing/utils/test_utils.gyp:test_utils',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
],
'libraries': [
'oleacc.lib',
'iepmapi.lib',
'rpcrt4.lib',
],
},
{
'target_name': 'mediumtest_ie',
'type': 'executable',
'sources': [
'plugin/bho/mediumtest_browser_event.cc',
'plugin/bho/mediumtest_browser_helper_object.cc',
'testing/mediumtest_ie_common.cc',
'testing/mediumtest_ie_common.h',
'testing/mediumtest_ie_main.cc',
],
'msvs_settings': {
'VCCLCompilerTool': {
# Many symbols generated by GMock and GTest,
# we need /bigobj to cope.
'AdditionalOptions': ['/bigobj'],
},
},
'dependencies': [
'broker/broker.gyp:broker_rpc_lib',
'common/common.gyp:ie_common',
'common/common.gyp:ie_common_settings',
'common/common.gyp:ie_guids',
'plugin/bho/bho.gyp:bho',
'plugin/scripting/scripting.gyp:scripting',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
'../../base/base.gyp:base',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
'../testing/sidestep/sidestep.gyp:sidestep',
'../testing/utils/test_utils.gyp:test_utils',
],
'libraries': [
'oleacc.lib',
'iepmapi.lib',
'rpcrt4.lib',
],
},
]
}
| {'targets': [{'target_name': 'ceee_ie_all', 'type': 'none', 'dependencies': ['common/common.gyp:*', 'broker/broker.gyp:*', 'plugin/bho/bho.gyp:*', 'plugin/scripting/scripting.gyp:*', 'plugin/toolband/toolband.gyp:*', 'ie_unittests', 'mediumtest_ie']}, {'target_name': 'testing_invoke_executor', 'type': 'executable', 'sources': ['plugin/bho/testing_invoke_executor.cc'], 'dependencies': ['../../base/base.gyp:base', '../common/common.gyp:ceee_common', 'common/common.gyp:ie_guids', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib'], 'libraries': ['rpcrt4.lib']}, {'target_name': 'ie_unittests', 'type': 'executable', 'sources': ['broker/api_dispatcher_unittest.cc', 'broker/broker_rpc_unittest.cc', 'broker/broker_unittest.cc', 'broker/cookie_api_module_unittest.cc', 'broker/executors_manager_unittest.cc', 'broker/infobar_api_module_unittest.cc', 'broker/tab_api_module_unittest.cc', 'broker/window_api_module_unittest.cc', 'broker/window_events_funnel_unittest.cc', 'common/ceee_module_util_unittest.cc', 'common/ceee_util_unittest.cc', 'common/chrome_frame_host_unittest.cc', 'common/crash_reporter_unittest.cc', 'common/extension_manifest_unittest.cc', 'common/ie_util_unittest.cc', 'common/metrics_util_unittest.cc', 'plugin/bho/browser_helper_object_unittest.cc', 'plugin/bho/cookie_accountant_unittest.cc', 'plugin/bho/cookie_events_funnel_unittest.cc', 'plugin/bho/dom_utils_unittest.cc', 'plugin/bho/events_funnel_unittest.cc', 'plugin/bho/executor_unittest.cc', 'plugin/bho/executor_com_unittest.cc', 'plugin/bho/extension_port_manager.cc', 'plugin/bho/frame_event_handler_unittest.cc', 'plugin/bho/infobar_events_funnel_unittest.cc', 'plugin/bho/infobar_manager_unittest.cc', 'plugin/bho/infobar_window_unittest.cc', 'plugin/bho/tab_events_funnel_unittest.cc', 'plugin/bho/tool_band_visibility_unittest.cc', 'plugin/bho/webnavigation_events_funnel_unittest.cc', 'plugin/bho/webrequest_events_funnel_unittest.cc', 'plugin/bho/webrequest_notifier_unittest.cc', 'plugin/bho/web_progress_notifier_unittest.cc', 'plugin/scripting/content_script_manager.rc', 'plugin/scripting/content_script_manager_unittest.cc', 'plugin/scripting/content_script_native_api_unittest.cc', 'plugin/scripting/renderer_extension_bindings_unittest.cc', 'plugin/scripting/renderer_extension_bindings_unittest.rc', 'plugin/scripting/script_host_unittest.cc', 'plugin/scripting/userscripts_librarian_unittest.cc', 'plugin/toolband/tool_band_unittest.cc', 'plugin/toolband/toolband_module_reporting_unittest.cc', 'testing/ie_unittest_main.cc', 'testing/mock_broker_and_friends.h', 'testing/mock_chrome_frame_host.h', 'testing/mock_browser_and_friends.h'], 'msvs_settings': {'VCCLCompilerTool': {'AdditionalOptions': ['/bigobj']}}, 'dependencies': ['testing_invoke_executor', 'common/common.gyp:ie_common', 'common/common.gyp:ie_common_settings', 'common/common.gyp:ie_guids', 'broker/broker.gyp:broker', 'broker/broker.gyp:broker_rpc_lib', 'plugin/bho/bho.gyp:bho', 'plugin/scripting/scripting.gyp:javascript_bindings', 'plugin/scripting/scripting.gyp:scripting', 'plugin/toolband/toolband.gyp:ceee_ie_lib', 'plugin/toolband/toolband.gyp:ie_toolband_common', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib', '../../base/base.gyp:base', '../../breakpad/breakpad.gyp:breakpad_handler', '../testing/sidestep/sidestep.gyp:sidestep', '../testing/utils/test_utils.gyp:test_utils', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest'], 'libraries': ['oleacc.lib', 'iepmapi.lib', 'rpcrt4.lib']}, {'target_name': 'mediumtest_ie', 'type': 'executable', 'sources': ['plugin/bho/mediumtest_browser_event.cc', 'plugin/bho/mediumtest_browser_helper_object.cc', 'testing/mediumtest_ie_common.cc', 'testing/mediumtest_ie_common.h', 'testing/mediumtest_ie_main.cc'], 'msvs_settings': {'VCCLCompilerTool': {'AdditionalOptions': ['/bigobj']}}, 'dependencies': ['broker/broker.gyp:broker_rpc_lib', 'common/common.gyp:ie_common', 'common/common.gyp:ie_common_settings', 'common/common.gyp:ie_guids', 'plugin/bho/bho.gyp:bho', 'plugin/scripting/scripting.gyp:scripting', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib', '../../base/base.gyp:base', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', '../testing/sidestep/sidestep.gyp:sidestep', '../testing/utils/test_utils.gyp:test_utils'], 'libraries': ['oleacc.lib', 'iepmapi.lib', 'rpcrt4.lib']}]} |
expected_output = {
"fsol_packet_drop": 0,
"cac_status": "Not Dropping",
"cac_state": "ACTIVE",
"total_call_session_charges": 0,
"cac_duration": 372898,
"calls_accepted": 48667,
"current_actual_cpu": 3,
"call_limit": 350,
"cpu_limit": 80,
"calls_rejected": 3381,
"cac_events": {
"reject_reason": {
"low_platform_resources": {
"duration_of_activation": 0,
"times_of_activation": 0,
"rejected_calls": 0
},
"session_charges": {
"duration_of_activation": 0,
"times_of_activation": 27,
"rejected_calls": 27
},
"session_limit": {
"duration_of_activation": 0,
"times_of_activation": 9876543,
"rejected_calls": 0
},
"cpu_limit": {
"duration_of_activation": 116,
"times_of_activation": 3354,
"rejected_calls": 33541234
}
}
}
}
| expected_output = {'fsol_packet_drop': 0, 'cac_status': 'Not Dropping', 'cac_state': 'ACTIVE', 'total_call_session_charges': 0, 'cac_duration': 372898, 'calls_accepted': 48667, 'current_actual_cpu': 3, 'call_limit': 350, 'cpu_limit': 80, 'calls_rejected': 3381, 'cac_events': {'reject_reason': {'low_platform_resources': {'duration_of_activation': 0, 'times_of_activation': 0, 'rejected_calls': 0}, 'session_charges': {'duration_of_activation': 0, 'times_of_activation': 27, 'rejected_calls': 27}, 'session_limit': {'duration_of_activation': 0, 'times_of_activation': 9876543, 'rejected_calls': 0}, 'cpu_limit': {'duration_of_activation': 116, 'times_of_activation': 3354, 'rejected_calls': 33541234}}}} |
# TODO Introduce DesignViolation escalation system
class DictAttrs(object):
def __init__(self, **dic):
self.__dict__.update(dic)
def __iter__(self):
return self.__dict__.__iter__()
def __getitem__(self, item):
return self.__dict__.__getitem__(item)
def __getattr__(self, item):
if not item in self.__dict__:
raise LookupError
def __setitem__(self, key, value):
self.__dict__.__setitem__(key, value)
def __str__(self):
return self.__dict__.__str__()
class DictAttrBuilder:
def _on_new_attr_val(self, key, val):
raise NotImplementedError
def _new_attr_val(self, key, val):
self._on_new_attr_val(key, val)
return self
def __getattr__(self, item):
return lambda val: self._new_attr_val(item, val)
class DictAttrBuilderFactory(object):
def __init__(self, attr_builder_class):
self.cls = attr_builder_class
def __getattr__(self, item):
if item == 'cls':
return self.cls
return self.cls().__getattr__(item)
class ShapeMismatchError(TypeError):
pass
| class Dictattrs(object):
def __init__(self, **dic):
self.__dict__.update(dic)
def __iter__(self):
return self.__dict__.__iter__()
def __getitem__(self, item):
return self.__dict__.__getitem__(item)
def __getattr__(self, item):
if not item in self.__dict__:
raise LookupError
def __setitem__(self, key, value):
self.__dict__.__setitem__(key, value)
def __str__(self):
return self.__dict__.__str__()
class Dictattrbuilder:
def _on_new_attr_val(self, key, val):
raise NotImplementedError
def _new_attr_val(self, key, val):
self._on_new_attr_val(key, val)
return self
def __getattr__(self, item):
return lambda val: self._new_attr_val(item, val)
class Dictattrbuilderfactory(object):
def __init__(self, attr_builder_class):
self.cls = attr_builder_class
def __getattr__(self, item):
if item == 'cls':
return self.cls
return self.cls().__getattr__(item)
class Shapemismatcherror(TypeError):
pass |
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
occ = {}
for num in arr:
if num not in occ:
occ[num] = 1
else:
occ[num] += 1
x = list(occ.values())
return len(set(x)) == len(x) | class Solution:
def unique_occurrences(self, arr: List[int]) -> bool:
occ = {}
for num in arr:
if num not in occ:
occ[num] = 1
else:
occ[num] += 1
x = list(occ.values())
return len(set(x)) == len(x) |
n = int(input())
class Tree:
left_node = None
right_node = None
node_dict = dict([])
for i in range(n):
root, left, right = input().split()
node_dict[root] = Tree()
node_dict[root].left_node = left
node_dict[root].right_node = right
def prefix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return root + prefix(left)
elif left == '.' and right != '.':
return root + prefix(right)
else:
return root + prefix(left) + prefix(right)
def infix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return infix(left) + root
elif left == '.' and right != '.':
return root + infix(right)
else:
return infix(left) + root + infix(right)
def postfix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return postfix(left) + root
elif left == '.' and right != '.':
return postfix(right) + root
else:
return postfix(left) + postfix(right) + root
print(prefix('A'))
print(infix('A'))
print(postfix('A')) | n = int(input())
class Tree:
left_node = None
right_node = None
node_dict = dict([])
for i in range(n):
(root, left, right) = input().split()
node_dict[root] = tree()
node_dict[root].left_node = left
node_dict[root].right_node = right
def prefix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return root + prefix(left)
elif left == '.' and right != '.':
return root + prefix(right)
else:
return root + prefix(left) + prefix(right)
def infix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return infix(left) + root
elif left == '.' and right != '.':
return root + infix(right)
else:
return infix(left) + root + infix(right)
def postfix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return postfix(left) + root
elif left == '.' and right != '.':
return postfix(right) + root
else:
return postfix(left) + postfix(right) + root
print(prefix('A'))
print(infix('A'))
print(postfix('A')) |
class Solution:
def rob(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
if len(nums) <= 2:
return max(nums)
cache = [0] * len(nums)
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums) - 1):
cache[i] = max(cache[i-2] + nums[i], cache[i-1])
ans = cache[len(nums) - 2]
cache = [0] * len(nums)
nums = nums[1:]
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums)):
cache[i] = max(cache[i-2] + nums[i], cache[i-1])
ans = max(ans, cache[len(nums) - 1])
return ans
| class Solution:
def rob(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
if len(nums) <= 2:
return max(nums)
cache = [0] * len(nums)
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums) - 1):
cache[i] = max(cache[i - 2] + nums[i], cache[i - 1])
ans = cache[len(nums) - 2]
cache = [0] * len(nums)
nums = nums[1:]
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums)):
cache[i] = max(cache[i - 2] + nums[i], cache[i - 1])
ans = max(ans, cache[len(nums) - 1])
return ans |
class Solution:
def maxLengthBetweenEqualCharacters(self, s: str) -> int:
char_dict = {}
max = 0
for i in range(len(s)):
t = char_dict.get(s[i],-1)
if t==-1:
char_dict[s[i]] = i
else:
if i-t>max:
max = i-t
return max-1 | class Solution:
def max_length_between_equal_characters(self, s: str) -> int:
char_dict = {}
max = 0
for i in range(len(s)):
t = char_dict.get(s[i], -1)
if t == -1:
char_dict[s[i]] = i
elif i - t > max:
max = i - t
return max - 1 |
def make_car(manufacturer, model_name, **arguments):
new_car = {
'manufacturer': manufacturer,
'model_name': model_name,
}
for key, value in arguments.items():
new_car[key] = value
return new_car
car = make_car('subaru', 'outback', color='blue', tow_package=True)
print(car) | def make_car(manufacturer, model_name, **arguments):
new_car = {'manufacturer': manufacturer, 'model_name': model_name}
for (key, value) in arguments.items():
new_car[key] = value
return new_car
car = make_car('subaru', 'outback', color='blue', tow_package=True)
print(car) |
################################################################################
# Design Automation #
################################################################################
'''
Author: Sean Lam
Contact: seanlm@student.ubc.ca
''' | """
Author: Sean Lam
Contact: seanlm@student.ubc.ca
""" |
# # below is Okceg v0.1
#
# def is_num(jerry):
# try:
# int(jerry)
# except:
# try:
# float(jerry)
# except:
# return False
# else:
# return True
# else:
# return True
#
# print('\nInteractive Okceg Shell!\npowered by python\n')
#
# while(True):
# i = input('>')
#
# if i.lower() == 'exit()':
# break
#
# elif i[:6] == 'class(' and i[-1] == ')':
# c = i[6:-1]
# if is_num(c):
# print('number')
# elif c == 'true' or c == 'false':
# print('boolean')
# else:
# print('string')
#
# elif i[:5] == 'math(' and i[-1] == ')':
# c = i[5:-1].split(' ')
# o = c[0]
# l = c[1]
# t = c[2]
# if l == '+':
# print(int(o) + int(t))
# elif l == '-':
# print(int(o) - int(t))
# elif l == '*':
# print(int(o) * int(t))
# elif l == '/':
# print(int(o) / int(t))
#
# else:
# print('nonsense')
#below is Okceg v.2
__author__ = "Vibius Vibidius Zosimus"
__version__ = ".2"
print('\n')
print("Okceg IS: interactive shell of Okceg, based on python\n")
print("now i am going to say 'hello_world!'.\nhello_world!\n")
print("help:\n\tinput anything and hit 'enter';\n\tinput '1' and hit 'enter' to quit;\n")
while 1:
user_input = input(">>> ")
#first-character identifier
print("the first character of your input is:", user_input[0])
#input division
components = []
#step 1: get all numbers
numbers = ""
for jerry in user_input:
if isinstance(jerry, int):
numbers += jerry
#outputting all numbers
print("the numbers are:", numbers)
#quitting
if user_input is '1':
break
print('\n')
| __author__ = 'Vibius Vibidius Zosimus'
__version__ = '.2'
print('\n')
print('Okceg IS: interactive shell of Okceg, based on python\n')
print("now i am going to say 'hello_world!'.\nhello_world!\n")
print("help:\n\tinput anything and hit 'enter';\n\tinput '1' and hit 'enter' to quit;\n")
while 1:
user_input = input('>>> ')
print('the first character of your input is:', user_input[0])
components = []
numbers = ''
for jerry in user_input:
if isinstance(jerry, int):
numbers += jerry
print('the numbers are:', numbers)
if user_input is '1':
break
print('\n') |
c.Authenticator.admin_users = {'jupyterhub'}
c.JupyterHub.services = [
{
'command': [
'/opt/conda/bin/comsoljupyter', 'web',
'-s', '/srv/jupyterhub',
'12345', 'http://jupyter.radiasoft.org:8000',
],
'name': 'comsol',
'url': 'http://127.0.0.1:12345',
},
]
| c.Authenticator.admin_users = {'jupyterhub'}
c.JupyterHub.services = [{'command': ['/opt/conda/bin/comsoljupyter', 'web', '-s', '/srv/jupyterhub', '12345', 'http://jupyter.radiasoft.org:8000'], 'name': 'comsol', 'url': 'http://127.0.0.1:12345'}] |
'''
Aim: Given a base-10 integer, n, convert it to binary (base-2). Then find and print the
base-10 integer denoting the maximum number of consecutive 1's in n's binary representation.
'''
n = int(input()) # getting input
remainder = []
while n > 0:
rm = n % 2
n = n//2 # whenever decimal to binary conversion is done, the number is repeatedly divided by 2 until it could not be divided any further
remainder.append(rm) # appending the remainder that is obtained each time in a list
count,result = 0,0
for i in range(0,len(remainder)):
if remainder[i] == 0:
count = 0 # as soon as '0' is encountered, the counter is set to 0
else:
count += 1 # the counter increases every time consecutive ones are encountered
result = max(result,count) # maximum streak of 1's is chosen
print(result)
'''
Sample Test Case:
Input:
13
Output:
2
Explaination:
The binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.
''' | """
Aim: Given a base-10 integer, n, convert it to binary (base-2). Then find and print the
base-10 integer denoting the maximum number of consecutive 1's in n's binary representation.
"""
n = int(input())
remainder = []
while n > 0:
rm = n % 2
n = n // 2
remainder.append(rm)
(count, result) = (0, 0)
for i in range(0, len(remainder)):
if remainder[i] == 0:
count = 0
else:
count += 1
result = max(result, count)
print(result)
"\nSample Test Case:\nInput: \n13\nOutput: \n2\nExplaination:\nThe binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.\n\n" |
class node:
def __init__(self,key):
self.left=self.right=None
self.val=key
def printlevel(root,level):
if root==None:
return
if level==0:
print(root.val,end=' ')
else:
printlevel(root.left,level-1)
printlevel(root.right,level-1)
root=node(1)
root.left=node(2)
root.right=node(3)
root.left.left=node(4)
root.left.right=node(5)
printlevel(root,2)
| class Node:
def __init__(self, key):
self.left = self.right = None
self.val = key
def printlevel(root, level):
if root == None:
return
if level == 0:
print(root.val, end=' ')
else:
printlevel(root.left, level - 1)
printlevel(root.right, level - 1)
root = node(1)
root.left = node(2)
root.right = node(3)
root.left.left = node(4)
root.left.right = node(5)
printlevel(root, 2) |
n=int(input())
for i in range(n):
x=input()
l=len(x);li=[]
for i in range(l):
li.append(x[i])
j=0
sum=0
while j<len(li):
if li[j]=='4':
sum+=1
else:
pass
j+=1
print(sum)
| n = int(input())
for i in range(n):
x = input()
l = len(x)
li = []
for i in range(l):
li.append(x[i])
j = 0
sum = 0
while j < len(li):
if li[j] == '4':
sum += 1
else:
pass
j += 1
print(sum) |
__title__ = 'aiolo'
__version__ = '4.1.1'
__description__ = 'asyncio-friendly Python bindings for liblo'
__url__ = 'https://github.com/elijahr/aiolo'
__author__ = 'Elijah Shaw-Rutschman'
__author_email__ = 'elijahr+aiolo@gmail.com'
| __title__ = 'aiolo'
__version__ = '4.1.1'
__description__ = 'asyncio-friendly Python bindings for liblo'
__url__ = 'https://github.com/elijahr/aiolo'
__author__ = 'Elijah Shaw-Rutschman'
__author_email__ = 'elijahr+aiolo@gmail.com' |
customers = {
"name": "Taen Ahammed",
"age": 20,
"is_verified": True
}
print(customers["name"])
# print(customers["birthdate"])
# print(customers["Name"])
customers["name"] = "Taen"
print(customers.get("name"))
print(customers.get("birthdate"))
print(customers.get("birthdate", "Dec 12 1998"))
customers["isMarried"] = False
print(customers["isMarried"])
| customers = {'name': 'Taen Ahammed', 'age': 20, 'is_verified': True}
print(customers['name'])
customers['name'] = 'Taen'
print(customers.get('name'))
print(customers.get('birthdate'))
print(customers.get('birthdate', 'Dec 12 1998'))
customers['isMarried'] = False
print(customers['isMarried']) |
def correct_sentence(text):
'''
For the input of your function, you will be given one sentence. You have to return a corrected version, that starts with a capital letter and ends with a period (dot).
Pay attention to the fact that not all of the fixes are necessary. If a sentence already ends with a period (dot), then adding another one will be a mistake.
Input: A string.
Output: A string.
Precondition: No leading and trailing spaces, text contains only spaces, a-z A-Z , and .
'''
text = text.strip()
if text[-1]!='.':
text=text+'.'
text = text.split()
text[0] =text[0].capitalize()
text = ' '.join(text)
#text = text.replace(text[0], text[0].upper())
return text
if __name__ == '__main__':
print("Example:")
print(correct_sentence("greetings, friends"))
print(correct_sentence("Greetings, friends"))
print(correct_sentence("Greetings, friends."))
print(correct_sentence(" hi "))
print(correct_sentence("welcome to New York")) | def correct_sentence(text):
"""
For the input of your function, you will be given one sentence. You have to return a corrected version, that starts with a capital letter and ends with a period (dot).
Pay attention to the fact that not all of the fixes are necessary. If a sentence already ends with a period (dot), then adding another one will be a mistake.
Input: A string.
Output: A string.
Precondition: No leading and trailing spaces, text contains only spaces, a-z A-Z , and .
"""
text = text.strip()
if text[-1] != '.':
text = text + '.'
text = text.split()
text[0] = text[0].capitalize()
text = ' '.join(text)
return text
if __name__ == '__main__':
print('Example:')
print(correct_sentence('greetings, friends'))
print(correct_sentence('Greetings, friends'))
print(correct_sentence('Greetings, friends.'))
print(correct_sentence(' hi '))
print(correct_sentence('welcome to New York')) |
def get_arrangement_count(free_spaces):
if not free_spaces:
return 1
elif free_spaces < 2:
return 0
arrangements = 0
if free_spaces >= 3:
arrangements += (2 + get_arrangement_count(free_spaces - 3))
arrangements += (2 + get_arrangement_count(free_spaces - 2))
return arrangements
def count_arragements(columns):
return get_arrangement_count(columns * 2)
# Tests
assert count_arragements(4) == 32
| def get_arrangement_count(free_spaces):
if not free_spaces:
return 1
elif free_spaces < 2:
return 0
arrangements = 0
if free_spaces >= 3:
arrangements += 2 + get_arrangement_count(free_spaces - 3)
arrangements += 2 + get_arrangement_count(free_spaces - 2)
return arrangements
def count_arragements(columns):
return get_arrangement_count(columns * 2)
assert count_arragements(4) == 32 |
# ------------------------------
# 397. Integer Replacement
#
# Description:
# Given a positive integer n and you can do operations as follow:
#
# If n is even, replace n with n/2.
# If n is odd, you can replace n with either n + 1 or n - 1.
# What is the minimum number of replacements needed for n to become 1?
#
# Example 1:
# Input:
# 8
# Output:
# 3
# Explanation:
# 8 -> 4 -> 2 -> 1
#
# Example 2:
# Input:
# 7
# Output:
# 4
# Explanation:
# 7 -> 8 -> 4 -> 2 -> 1
# or
# 7 -> 6 -> 3 -> 2 -> 1
#
# Version: 1.0
# 10/09/19 by Jianfa
# ------------------------------
class Solution:
def integerReplacement(self, n: int) -> int:
if n == 1:
return 0
replaceCount = {1:0}
def dp(n: int) -> int:
if n in replaceCount:
return replaceCount[n]
if n % 2 == 0:
res = dp(n / 2) + 1
else:
res = min(dp(n + 1), dp(n - 1)) + 1
replaceCount[n] = res
return res
return dp(n)
# Used for testing
if __name__ == "__main__":
test = Solution()
# ------------------------------
# Summary:
# Dynamic programming solution.
# While there is another smart math solution idea from: https://leetcode.com/problems/integer-replacement/discuss/87928/Java-12-line-4(5)ms-iterative-solution-with-explanations.-No-other-data-structures.
# When n is even, the operation is fixed. The procedure is unknown when it is odd. When n is
# odd it can be written into the form n = 2k+1 (k is a non-negative integer.). That is,
# n+1 = 2k+2 and n-1 = 2k. Then, (n+1)/2 = k+1 and (n-1)/2 = k. So one of (n+1)/2 and (n-1)/2
# is even, the other is odd. And the "best" case of this problem is to divide as much as
# possible. Because of that, always pick n+1 or n-1 based on if it can be divided by 4. The
# only special case of that is when n=3 you would like to pick n-1 rather than n+1.
| class Solution:
def integer_replacement(self, n: int) -> int:
if n == 1:
return 0
replace_count = {1: 0}
def dp(n: int) -> int:
if n in replaceCount:
return replaceCount[n]
if n % 2 == 0:
res = dp(n / 2) + 1
else:
res = min(dp(n + 1), dp(n - 1)) + 1
replaceCount[n] = res
return res
return dp(n)
if __name__ == '__main__':
test = solution() |
__copyright__ = "Copyright (C) 2020 shimakaze-git"
__version__ = "0.0.1"
__license__ = "MIT"
__author__ = "shimakaze-git"
__author_email__ = "shimakaze.soft+github@googlemail.com"
__url__ = "http://github.com/shimakaze-git/django-jp-birthday"
__all__ = ["fields", "managers", "models"]
| __copyright__ = 'Copyright (C) 2020 shimakaze-git'
__version__ = '0.0.1'
__license__ = 'MIT'
__author__ = 'shimakaze-git'
__author_email__ = 'shimakaze.soft+github@googlemail.com'
__url__ = 'http://github.com/shimakaze-git/django-jp-birthday'
__all__ = ['fields', 'managers', 'models'] |
blist = [ 1, 2, 3, 255 ]
# byte is immutable
the_bytes = bytes( blist )
# b'\x01\x02\x03\xff'
print( the_bytes )
the_byte_array = bytearray( blist )
# bytearray(b'\x01\x02\x03\xff')
print( the_byte_array )
# bytearray is mutable
the_byte_array = bytearray( blist )
print( the_byte_array )
the_byte_array[0] = 127
print( the_byte_array )
the_bytes = bytes( range(0, 256) )
the_byte_array = bytearray( range(0, 256) )
'''
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
'''
print( the_bytes )
'''
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')
'''
print( the_byte_array ) | blist = [1, 2, 3, 255]
the_bytes = bytes(blist)
print(the_bytes)
the_byte_array = bytearray(blist)
print(the_byte_array)
the_byte_array = bytearray(blist)
print(the_byte_array)
the_byte_array[0] = 127
print(the_byte_array)
the_bytes = bytes(range(0, 256))
the_byte_array = bytearray(range(0, 256))
'\nb\'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\'\n'
print(the_bytes)
'\nbytearray(b\'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\')\n'
print(the_byte_array) |
total=0
n=int(input())
for i in range(9):
t=int(input())
total+=t
print(n-total) | total = 0
n = int(input())
for i in range(9):
t = int(input())
total += t
print(n - total) |
matrix_line_color = '#fff'
matrix_background_color = '#eee'
matrix_border_color = '#888'
matrix_border_width = 0.18
cc = { # cycle colors
'axis': 'ff0000',
'maindiag': '00438a',
'bigcyc': 'ba1000',
'with0': 'ff5500',
'without0': 'e23287',
'lighttetra': 'da691e',
'darktetra': '7b2e13'
}
id_colors_dict = {
'white': '#ffffff',
'yellow': '#ffff7f',
'green': '#33d42a',
'blue': '#3375ff',
'orange': '#ffa200',
'red': '#ef2500',
}
cube_grays_dict = {
'light': '#ddd',
'dark': '#888'
}
arrow_cube_svg_coordinates = [(0, 3), (2, 3), (.6, 2.2), (2.6, 2.2), (0, 1), (2, 1), (.6, .2), (2.6, .2)]
gray_cube_svg_coordinates = [(0, 3), (2, 3), (1, 2), (3, 2), (0, 1), (2, 1), (1, 0), (3, 0)]
cube_edges = [(0,1), (2,3), (4,5), (6,7), (0,2), (1,3), (4,6), (5,7), (0,4), (1,5), (2,6), (3,7)]
JF_sides_and_manipulations = {(7, 3): ('top', 'asc'), (1, 3): ('bottom', 'desc'), (3, 0): ('J back', 'fix'), (5, 4): ('F back', 'left'), (2, 1): ('F front', 'fix'), (6, 2): ('top', 'vert'), (5, 1): ('F back', 'vert'), (2, 5): ('J back', 'right'), (0, 3): ('bottom', 'left'), (7, 2): ('top', 'cross'), (4, 0): ('J front', 'vert'), (1, 2): ('bottom', 'cross'), (5, 5): ('J front', 'asc'), (4, 4): ('F back', 'desc'), (6, 3): ('top', 'right'), (1, 5): ('J front', 'left'), (5, 0): ('J front', 'cross'), (0, 4): ('F back', 'right'), (3, 3): ('top', 'left'), (5, 3): ('bottom', 'right'), (4, 1): ('F back', 'cross'), (1, 1): ('F back', 'fix'), (6, 4): ('F front', 'right'), (3, 2): ('top', 'horz'), (0, 0): ('J front', 'fix'), (7, 1): ('F front', 'cross'), (4, 5): ('J front', 'right'), (2, 2): ('top', 'fix'), (6, 0): ('J back', 'cross'), (1, 4): ('F back', 'asc'), (7, 5): ('J back', 'left'), (0, 5): ('J front', 'desc'), (4, 2): ('bottom', 'fix'), (1, 0): ('J front', 'horz'), (6, 5): ('J back', 'desc'), (3, 5): ('J back', 'asc'), (0, 1): ('F back', 'horz'), (7, 0): ('J back', 'vert'), (5, 2): ('bottom', 'horz'), (6, 1): ('F front', 'vert'), (3, 1): ('F front', 'horz'), (2, 4): ('F front', 'desc'), (7, 4): ('F front', 'asc'), (2, 0): ('J back', 'horz'), (4, 3): ('bottom', 'asc'), (2, 3): ('top', 'desc'), (3, 4): ('F front', 'left'), (0, 2): ('bottom', 'vert')}
| matrix_line_color = '#fff'
matrix_background_color = '#eee'
matrix_border_color = '#888'
matrix_border_width = 0.18
cc = {'axis': 'ff0000', 'maindiag': '00438a', 'bigcyc': 'ba1000', 'with0': 'ff5500', 'without0': 'e23287', 'lighttetra': 'da691e', 'darktetra': '7b2e13'}
id_colors_dict = {'white': '#ffffff', 'yellow': '#ffff7f', 'green': '#33d42a', 'blue': '#3375ff', 'orange': '#ffa200', 'red': '#ef2500'}
cube_grays_dict = {'light': '#ddd', 'dark': '#888'}
arrow_cube_svg_coordinates = [(0, 3), (2, 3), (0.6, 2.2), (2.6, 2.2), (0, 1), (2, 1), (0.6, 0.2), (2.6, 0.2)]
gray_cube_svg_coordinates = [(0, 3), (2, 3), (1, 2), (3, 2), (0, 1), (2, 1), (1, 0), (3, 0)]
cube_edges = [(0, 1), (2, 3), (4, 5), (6, 7), (0, 2), (1, 3), (4, 6), (5, 7), (0, 4), (1, 5), (2, 6), (3, 7)]
jf_sides_and_manipulations = {(7, 3): ('top', 'asc'), (1, 3): ('bottom', 'desc'), (3, 0): ('J back', 'fix'), (5, 4): ('F back', 'left'), (2, 1): ('F front', 'fix'), (6, 2): ('top', 'vert'), (5, 1): ('F back', 'vert'), (2, 5): ('J back', 'right'), (0, 3): ('bottom', 'left'), (7, 2): ('top', 'cross'), (4, 0): ('J front', 'vert'), (1, 2): ('bottom', 'cross'), (5, 5): ('J front', 'asc'), (4, 4): ('F back', 'desc'), (6, 3): ('top', 'right'), (1, 5): ('J front', 'left'), (5, 0): ('J front', 'cross'), (0, 4): ('F back', 'right'), (3, 3): ('top', 'left'), (5, 3): ('bottom', 'right'), (4, 1): ('F back', 'cross'), (1, 1): ('F back', 'fix'), (6, 4): ('F front', 'right'), (3, 2): ('top', 'horz'), (0, 0): ('J front', 'fix'), (7, 1): ('F front', 'cross'), (4, 5): ('J front', 'right'), (2, 2): ('top', 'fix'), (6, 0): ('J back', 'cross'), (1, 4): ('F back', 'asc'), (7, 5): ('J back', 'left'), (0, 5): ('J front', 'desc'), (4, 2): ('bottom', 'fix'), (1, 0): ('J front', 'horz'), (6, 5): ('J back', 'desc'), (3, 5): ('J back', 'asc'), (0, 1): ('F back', 'horz'), (7, 0): ('J back', 'vert'), (5, 2): ('bottom', 'horz'), (6, 1): ('F front', 'vert'), (3, 1): ('F front', 'horz'), (2, 4): ('F front', 'desc'), (7, 4): ('F front', 'asc'), (2, 0): ('J back', 'horz'), (4, 3): ('bottom', 'asc'), (2, 3): ('top', 'desc'), (3, 4): ('F front', 'left'), (0, 2): ('bottom', 'vert')} |
# http://59.23.150.58/30stair/q_r/q_r.php?pname=q_r
a, b = map(int, input().split())
print(int(a/b), a%b) | (a, b) = map(int, input().split())
print(int(a / b), a % b) |
#
# PySNMP MIB module HPN-ICF-LswRSTP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-LswRSTP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:40:01 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")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
dot1dStpPort, dot1dStpPortEntry = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dStpPort", "dot1dStpPortEntry")
hpnicflswCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicflswCommon")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
IpAddress, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Bits, Gauge32, Unsigned32, ObjectIdentity, TimeTicks, Counter64, Integer32, NotificationType, iso = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Bits", "Gauge32", "Unsigned32", "ObjectIdentity", "TimeTicks", "Counter64", "Integer32", "NotificationType", "iso")
MacAddress, TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TruthValue", "TextualConvention", "DisplayString")
hpnicfLswRstpMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6))
hpnicfLswRstpMib.setRevisions(('2001-06-29 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hpnicfLswRstpMib.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts: hpnicfLswRstpMib.setLastUpdated('200106290000Z')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setOrganization('')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setContactInfo('')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setDescription('')
class EnabledStatus(TextualConvention, Integer32):
description = 'A simple status value for the object.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("enabled", 1), ("disabled", 2))
hpnicfLswRstpMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1))
hpnicfdot1dStpStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 1), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpStatus.setDescription(' Bridge STP enabled/disabled state')
hpnicfdot1dStpForceVersion = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpForceVersion.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpForceVersion.setDescription(' Running mode of the bridge RSTP state machine')
hpnicfdot1dStpDiameter = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpDiameter.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpDiameter.setDescription(' Permitted amount of bridges between any two ends on the network.')
hpnicfdot1dStpRootBridgeAddress = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 4), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRootBridgeAddress.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRootBridgeAddress.setDescription(' MAC address of the root bridge')
hpnicfDot1dStpBpduGuard = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 6), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpBpduGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpBpduGuard.setDescription(' If BPDU guard enabled. The edge port will discard illegal BPDU when enabled')
hpnicfDot1dStpRootType = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("normal", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpRootType.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpRootType.setDescription(' Root type of the bridge')
hpnicfDot1dTimeOutFactor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dTimeOutFactor.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dTimeOutFactor.setDescription(' Time Out Factor of the bridge.')
hpnicfDot1dStpPathCostStandard = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("dot1d-1998", 1), ("dot1t", 2), ("legacy", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpPathCostStandard.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpPathCostStandard.setDescription(" Path Cost Standard of the bridge. Value 'dot1d-1998' is IEEE 802.1d standard in 1998, value 'dot1t' is IEEE 802.1t standard, and value 'legacy' is a private legacy standard.")
hpnicfdot1dStpPortXTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5), )
if mibBuilder.loadTexts: hpnicfdot1dStpPortXTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortXTable.setDescription('RSTP extended information of the port ')
hpnicfdot1dStpPortXEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1), )
dot1dStpPortEntry.registerAugmentions(("HPN-ICF-LswRSTP-MIB", "hpnicfdot1dStpPortXEntry"))
hpnicfdot1dStpPortXEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames())
if mibBuilder.loadTexts: hpnicfdot1dStpPortXEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortXEntry.setDescription(' RSTP extended information of the port ')
hpnicfdot1dStpPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 1), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortStatus.setDescription(' RSTP status of the port')
hpnicfdot1dStpPortEdgeport = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortEdgeport.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortEdgeport.setDescription(' Whether the port can be an edge port')
hpnicfdot1dStpPortPointToPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("forceTrue", 1), ("forceFalse", 2), ("auto", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortPointToPoint.setDescription(" It is the administrative value indicates whether the port can be connected to a point-to-point link or not. If the value is 'auto', the operative value of a point-to-point link state is determined by device itself, and can be read from hpnicfdot1dStpOperPortPointToPoint.")
hpnicfdot1dStpMcheck = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpMcheck.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpMcheck.setDescription(' Check if the port transfer state machine enters')
hpnicfdot1dStpTransLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpTransLimit.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTransLimit.setDescription(' Packet transmission limit of the bridge in a duration of Hello Time.')
hpnicfdot1dStpRXStpBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXStpBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXStpBPDU.setDescription(' Number of STP BPDU received ')
hpnicfdot1dStpTXStpBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXStpBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXStpBPDU.setDescription(' Number of STP BPDU transmitted ')
hpnicfdot1dStpRXTCNBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCNBPDU.setDescription(' Number of TCN BPDU received ')
hpnicfdot1dStpTXTCNBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXTCNBPDU.setDescription(' Number of TCN BPDU transmitted ')
hpnicfdot1dStpRXRSTPBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXRSTPBPDU.setDescription('Number of RSTP BPDU received')
hpnicfdot1dStpTXRSTPBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXRSTPBPDU.setDescription(' Number of RSTP BPDU transmitted ')
hpnicfdot1dStpClearStatistics = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpClearStatistics.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpClearStatistics.setDescription('Clear RSTP statistics. Read operation not supported. ')
hpnicfdot1dSetStpDefaultPortCost = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("enable", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dSetStpDefaultPortCost.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dSetStpDefaultPortCost.setDescription('Set PathCost back to the default setting. Read operation not supported.')
hpnicfdot1dStpRootGuard = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 14), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpRootGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRootGuard.setDescription(' If the port guard root bridge. Other bridge which want to be root can not become root through this port if enabled. ')
hpnicfdot1dStpLoopGuard = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 15), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpLoopGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpLoopGuard.setDescription(' Loop guard function that keep a root port or an alternate port in discarding state while the information on the port is aged out.')
hpnicfdot1dStpPortBlockedReason = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("notBlock", 1), ("blockForProtocol", 2), ("blockForRootGuard", 3), ("blockForBPDUGuard", 4), ("blockForLoopGuard", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpPortBlockedReason.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortBlockedReason.setDescription(' Record the block reason of the port. notBlock (1) means that the port is not in block state,. blockForProtocol (2) means that the port is blocked by stp protocol to avoid loop. blockForRootGuard(3) means that the root guard flag of bridge is set and a better message received from the port,and the port is blocked. blockForBPDUGuard(4) means that the port has been configured as an edge port and receive a BPDU and thus blocked. blockForLoopGuard(5) means that the port is blocked for loopguarded. ')
hpnicfdot1dStpRXTCBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCBPDU.setDescription(' The number of received TC BPDUs ')
hpnicfdot1dStpPortSendingBPDUType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpPortSendingBPDUType.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortSendingBPDUType.setDescription(' Type of BPDU which the port is sending. ')
hpnicfdot1dStpOperPortPointToPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpOperPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpOperPortPointToPoint.setDescription(' This object indicates whether the port has connected to a point-to-point link or not. The administrative value should be read from hpnicfdot1dStpPortPointToPoint. ')
hpnicfRstpEventsV2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0))
if mibBuilder.loadTexts: hpnicfRstpEventsV2.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpEventsV2.setDescription('Definition point for RSTP notifications.')
hpnicfRstpBpduGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 1)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpBpduGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpBpduGuarded.setDescription('The SNMP trap that is generated when an edged port of the BPDU-guard switch recevies BPDU packets.')
hpnicfRstpRootGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 2)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpRootGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpRootGuarded.setDescription('The SNMP trap that is generated when a root-guard port receives a superior bpdu.')
hpnicfRstpBridgeLostRootPrimary = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 3))
if mibBuilder.loadTexts: hpnicfRstpBridgeLostRootPrimary.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpBridgeLostRootPrimary.setDescription('The SNMP trap that is generated when the bridge is no longer the root bridge of the spanning tree. Another switch with higher priority has already been the root bridge. ')
hpnicfRstpLoopGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 4)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpLoopGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpLoopGuarded.setDescription('The SNMP trap that is generated when a loop-guard port is aged out .')
hpnicfdot1dStpIgnoredVlanTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10), )
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanTable.setDescription('RSTP extended information of vlan ')
hpnicfdot1dStpIgnoredVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1), ).setIndexNames((0, "HPN-ICF-LswRSTP-MIB", "hpnicfdot1dVlan"))
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanEntry.setDescription(' RSTP extended information of the vlan ')
hpnicfdot1dVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dVlan.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dVlan.setDescription(' Vlan id supported')
hpnicfdot1dStpIgnore = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpIgnore.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnore.setDescription(' Whether the vlan is stp Ignored')
mibBuilder.exportSymbols("HPN-ICF-LswRSTP-MIB", hpnicfdot1dStpRXStpBPDU=hpnicfdot1dStpRXStpBPDU, hpnicfRstpBridgeLostRootPrimary=hpnicfRstpBridgeLostRootPrimary, PYSNMP_MODULE_ID=hpnicfLswRstpMib, hpnicfdot1dStpRXRSTPBPDU=hpnicfdot1dStpRXRSTPBPDU, hpnicfdot1dSetStpDefaultPortCost=hpnicfdot1dSetStpDefaultPortCost, hpnicfdot1dStpPortSendingBPDUType=hpnicfdot1dStpPortSendingBPDUType, hpnicfRstpRootGuarded=hpnicfRstpRootGuarded, hpnicfLswRstpMibObject=hpnicfLswRstpMibObject, hpnicfdot1dStpForceVersion=hpnicfdot1dStpForceVersion, hpnicfRstpLoopGuarded=hpnicfRstpLoopGuarded, hpnicfDot1dTimeOutFactor=hpnicfDot1dTimeOutFactor, hpnicfDot1dStpBpduGuard=hpnicfDot1dStpBpduGuard, hpnicfdot1dStpDiameter=hpnicfdot1dStpDiameter, hpnicfdot1dStpTXRSTPBPDU=hpnicfdot1dStpTXRSTPBPDU, hpnicfdot1dStpOperPortPointToPoint=hpnicfdot1dStpOperPortPointToPoint, hpnicfRstpEventsV2=hpnicfRstpEventsV2, EnabledStatus=EnabledStatus, hpnicfDot1dStpRootType=hpnicfDot1dStpRootType, hpnicfDot1dStpPathCostStandard=hpnicfDot1dStpPathCostStandard, hpnicfdot1dStpTXTCNBPDU=hpnicfdot1dStpTXTCNBPDU, hpnicfdot1dStpClearStatistics=hpnicfdot1dStpClearStatistics, hpnicfdot1dVlan=hpnicfdot1dVlan, hpnicfLswRstpMib=hpnicfLswRstpMib, hpnicfRstpBpduGuarded=hpnicfRstpBpduGuarded, hpnicfdot1dStpPortXEntry=hpnicfdot1dStpPortXEntry, hpnicfdot1dStpStatus=hpnicfdot1dStpStatus, hpnicfdot1dStpPortPointToPoint=hpnicfdot1dStpPortPointToPoint, hpnicfdot1dStpRootBridgeAddress=hpnicfdot1dStpRootBridgeAddress, hpnicfdot1dStpPortEdgeport=hpnicfdot1dStpPortEdgeport, hpnicfdot1dStpIgnoredVlanTable=hpnicfdot1dStpIgnoredVlanTable, hpnicfdot1dStpRootGuard=hpnicfdot1dStpRootGuard, hpnicfdot1dStpRXTCNBPDU=hpnicfdot1dStpRXTCNBPDU, hpnicfdot1dStpTXStpBPDU=hpnicfdot1dStpTXStpBPDU, hpnicfdot1dStpIgnore=hpnicfdot1dStpIgnore, hpnicfdot1dStpPortStatus=hpnicfdot1dStpPortStatus, hpnicfdot1dStpPortBlockedReason=hpnicfdot1dStpPortBlockedReason, hpnicfdot1dStpPortXTable=hpnicfdot1dStpPortXTable, hpnicfdot1dStpRXTCBPDU=hpnicfdot1dStpRXTCBPDU, hpnicfdot1dStpMcheck=hpnicfdot1dStpMcheck, hpnicfdot1dStpLoopGuard=hpnicfdot1dStpLoopGuard, hpnicfdot1dStpTransLimit=hpnicfdot1dStpTransLimit, hpnicfdot1dStpIgnoredVlanEntry=hpnicfdot1dStpIgnoredVlanEntry)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(dot1d_stp_port, dot1d_stp_port_entry) = mibBuilder.importSymbols('BRIDGE-MIB', 'dot1dStpPort', 'dot1dStpPortEntry')
(hpnicflsw_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicflswCommon')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(ip_address, module_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, bits, gauge32, unsigned32, object_identity, time_ticks, counter64, integer32, notification_type, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'ModuleIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Bits', 'Gauge32', 'Unsigned32', 'ObjectIdentity', 'TimeTicks', 'Counter64', 'Integer32', 'NotificationType', 'iso')
(mac_address, truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'TruthValue', 'TextualConvention', 'DisplayString')
hpnicf_lsw_rstp_mib = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6))
hpnicfLswRstpMib.setRevisions(('2001-06-29 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setLastUpdated('200106290000Z')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setOrganization('')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setContactInfo('')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setDescription('')
class Enabledstatus(TextualConvention, Integer32):
description = 'A simple status value for the object.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('enabled', 1), ('disabled', 2))
hpnicf_lsw_rstp_mib_object = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1))
hpnicfdot1d_stp_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 1), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpStatus.setDescription(' Bridge STP enabled/disabled state')
hpnicfdot1d_stp_force_version = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('stp', 0), ('rstp', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpForceVersion.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpForceVersion.setDescription(' Running mode of the bridge RSTP state machine')
hpnicfdot1d_stp_diameter = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpDiameter.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpDiameter.setDescription(' Permitted amount of bridges between any two ends on the network.')
hpnicfdot1d_stp_root_bridge_address = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 4), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootBridgeAddress.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootBridgeAddress.setDescription(' MAC address of the root bridge')
hpnicf_dot1d_stp_bpdu_guard = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 6), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpBpduGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpBpduGuard.setDescription(' If BPDU guard enabled. The edge port will discard illegal BPDU when enabled')
hpnicf_dot1d_stp_root_type = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('normal', 1), ('primary', 2), ('secondary', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpRootType.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpRootType.setDescription(' Root type of the bridge')
hpnicf_dot1d_time_out_factor = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(3, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dTimeOutFactor.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dTimeOutFactor.setDescription(' Time Out Factor of the bridge.')
hpnicf_dot1d_stp_path_cost_standard = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('dot1d-1998', 1), ('dot1t', 2), ('legacy', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpPathCostStandard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpPathCostStandard.setDescription(" Path Cost Standard of the bridge. Value 'dot1d-1998' is IEEE 802.1d standard in 1998, value 'dot1t' is IEEE 802.1t standard, and value 'legacy' is a private legacy standard.")
hpnicfdot1d_stp_port_x_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5))
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXTable.setDescription('RSTP extended information of the port ')
hpnicfdot1d_stp_port_x_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1))
dot1dStpPortEntry.registerAugmentions(('HPN-ICF-LswRSTP-MIB', 'hpnicfdot1dStpPortXEntry'))
hpnicfdot1dStpPortXEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames())
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXEntry.setDescription(' RSTP extended information of the port ')
hpnicfdot1d_stp_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 1), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortStatus.setDescription(' RSTP status of the port')
hpnicfdot1d_stp_port_edgeport = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortEdgeport.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortEdgeport.setDescription(' Whether the port can be an edge port')
hpnicfdot1d_stp_port_point_to_point = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('forceTrue', 1), ('forceFalse', 2), ('auto', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortPointToPoint.setDescription(" It is the administrative value indicates whether the port can be connected to a point-to-point link or not. If the value is 'auto', the operative value of a point-to-point link state is determined by device itself, and can be read from hpnicfdot1dStpOperPortPointToPoint.")
hpnicfdot1d_stp_mcheck = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 4), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpMcheck.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpMcheck.setDescription(' Check if the port transfer state machine enters')
hpnicfdot1d_stp_trans_limit = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpTransLimit.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTransLimit.setDescription(' Packet transmission limit of the bridge in a duration of Hello Time.')
hpnicfdot1d_stp_rx_stp_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXStpBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXStpBPDU.setDescription(' Number of STP BPDU received ')
hpnicfdot1d_stp_tx_stp_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXStpBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXStpBPDU.setDescription(' Number of STP BPDU transmitted ')
hpnicfdot1d_stp_rxtcnbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCNBPDU.setDescription(' Number of TCN BPDU received ')
hpnicfdot1d_stp_txtcnbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXTCNBPDU.setDescription(' Number of TCN BPDU transmitted ')
hpnicfdot1d_stp_rxrstpbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXRSTPBPDU.setDescription('Number of RSTP BPDU received')
hpnicfdot1d_stp_txrstpbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXRSTPBPDU.setDescription(' Number of RSTP BPDU transmitted ')
hpnicfdot1d_stp_clear_statistics = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpClearStatistics.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpClearStatistics.setDescription('Clear RSTP statistics. Read operation not supported. ')
hpnicfdot1d_set_stp_default_port_cost = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('enable', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dSetStpDefaultPortCost.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dSetStpDefaultPortCost.setDescription('Set PathCost back to the default setting. Read operation not supported.')
hpnicfdot1d_stp_root_guard = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 14), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootGuard.setDescription(' If the port guard root bridge. Other bridge which want to be root can not become root through this port if enabled. ')
hpnicfdot1d_stp_loop_guard = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 15), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpLoopGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpLoopGuard.setDescription(' Loop guard function that keep a root port or an alternate port in discarding state while the information on the port is aged out.')
hpnicfdot1d_stp_port_blocked_reason = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('notBlock', 1), ('blockForProtocol', 2), ('blockForRootGuard', 3), ('blockForBPDUGuard', 4), ('blockForLoopGuard', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortBlockedReason.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortBlockedReason.setDescription(' Record the block reason of the port. notBlock (1) means that the port is not in block state,. blockForProtocol (2) means that the port is blocked by stp protocol to avoid loop. blockForRootGuard(3) means that the root guard flag of bridge is set and a better message received from the port,and the port is blocked. blockForBPDUGuard(4) means that the port has been configured as an edge port and receive a BPDU and thus blocked. blockForLoopGuard(5) means that the port is blocked for loopguarded. ')
hpnicfdot1d_stp_rxtcbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCBPDU.setDescription(' The number of received TC BPDUs ')
hpnicfdot1d_stp_port_sending_bpdu_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('stp', 0), ('rstp', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortSendingBPDUType.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortSendingBPDUType.setDescription(' Type of BPDU which the port is sending. ')
hpnicfdot1d_stp_oper_port_point_to_point = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpOperPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpOperPortPointToPoint.setDescription(' This object indicates whether the port has connected to a point-to-point link or not. The administrative value should be read from hpnicfdot1dStpPortPointToPoint. ')
hpnicf_rstp_events_v2 = object_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0))
if mibBuilder.loadTexts:
hpnicfRstpEventsV2.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpEventsV2.setDescription('Definition point for RSTP notifications.')
hpnicf_rstp_bpdu_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 1)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpBpduGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpBpduGuarded.setDescription('The SNMP trap that is generated when an edged port of the BPDU-guard switch recevies BPDU packets.')
hpnicf_rstp_root_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 2)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpRootGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpRootGuarded.setDescription('The SNMP trap that is generated when a root-guard port receives a superior bpdu.')
hpnicf_rstp_bridge_lost_root_primary = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 3))
if mibBuilder.loadTexts:
hpnicfRstpBridgeLostRootPrimary.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpBridgeLostRootPrimary.setDescription('The SNMP trap that is generated when the bridge is no longer the root bridge of the spanning tree. Another switch with higher priority has already been the root bridge. ')
hpnicf_rstp_loop_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 4)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpLoopGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpLoopGuarded.setDescription('The SNMP trap that is generated when a loop-guard port is aged out .')
hpnicfdot1d_stp_ignored_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10))
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanTable.setDescription('RSTP extended information of vlan ')
hpnicfdot1d_stp_ignored_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1)).setIndexNames((0, 'HPN-ICF-LswRSTP-MIB', 'hpnicfdot1dVlan'))
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanEntry.setDescription(' RSTP extended information of the vlan ')
hpnicfdot1d_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dVlan.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dVlan.setDescription(' Vlan id supported')
hpnicfdot1d_stp_ignore = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnore.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnore.setDescription(' Whether the vlan is stp Ignored')
mibBuilder.exportSymbols('HPN-ICF-LswRSTP-MIB', hpnicfdot1dStpRXStpBPDU=hpnicfdot1dStpRXStpBPDU, hpnicfRstpBridgeLostRootPrimary=hpnicfRstpBridgeLostRootPrimary, PYSNMP_MODULE_ID=hpnicfLswRstpMib, hpnicfdot1dStpRXRSTPBPDU=hpnicfdot1dStpRXRSTPBPDU, hpnicfdot1dSetStpDefaultPortCost=hpnicfdot1dSetStpDefaultPortCost, hpnicfdot1dStpPortSendingBPDUType=hpnicfdot1dStpPortSendingBPDUType, hpnicfRstpRootGuarded=hpnicfRstpRootGuarded, hpnicfLswRstpMibObject=hpnicfLswRstpMibObject, hpnicfdot1dStpForceVersion=hpnicfdot1dStpForceVersion, hpnicfRstpLoopGuarded=hpnicfRstpLoopGuarded, hpnicfDot1dTimeOutFactor=hpnicfDot1dTimeOutFactor, hpnicfDot1dStpBpduGuard=hpnicfDot1dStpBpduGuard, hpnicfdot1dStpDiameter=hpnicfdot1dStpDiameter, hpnicfdot1dStpTXRSTPBPDU=hpnicfdot1dStpTXRSTPBPDU, hpnicfdot1dStpOperPortPointToPoint=hpnicfdot1dStpOperPortPointToPoint, hpnicfRstpEventsV2=hpnicfRstpEventsV2, EnabledStatus=EnabledStatus, hpnicfDot1dStpRootType=hpnicfDot1dStpRootType, hpnicfDot1dStpPathCostStandard=hpnicfDot1dStpPathCostStandard, hpnicfdot1dStpTXTCNBPDU=hpnicfdot1dStpTXTCNBPDU, hpnicfdot1dStpClearStatistics=hpnicfdot1dStpClearStatistics, hpnicfdot1dVlan=hpnicfdot1dVlan, hpnicfLswRstpMib=hpnicfLswRstpMib, hpnicfRstpBpduGuarded=hpnicfRstpBpduGuarded, hpnicfdot1dStpPortXEntry=hpnicfdot1dStpPortXEntry, hpnicfdot1dStpStatus=hpnicfdot1dStpStatus, hpnicfdot1dStpPortPointToPoint=hpnicfdot1dStpPortPointToPoint, hpnicfdot1dStpRootBridgeAddress=hpnicfdot1dStpRootBridgeAddress, hpnicfdot1dStpPortEdgeport=hpnicfdot1dStpPortEdgeport, hpnicfdot1dStpIgnoredVlanTable=hpnicfdot1dStpIgnoredVlanTable, hpnicfdot1dStpRootGuard=hpnicfdot1dStpRootGuard, hpnicfdot1dStpRXTCNBPDU=hpnicfdot1dStpRXTCNBPDU, hpnicfdot1dStpTXStpBPDU=hpnicfdot1dStpTXStpBPDU, hpnicfdot1dStpIgnore=hpnicfdot1dStpIgnore, hpnicfdot1dStpPortStatus=hpnicfdot1dStpPortStatus, hpnicfdot1dStpPortBlockedReason=hpnicfdot1dStpPortBlockedReason, hpnicfdot1dStpPortXTable=hpnicfdot1dStpPortXTable, hpnicfdot1dStpRXTCBPDU=hpnicfdot1dStpRXTCBPDU, hpnicfdot1dStpMcheck=hpnicfdot1dStpMcheck, hpnicfdot1dStpLoopGuard=hpnicfdot1dStpLoopGuard, hpnicfdot1dStpTransLimit=hpnicfdot1dStpTransLimit, hpnicfdot1dStpIgnoredVlanEntry=hpnicfdot1dStpIgnoredVlanEntry) |
{
"variables": {
"base_path": "C:/msys64/mingw64"
},
"targets": [
{
"target_name": "expand",
"sources": [
"src/expand.cc"
],
"libraries": ["-llibpostal"],
"library_dirs": ["<(base_path)/bin"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(base_path)/include"
]
},
{
"target_name": "parser",
"sources": [
"src/parser.cc"
],
"libraries": ["-llibpostal"],
"library_dirs": ["<(base_path)/bin"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(base_path)/include"
]
}
]
}
| {'variables': {'base_path': 'C:/msys64/mingw64'}, 'targets': [{'target_name': 'expand', 'sources': ['src/expand.cc'], 'libraries': ['-llibpostal'], 'library_dirs': ['<(base_path)/bin'], 'include_dirs': ['<!(node -e "require(\'nan\')")', '<(base_path)/include']}, {'target_name': 'parser', 'sources': ['src/parser.cc'], 'libraries': ['-llibpostal'], 'library_dirs': ['<(base_path)/bin'], 'include_dirs': ['<!(node -e "require(\'nan\')")', '<(base_path)/include']}]} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
name = input('please input your name:')
print('hello,', name)
| if __name__ == '__main__':
name = input('please input your name:')
print('hello,', name) |
s: str = ""
se: str = ""
l: [int] = None
le: int = 0
k: bool = False
def f():
1+"2"
for k in l:
1+"2"
for g in l:
1+"2"
for f in l:
1+"2"
for se in l:
1+"2"
for l in s:
1+"2"
for f in k:
1+"2"
| s: str = ''
se: str = ''
l: [int] = None
le: int = 0
k: bool = False
def f():
1 + '2'
for k in l:
1 + '2'
for g in l:
1 + '2'
for f in l:
1 + '2'
for se in l:
1 + '2'
for l in s:
1 + '2'
for f in k:
1 + '2' |
# coding=utf8
SthWrong = (-1, 'Something Wrong')
ArgMis = (-1000, 'Args Missing')
ArgFormatInvalid = (-1001, 'Args Format Invalid')
DataNotExists = (-2000, 'Data Not Exists') | sth_wrong = (-1, 'Something Wrong')
arg_mis = (-1000, 'Args Missing')
arg_format_invalid = (-1001, 'Args Format Invalid')
data_not_exists = (-2000, 'Data Not Exists') |
# Directory and File locations
DATASETDIR = "driving_dataset/"
MODELDIR = "save"
MODELFILE = MODELDIR + "/model.ckpt"
LOGDIR = "logs"
| datasetdir = 'driving_dataset/'
modeldir = 'save'
modelfile = MODELDIR + '/model.ckpt'
logdir = 'logs' |
side1 = 12
side2 = 14
side3 = 124
if side1 == side2 and side2 == side3:
print(1)
elif side1 == side2 or side2 == side3 or side1 == side3:
print(2)
else:
print(3)
| side1 = 12
side2 = 14
side3 = 124
if side1 == side2 and side2 == side3:
print(1)
elif side1 == side2 or side2 == side3 or side1 == side3:
print(2)
else:
print(3) |
class RPCError(Exception):
pass
class ConsistencyError(Exception):
pass
class TermConsistencyError(ConsistencyError):
def __init__(self, term: int):
self.term = term
class LeaderConsistencyError(ConsistencyError):
def __init__(self, leader_id: bytes):
self.leader_id = leader_id
class EntriesConsistencyError(ConsistencyError):
pass
| class Rpcerror(Exception):
pass
class Consistencyerror(Exception):
pass
class Termconsistencyerror(ConsistencyError):
def __init__(self, term: int):
self.term = term
class Leaderconsistencyerror(ConsistencyError):
def __init__(self, leader_id: bytes):
self.leader_id = leader_id
class Entriesconsistencyerror(ConsistencyError):
pass |
#Card class to be imported by every program in repository
#Ace value initialized to 11, can be changed to 1 in-game
class Card:
def __init__(self, suit_id, rank_id):
self.suit_id = suit_id
self.rank_id = rank_id
if self.rank_id == 1:
self.rank = "Ace"
self.value = 11
elif self.rank_id == 11:
self.rank = "Jack"
self.value = 10
elif self.rank_id == 12:
self.rank = "Queen"
self.value = 10
elif self.rank_id == 13:
self.rank = "King"
self.value = 10
elif 2 <= self.rank_id <= 10:
self.rank = str(self.rank_id)
self.value = self.rank_id
else:
self.rank = "RankError"
self.value = -1
if self.suit_id == 1:
self.suit = "Hearts"
self.symbol = "\u2665"
elif self.suit_id == 2:
self.suit = "Clubs"
self.symbol = "\u2663"
elif self.suit_id == 3:
self.suit = "Spades"
self.symbol = "\u2660"
elif self.suit_id == 4:
self.suit = "Diamonds"
self.symbol = "\u2666"
else:
self.suit = "SuitError"
self.full_name = f"{self.rank} of {self.suit}"
if self.rank_id in (1, 11, 12, 13):
self.short_name = self.rank[0] + self.symbol
else:
self.short_name = self.rank + self.symbol
def __str__(self):
return self.full_name
| class Card:
def __init__(self, suit_id, rank_id):
self.suit_id = suit_id
self.rank_id = rank_id
if self.rank_id == 1:
self.rank = 'Ace'
self.value = 11
elif self.rank_id == 11:
self.rank = 'Jack'
self.value = 10
elif self.rank_id == 12:
self.rank = 'Queen'
self.value = 10
elif self.rank_id == 13:
self.rank = 'King'
self.value = 10
elif 2 <= self.rank_id <= 10:
self.rank = str(self.rank_id)
self.value = self.rank_id
else:
self.rank = 'RankError'
self.value = -1
if self.suit_id == 1:
self.suit = 'Hearts'
self.symbol = '♥'
elif self.suit_id == 2:
self.suit = 'Clubs'
self.symbol = '♣'
elif self.suit_id == 3:
self.suit = 'Spades'
self.symbol = '♠'
elif self.suit_id == 4:
self.suit = 'Diamonds'
self.symbol = '♦'
else:
self.suit = 'SuitError'
self.full_name = f'{self.rank} of {self.suit}'
if self.rank_id in (1, 11, 12, 13):
self.short_name = self.rank[0] + self.symbol
else:
self.short_name = self.rank + self.symbol
def __str__(self):
return self.full_name |
# find the maximum path sum. The path may start and end at any node in the tree.
class Node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def max_sum_path(root):
max_sum_path_util.res = -float('inf')
max_sum_path_util(root)
return max_sum_path_util.res
def max_sum_path_util(root):
if root is None:
return 0
# find max sum in left and right sub tree
left_sum = max_sum_path_util(root.left)
right_sum = max_sum_path_util(root.right)
# if current node is one of the nodes in the path above for max
# it can either be along, or with left sub tree or right sub tree
max_single = max(max(left_sum, right_sum) + root.data, root.data)
# if the current root itself is considered as top node of the max path
max_parent = max(left_sum + right_sum + root.data, max_single)
# store the maximum result
max_sum_path_util.res = max(max_sum_path_util.res, max_parent)
# return the max_single for upper nodes calculation
return max_single
if __name__ == '__main__':
root = Node(10)
root.left = Node(2)
root.right = Node(10)
root.left.left = Node(20)
root.left.right = Node(1)
root.right.right = Node(-25)
root.right.right.left = Node(3)
root.right.right.right = Node(4)
print('max path sum is:', max_sum_path(root))
| class Node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def max_sum_path(root):
max_sum_path_util.res = -float('inf')
max_sum_path_util(root)
return max_sum_path_util.res
def max_sum_path_util(root):
if root is None:
return 0
left_sum = max_sum_path_util(root.left)
right_sum = max_sum_path_util(root.right)
max_single = max(max(left_sum, right_sum) + root.data, root.data)
max_parent = max(left_sum + right_sum + root.data, max_single)
max_sum_path_util.res = max(max_sum_path_util.res, max_parent)
return max_single
if __name__ == '__main__':
root = node(10)
root.left = node(2)
root.right = node(10)
root.left.left = node(20)
root.left.right = node(1)
root.right.right = node(-25)
root.right.right.left = node(3)
root.right.right.right = node(4)
print('max path sum is:', max_sum_path(root)) |
def buildGraphFromInput():
n = int(input())
graph = []
for i in range(n):
x, y = [int(j) for j in input().split()]
graph.append((x,y))
return graph
def computeNumberOfNeighbors(graph):
numberOfNeighbors = {}
for x,y in graph:
if not x in numberOfNeighbors:
numberOfNeighbors[x] = 1
else:
numberOfNeighbors[x] += 1
if not y in numberOfNeighbors:
numberOfNeighbors[y] = 1
else:
numberOfNeighbors[y] += 1
return numberOfNeighbors
def computeMinHeight(graph):
minHeight = 0
while graph:
i = 0
numberOfNeighbors = computeNumberOfNeighbors(graph)
numberOfVertices = len(graph)
while i < numberOfVertices:
x, y = graph[i]
if numberOfNeighbors[x] == 1 or numberOfNeighbors[y] == 1:
graph.pop(i)
numberOfVertices -= 1
else:
i += 1
minHeight += 1
return minHeight
print(computeMinHeight(buildGraphFromInput()))
| def build_graph_from_input():
n = int(input())
graph = []
for i in range(n):
(x, y) = [int(j) for j in input().split()]
graph.append((x, y))
return graph
def compute_number_of_neighbors(graph):
number_of_neighbors = {}
for (x, y) in graph:
if not x in numberOfNeighbors:
numberOfNeighbors[x] = 1
else:
numberOfNeighbors[x] += 1
if not y in numberOfNeighbors:
numberOfNeighbors[y] = 1
else:
numberOfNeighbors[y] += 1
return numberOfNeighbors
def compute_min_height(graph):
min_height = 0
while graph:
i = 0
number_of_neighbors = compute_number_of_neighbors(graph)
number_of_vertices = len(graph)
while i < numberOfVertices:
(x, y) = graph[i]
if numberOfNeighbors[x] == 1 or numberOfNeighbors[y] == 1:
graph.pop(i)
number_of_vertices -= 1
else:
i += 1
min_height += 1
return minHeight
print(compute_min_height(build_graph_from_input())) |
MES_LEVEL_INFO = 0
MES_LEVEL_WARN = 1
MES_LEVEL_ERROR = 2
_level = 0
_message = ""
def set_mes(level, message):
global _level
global _message
if message != "":
_level = level
_message = message
def get_mes():
return _level, _message
| mes_level_info = 0
mes_level_warn = 1
mes_level_error = 2
_level = 0
_message = ''
def set_mes(level, message):
global _level
global _message
if message != '':
_level = level
_message = message
def get_mes():
return (_level, _message) |
#
# PySNMP MIB module IBM-INTERFACE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IBM-INTERFACE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:51:02 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
enterprises, ObjectIdentity, Gauge32, iso, MibIdentifier, Integer32, ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, TimeTicks, Bits, Counter32, Counter64, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "ObjectIdentity", "Gauge32", "iso", "MibIdentifier", "Integer32", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "TimeTicks", "Bits", "Counter32", "Counter64", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
ibmIROCroutinginterface = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17))
ibminterfaceClearTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1), )
if mibBuilder.loadTexts: ibminterfaceClearTable.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearTable.setDescription('A table allowing interface counters to be cleared.')
ibminterfaceClearEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: ibminterfaceClearEntry.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearEntry.setDescription('Entry identifying a particular interface whose counters are to be cleared.')
ibminterfaceClearInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearInOctets.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearInOctets.setDescription('When SET to a value of clear(1), the counter of bytes received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearInUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearInUcastPkts.setDescription('When SET to a value of clear(1), the counter of unicast packets received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearInMulticastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearInMulticastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearInMulticastPkts.setDescription('When SET to a value of clear(1), the counter of multicast packets received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearInErrors.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearInErrors.setDescription('When SET to a value of clear(1), the counters for all types of input errors are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearInAll = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearInAll.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearInAll.setDescription('When SET to a value of clear(1), the counters for all input counters (byte, packet, error) are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearOutOctets.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearOutOctets.setDescription('When SET to a value of clear(1), the counter of bytes sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearOutUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearOutUcastPkts.setDescription('When SET to a value of clear(1), the counter of unicast packets sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearOutMulticastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearOutMulticastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearOutMulticastPkts.setDescription('When SET to a value of clear(1), the counter of multicast packets sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearOutErrors.setDescription('When SET to a value of clear(1), the counters for all types of output errors are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearOutAll = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearOutAll.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearOutAll.setDescription('When SET to a value of clear(1), the counters for all output counters (byte, packet, error) are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearMaintTest = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearMaintTest.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearMaintTest.setDescription('When SET to a value of clear(1), the counters for self test pass, self test fail and maintenance fail are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearDeviceSpecific = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearDeviceSpecific.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearDeviceSpecific.setDescription('When SET to a value of clear(1), all the device specific counters are reset. For example, for an Ethernet interface, all the counters provided in the dot3StatsTable are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterfaceClearAll = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noaction", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ibminterfaceClearAll.setStatus('mandatory')
if mibBuilder.loadTexts: ibminterfaceClearAll.setDescription('When SET to a value of clear(1), all the reset actions performed by the MIB objects defined above are executed at once. This action has the same behavior as executing the CLEAR command from the T5 console prompt (+). When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
mibBuilder.exportSymbols("IBM-INTERFACE-MIB", ibminterfaceClearInAll=ibminterfaceClearInAll, ibminterfaceClearTable=ibminterfaceClearTable, ibminterfaceClearEntry=ibminterfaceClearEntry, ibminterfaceClearInMulticastPkts=ibminterfaceClearInMulticastPkts, ibminterfaceClearInErrors=ibminterfaceClearInErrors, ibminterfaceClearOutOctets=ibminterfaceClearOutOctets, ibmIROCroutinginterface=ibmIROCroutinginterface, ibminterfaceClearInOctets=ibminterfaceClearInOctets, ibminterfaceClearOutMulticastPkts=ibminterfaceClearOutMulticastPkts, ibminterfaceClearMaintTest=ibminterfaceClearMaintTest, ibminterfaceClearOutUcastPkts=ibminterfaceClearOutUcastPkts, ibminterfaceClearOutErrors=ibminterfaceClearOutErrors, ibminterfaceClearOutAll=ibminterfaceClearOutAll, ibminterfaceClearInUcastPkts=ibminterfaceClearInUcastPkts, ibminterfaceClearAll=ibminterfaceClearAll, ibminterfaceClearDeviceSpecific=ibminterfaceClearDeviceSpecific)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, value_size_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(enterprises, object_identity, gauge32, iso, mib_identifier, integer32, module_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, time_ticks, bits, counter32, counter64, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'enterprises', 'ObjectIdentity', 'Gauge32', 'iso', 'MibIdentifier', 'Integer32', 'ModuleIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'TimeTicks', 'Bits', 'Counter32', 'Counter64', 'IpAddress')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
ibm_iro_croutinginterface = mib_identifier((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17))
ibminterface_clear_table = mib_table((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1))
if mibBuilder.loadTexts:
ibminterfaceClearTable.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearTable.setDescription('A table allowing interface counters to be cleared.')
ibminterface_clear_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
ibminterfaceClearEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearEntry.setDescription('Entry identifying a particular interface whose counters are to be cleared.')
ibminterface_clear_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearInOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearInOctets.setDescription('When SET to a value of clear(1), the counter of bytes received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearInUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearInUcastPkts.setDescription('When SET to a value of clear(1), the counter of unicast packets received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_in_multicast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearInMulticastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearInMulticastPkts.setDescription('When SET to a value of clear(1), the counter of multicast packets received over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearInErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearInErrors.setDescription('When SET to a value of clear(1), the counters for all types of input errors are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_in_all = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearInAll.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearInAll.setDescription('When SET to a value of clear(1), the counters for all input counters (byte, packet, error) are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearOutOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearOutOctets.setDescription('When SET to a value of clear(1), the counter of bytes sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearOutUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearOutUcastPkts.setDescription('When SET to a value of clear(1), the counter of unicast packets sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_out_multicast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearOutMulticastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearOutMulticastPkts.setDescription('When SET to a value of clear(1), the counter of multicast packets sent over this interface is reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearOutErrors.setDescription('When SET to a value of clear(1), the counters for all types of output errors are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_out_all = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearOutAll.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearOutAll.setDescription('When SET to a value of clear(1), the counters for all output counters (byte, packet, error) are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_maint_test = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearMaintTest.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearMaintTest.setDescription('When SET to a value of clear(1), the counters for self test pass, self test fail and maintenance fail are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_device_specific = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearDeviceSpecific.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearDeviceSpecific.setDescription('When SET to a value of clear(1), all the device specific counters are reset. For example, for an Ethernet interface, all the counters provided in the dot3StatsTable are reset. When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
ibminterface_clear_all = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 119, 4, 17, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('noaction', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ibminterfaceClearAll.setStatus('mandatory')
if mibBuilder.loadTexts:
ibminterfaceClearAll.setDescription('When SET to a value of clear(1), all the reset actions performed by the MIB objects defined above are executed at once. This action has the same behavior as executing the CLEAR command from the T5 console prompt (+). When READ, this object always returns a value of noaction(0), since this object is intended as a trigger, rather than providing information.')
mibBuilder.exportSymbols('IBM-INTERFACE-MIB', ibminterfaceClearInAll=ibminterfaceClearInAll, ibminterfaceClearTable=ibminterfaceClearTable, ibminterfaceClearEntry=ibminterfaceClearEntry, ibminterfaceClearInMulticastPkts=ibminterfaceClearInMulticastPkts, ibminterfaceClearInErrors=ibminterfaceClearInErrors, ibminterfaceClearOutOctets=ibminterfaceClearOutOctets, ibmIROCroutinginterface=ibmIROCroutinginterface, ibminterfaceClearInOctets=ibminterfaceClearInOctets, ibminterfaceClearOutMulticastPkts=ibminterfaceClearOutMulticastPkts, ibminterfaceClearMaintTest=ibminterfaceClearMaintTest, ibminterfaceClearOutUcastPkts=ibminterfaceClearOutUcastPkts, ibminterfaceClearOutErrors=ibminterfaceClearOutErrors, ibminterfaceClearOutAll=ibminterfaceClearOutAll, ibminterfaceClearInUcastPkts=ibminterfaceClearInUcastPkts, ibminterfaceClearAll=ibminterfaceClearAll, ibminterfaceClearDeviceSpecific=ibminterfaceClearDeviceSpecific) |
name = "btclib"
__version__ = "2020.12"
__author__ = "The btclib developers"
__author_email__ = "devs@btclib.org"
__copyright__ = "Copyright (C) 2017-2020 The btclib developers"
__license__ = "MIT License"
| name = 'btclib'
__version__ = '2020.12'
__author__ = 'The btclib developers'
__author_email__ = 'devs@btclib.org'
__copyright__ = 'Copyright (C) 2017-2020 The btclib developers'
__license__ = 'MIT License' |
#
# PySNMP MIB module RARITANCCv2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RARITANCCv2-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:43:46 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
internet, Bits, MibIdentifier, Counter64, IpAddress, Counter32, TimeTicks, Unsigned32, mgmt, Integer32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ObjectIdentity, NotificationType, Gauge32, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "internet", "Bits", "MibIdentifier", "Counter64", "IpAddress", "Counter32", "TimeTicks", "Unsigned32", "mgmt", "Integer32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ObjectIdentity", "NotificationType", "Gauge32", "enterprises")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
raritan = ModuleIdentity((1, 3, 6, 1, 4, 1, 13742))
raritan.setRevisions(('2011-04-11 11:08',))
if mibBuilder.loadTexts: raritan.setLastUpdated('201104111108Z')
if mibBuilder.loadTexts: raritan.setOrganization('Raritan Inc.')
products = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 1))
enterpriseManagement = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 1, 1))
commandCenter = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1))
ccObject = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0))
ccNotify = MibIdentifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1))
ccObjectName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccObjectName.setStatus('current')
ccObjectInstance = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccObjectInstance.setStatus('current')
ccUserName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserName.setStatus('current')
ccUserSessionId = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 4), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserSessionId.setStatus('current')
ccUserNameInitiated = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserNameInitiated.setStatus('current')
ccUserNameTerminated = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 6), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserNameTerminated.setStatus('current')
ccImageType = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 7), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccImageType.setStatus('current')
ccImageVersion = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 8), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccImageVersion.setStatus('current')
ccImageVersionStatus = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("success", 1), ("failure", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccImageVersionStatus.setStatus('current')
ccUserWhoAdded = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 10), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserWhoAdded.setStatus('current')
ccUserWhoDeleted = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 11), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserWhoDeleted.setStatus('current')
ccUserWhoModified = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 12), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserWhoModified.setStatus('current')
ccNodeName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 13), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccNodeName.setStatus('current')
ccLanCard = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("primary", 1), ("backup", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLanCard.setStatus('current')
ccHardDisk = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("primary", 1), ("backup", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccHardDisk.setStatus('current')
ccSessionType = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("serial", 1), ("kvm", 2), ("powerOutlet", 3), ("admin", 4), ("diagnostics", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccSessionType.setStatus('current')
ccClusterState = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2), ("standAlone", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccClusterState.setStatus('current')
ccLeafNodeName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 18), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLeafNodeName.setStatus('current')
ccLeafNodeIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 19), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLeafNodeIPAddress.setStatus('current')
ccLeafNodeFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 20), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLeafNodeFirmwareVersion.setStatus('current')
ccScheduledTaskDescription = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 21), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccScheduledTaskDescription.setStatus('current')
ccScheduledTaskFailureReason = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 22), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccScheduledTaskFailureReason.setStatus('current')
ccDiagnosticConsoleMAX_ACCESSLevel = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 23), DisplayString()).setLabel("ccDiagnosticConsoleMAX-ACCESSLevel").setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccDiagnosticConsoleMAX_ACCESSLevel.setStatus('current')
ccDeviceName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 24), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccDeviceName.setStatus('current')
ccUserGroupName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 25), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccUserGroupName.setStatus('current')
ccBannerChanges = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("modified", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccBannerChanges.setStatus('current')
ccMOTDChanges = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("modified", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccMOTDChanges.setStatus('current')
ccOldNumberOfOutlets = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 28), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccOldNumberOfOutlets.setStatus('current')
ccNewNumberOfOutlets = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 29), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccNewNumberOfOutlets.setStatus('current')
ccSystemMonitorNotificationLevel = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 30), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccSystemMonitorNotificationLevel.setStatus('current')
ccSystemMonitorNotificationMessage = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 31), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccSystemMonitorNotificationMessage.setStatus('current')
ccDominionPXFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 32), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccDominionPXFirmwareVersion.setStatus('current')
ccClusterPeer = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 33), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccClusterPeer.setStatus('current')
ccClusterOperation = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 34), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccClusterOperation.setStatus('current')
ccClusterOperationStatus = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("success", 1), ("failure", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccClusterOperationStatus.setStatus('current')
ccTransferOperation = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("export", 1), ("import", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccTransferOperation.setStatus('current')
ccFileType = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 37), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccFileType.setStatus('current')
ccLicensedFeature = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 38), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLicensedFeature.setStatus('current')
ccLicenseServer = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 39), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLicenseServer.setStatus('current')
ccPortName = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 41), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccPortName.setStatus('current')
ccLicenseTerminatedReason = MibScalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 40), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ccLicenseTerminatedReason.setStatus('current')
ccUnavailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 1)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccClusterState"))
if mibBuilder.loadTexts: ccUnavailable.setStatus('current')
ccAvailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 2)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccClusterState"))
if mibBuilder.loadTexts: ccAvailable.setStatus('current')
ccUserLogin = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 3)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccUserLogin.setStatus('current')
ccUserLogout = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 4)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccUserLogout.setStatus('current')
ccSPortConnectionStarted = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 5)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccSessionType"), ("RARITANCCv2-MIB", "ccUserSessionId"), ("RARITANCCv2-MIB", "ccNodeName"), ("RARITANCCv2-MIB", "ccPortName"))
if mibBuilder.loadTexts: ccSPortConnectionStarted.setStatus('current')
ccPortConnectionStopped = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 6)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccSessionType"), ("RARITANCCv2-MIB", "ccUserSessionId"), ("RARITANCCv2-MIB", "ccNodeName"), ("RARITANCCv2-MIB", "ccPortName"))
if mibBuilder.loadTexts: ccPortConnectionStopped.setStatus('current')
ccPortConnectionTerminated = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 7)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserNameInitiated"), ("RARITANCCv2-MIB", "ccUserNameTerminated"), ("RARITANCCv2-MIB", "ccSessionType"), ("RARITANCCv2-MIB", "ccUserSessionId"), ("RARITANCCv2-MIB", "ccNodeName"), ("RARITANCCv2-MIB", "ccPortName"))
if mibBuilder.loadTexts: ccPortConnectionTerminated.setStatus('current')
ccImageUpgradeStarted = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 8)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccImageType"), ("RARITANCCv2-MIB", "ccImageVersion"))
if mibBuilder.loadTexts: ccImageUpgradeStarted.setStatus('current')
ccImageUpgradeResults = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 9)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccImageType"), ("RARITANCCv2-MIB", "ccImageVersion"), ("RARITANCCv2-MIB", "ccImageVersionStatus"))
if mibBuilder.loadTexts: ccImageUpgradeResults.setStatus('current')
ccUserAdded = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 10)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccUserWhoAdded"))
if mibBuilder.loadTexts: ccUserAdded.setStatus('current')
ccUserDeleted = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 11)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccUserWhoDeleted"))
if mibBuilder.loadTexts: ccUserDeleted.setStatus('current')
ccUserModified = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 12)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccUserModified.setStatus('current')
ccUserAuthenticationFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 13)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccUserAuthenticationFailure.setStatus('current')
ccRootPasswordChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 14)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccRootPasswordChanged.setStatus('current')
ccLanCardFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 15)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLanCard"), ("RARITANCCv2-MIB", "ccClusterState"))
if mibBuilder.loadTexts: ccLanCardFailure.setStatus('current')
ccHardDiskFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 16)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccHardDisk"), ("RARITANCCv2-MIB", "ccClusterState"))
if mibBuilder.loadTexts: ccHardDiskFailure.setStatus('current')
ccLeafNodeUnavailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 17)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccLeafNodeUnavailable.setStatus('current')
ccLeafNodeAvailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 18)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccLeafNodeAvailable.setStatus('current')
ccIncompatibleDeviceFirmware = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 19)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"), ("RARITANCCv2-MIB", "ccLeafNodeFirmwareVersion"))
if mibBuilder.loadTexts: ccIncompatibleDeviceFirmware.setStatus('current')
ccDeviceUpgrade = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 20)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"), ("RARITANCCv2-MIB", "ccLeafNodeFirmwareVersion"), ("RARITANCCv2-MIB", "ccImageVersionStatus"))
if mibBuilder.loadTexts: ccDeviceUpgrade.setStatus('current')
ccEnterMaintenanceMode = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 21)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccEnterMaintenanceMode.setStatus('current')
ccExitMaintenanceMode = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 22)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccExitMaintenanceMode.setStatus('current')
ccUserLockedOut = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 23)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"))
if mibBuilder.loadTexts: ccUserLockedOut.setStatus('current')
ccDeviceAddedAfterCCNOCNotification = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 24)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccDeviceName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccDeviceAddedAfterCCNOCNotification.setStatus('current')
ccScheduledTaskExecutionFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 25)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccScheduledTaskDescription"), ("RARITANCCv2-MIB", "ccScheduledTaskFailureReason"))
if mibBuilder.loadTexts: ccScheduledTaskExecutionFailure.setStatus('current')
ccDiagnosticConsoleLogin = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 26)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccDiagnosticConsoleMAX_ACCESSLevel"))
if mibBuilder.loadTexts: ccDiagnosticConsoleLogin.setStatus('current')
ccDiagnosticConsoleLogout = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 27)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccDiagnosticConsoleMAX_ACCESSLevel"))
if mibBuilder.loadTexts: ccDiagnosticConsoleLogout.setStatus('current')
ccNOCAvailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 28)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccNOCAvailable.setStatus('current')
ccNOCUnavailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 29)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccNOCUnavailable.setStatus('current')
ccUserGroupAdded = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 30)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserGroupName"), ("RARITANCCv2-MIB", "ccUserWhoAdded"))
if mibBuilder.loadTexts: ccUserGroupAdded.setStatus('current')
ccUserGroupDeleted = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 31)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserGroupName"), ("RARITANCCv2-MIB", "ccUserWhoDeleted"))
if mibBuilder.loadTexts: ccUserGroupDeleted.setStatus('current')
ccUserGroupModified = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 32)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserGroupName"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccUserGroupModified.setStatus('current')
ccSuperuserNameChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 33)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccSuperuserNameChanged.setStatus('current')
ccSuperuserPasswordChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 34)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccSuperuserPasswordChanged.setStatus('current')
ccLoginBannerChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 35)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserWhoModified"), ("RARITANCCv2-MIB", "ccBannerChanges"))
if mibBuilder.loadTexts: ccLoginBannerChanged.setStatus('current')
ccMOTDChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 36)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserWhoModified"), ("RARITANCCv2-MIB", "ccMOTDChanges"))
if mibBuilder.loadTexts: ccMOTDChanged.setStatus('current')
ccDominionPXReplaced = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 37)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccOldNumberOfOutlets"), ("RARITANCCv2-MIB", "ccNewNumberOfOutlets"))
if mibBuilder.loadTexts: ccDominionPXReplaced.setStatus('current')
ccSystemMonitorNotification = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 38)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccSystemMonitorNotificationLevel"), ("RARITANCCv2-MIB", "ccSystemMonitorNotificationMessage"))
if mibBuilder.loadTexts: ccSystemMonitorNotification.setStatus('current')
ccNeighborhoodActivated = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 39)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"))
if mibBuilder.loadTexts: ccNeighborhoodActivated.setStatus('current')
ccNeighborhoodUpdated = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 40)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"))
if mibBuilder.loadTexts: ccNeighborhoodUpdated.setStatus('current')
ccDominionPXFirmwareChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 41)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccDominionPXFirmwareVersion"))
if mibBuilder.loadTexts: ccDominionPXFirmwareChanged.setStatus('current')
ccClusterFailover = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 42)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccClusterPeer"))
if mibBuilder.loadTexts: ccClusterFailover.setStatus('current')
ccClusterBackupFailed = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 43)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccClusterPeer"))
if mibBuilder.loadTexts: ccClusterBackupFailed.setStatus('current')
ccClusterWaitingPeerDetected = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 44)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccClusterPeer"))
if mibBuilder.loadTexts: ccClusterWaitingPeerDetected.setStatus('current')
ccClusterAction = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 45)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccClusterOperation"), ("RARITANCCv2-MIB", "ccClusterOperationStatus"))
if mibBuilder.loadTexts: ccClusterAction.setStatus('current')
ccCSVFileTransferred = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 46)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccFileType"), ("RARITANCCv2-MIB", "ccTransferOperation"))
if mibBuilder.loadTexts: ccCSVFileTransferred.setStatus('current')
ccPIQUnavailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 47)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccPIQUnavailable.setStatus('current')
ccPIQAvailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 48)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLeafNodeName"), ("RARITANCCv2-MIB", "ccLeafNodeIPAddress"))
if mibBuilder.loadTexts: ccPIQAvailable.setStatus('current')
ccLicenseServerUnavailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 49)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLicenseServer"))
if mibBuilder.loadTexts: ccLicenseServerUnavailable.setStatus('current')
ccLicenseServerFailover = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 50)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLicenseServer"))
if mibBuilder.loadTexts: ccLicenseServerFailover.setStatus('current')
ccLicenseServerAvailable = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 51)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLicenseServer"))
if mibBuilder.loadTexts: ccLicenseServerAvailable.setStatus('current')
ccLicenseTerminated = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 52)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"))
if mibBuilder.loadTexts: ccLicenseTerminated.setStatus('current')
ccAddLicenseFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 53)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"))
if mibBuilder.loadTexts: ccAddLicenseFailure.setStatus('current')
ccAddFeatureFailure = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 54)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLicensedFeature"))
if mibBuilder.loadTexts: ccAddFeatureFailure.setStatus('current')
ccLicenseTerminatedWithReason = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 55)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccLicenseTerminatedReason"))
if mibBuilder.loadTexts: ccLicenseTerminatedWithReason.setStatus('current')
ccUserPasswordChanged = NotificationType((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 56)).setObjects(("RARITANCCv2-MIB", "ccObjectName"), ("RARITANCCv2-MIB", "ccObjectInstance"), ("RARITANCCv2-MIB", "ccUserName"), ("RARITANCCv2-MIB", "ccUserWhoModified"))
if mibBuilder.loadTexts: ccUserPasswordChanged.setStatus('current')
mibBuilder.exportSymbols("RARITANCCv2-MIB", ccNeighborhoodUpdated=ccNeighborhoodUpdated, ccNeighborhoodActivated=ccNeighborhoodActivated, ccUserAdded=ccUserAdded, ccMOTDChanges=ccMOTDChanges, ccLicenseServerFailover=ccLicenseServerFailover, ccMOTDChanged=ccMOTDChanged, ccUserWhoDeleted=ccUserWhoDeleted, ccEnterMaintenanceMode=ccEnterMaintenanceMode, ccClusterState=ccClusterState, ccNOCAvailable=ccNOCAvailable, ccSessionType=ccSessionType, ccUserGroupModified=ccUserGroupModified, ccTransferOperation=ccTransferOperation, ccUserAuthenticationFailure=ccUserAuthenticationFailure, ccUserNameInitiated=ccUserNameInitiated, ccLanCard=ccLanCard, ccLeafNodeFirmwareVersion=ccLeafNodeFirmwareVersion, ccDeviceUpgrade=ccDeviceUpgrade, ccDiagnosticConsoleMAX_ACCESSLevel=ccDiagnosticConsoleMAX_ACCESSLevel, ccClusterWaitingPeerDetected=ccClusterWaitingPeerDetected, ccScheduledTaskFailureReason=ccScheduledTaskFailureReason, ccSystemMonitorNotificationMessage=ccSystemMonitorNotificationMessage, ccFileType=ccFileType, ccDeviceAddedAfterCCNOCNotification=ccDeviceAddedAfterCCNOCNotification, ccUserName=ccUserName, ccObject=ccObject, ccClusterOperation=ccClusterOperation, ccDominionPXFirmwareVersion=ccDominionPXFirmwareVersion, ccClusterFailover=ccClusterFailover, ccClusterPeer=ccClusterPeer, ccImageUpgradeResults=ccImageUpgradeResults, ccLicenseServerAvailable=ccLicenseServerAvailable, ccLeafNodeName=ccLeafNodeName, ccAvailable=ccAvailable, ccObjectInstance=ccObjectInstance, ccIncompatibleDeviceFirmware=ccIncompatibleDeviceFirmware, ccUserGroupAdded=ccUserGroupAdded, ccUnavailable=ccUnavailable, ccSuperuserNameChanged=ccSuperuserNameChanged, ccPIQUnavailable=ccPIQUnavailable, ccUserWhoModified=ccUserWhoModified, ccLicenseTerminated=ccLicenseTerminated, ccNewNumberOfOutlets=ccNewNumberOfOutlets, ccUserPasswordChanged=ccUserPasswordChanged, commandCenter=commandCenter, ccHardDisk=ccHardDisk, products=products, ccPortConnectionTerminated=ccPortConnectionTerminated, ccDominionPXFirmwareChanged=ccDominionPXFirmwareChanged, ccDeviceName=ccDeviceName, enterpriseManagement=enterpriseManagement, ccImageVersion=ccImageVersion, ccClusterOperationStatus=ccClusterOperationStatus, ccNOCUnavailable=ccNOCUnavailable, ccUserGroupName=ccUserGroupName, ccLoginBannerChanged=ccLoginBannerChanged, ccSuperuserPasswordChanged=ccSuperuserPasswordChanged, ccObjectName=ccObjectName, ccCSVFileTransferred=ccCSVFileTransferred, ccUserLogout=ccUserLogout, ccOldNumberOfOutlets=ccOldNumberOfOutlets, ccUserModified=ccUserModified, ccImageType=ccImageType, ccUserGroupDeleted=ccUserGroupDeleted, ccNotify=ccNotify, ccSystemMonitorNotificationLevel=ccSystemMonitorNotificationLevel, ccUserLockedOut=ccUserLockedOut, ccPortConnectionStopped=ccPortConnectionStopped, ccDiagnosticConsoleLogin=ccDiagnosticConsoleLogin, ccLeafNodeAvailable=ccLeafNodeAvailable, ccLicensedFeature=ccLicensedFeature, ccPIQAvailable=ccPIQAvailable, ccUserNameTerminated=ccUserNameTerminated, PYSNMP_MODULE_ID=raritan, ccHardDiskFailure=ccHardDiskFailure, ccNodeName=ccNodeName, raritan=raritan, ccSPortConnectionStarted=ccSPortConnectionStarted, ccImageUpgradeStarted=ccImageUpgradeStarted, ccUserLogin=ccUserLogin, ccExitMaintenanceMode=ccExitMaintenanceMode, ccLeafNodeIPAddress=ccLeafNodeIPAddress, ccRootPasswordChanged=ccRootPasswordChanged, ccScheduledTaskExecutionFailure=ccScheduledTaskExecutionFailure, ccUserWhoAdded=ccUserWhoAdded, ccLicenseTerminatedReason=ccLicenseTerminatedReason, ccBannerChanges=ccBannerChanges, ccAddFeatureFailure=ccAddFeatureFailure, ccClusterAction=ccClusterAction, ccDiagnosticConsoleLogout=ccDiagnosticConsoleLogout, ccUserDeleted=ccUserDeleted, ccScheduledTaskDescription=ccScheduledTaskDescription, ccLicenseServer=ccLicenseServer, ccClusterBackupFailed=ccClusterBackupFailed, ccImageVersionStatus=ccImageVersionStatus, ccLeafNodeUnavailable=ccLeafNodeUnavailable, ccPortName=ccPortName, ccUserSessionId=ccUserSessionId, ccLicenseServerUnavailable=ccLicenseServerUnavailable, ccLicenseTerminatedWithReason=ccLicenseTerminatedWithReason, ccDominionPXReplaced=ccDominionPXReplaced, ccSystemMonitorNotification=ccSystemMonitorNotification, ccLanCardFailure=ccLanCardFailure, ccAddLicenseFailure=ccAddLicenseFailure)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, value_size_constraint, constraints_intersection, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(internet, bits, mib_identifier, counter64, ip_address, counter32, time_ticks, unsigned32, mgmt, integer32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, object_identity, notification_type, gauge32, enterprises) = mibBuilder.importSymbols('SNMPv2-SMI', 'internet', 'Bits', 'MibIdentifier', 'Counter64', 'IpAddress', 'Counter32', 'TimeTicks', 'Unsigned32', 'mgmt', 'Integer32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'ObjectIdentity', 'NotificationType', 'Gauge32', 'enterprises')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
raritan = module_identity((1, 3, 6, 1, 4, 1, 13742))
raritan.setRevisions(('2011-04-11 11:08',))
if mibBuilder.loadTexts:
raritan.setLastUpdated('201104111108Z')
if mibBuilder.loadTexts:
raritan.setOrganization('Raritan Inc.')
products = mib_identifier((1, 3, 6, 1, 4, 1, 13742, 1))
enterprise_management = mib_identifier((1, 3, 6, 1, 4, 1, 13742, 1, 1))
command_center = mib_identifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1))
cc_object = mib_identifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0))
cc_notify = mib_identifier((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1))
cc_object_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccObjectName.setStatus('current')
cc_object_instance = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccObjectInstance.setStatus('current')
cc_user_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserName.setStatus('current')
cc_user_session_id = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 4), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserSessionId.setStatus('current')
cc_user_name_initiated = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserNameInitiated.setStatus('current')
cc_user_name_terminated = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 6), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserNameTerminated.setStatus('current')
cc_image_type = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 7), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccImageType.setStatus('current')
cc_image_version = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 8), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccImageVersion.setStatus('current')
cc_image_version_status = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('success', 1), ('failure', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccImageVersionStatus.setStatus('current')
cc_user_who_added = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 10), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserWhoAdded.setStatus('current')
cc_user_who_deleted = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 11), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserWhoDeleted.setStatus('current')
cc_user_who_modified = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 12), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserWhoModified.setStatus('current')
cc_node_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 13), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccNodeName.setStatus('current')
cc_lan_card = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('primary', 1), ('backup', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLanCard.setStatus('current')
cc_hard_disk = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('primary', 1), ('backup', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccHardDisk.setStatus('current')
cc_session_type = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('serial', 1), ('kvm', 2), ('powerOutlet', 3), ('admin', 4), ('diagnostics', 5)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccSessionType.setStatus('current')
cc_cluster_state = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('primary', 1), ('secondary', 2), ('standAlone', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccClusterState.setStatus('current')
cc_leaf_node_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 18), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLeafNodeName.setStatus('current')
cc_leaf_node_ip_address = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 19), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLeafNodeIPAddress.setStatus('current')
cc_leaf_node_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 20), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLeafNodeFirmwareVersion.setStatus('current')
cc_scheduled_task_description = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 21), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccScheduledTaskDescription.setStatus('current')
cc_scheduled_task_failure_reason = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 22), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccScheduledTaskFailureReason.setStatus('current')
cc_diagnostic_console_max_access_level = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 23), display_string()).setLabel('ccDiagnosticConsoleMAX-ACCESSLevel').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccDiagnosticConsoleMAX_ACCESSLevel.setStatus('current')
cc_device_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 24), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccDeviceName.setStatus('current')
cc_user_group_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 25), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccUserGroupName.setStatus('current')
cc_banner_changes = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('modified', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccBannerChanges.setStatus('current')
cc_motd_changes = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('modified', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccMOTDChanges.setStatus('current')
cc_old_number_of_outlets = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 28), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccOldNumberOfOutlets.setStatus('current')
cc_new_number_of_outlets = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 29), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccNewNumberOfOutlets.setStatus('current')
cc_system_monitor_notification_level = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 30), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccSystemMonitorNotificationLevel.setStatus('current')
cc_system_monitor_notification_message = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 31), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccSystemMonitorNotificationMessage.setStatus('current')
cc_dominion_px_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 32), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccDominionPXFirmwareVersion.setStatus('current')
cc_cluster_peer = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 33), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccClusterPeer.setStatus('current')
cc_cluster_operation = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 34), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccClusterOperation.setStatus('current')
cc_cluster_operation_status = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 35), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('success', 1), ('failure', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccClusterOperationStatus.setStatus('current')
cc_transfer_operation = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 36), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('export', 1), ('import', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccTransferOperation.setStatus('current')
cc_file_type = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 37), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccFileType.setStatus('current')
cc_licensed_feature = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 38), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLicensedFeature.setStatus('current')
cc_license_server = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 39), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLicenseServer.setStatus('current')
cc_port_name = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 41), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccPortName.setStatus('current')
cc_license_terminated_reason = mib_scalar((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 0, 40), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ccLicenseTerminatedReason.setStatus('current')
cc_unavailable = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 1)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccClusterState'))
if mibBuilder.loadTexts:
ccUnavailable.setStatus('current')
cc_available = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 2)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccClusterState'))
if mibBuilder.loadTexts:
ccAvailable.setStatus('current')
cc_user_login = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 3)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccUserLogin.setStatus('current')
cc_user_logout = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 4)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccUserLogout.setStatus('current')
cc_s_port_connection_started = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 5)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccSessionType'), ('RARITANCCv2-MIB', 'ccUserSessionId'), ('RARITANCCv2-MIB', 'ccNodeName'), ('RARITANCCv2-MIB', 'ccPortName'))
if mibBuilder.loadTexts:
ccSPortConnectionStarted.setStatus('current')
cc_port_connection_stopped = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 6)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccSessionType'), ('RARITANCCv2-MIB', 'ccUserSessionId'), ('RARITANCCv2-MIB', 'ccNodeName'), ('RARITANCCv2-MIB', 'ccPortName'))
if mibBuilder.loadTexts:
ccPortConnectionStopped.setStatus('current')
cc_port_connection_terminated = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 7)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserNameInitiated'), ('RARITANCCv2-MIB', 'ccUserNameTerminated'), ('RARITANCCv2-MIB', 'ccSessionType'), ('RARITANCCv2-MIB', 'ccUserSessionId'), ('RARITANCCv2-MIB', 'ccNodeName'), ('RARITANCCv2-MIB', 'ccPortName'))
if mibBuilder.loadTexts:
ccPortConnectionTerminated.setStatus('current')
cc_image_upgrade_started = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 8)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccImageType'), ('RARITANCCv2-MIB', 'ccImageVersion'))
if mibBuilder.loadTexts:
ccImageUpgradeStarted.setStatus('current')
cc_image_upgrade_results = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 9)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccImageType'), ('RARITANCCv2-MIB', 'ccImageVersion'), ('RARITANCCv2-MIB', 'ccImageVersionStatus'))
if mibBuilder.loadTexts:
ccImageUpgradeResults.setStatus('current')
cc_user_added = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 10)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccUserWhoAdded'))
if mibBuilder.loadTexts:
ccUserAdded.setStatus('current')
cc_user_deleted = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 11)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccUserWhoDeleted'))
if mibBuilder.loadTexts:
ccUserDeleted.setStatus('current')
cc_user_modified = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 12)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccUserModified.setStatus('current')
cc_user_authentication_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 13)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccUserAuthenticationFailure.setStatus('current')
cc_root_password_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 14)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccRootPasswordChanged.setStatus('current')
cc_lan_card_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 15)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLanCard'), ('RARITANCCv2-MIB', 'ccClusterState'))
if mibBuilder.loadTexts:
ccLanCardFailure.setStatus('current')
cc_hard_disk_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 16)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccHardDisk'), ('RARITANCCv2-MIB', 'ccClusterState'))
if mibBuilder.loadTexts:
ccHardDiskFailure.setStatus('current')
cc_leaf_node_unavailable = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 17)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccLeafNodeUnavailable.setStatus('current')
cc_leaf_node_available = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 18)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccLeafNodeAvailable.setStatus('current')
cc_incompatible_device_firmware = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 19)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'), ('RARITANCCv2-MIB', 'ccLeafNodeFirmwareVersion'))
if mibBuilder.loadTexts:
ccIncompatibleDeviceFirmware.setStatus('current')
cc_device_upgrade = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 20)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'), ('RARITANCCv2-MIB', 'ccLeafNodeFirmwareVersion'), ('RARITANCCv2-MIB', 'ccImageVersionStatus'))
if mibBuilder.loadTexts:
ccDeviceUpgrade.setStatus('current')
cc_enter_maintenance_mode = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 21)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccEnterMaintenanceMode.setStatus('current')
cc_exit_maintenance_mode = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 22)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccExitMaintenanceMode.setStatus('current')
cc_user_locked_out = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 23)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'))
if mibBuilder.loadTexts:
ccUserLockedOut.setStatus('current')
cc_device_added_after_ccnoc_notification = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 24)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccDeviceName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccDeviceAddedAfterCCNOCNotification.setStatus('current')
cc_scheduled_task_execution_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 25)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccScheduledTaskDescription'), ('RARITANCCv2-MIB', 'ccScheduledTaskFailureReason'))
if mibBuilder.loadTexts:
ccScheduledTaskExecutionFailure.setStatus('current')
cc_diagnostic_console_login = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 26)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccDiagnosticConsoleMAX_ACCESSLevel'))
if mibBuilder.loadTexts:
ccDiagnosticConsoleLogin.setStatus('current')
cc_diagnostic_console_logout = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 27)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccDiagnosticConsoleMAX_ACCESSLevel'))
if mibBuilder.loadTexts:
ccDiagnosticConsoleLogout.setStatus('current')
cc_noc_available = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 28)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccNOCAvailable.setStatus('current')
cc_noc_unavailable = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 29)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccNOCUnavailable.setStatus('current')
cc_user_group_added = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 30)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserGroupName'), ('RARITANCCv2-MIB', 'ccUserWhoAdded'))
if mibBuilder.loadTexts:
ccUserGroupAdded.setStatus('current')
cc_user_group_deleted = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 31)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserGroupName'), ('RARITANCCv2-MIB', 'ccUserWhoDeleted'))
if mibBuilder.loadTexts:
ccUserGroupDeleted.setStatus('current')
cc_user_group_modified = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 32)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserGroupName'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccUserGroupModified.setStatus('current')
cc_superuser_name_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 33)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccSuperuserNameChanged.setStatus('current')
cc_superuser_password_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 34)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccSuperuserPasswordChanged.setStatus('current')
cc_login_banner_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 35)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserWhoModified'), ('RARITANCCv2-MIB', 'ccBannerChanges'))
if mibBuilder.loadTexts:
ccLoginBannerChanged.setStatus('current')
cc_motd_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 36)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserWhoModified'), ('RARITANCCv2-MIB', 'ccMOTDChanges'))
if mibBuilder.loadTexts:
ccMOTDChanged.setStatus('current')
cc_dominion_px_replaced = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 37)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccOldNumberOfOutlets'), ('RARITANCCv2-MIB', 'ccNewNumberOfOutlets'))
if mibBuilder.loadTexts:
ccDominionPXReplaced.setStatus('current')
cc_system_monitor_notification = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 38)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccSystemMonitorNotificationLevel'), ('RARITANCCv2-MIB', 'ccSystemMonitorNotificationMessage'))
if mibBuilder.loadTexts:
ccSystemMonitorNotification.setStatus('current')
cc_neighborhood_activated = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 39)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'))
if mibBuilder.loadTexts:
ccNeighborhoodActivated.setStatus('current')
cc_neighborhood_updated = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 40)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'))
if mibBuilder.loadTexts:
ccNeighborhoodUpdated.setStatus('current')
cc_dominion_px_firmware_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 41)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccDominionPXFirmwareVersion'))
if mibBuilder.loadTexts:
ccDominionPXFirmwareChanged.setStatus('current')
cc_cluster_failover = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 42)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccClusterPeer'))
if mibBuilder.loadTexts:
ccClusterFailover.setStatus('current')
cc_cluster_backup_failed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 43)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccClusterPeer'))
if mibBuilder.loadTexts:
ccClusterBackupFailed.setStatus('current')
cc_cluster_waiting_peer_detected = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 44)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccClusterPeer'))
if mibBuilder.loadTexts:
ccClusterWaitingPeerDetected.setStatus('current')
cc_cluster_action = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 45)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccClusterOperation'), ('RARITANCCv2-MIB', 'ccClusterOperationStatus'))
if mibBuilder.loadTexts:
ccClusterAction.setStatus('current')
cc_csv_file_transferred = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 46)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccFileType'), ('RARITANCCv2-MIB', 'ccTransferOperation'))
if mibBuilder.loadTexts:
ccCSVFileTransferred.setStatus('current')
cc_piq_unavailable = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 47)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccPIQUnavailable.setStatus('current')
cc_piq_available = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 48)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLeafNodeName'), ('RARITANCCv2-MIB', 'ccLeafNodeIPAddress'))
if mibBuilder.loadTexts:
ccPIQAvailable.setStatus('current')
cc_license_server_unavailable = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 49)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLicenseServer'))
if mibBuilder.loadTexts:
ccLicenseServerUnavailable.setStatus('current')
cc_license_server_failover = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 50)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLicenseServer'))
if mibBuilder.loadTexts:
ccLicenseServerFailover.setStatus('current')
cc_license_server_available = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 51)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLicenseServer'))
if mibBuilder.loadTexts:
ccLicenseServerAvailable.setStatus('current')
cc_license_terminated = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 52)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'))
if mibBuilder.loadTexts:
ccLicenseTerminated.setStatus('current')
cc_add_license_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 53)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'))
if mibBuilder.loadTexts:
ccAddLicenseFailure.setStatus('current')
cc_add_feature_failure = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 54)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLicensedFeature'))
if mibBuilder.loadTexts:
ccAddFeatureFailure.setStatus('current')
cc_license_terminated_with_reason = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 55)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccLicenseTerminatedReason'))
if mibBuilder.loadTexts:
ccLicenseTerminatedWithReason.setStatus('current')
cc_user_password_changed = notification_type((1, 3, 6, 1, 4, 1, 13742, 1, 1, 1, 1, 56)).setObjects(('RARITANCCv2-MIB', 'ccObjectName'), ('RARITANCCv2-MIB', 'ccObjectInstance'), ('RARITANCCv2-MIB', 'ccUserName'), ('RARITANCCv2-MIB', 'ccUserWhoModified'))
if mibBuilder.loadTexts:
ccUserPasswordChanged.setStatus('current')
mibBuilder.exportSymbols('RARITANCCv2-MIB', ccNeighborhoodUpdated=ccNeighborhoodUpdated, ccNeighborhoodActivated=ccNeighborhoodActivated, ccUserAdded=ccUserAdded, ccMOTDChanges=ccMOTDChanges, ccLicenseServerFailover=ccLicenseServerFailover, ccMOTDChanged=ccMOTDChanged, ccUserWhoDeleted=ccUserWhoDeleted, ccEnterMaintenanceMode=ccEnterMaintenanceMode, ccClusterState=ccClusterState, ccNOCAvailable=ccNOCAvailable, ccSessionType=ccSessionType, ccUserGroupModified=ccUserGroupModified, ccTransferOperation=ccTransferOperation, ccUserAuthenticationFailure=ccUserAuthenticationFailure, ccUserNameInitiated=ccUserNameInitiated, ccLanCard=ccLanCard, ccLeafNodeFirmwareVersion=ccLeafNodeFirmwareVersion, ccDeviceUpgrade=ccDeviceUpgrade, ccDiagnosticConsoleMAX_ACCESSLevel=ccDiagnosticConsoleMAX_ACCESSLevel, ccClusterWaitingPeerDetected=ccClusterWaitingPeerDetected, ccScheduledTaskFailureReason=ccScheduledTaskFailureReason, ccSystemMonitorNotificationMessage=ccSystemMonitorNotificationMessage, ccFileType=ccFileType, ccDeviceAddedAfterCCNOCNotification=ccDeviceAddedAfterCCNOCNotification, ccUserName=ccUserName, ccObject=ccObject, ccClusterOperation=ccClusterOperation, ccDominionPXFirmwareVersion=ccDominionPXFirmwareVersion, ccClusterFailover=ccClusterFailover, ccClusterPeer=ccClusterPeer, ccImageUpgradeResults=ccImageUpgradeResults, ccLicenseServerAvailable=ccLicenseServerAvailable, ccLeafNodeName=ccLeafNodeName, ccAvailable=ccAvailable, ccObjectInstance=ccObjectInstance, ccIncompatibleDeviceFirmware=ccIncompatibleDeviceFirmware, ccUserGroupAdded=ccUserGroupAdded, ccUnavailable=ccUnavailable, ccSuperuserNameChanged=ccSuperuserNameChanged, ccPIQUnavailable=ccPIQUnavailable, ccUserWhoModified=ccUserWhoModified, ccLicenseTerminated=ccLicenseTerminated, ccNewNumberOfOutlets=ccNewNumberOfOutlets, ccUserPasswordChanged=ccUserPasswordChanged, commandCenter=commandCenter, ccHardDisk=ccHardDisk, products=products, ccPortConnectionTerminated=ccPortConnectionTerminated, ccDominionPXFirmwareChanged=ccDominionPXFirmwareChanged, ccDeviceName=ccDeviceName, enterpriseManagement=enterpriseManagement, ccImageVersion=ccImageVersion, ccClusterOperationStatus=ccClusterOperationStatus, ccNOCUnavailable=ccNOCUnavailable, ccUserGroupName=ccUserGroupName, ccLoginBannerChanged=ccLoginBannerChanged, ccSuperuserPasswordChanged=ccSuperuserPasswordChanged, ccObjectName=ccObjectName, ccCSVFileTransferred=ccCSVFileTransferred, ccUserLogout=ccUserLogout, ccOldNumberOfOutlets=ccOldNumberOfOutlets, ccUserModified=ccUserModified, ccImageType=ccImageType, ccUserGroupDeleted=ccUserGroupDeleted, ccNotify=ccNotify, ccSystemMonitorNotificationLevel=ccSystemMonitorNotificationLevel, ccUserLockedOut=ccUserLockedOut, ccPortConnectionStopped=ccPortConnectionStopped, ccDiagnosticConsoleLogin=ccDiagnosticConsoleLogin, ccLeafNodeAvailable=ccLeafNodeAvailable, ccLicensedFeature=ccLicensedFeature, ccPIQAvailable=ccPIQAvailable, ccUserNameTerminated=ccUserNameTerminated, PYSNMP_MODULE_ID=raritan, ccHardDiskFailure=ccHardDiskFailure, ccNodeName=ccNodeName, raritan=raritan, ccSPortConnectionStarted=ccSPortConnectionStarted, ccImageUpgradeStarted=ccImageUpgradeStarted, ccUserLogin=ccUserLogin, ccExitMaintenanceMode=ccExitMaintenanceMode, ccLeafNodeIPAddress=ccLeafNodeIPAddress, ccRootPasswordChanged=ccRootPasswordChanged, ccScheduledTaskExecutionFailure=ccScheduledTaskExecutionFailure, ccUserWhoAdded=ccUserWhoAdded, ccLicenseTerminatedReason=ccLicenseTerminatedReason, ccBannerChanges=ccBannerChanges, ccAddFeatureFailure=ccAddFeatureFailure, ccClusterAction=ccClusterAction, ccDiagnosticConsoleLogout=ccDiagnosticConsoleLogout, ccUserDeleted=ccUserDeleted, ccScheduledTaskDescription=ccScheduledTaskDescription, ccLicenseServer=ccLicenseServer, ccClusterBackupFailed=ccClusterBackupFailed, ccImageVersionStatus=ccImageVersionStatus, ccLeafNodeUnavailable=ccLeafNodeUnavailable, ccPortName=ccPortName, ccUserSessionId=ccUserSessionId, ccLicenseServerUnavailable=ccLicenseServerUnavailable, ccLicenseTerminatedWithReason=ccLicenseTerminatedWithReason, ccDominionPXReplaced=ccDominionPXReplaced, ccSystemMonitorNotification=ccSystemMonitorNotification, ccLanCardFailure=ccLanCardFailure, ccAddLicenseFailure=ccAddLicenseFailure) |
age=input("How old are you? 38")
height=input("How tall are you? `120")
weight=input("How much do you weight? 129")
print(f"So, you're {age} old, {height} tall, and {weight} heavy.")
| age = input('How old are you? 38')
height = input('How tall are you? `120')
weight = input('How much do you weight? 129')
print(f"So, you're {age} old, {height} tall, and {weight} heavy.") |
# Homeserver address
homeserver = "https://phuks.co"
# Homeserver credentials. Not required if using a .token file
username = "jenny"
password = "nice&secure"
# Display name
nick = "Jenny"
# Prefix for commands
prefix = '.'
# List of admins using full matrix usernames
admins = ['@polsaker:phuks.co']
# If this list is not empty, the bot will ONLY load the modules on this list
whitelistonly_modules = []
# Modules that won't be loaded
disabled_modules = ['steam', 'phuks']
# WolframAlpha API key, used for wolframalpha.py
wolframalpha_apikey = "123456-7894561234"
# Google API key, used by various modules
google_apikey = "PutItInHere"
# DarkSky API key, used for the weather module
darksky_apikey = "GibMeTheWeather"
# Cleverbot API key, used for cleverbot.py
CLEVERBOT_API_KEY = "CccCcCccCCCccCccCc"
# List of servers we will blindly join channels when invited to
allowed_servers = ['phuks.co', 'chat.poal.co']
| homeserver = 'https://phuks.co'
username = 'jenny'
password = 'nice&secure'
nick = 'Jenny'
prefix = '.'
admins = ['@polsaker:phuks.co']
whitelistonly_modules = []
disabled_modules = ['steam', 'phuks']
wolframalpha_apikey = '123456-7894561234'
google_apikey = 'PutItInHere'
darksky_apikey = 'GibMeTheWeather'
cleverbot_api_key = 'CccCcCccCCCccCccCc'
allowed_servers = ['phuks.co', 'chat.poal.co'] |
# table definition
table = {
'table_name' : 'db_view_cols',
'module_id' : 'db',
'short_descr' : 'Db view columns',
'long_descr' : 'Database view column definitions',
'sub_types' : None,
'sub_trans' : None,
'sequence' : ['seq', ['view_id', 'col_type'], None],
'tree_params' : None,
'roll_params' : None,
'indexes' : None,
'ledger_col' : None,
'defn_company' : None,
'data_company' : None,
'read_only' : False,
}
# column definitions
cols = []
cols.append ({
'col_name' : 'row_id',
'data_type' : 'AUTO',
'short_descr': 'Row id',
'long_descr' : 'Row id',
'col_head' : 'Row',
'key_field' : 'Y',
'data_source': 'gen',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'created_id',
'data_type' : 'INT',
'short_descr': 'Created id',
'long_descr' : 'Created row id',
'col_head' : 'Created',
'key_field' : 'N',
'data_source': 'gen',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : '0',
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'deleted_id',
'data_type' : 'INT',
'short_descr': 'Deleted id',
'long_descr' : 'Deleted row id',
'col_head' : 'Deleted',
'key_field' : 'N',
'data_source': 'gen',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : '0',
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'view_id',
'data_type' : 'INT',
'short_descr': 'View id',
'long_descr' : 'View id',
'col_head' : 'View',
'key_field' : 'A',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : ['db_views', 'row_id', 'view_name', 'view_name', True, None],
'choices' : None,
})
cols.append ({
'col_name' : 'col_name',
'data_type' : 'TEXT',
'short_descr': 'Column name',
'long_descr' : 'Column name',
'col_head' : 'Column',
'key_field' : 'A',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 15,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'col_type',
'data_type' : 'TEXT',
'short_descr': 'Column type',
'long_descr' : 'Column type',
'col_head' : 'Col type',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': False,
'max_len' : 5,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : 'view',
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : [
['view', 'View column'],
['virt', 'Virtual column'],
],
})
cols.append ({
'col_name' : 'source',
'data_type' : 'JSON',
'short_descr': 'Source',
'long_descr' : 'Source - for each base table, literal or db column',
'col_head' : 'Source',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'seq',
'data_type' : 'INT',
'short_descr': 'Seq',
'long_descr' : 'Position for display',
'col_head' : 'Seq',
'key_field' : 'N',
'data_source': 'seq',
'condition' : None,
'allow_null' : False,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'data_type',
'data_type' : 'TEXT',
'short_descr': 'Data type',
'long_descr' : 'Data type',
'col_head' : 'Type',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': [
['where', '', 'view_id>view_created', 'is', '$False', ''],
],
'max_len' : 5,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : 'TEXT',
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : [
['TEXT', 'Text'],
['INT', 'Integer'],
['DEC', 'Decimal'],
['$TRN', 'Transaction currency'],
['$PTY', 'Party currency'],
['$LCL', 'Local currency'],
['DTE', 'Date'],
['DTM', 'Date-time'],
['BOOL', 'True/False'],
['AUTO', 'Generated key'],
['JSON', 'Json'],
['XML', 'Xml'],
['SXML', 'Xml string'],
['FXML', 'Form definition'],
['RXML', 'Report definition'],
['PXML', 'Process definition'],
],
})
cols.append ({
'col_name' : 'short_descr',
'data_type' : 'TEXT',
'short_descr': 'Short description',
'long_descr' : 'Column description',
'col_head' : 'Description',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': True,
'max_len' : 30,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'long_descr',
'data_type' : 'TEXT',
'short_descr': 'Long description',
'long_descr' : 'Full description for user manual, tool-tip, etc',
'col_head' : 'Long description',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'col_head',
'data_type' : 'TEXT',
'short_descr': 'Column heading',
'long_descr' : 'Column heading for reports and grids',
'col_head' : 'Col head',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 30,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'key_field',
'data_type' : 'TEXT',
'short_descr': 'Key field',
'long_descr' : 'Yes=primary key, Alt=alternate key, No=not key field',
'col_head' : 'Key',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : False,
'allow_amend': [
['where', '', 'view_id>view_created', 'is', '$False', ''],
],
'max_len' : 1,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : 'N',
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : [
['N', 'No'],
['Y', 'Yes'],
['A', 'Alt'],
],
})
cols.append ({
'col_name' : 'scale_ptr',
'data_type' : 'TEXT',
'short_descr': 'Column with scale factor',
'long_descr' : 'Column to define number of decimals allowed',
'col_head' : 'Scale ptr',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'fkey',
'data_type' : 'JSON',
'short_descr': 'Foreign key',
'long_descr' : 'Foreign key',
'col_head' : 'Fkey',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'choices',
'data_type' : 'JSON',
'short_descr': 'Choices',
'long_descr' : 'List of valid choices.\nNot used at present, but might be useful.',
'col_head' : 'Choices',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
cols.append ({
'col_name' : 'sql',
'data_type' : 'TEXT',
'short_descr': 'Sql statement',
'long_descr' : 'Sql statement to return value',
'col_head' : 'Sql',
'key_field' : 'N',
'data_source': 'input',
'condition' : None,
'allow_null' : True,
'allow_amend': True,
'max_len' : 0,
'db_scale' : 0,
'scale_ptr' : None,
'dflt_val' : None,
'dflt_rule' : None,
'col_checks' : None,
'fkey' : None,
'choices' : None,
})
# virtual column definitions
virt = []
# cursor definitions
cursors = []
# actions
actions = []
| table = {'table_name': 'db_view_cols', 'module_id': 'db', 'short_descr': 'Db view columns', 'long_descr': 'Database view column definitions', 'sub_types': None, 'sub_trans': None, 'sequence': ['seq', ['view_id', 'col_type'], None], 'tree_params': None, 'roll_params': None, 'indexes': None, 'ledger_col': None, 'defn_company': None, 'data_company': None, 'read_only': False}
cols = []
cols.append({'col_name': 'row_id', 'data_type': 'AUTO', 'short_descr': 'Row id', 'long_descr': 'Row id', 'col_head': 'Row', 'key_field': 'Y', 'data_source': 'gen', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'created_id', 'data_type': 'INT', 'short_descr': 'Created id', 'long_descr': 'Created row id', 'col_head': 'Created', 'key_field': 'N', 'data_source': 'gen', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': '0', 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'deleted_id', 'data_type': 'INT', 'short_descr': 'Deleted id', 'long_descr': 'Deleted row id', 'col_head': 'Deleted', 'key_field': 'N', 'data_source': 'gen', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': '0', 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'view_id', 'data_type': 'INT', 'short_descr': 'View id', 'long_descr': 'View id', 'col_head': 'View', 'key_field': 'A', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': ['db_views', 'row_id', 'view_name', 'view_name', True, None], 'choices': None})
cols.append({'col_name': 'col_name', 'data_type': 'TEXT', 'short_descr': 'Column name', 'long_descr': 'Column name', 'col_head': 'Column', 'key_field': 'A', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 15, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'col_type', 'data_type': 'TEXT', 'short_descr': 'Column type', 'long_descr': 'Column type', 'col_head': 'Col type', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': False, 'max_len': 5, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': 'view', 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': [['view', 'View column'], ['virt', 'Virtual column']]})
cols.append({'col_name': 'source', 'data_type': 'JSON', 'short_descr': 'Source', 'long_descr': 'Source - for each base table, literal or db column', 'col_head': 'Source', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'seq', 'data_type': 'INT', 'short_descr': 'Seq', 'long_descr': 'Position for display', 'col_head': 'Seq', 'key_field': 'N', 'data_source': 'seq', 'condition': None, 'allow_null': False, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'data_type', 'data_type': 'TEXT', 'short_descr': 'Data type', 'long_descr': 'Data type', 'col_head': 'Type', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': [['where', '', 'view_id>view_created', 'is', '$False', '']], 'max_len': 5, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': 'TEXT', 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': [['TEXT', 'Text'], ['INT', 'Integer'], ['DEC', 'Decimal'], ['$TRN', 'Transaction currency'], ['$PTY', 'Party currency'], ['$LCL', 'Local currency'], ['DTE', 'Date'], ['DTM', 'Date-time'], ['BOOL', 'True/False'], ['AUTO', 'Generated key'], ['JSON', 'Json'], ['XML', 'Xml'], ['SXML', 'Xml string'], ['FXML', 'Form definition'], ['RXML', 'Report definition'], ['PXML', 'Process definition']]})
cols.append({'col_name': 'short_descr', 'data_type': 'TEXT', 'short_descr': 'Short description', 'long_descr': 'Column description', 'col_head': 'Description', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': True, 'max_len': 30, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'long_descr', 'data_type': 'TEXT', 'short_descr': 'Long description', 'long_descr': 'Full description for user manual, tool-tip, etc', 'col_head': 'Long description', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'col_head', 'data_type': 'TEXT', 'short_descr': 'Column heading', 'long_descr': 'Column heading for reports and grids', 'col_head': 'Col head', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 30, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'key_field', 'data_type': 'TEXT', 'short_descr': 'Key field', 'long_descr': 'Yes=primary key, Alt=alternate key, No=not key field', 'col_head': 'Key', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': False, 'allow_amend': [['where', '', 'view_id>view_created', 'is', '$False', '']], 'max_len': 1, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': 'N', 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': [['N', 'No'], ['Y', 'Yes'], ['A', 'Alt']]})
cols.append({'col_name': 'scale_ptr', 'data_type': 'TEXT', 'short_descr': 'Column with scale factor', 'long_descr': 'Column to define number of decimals allowed', 'col_head': 'Scale ptr', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'fkey', 'data_type': 'JSON', 'short_descr': 'Foreign key', 'long_descr': 'Foreign key', 'col_head': 'Fkey', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'choices', 'data_type': 'JSON', 'short_descr': 'Choices', 'long_descr': 'List of valid choices.\nNot used at present, but might be useful.', 'col_head': 'Choices', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
cols.append({'col_name': 'sql', 'data_type': 'TEXT', 'short_descr': 'Sql statement', 'long_descr': 'Sql statement to return value', 'col_head': 'Sql', 'key_field': 'N', 'data_source': 'input', 'condition': None, 'allow_null': True, 'allow_amend': True, 'max_len': 0, 'db_scale': 0, 'scale_ptr': None, 'dflt_val': None, 'dflt_rule': None, 'col_checks': None, 'fkey': None, 'choices': None})
virt = []
cursors = []
actions = [] |
f = open('input.txt', 'r')
values = []
for line in f:
values.append(int(line))
counter = 0
# Part 1:
for x in range(len(values)-1):
if values[x+1] > values[x]:
counter += 1
print(f"part 1: {counter}")
# Part 2:
counter = 0
for x in range(2, len(values)-1):
lsum = sum([values[i] for i in range(x-2, x+1)])
rsum = sum([values[j] for j in range(x-1, x+2)])
# print(f"lsum: {lsum}, rsum: {rsum}")
if rsum > lsum:
counter += 1
print(f"part 2: {counter}")
| f = open('input.txt', 'r')
values = []
for line in f:
values.append(int(line))
counter = 0
for x in range(len(values) - 1):
if values[x + 1] > values[x]:
counter += 1
print(f'part 1: {counter}')
counter = 0
for x in range(2, len(values) - 1):
lsum = sum([values[i] for i in range(x - 2, x + 1)])
rsum = sum([values[j] for j in range(x - 1, x + 2)])
if rsum > lsum:
counter += 1
print(f'part 2: {counter}') |
#
# PySNMP MIB module ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:49:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint")
etsysModules, = mibBuilder.importSymbols("ENTERASYS-MIB-NAMES", "etsysModules")
InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
NotificationType, ModuleIdentity, Bits, ObjectIdentity, IpAddress, Integer32, Counter64, iso, Gauge32, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ModuleIdentity", "Bits", "ObjectIdentity", "IpAddress", "Integer32", "Counter64", "iso", "Gauge32", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "Counter32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
etsysMgmtAuthNotificationMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60))
etsysMgmtAuthNotificationMIB.setRevisions(('2011-03-08 20:40', '2005-11-14 16:48',))
if mibBuilder.loadTexts: etsysMgmtAuthNotificationMIB.setLastUpdated('201103082040Z')
if mibBuilder.loadTexts: etsysMgmtAuthNotificationMIB.setOrganization('Enterasys Networks, Inc')
class EtsysMgmtAuthNotificationTypes(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("cliConsole", 0), ("cliSsh", 1), ("cliTelnet", 2), ("webview", 3), ("inactiveUser", 4), ("maxUserAttempt", 5), ("maxUserFail", 6))
etsysMgmtAuthObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1))
etsysMgmtAuthNotificationBranch = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0))
etsysMgmtAuthConfigBranch = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1))
etsysMgmtAuthAuthenticationBranch = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2))
etsysMgmtAuthNotificationsSupported = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1, 1), EtsysMgmtAuthNotificationTypes()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysMgmtAuthNotificationsSupported.setStatus('current')
etsysMgmtAuthNotificationEnabledStatus = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1, 2), EtsysMgmtAuthNotificationTypes()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysMgmtAuthNotificationEnabledStatus.setStatus('current')
etsysMgmtAuthType = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 1), EtsysMgmtAuthNotificationTypes()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: etsysMgmtAuthType.setStatus('current')
etsysMgmtAuthUserName = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 2), DisplayString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: etsysMgmtAuthUserName.setStatus('current')
etsysMgmtAuthInetAddressType = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 3), InetAddressType()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: etsysMgmtAuthInetAddressType.setStatus('current')
etsysMgmtAuthInetAddress = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 4), InetAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: etsysMgmtAuthInetAddress.setStatus('current')
etsysMgmtAuthInIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 5), InterfaceIndexOrZero()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: etsysMgmtAuthInIfIndex.setStatus('current')
etsysMgmtAuthSuccessNotificiation = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 1)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if mibBuilder.loadTexts: etsysMgmtAuthSuccessNotificiation.setStatus('current')
etsysMgmtAuthFailNotificiation = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 2)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if mibBuilder.loadTexts: etsysMgmtAuthFailNotificiation.setStatus('current')
etsysMgmtAuthInactiveNotification = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 3)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if mibBuilder.loadTexts: etsysMgmtAuthInactiveNotification.setStatus('current')
etsysMgmtAuthMaxAuthAttemptNotification = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 4)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if mibBuilder.loadTexts: etsysMgmtAuthMaxAuthAttemptNotification.setStatus('current')
etsysMgmtAuthMaxFailNotification = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 5)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if mibBuilder.loadTexts: etsysMgmtAuthMaxFailNotification.setStatus('current')
etsysMgmtAuthConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2))
etsysMgmtAuthGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1))
etsysMgmtAuthCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2))
etsysMgmtAuthConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 1)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthNotificationsSupported"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthNotificationEnabledStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthConfigGroup = etsysMgmtAuthConfigGroup.setStatus('current')
etsysMgmtAuthHistoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 2)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthUserName"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddressType"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInetAddress"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInIfIndex"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthHistoryGroup = etsysMgmtAuthHistoryGroup.setStatus('current')
etsysMgmtAuthNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 3)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthSuccessNotificiation"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthFailNotificiation"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthNotificationGroup = etsysMgmtAuthNotificationGroup.setStatus('current')
etsysMgmtAuthNotificationUserGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 4)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthInactiveNotification"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthMaxAuthAttemptNotification"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthMaxFailNotification"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthNotificationUserGroup = etsysMgmtAuthNotificationUserGroup.setStatus('current')
etsysMgmtAuthCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2, 1)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthConfigGroup"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthHistoryGroup"), ("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthNotificationGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthCompliance = etsysMgmtAuthCompliance.setStatus('current')
etsysMgmtAuthUserCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2, 2)).setObjects(("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", "etsysMgmtAuthNotificationUserGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysMgmtAuthUserCompliance = etsysMgmtAuthUserCompliance.setStatus('current')
mibBuilder.exportSymbols("ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB", etsysMgmtAuthNotificationUserGroup=etsysMgmtAuthNotificationUserGroup, etsysMgmtAuthNotificationGroup=etsysMgmtAuthNotificationGroup, etsysMgmtAuthNotificationBranch=etsysMgmtAuthNotificationBranch, etsysMgmtAuthFailNotificiation=etsysMgmtAuthFailNotificiation, etsysMgmtAuthConfigGroup=etsysMgmtAuthConfigGroup, etsysMgmtAuthMaxFailNotification=etsysMgmtAuthMaxFailNotification, etsysMgmtAuthNotificationEnabledStatus=etsysMgmtAuthNotificationEnabledStatus, etsysMgmtAuthCompliance=etsysMgmtAuthCompliance, etsysMgmtAuthGroups=etsysMgmtAuthGroups, etsysMgmtAuthConformance=etsysMgmtAuthConformance, etsysMgmtAuthNotificationMIB=etsysMgmtAuthNotificationMIB, etsysMgmtAuthInetAddress=etsysMgmtAuthInetAddress, PYSNMP_MODULE_ID=etsysMgmtAuthNotificationMIB, etsysMgmtAuthNotificationsSupported=etsysMgmtAuthNotificationsSupported, etsysMgmtAuthConfigBranch=etsysMgmtAuthConfigBranch, etsysMgmtAuthInIfIndex=etsysMgmtAuthInIfIndex, etsysMgmtAuthSuccessNotificiation=etsysMgmtAuthSuccessNotificiation, etsysMgmtAuthType=etsysMgmtAuthType, etsysMgmtAuthUserCompliance=etsysMgmtAuthUserCompliance, etsysMgmtAuthUserName=etsysMgmtAuthUserName, etsysMgmtAuthAuthenticationBranch=etsysMgmtAuthAuthenticationBranch, etsysMgmtAuthObjects=etsysMgmtAuthObjects, etsysMgmtAuthInactiveNotification=etsysMgmtAuthInactiveNotification, etsysMgmtAuthMaxAuthAttemptNotification=etsysMgmtAuthMaxAuthAttemptNotification, etsysMgmtAuthInetAddressType=etsysMgmtAuthInetAddressType, EtsysMgmtAuthNotificationTypes=EtsysMgmtAuthNotificationTypes, etsysMgmtAuthCompliances=etsysMgmtAuthCompliances, etsysMgmtAuthHistoryGroup=etsysMgmtAuthHistoryGroup)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_size_constraint, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint')
(etsys_modules,) = mibBuilder.importSymbols('ENTERASYS-MIB-NAMES', 'etsysModules')
(interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero')
(inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(notification_type, module_identity, bits, object_identity, ip_address, integer32, counter64, iso, gauge32, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, mib_identifier, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ModuleIdentity', 'Bits', 'ObjectIdentity', 'IpAddress', 'Integer32', 'Counter64', 'iso', 'Gauge32', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'MibIdentifier', 'Counter32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
etsys_mgmt_auth_notification_mib = module_identity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60))
etsysMgmtAuthNotificationMIB.setRevisions(('2011-03-08 20:40', '2005-11-14 16:48'))
if mibBuilder.loadTexts:
etsysMgmtAuthNotificationMIB.setLastUpdated('201103082040Z')
if mibBuilder.loadTexts:
etsysMgmtAuthNotificationMIB.setOrganization('Enterasys Networks, Inc')
class Etsysmgmtauthnotificationtypes(TextualConvention, Bits):
status = 'current'
named_values = named_values(('cliConsole', 0), ('cliSsh', 1), ('cliTelnet', 2), ('webview', 3), ('inactiveUser', 4), ('maxUserAttempt', 5), ('maxUserFail', 6))
etsys_mgmt_auth_objects = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1))
etsys_mgmt_auth_notification_branch = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0))
etsys_mgmt_auth_config_branch = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1))
etsys_mgmt_auth_authentication_branch = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2))
etsys_mgmt_auth_notifications_supported = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1, 1), etsys_mgmt_auth_notification_types()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysMgmtAuthNotificationsSupported.setStatus('current')
etsys_mgmt_auth_notification_enabled_status = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 1, 2), etsys_mgmt_auth_notification_types()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysMgmtAuthNotificationEnabledStatus.setStatus('current')
etsys_mgmt_auth_type = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 1), etsys_mgmt_auth_notification_types()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
etsysMgmtAuthType.setStatus('current')
etsys_mgmt_auth_user_name = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 2), display_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
etsysMgmtAuthUserName.setStatus('current')
etsys_mgmt_auth_inet_address_type = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 3), inet_address_type()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
etsysMgmtAuthInetAddressType.setStatus('current')
etsys_mgmt_auth_inet_address = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 4), inet_address()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
etsysMgmtAuthInetAddress.setStatus('current')
etsys_mgmt_auth_in_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 2, 5), interface_index_or_zero()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
etsysMgmtAuthInIfIndex.setStatus('current')
etsys_mgmt_auth_success_notificiation = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 1)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if mibBuilder.loadTexts:
etsysMgmtAuthSuccessNotificiation.setStatus('current')
etsys_mgmt_auth_fail_notificiation = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 2)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if mibBuilder.loadTexts:
etsysMgmtAuthFailNotificiation.setStatus('current')
etsys_mgmt_auth_inactive_notification = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 3)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if mibBuilder.loadTexts:
etsysMgmtAuthInactiveNotification.setStatus('current')
etsys_mgmt_auth_max_auth_attempt_notification = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 4)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if mibBuilder.loadTexts:
etsysMgmtAuthMaxAuthAttemptNotification.setStatus('current')
etsys_mgmt_auth_max_fail_notification = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 1, 0, 5)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if mibBuilder.loadTexts:
etsysMgmtAuthMaxFailNotification.setStatus('current')
etsys_mgmt_auth_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2))
etsys_mgmt_auth_groups = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1))
etsys_mgmt_auth_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2))
etsys_mgmt_auth_config_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 1)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthNotificationsSupported'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthNotificationEnabledStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_config_group = etsysMgmtAuthConfigGroup.setStatus('current')
etsys_mgmt_auth_history_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 2)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthUserName'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddressType'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInetAddress'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInIfIndex'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_history_group = etsysMgmtAuthHistoryGroup.setStatus('current')
etsys_mgmt_auth_notification_group = notification_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 3)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthSuccessNotificiation'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthFailNotificiation'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_notification_group = etsysMgmtAuthNotificationGroup.setStatus('current')
etsys_mgmt_auth_notification_user_group = notification_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 1, 4)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthInactiveNotification'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthMaxAuthAttemptNotification'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthMaxFailNotification'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_notification_user_group = etsysMgmtAuthNotificationUserGroup.setStatus('current')
etsys_mgmt_auth_compliance = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2, 1)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthConfigGroup'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthHistoryGroup'), ('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthNotificationGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_compliance = etsysMgmtAuthCompliance.setStatus('current')
etsys_mgmt_auth_user_compliance = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 60, 2, 2, 2)).setObjects(('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', 'etsysMgmtAuthNotificationUserGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_mgmt_auth_user_compliance = etsysMgmtAuthUserCompliance.setStatus('current')
mibBuilder.exportSymbols('ENTERASYS-MGMT-AUTH-NOTIFICATION-MIB', etsysMgmtAuthNotificationUserGroup=etsysMgmtAuthNotificationUserGroup, etsysMgmtAuthNotificationGroup=etsysMgmtAuthNotificationGroup, etsysMgmtAuthNotificationBranch=etsysMgmtAuthNotificationBranch, etsysMgmtAuthFailNotificiation=etsysMgmtAuthFailNotificiation, etsysMgmtAuthConfigGroup=etsysMgmtAuthConfigGroup, etsysMgmtAuthMaxFailNotification=etsysMgmtAuthMaxFailNotification, etsysMgmtAuthNotificationEnabledStatus=etsysMgmtAuthNotificationEnabledStatus, etsysMgmtAuthCompliance=etsysMgmtAuthCompliance, etsysMgmtAuthGroups=etsysMgmtAuthGroups, etsysMgmtAuthConformance=etsysMgmtAuthConformance, etsysMgmtAuthNotificationMIB=etsysMgmtAuthNotificationMIB, etsysMgmtAuthInetAddress=etsysMgmtAuthInetAddress, PYSNMP_MODULE_ID=etsysMgmtAuthNotificationMIB, etsysMgmtAuthNotificationsSupported=etsysMgmtAuthNotificationsSupported, etsysMgmtAuthConfigBranch=etsysMgmtAuthConfigBranch, etsysMgmtAuthInIfIndex=etsysMgmtAuthInIfIndex, etsysMgmtAuthSuccessNotificiation=etsysMgmtAuthSuccessNotificiation, etsysMgmtAuthType=etsysMgmtAuthType, etsysMgmtAuthUserCompliance=etsysMgmtAuthUserCompliance, etsysMgmtAuthUserName=etsysMgmtAuthUserName, etsysMgmtAuthAuthenticationBranch=etsysMgmtAuthAuthenticationBranch, etsysMgmtAuthObjects=etsysMgmtAuthObjects, etsysMgmtAuthInactiveNotification=etsysMgmtAuthInactiveNotification, etsysMgmtAuthMaxAuthAttemptNotification=etsysMgmtAuthMaxAuthAttemptNotification, etsysMgmtAuthInetAddressType=etsysMgmtAuthInetAddressType, EtsysMgmtAuthNotificationTypes=EtsysMgmtAuthNotificationTypes, etsysMgmtAuthCompliances=etsysMgmtAuthCompliances, etsysMgmtAuthHistoryGroup=etsysMgmtAuthHistoryGroup) |
class Solution(object):
def fizzBuzz(self, n):
# Scaleable hash
dict = {3:"Fizz", 5:"Buzz"}
res = []
# Iterate through 1-n+1
for i in range(1, n+1):
# app represents what to append of not the number
app = ""
# iterate through any number of keys, instead of only 3, 5
for j in [3, 5]:
if not i % j:
app+=(dict[j])
# Append to res array
if app != "":
res.append(app)
else:
res.append(str(i))
return res
z = Solution()
n = 15
print(z.fizzBuzz(n))
| class Solution(object):
def fizz_buzz(self, n):
dict = {3: 'Fizz', 5: 'Buzz'}
res = []
for i in range(1, n + 1):
app = ''
for j in [3, 5]:
if not i % j:
app += dict[j]
if app != '':
res.append(app)
else:
res.append(str(i))
return res
z = solution()
n = 15
print(z.fizzBuzz(n)) |
# MAJOR_VER = 20
# MINOR_VER = 11
# REVISION_VER = 0
# CONTROL_VER = 6
# OFFICIAL = False
# MAJOR_VER = 20
# MINOR_VER = 12
# REVISION_VER = 5
# CONTROL_VER = 6
# OFFICIAL = True
MAJOR_VER = 21
MINOR_VER = 6
REVISION_VER = 0
CONTROL_VER = 6
OFFICIAL = False
| major_ver = 21
minor_ver = 6
revision_ver = 0
control_ver = 6
official = False |
#https://www.hackerrank.com/challenges/array-left-rotation
length, rotations = map(int, input().strip().split())
array = list(map(int, input().strip().split()))
displacement = rotations % length
lower = []
for i in range(displacement, length):
lower.append(array[i])
upper = []
for i in range(displacement):
upper.append(array[i])
array = lower + upper
print(" ".join(map(str, array)))
## or
array = array[displacement:] + array[:displacement] | (length, rotations) = map(int, input().strip().split())
array = list(map(int, input().strip().split()))
displacement = rotations % length
lower = []
for i in range(displacement, length):
lower.append(array[i])
upper = []
for i in range(displacement):
upper.append(array[i])
array = lower + upper
print(' '.join(map(str, array)))
array = array[displacement:] + array[:displacement] |
DWI_ENTITIES = dict(suffix="dwi", extension=".nii.gz")
TENSOR_DERIVED_ENTITIES = dict(suffix="dwiref", resolution="dwi")
TENSOR_DERIVED_METRICS = dict(
diffusion_tensor=[
"fa",
"ga",
"rgb",
"md",
"ad",
"rd",
"mode",
"evec",
"eval",
"tensor",
],
restore_tensor=[
"fa",
"ga",
"rgb",
"md",
"ad",
"rd",
"mode",
"evec",
"eval",
"tensor",
],
diffusion_kurtosis=[
"fa",
"ga",
"rgb",
"md",
"ad",
"rd",
"mode",
"evec",
"eval",
"mk",
"ak",
"rk",
"dt_tensor",
"dk_tensor",
],
)
KWARGS_MAPPING = dict(
dwi="input_files",
bval="bvalues_files",
bvec="bvectors_files",
mask="mask_files",
out_metrics="save_metrics",
)
| dwi_entities = dict(suffix='dwi', extension='.nii.gz')
tensor_derived_entities = dict(suffix='dwiref', resolution='dwi')
tensor_derived_metrics = dict(diffusion_tensor=['fa', 'ga', 'rgb', 'md', 'ad', 'rd', 'mode', 'evec', 'eval', 'tensor'], restore_tensor=['fa', 'ga', 'rgb', 'md', 'ad', 'rd', 'mode', 'evec', 'eval', 'tensor'], diffusion_kurtosis=['fa', 'ga', 'rgb', 'md', 'ad', 'rd', 'mode', 'evec', 'eval', 'mk', 'ak', 'rk', 'dt_tensor', 'dk_tensor'])
kwargs_mapping = dict(dwi='input_files', bval='bvalues_files', bvec='bvectors_files', mask='mask_files', out_metrics='save_metrics') |
#!/usr/bin/env python3
t = sorted([float(x) for x in input().split()])
o = float(input())
best = (t[0] + t[1] + t[2])/3
worst = (t[1] + t[2] + t[3])/3
if o < best: print('impossible')
elif o >= worst: print('infinite')
else: print(f'{3*o-t[1]-t[2]:.2f}')
| t = sorted([float(x) for x in input().split()])
o = float(input())
best = (t[0] + t[1] + t[2]) / 3
worst = (t[1] + t[2] + t[3]) / 3
if o < best:
print('impossible')
elif o >= worst:
print('infinite')
else:
print(f'{3 * o - t[1] - t[2]:.2f}') |
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_test")
def gen_tests(srcs):
for src in srcs:
name = src.replace("s/","_").replace(".ts","")
nodejs_test(name=name, entry_point = src, data=[":tsc","@npm//big-integer"]) | load('@build_bazel_rules_nodejs//:index.bzl', 'nodejs_test')
def gen_tests(srcs):
for src in srcs:
name = src.replace('s/', '_').replace('.ts', '')
nodejs_test(name=name, entry_point=src, data=[':tsc', '@npm//big-integer']) |
class Generator(object):
def __init__(self, number, factor):
self.number = number
self.factor = factor
def next(self):
self.number = (self.number * self.factor) % 2147483647
return self.number
class Judge(object):
def __init__(self):
self.A = Generator(512, 16807)
self.B = Generator(191, 48271)
def do_steps(self, steps):
ctr = 0
for i in range(steps):
if (self.A.next() & 0xFFFF) == (self.B.next() & 0xFFFF):
ctr += 1
print(ctr, i)
return ctr
j = Judge()
print(j.do_steps(40 * 1000 * 1000))
| class Generator(object):
def __init__(self, number, factor):
self.number = number
self.factor = factor
def next(self):
self.number = self.number * self.factor % 2147483647
return self.number
class Judge(object):
def __init__(self):
self.A = generator(512, 16807)
self.B = generator(191, 48271)
def do_steps(self, steps):
ctr = 0
for i in range(steps):
if self.A.next() & 65535 == self.B.next() & 65535:
ctr += 1
print(ctr, i)
return ctr
j = judge()
print(j.do_steps(40 * 1000 * 1000)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.