content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
data = input() courses = {} while ":" in data: student_name, id, course_name = data.split(":") if course_name not in courses: courses[course_name] = {} courses[course_name][id] = student_name data = input() searched_course = data searched_course_name_as_list = searched_course.split("_") searched_course = " ".join(searched_course_name_as_list) for course_name in courses: if course_name == searched_course: for id, name in courses[course_name].items(): print(f"{name} - {id}")
data = input() courses = {} while ':' in data: (student_name, id, course_name) = data.split(':') if course_name not in courses: courses[course_name] = {} courses[course_name][id] = student_name data = input() searched_course = data searched_course_name_as_list = searched_course.split('_') searched_course = ' '.join(searched_course_name_as_list) for course_name in courses: if course_name == searched_course: for (id, name) in courses[course_name].items(): print(f'{name} - {id}')
nums = list() while True: nStr = input('Enter a number: ') try: if nStr == 'done': break n = float(nStr) nums.append(n) except: print('Invalid input') continue print('Maximum: ',max(nums)) print('Minimum: ',min(nums))
nums = list() while True: n_str = input('Enter a number: ') try: if nStr == 'done': break n = float(nStr) nums.append(n) except: print('Invalid input') continue print('Maximum: ', max(nums)) print('Minimum: ', min(nums))
# to run this, add code from experiments_HSCC2021.py def time_series_pulse(): path = Path(__file__).parent.parent / "data" / "real_data" / "datasets" / "basic_data" filename1 = path / "pulse1-1.csv" filename2 = path / "pulse1-2.csv" filename3 = path / "pulse1-3.csv" f1 = load_time_series(filename1, 1) f2 = load_time_series(filename2, 1) f3 = load_time_series(filename3, 1) dataset = [f1, f2, f3] return dataset def parameters_pulse(): delta_ts = 0.02 deltas_ha = [0.1] n_discrete_steps = 10 reachability_time_step = 1e-3 refinement_distance = 0.001 n_intermediate = 1 max_dwell_time = 4.0 min_dwell_time = None n_simulations = 3 path_length = 6 time_step = 0.01 return delta_ts, deltas_ha, n_discrete_steps, reachability_time_step, refinement_distance, max_dwell_time,\ n_intermediate, n_simulations, path_length, time_step, min_dwell_time
def time_series_pulse(): path = path(__file__).parent.parent / 'data' / 'real_data' / 'datasets' / 'basic_data' filename1 = path / 'pulse1-1.csv' filename2 = path / 'pulse1-2.csv' filename3 = path / 'pulse1-3.csv' f1 = load_time_series(filename1, 1) f2 = load_time_series(filename2, 1) f3 = load_time_series(filename3, 1) dataset = [f1, f2, f3] return dataset def parameters_pulse(): delta_ts = 0.02 deltas_ha = [0.1] n_discrete_steps = 10 reachability_time_step = 0.001 refinement_distance = 0.001 n_intermediate = 1 max_dwell_time = 4.0 min_dwell_time = None n_simulations = 3 path_length = 6 time_step = 0.01 return (delta_ts, deltas_ha, n_discrete_steps, reachability_time_step, refinement_distance, max_dwell_time, n_intermediate, n_simulations, path_length, time_step, min_dwell_time)
#Day 1.3 Exercise!! #First way I thought to do it without help name = input("What is your name? ") print(len(name)) #Way I found to do it from searching google print(len(input("What is your name? ")))
name = input('What is your name? ') print(len(name)) print(len(input('What is your name? ')))
#-- THIS LINE SHOULD BE THE FIRST LINE OF YOUR SUBMISSION! --# def tally(costs, discounts, rebate_factor): cost = sum(costs) discount = sum(discounts) pre = (cost - discount) * rebate_factor if pre < 0: return 0 else: return round(pre, 2) #-- THIS LINE SHOULD BE THE LAST LINE OF YOUR SUBMISSION! ---# ### DO NOT SUBMIT THE FOLLOWING LINES!!! THESE ARE FOR LOCAL TESTING ONLY! # ((10+24) - (3+4+3)) * 0.3 assert(tally([10,24], [3,4,3], 0.30) == 7.20) # if the result would be negative, 0 is returned instead assert(tally([10], [20], 0.1) == 0)
def tally(costs, discounts, rebate_factor): cost = sum(costs) discount = sum(discounts) pre = (cost - discount) * rebate_factor if pre < 0: return 0 else: return round(pre, 2) assert tally([10, 24], [3, 4, 3], 0.3) == 7.2 assert tally([10], [20], 0.1) == 0
def soma (a,b): print(f'A = {a} e B = {b}') s=a+b print(f'A soma A + B ={s}') #Programa Principal soma(4,5)
def soma(a, b): print(f'A = {a} e B = {b}') s = a + b print(f'A soma A + B ={s}') soma(4, 5)
def GCD(a,b): if b == 0: return a else: return GCD(b, a%b) a = int(input()) b = int(input()) print(a*b//(GCD(a,b)))
def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) a = int(input()) b = int(input()) print(a * b // gcd(a, b))
# -*- coding:utf-8 -*- """ """ __date__ = "14/12/2017" __author__ = "zhaojm"
""" """ __date__ = '14/12/2017' __author__ = 'zhaojm'
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '10/28/2020 4:52 PM' # import re # # # def format_qs_score(score_str): # """ # help you generate a qs score # 1 - 100 : 5 # 141-200 : 4 # =100: 4 # N/A 3 # :param score_str: # :return: # """ # score = 3 # if not score_str or score_str != "N/A": # try: # parts = int(list(filter(lambda val: val, # list(re.split('-|=', score_str))))[0]) # except: # return 3 # score = 5 - int(parts / 100) # if score > 5 or score < 1: # return 3 # return score # # # print(format_qs_score("=100")) # # print(list(filter(lambda val: val, re.split('-|=', "=100")))) # import csv # import numpy as np # import requests # # with open('./college_explorer.csv', newline='', encoding='utf-8') as file: # data = list(csv.reader(file)) # data = np.array(data) # img_list = data[1:, 33].tolist() # # img_list = list(filter(lambda url: url != 'N/A', img_list)) # # # for url in img_list: # response = requests.get(url) # if response.status_code == 200: # school_name = url.split('/')[-1].split('_')[0] # with open("./images/" + school_name + ".jpg", 'wb') as f: # f.write(response.content)
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '10/28/2020 4:52 PM'
def Linear_Search(Test_arr, val): index = 0 for i in range(len(Test_arr)): if val > Test_arr[i]: index = i+1 return index def Insertion_Sort(Test_arr): for i in range(1, len(Test_arr)): val = Test_arr[i] j = Linear_Search(Test_arr[:i], val) Test_arr.pop(i) Test_arr.insert(j, val) return Test_arr if __name__ == "__main__": Test_list = input("Enter the list of Numbers: ").split() Test_list = [int(i) for i in Test_list] print(f"Binary Insertion Sort: {Insertion_Sort(Test_list)}")
def linear__search(Test_arr, val): index = 0 for i in range(len(Test_arr)): if val > Test_arr[i]: index = i + 1 return index def insertion__sort(Test_arr): for i in range(1, len(Test_arr)): val = Test_arr[i] j = linear__search(Test_arr[:i], val) Test_arr.pop(i) Test_arr.insert(j, val) return Test_arr if __name__ == '__main__': test_list = input('Enter the list of Numbers: ').split() test_list = [int(i) for i in Test_list] print(f'Binary Insertion Sort: {insertion__sort(Test_list)}')
class Wrapper(object): wrapper_classes = {} @classmethod def wrap(cls, obj): return cls(obj) def __init__(self, wrapped): self.__dict__['wrapped'] = wrapped def __getattr__(self, name): return getattr(self.wrapped, name) def __setattr__(self, name, value): setattr(self.wrapped, name, value) def __delattr__(self, name): delattr(self.wrapped, name) def __str__(self): return str(self.wrapped) def __repr__(self): return repr(self.wrapped)
class Wrapper(object): wrapper_classes = {} @classmethod def wrap(cls, obj): return cls(obj) def __init__(self, wrapped): self.__dict__['wrapped'] = wrapped def __getattr__(self, name): return getattr(self.wrapped, name) def __setattr__(self, name, value): setattr(self.wrapped, name, value) def __delattr__(self, name): delattr(self.wrapped, name) def __str__(self): return str(self.wrapped) def __repr__(self): return repr(self.wrapped)
height = int(input()) for i in range(1,height+1) : for j in range(1, i+1): m = i*j if(m <= 9): print("",m,end = " ") else: print(m,end = " ") print() # Sample Input :- 5 # Output :- # 1 # 2 4 # 3 6 9 # 4 8 12 16 # 5 10 15 20 25
height = int(input()) for i in range(1, height + 1): for j in range(1, i + 1): m = i * j if m <= 9: print('', m, end=' ') else: print(m, end=' ') print()
"""WWUCS Bot module.""" __all__ = [ "__author__", "__email__", "__version__", ] __author__ = "Reilly Tucker Siemens" __email__ = "reilly@tuckersiemens.com" __version__ = "0.1.0"
"""WWUCS Bot module.""" __all__ = ['__author__', '__email__', '__version__'] __author__ = 'Reilly Tucker Siemens' __email__ = 'reilly@tuckersiemens.com' __version__ = '0.1.0'
""" =========== What is Matter Parameters =================== """ #tups = [(125.0, 1.0), (125.0, 1.5), (125.0, 2.0), (125.0, 2.5), (125.0, 3.0), (150.0, 1.0), (150.0, 1.5), (150.0, 2.0), (150.0, 2.5), (150.0, 3.0), (175.0, 1.0), (175.0, 1.5), (175.0, 2.0), (175.0, 2.5), (175.0, 3.0), (200.0, 1.0), (200.0, 1.5), (200.0, 2.0), (200.0, 2.5), (200.0, 3.0), (225.0, 1.0), (225.0, 1.5), (225.0, 2.0), (225.0, 2.5), (225.0, 3.0), (250.0, 1.0), (250.0, 1.5), (250.0, 2.0), (250.0, 2.5), (250.0, 3.0)] """ =========== DUC Data ========== """ #tups = [(64.0, 1.0), (64.0, 1.5), (64.0, 2.0), (64.0, 2.5), (70.0, 1.0), (70.0, 1.5), (70.0, 2.0), (70.0, 2.5), (76.0, 1.0), (76.0, 1.5), (76.0, 2.0), (76.0, 2.5), (82.0, 1.0), (82.0, 1.5), (82.0, 2.0), (82.0, 2.5), (88.0, 1.0), (88.0, 1.5), (88.0, 2.0), (88.0, 2.5), (96.0, 1.0), (96.0, 1.5), (96.0, 2.0), (96.0, 2.5), (100.0, 1.0), (100.0, 1.5), (100.0, 2.0), (100.0, 2.5)] #b = [1.0,1.5,2.0,2.5,3.0] # alpha should be from [10,40] #a = range(len(segpool)+10,len(segpool)+60,10) #tups = list(itertools.product(a,b)) #print "Alll combinations ", tups #tups = [(125, 1.0), (125, 1.5), (125, 2.0), (125, 2.5), (125, 3.0), (135, 1.0), (135, 1.5), (135, 2.0), (135, 2.5), (135, 3.0), (145, 1.0), (145, 1.5), (145, 2.0), (145, 2.5), (145, 3.0), (155, 1.0), (155, 1.5), (155, 2.0), (155, 2.5), (155, 3.0), (165, 1.0), (165, 1.5), (165, 2.0), (165, 2.5), (165, 3.0)] #thresholds = [83]
""" =========== What is Matter Parameters =================== """ '\n=========== DUC Data ==========\n'
x = 2 print(x) # multiple assignment a, b, c, d = (1, 2, 5, 9) print(a, b, c, d) print(type(str(a)))
x = 2 print(x) (a, b, c, d) = (1, 2, 5, 9) print(a, b, c, d) print(type(str(a)))
# OpenWeatherMap API Key weather_api_key = "ae41fcf95db0d612b74e2b509abe9684" # Google API Key g_key = "AIzaSyCuF1rT6NscWq62bcBm0tZM7hKlaeWfONQ"
weather_api_key = 'ae41fcf95db0d612b74e2b509abe9684' g_key = 'AIzaSyCuF1rT6NscWq62bcBm0tZM7hKlaeWfONQ'
"""File for holding the different verb forms for all of the verbs in the Total English book series.""" verb_forms = { 'become' : { 'normal' : 'become', 'present' : ['become','becomes'], 'past' : 'became', 'past participle' : 'become', 'gerund' : 'becoming', }, 'be': { 'normal' : 'be', 'present' : ['am','is','are'], 'past' : ['was', 'were'], 'past participle' : 'been', 'gerund' : 'being', }, 'begin': { 'normal' : 'begin', 'present' : ['begin','begins'], 'past' : 'began', 'past participle' : 'begun', 'gerund' : 'beginning', }, 'blow': { 'normal' : 'blow', 'present' : ['blow', 'blows'], 'past' : 'blew', 'past participle' : 'blown', 'gerund' : 'blowing', }, 'bring': { 'normal' : 'bring', 'present' : ['bring','brings'], 'past' : 'brought', 'past participle' : 'brought', 'gerund' : 'bringing', }, 'build': { 'normal' : 'build', 'present' : ['build','builds'], 'past' : 'built', 'past participle' : 'built', 'gerund' : 'building', }, 'burn': { 'normal' : 'burn', 'present' : ['burn','burns'], 'past' : ['burned','burnt'], 'past participle' : ['burned','burnt'], 'gerund' : 'burning', }, 'buy': { 'normal' : 'buy', 'present' : ['buy','buys'], 'past' : 'bought', 'past participle' : 'bought', 'gerund' : 'buying', }, 'catch': { 'normal' : 'catch', 'present' : ['catch','catches'], 'past' : 'caught', 'past participle' : 'caught', 'gerund' : 'catching', }, 'choose': { 'normal' : 'choose', 'present' : ['choose','chooses'], 'past' : 'chose', 'past participle' : 'chosen', 'gerund' : 'choosing', }, 'come': { 'normal' : 'come', 'present' : ['come','comes'], 'past' : 'came', 'past participle' : 'come', 'gerund' : 'coming', }, 'cut': { 'normal' : 'cut', 'present' : ['cut','cuts'], 'past' : 'cut', 'past participle' : 'cut', 'gerund' : 'cutting', }, 'do': { 'normal' : 'do', 'present' : ['do','does'], 'past' : 'did', 'past participle' : 'done', 'gerund' : 'doing', }, 'drink': { 'normal' : 'drink', 'present' : ['drink','drinks'], 'past' : 'drank', 'past participle' : 'drunk', 'gerund' : 'drinking', }, 'eat': { 'normal' : 'eat', 'present' : ['eat','eats'], 'past' : 'ate', 'past participle' : 'eaten', 'gerund' : 'eating', }, 'feel': { 'normal' : 'feel', 'present' : ['feel','feels'], 'past' : 'felt', 'past participle' : 'felt', 'gerund' : 'feeling', }, 'fight': { 'normal' : 'fight', 'present' : ['fight','fights'], 'past' : 'fought', 'past participle' : 'fought', 'gerund' : 'fighting', }, 'find': { 'normal' : 'find', 'present' : ['find','finds'], 'past' : 'found', 'past participle' : 'found', 'gerund' : 'finding', }, 'fly': { 'normal' : 'fly', 'present' : ['fly','flies'], 'past' : 'flew', 'past participle' : 'flown', 'gerund' : 'flying', }, 'forget': { 'normal' : 'forget', 'present' : ['forget','forgets'], 'past' : 'forgot', 'past participle' : ['forgotten','forgot'], 'gerund' : 'forgetting', }, 'get': { 'normal' : 'get', 'present' : ['get','gets'], 'past' : 'got', 'past participle' : ['gotten','got'], 'gerund' : 'getting', }, 'give': { 'normal' : 'give', 'present' : ['give','gives'], 'past' : 'gave', 'past participle' : 'given', 'gerund' : 'giving', }, 'go': { 'normal' : 'go', 'present' : ['go','goes'], 'past' : 'went', 'past participle' : 'gone', 'gerund' : 'going', }, 'grow': { 'normal' : 'grow', 'present' : ['grow','grows'], 'past' : 'grew', 'past participle' : 'grown', 'gerund' : 'growing', }, 'have': { 'normal' : 'have', 'present' : ['have','has'], 'past' : 'had', 'past participle' : 'had', 'gerund' : 'having', }, 'hear': { 'normal' : 'hear', 'present' : ['hear','hears'], 'past' : 'heard', 'past participle' : 'heard', 'gerund' : 'hearing', }, 'hit': { 'normal' : 'hit', 'present' : ['hit','hits'], 'past' : 'hit', 'past participle' : 'hit', 'gerund' : 'hitting', }, 'hold': { 'normal' : 'hold', 'present' : ['hold','holds'], 'past' : 'held', 'past participle' : 'held', 'gerund' : 'holding', }, 'hurt': { 'normal' : 'hurt', 'present' : ['hurt','hurts'], 'past' : 'hurt', 'past participle' : 'hurt', 'gerund' : 'hurting', }, 'keep': { 'normal' : 'keep', 'present' : ['keep','keeps'], 'past' : 'kept', 'past participle' : 'kept', 'gerund' : 'keeping', }, 'know': { 'normal' : 'know', 'present' : ['know','knows'], 'past' : 'knew', 'past participle' : 'known', 'gerund' : 'knowing', }, 'lead': { 'normal' : 'lead', 'present' : ['lead','leads'], 'past' : 'led', 'past participle' : 'led', 'gerund' : 'leading', }, 'leave': { 'normal' : 'leave', 'present' : ['leave','leaves'], 'past' : 'left', 'past participle' : 'left', 'gerund' : 'leaving', }, 'lend': { 'normal' : 'lend', 'present' : ['lend','lends'], 'past' : 'lent', 'past participle' : 'lent', 'gerund' : 'lending', }, 'lie': { 'normal' : 'lie', 'present' : ['lie','lies'], 'past' : 'lay', 'past participle' : 'lain', 'gerund' : 'lying', }, 'lose': { 'normal' : 'lose', 'present' : ['lose','loses'], 'past' : 'lost', 'past participle' : 'lost', 'gerund' : 'losing', }, 'make': { 'normal' : 'make', 'present' : ['make','makes'], 'past' : 'made', 'past participle' : 'made', 'gerund' : 'making', }, 'mean': { 'normal' : 'mean', 'present' : ['mean','means'], 'past' : 'meant', 'past participle' : 'meant', 'gerund' : 'meaning', }, 'meet': { 'normal' : 'meet', 'present' : ['meet','meets'], 'past' : 'met', 'past participle' : 'met', 'gerund' : 'meeting', }, 'put': { 'normal' : 'put', 'present' : ['put','puts'], 'past' : 'put', 'past participle' : 'put', 'gerund' : 'putting', }, 'read': { 'normal' : 'read', 'present' : ['read','reads'], 'past' : 'read', 'past participle' : 'read', 'gerund' : 'reading', }, 'ride': { 'normal' : 'ride', 'present' : ['ride','rides'], 'past' : 'rode', 'past participle' : 'ridden', 'gerund' : 'riding', }, 'ring': { 'normal' : 'ring', 'present' : ['ring','rings'], 'past' : 'rang', 'past participle' : 'rung', 'gerund' : 'ringing', }, 'run': { 'normal' : 'run', 'present' : ['run','runs'], 'past' : 'ran', 'past participle' : 'run', 'gerund' : 'running', }, 'say': { 'normal' : 'say', 'present' : ['say','says'], 'past' : 'said', 'past participle' : 'said', 'gerund' : 'saying', }, 'see': { 'normal' : 'see', 'present' : ['see','sees'], 'past' : 'saw', 'past participle' : 'seen', 'gerund' : 'seeing', }, 'sell': { 'normal' : 'sell', 'present' : ['sell','sells'], 'past' : 'sold', 'past participle' : 'sold', 'gerund' : 'selling', }, 'send': { 'normal' : 'send', 'present' : ['send','sends'], 'past' : 'sent', 'past participle' : 'sent', 'gerund' : 'sending', }, 'shake': { 'normal' : 'shake', 'present' : ['shake','shakes'], 'past' : 'shook', 'past participle' : 'shaken', 'gerund' : 'shaking', }, 'show': { 'normal' : 'show', 'present' : ['show','shows'], 'past' : 'showed', 'past participle' : 'shown', 'gerund' : 'showing', }, 'shut': { 'normal' : 'shut', 'present' : ['shut','shuts'], 'past' : 'shut', 'past participle' : 'shut', 'gerund' : 'shutting', }, 'sing': { 'normal' : 'sing', 'present' : ['sing','sings'], 'past' : 'sang', 'past participle' : 'sung', 'gerund' : 'singing', }, 'sit': { 'normal' : 'sit', 'present' : ['sit','sits'], 'past' : 'sat', 'past participle' : 'sat', 'gerund' : 'sitting', }, 'sleep': { 'normal' : 'sleep', 'present' : ['sleep','sleeps'], 'past' : 'slept', 'past participle' : 'slept', 'gerund' : 'sleeping', }, 'smell': { 'normal' : 'smell', 'present' : ['smell','smells'], 'past' : 'smelled,smelt', 'past participle' : 'smelled,smelt', 'gerund' : 'smelling', }, 'speak': { 'normal' : 'speak', 'present' : ['speak','speaks'], 'past' : 'spoke', 'past participle' : 'spoken', 'gerund' : 'speaking', }, 'spend': { 'normal' : 'spend', 'present' : ['spend','spends'], 'past' : 'spent', 'past participle' : 'spent', 'gerund' : 'spending', }, 'stand': { 'normal' : 'stand', 'present' : ['stand','stands'], 'past' : 'stood', 'past participle' : 'stood', 'gerund' : 'standing', }, 'swim': { 'normal' : 'swim', 'present' : ['swim','swims'], 'past' : 'swam', 'past participle' : 'swum', 'gerund' : 'swimming', }, 'take': { 'normal' : 'take', 'present' : ['take','takes'], 'past' : 'took', 'past participle' : 'taken', 'gerund' : 'taking', }, 'teach': { 'normal' : 'teach', 'present' : ['teach','teaches'], 'past' : 'taught', 'past participle' : 'taught', 'gerund' : 'teaching', }, 'tell': { 'normal' : 'tell', 'present' : ['tell','tells'], 'past' : 'told', 'past participle' : 'told', 'gerund' : 'telling', }, 'think': { 'normal' : 'think', 'present' : ['think','thinks'], 'past' : 'thought', 'past participle' : 'thought', 'gerund' : 'thinking', }, 'throw': { 'normal' : 'throw', 'present' : ['throw','throws'], 'past' : 'threw', 'past participle' : 'thrown', 'gerund' : 'throwing', }, 'understand': { 'normal' : 'understand', 'present' : ['understand','understands'], 'past' : 'understood', 'past participle' : 'understood', 'gerund' : 'unerstanding', }, 'wear': { 'normal' : 'wear', 'present' : ['wear','wears'], 'past' : 'wore', 'past participle' : 'worn', 'gerund' : 'wearing', }, 'win': { 'normal' : 'win', 'present' : ['win','wins'], 'past' : 'won', 'past participle' : 'won', 'gerund' : 'winning', }, 'write': { 'normal' : 'write', 'present' : ['write','writes'], 'past' : 'wrote', 'past participle' : 'written', 'gerund' : 'writing',},}
"""File for holding the different verb forms for all of the verbs in the Total English book series.""" verb_forms = {'become': {'normal': 'become', 'present': ['become', 'becomes'], 'past': 'became', 'past participle': 'become', 'gerund': 'becoming'}, 'be': {'normal': 'be', 'present': ['am', 'is', 'are'], 'past': ['was', 'were'], 'past participle': 'been', 'gerund': 'being'}, 'begin': {'normal': 'begin', 'present': ['begin', 'begins'], 'past': 'began', 'past participle': 'begun', 'gerund': 'beginning'}, 'blow': {'normal': 'blow', 'present': ['blow', 'blows'], 'past': 'blew', 'past participle': 'blown', 'gerund': 'blowing'}, 'bring': {'normal': 'bring', 'present': ['bring', 'brings'], 'past': 'brought', 'past participle': 'brought', 'gerund': 'bringing'}, 'build': {'normal': 'build', 'present': ['build', 'builds'], 'past': 'built', 'past participle': 'built', 'gerund': 'building'}, 'burn': {'normal': 'burn', 'present': ['burn', 'burns'], 'past': ['burned', 'burnt'], 'past participle': ['burned', 'burnt'], 'gerund': 'burning'}, 'buy': {'normal': 'buy', 'present': ['buy', 'buys'], 'past': 'bought', 'past participle': 'bought', 'gerund': 'buying'}, 'catch': {'normal': 'catch', 'present': ['catch', 'catches'], 'past': 'caught', 'past participle': 'caught', 'gerund': 'catching'}, 'choose': {'normal': 'choose', 'present': ['choose', 'chooses'], 'past': 'chose', 'past participle': 'chosen', 'gerund': 'choosing'}, 'come': {'normal': 'come', 'present': ['come', 'comes'], 'past': 'came', 'past participle': 'come', 'gerund': 'coming'}, 'cut': {'normal': 'cut', 'present': ['cut', 'cuts'], 'past': 'cut', 'past participle': 'cut', 'gerund': 'cutting'}, 'do': {'normal': 'do', 'present': ['do', 'does'], 'past': 'did', 'past participle': 'done', 'gerund': 'doing'}, 'drink': {'normal': 'drink', 'present': ['drink', 'drinks'], 'past': 'drank', 'past participle': 'drunk', 'gerund': 'drinking'}, 'eat': {'normal': 'eat', 'present': ['eat', 'eats'], 'past': 'ate', 'past participle': 'eaten', 'gerund': 'eating'}, 'feel': {'normal': 'feel', 'present': ['feel', 'feels'], 'past': 'felt', 'past participle': 'felt', 'gerund': 'feeling'}, 'fight': {'normal': 'fight', 'present': ['fight', 'fights'], 'past': 'fought', 'past participle': 'fought', 'gerund': 'fighting'}, 'find': {'normal': 'find', 'present': ['find', 'finds'], 'past': 'found', 'past participle': 'found', 'gerund': 'finding'}, 'fly': {'normal': 'fly', 'present': ['fly', 'flies'], 'past': 'flew', 'past participle': 'flown', 'gerund': 'flying'}, 'forget': {'normal': 'forget', 'present': ['forget', 'forgets'], 'past': 'forgot', 'past participle': ['forgotten', 'forgot'], 'gerund': 'forgetting'}, 'get': {'normal': 'get', 'present': ['get', 'gets'], 'past': 'got', 'past participle': ['gotten', 'got'], 'gerund': 'getting'}, 'give': {'normal': 'give', 'present': ['give', 'gives'], 'past': 'gave', 'past participle': 'given', 'gerund': 'giving'}, 'go': {'normal': 'go', 'present': ['go', 'goes'], 'past': 'went', 'past participle': 'gone', 'gerund': 'going'}, 'grow': {'normal': 'grow', 'present': ['grow', 'grows'], 'past': 'grew', 'past participle': 'grown', 'gerund': 'growing'}, 'have': {'normal': 'have', 'present': ['have', 'has'], 'past': 'had', 'past participle': 'had', 'gerund': 'having'}, 'hear': {'normal': 'hear', 'present': ['hear', 'hears'], 'past': 'heard', 'past participle': 'heard', 'gerund': 'hearing'}, 'hit': {'normal': 'hit', 'present': ['hit', 'hits'], 'past': 'hit', 'past participle': 'hit', 'gerund': 'hitting'}, 'hold': {'normal': 'hold', 'present': ['hold', 'holds'], 'past': 'held', 'past participle': 'held', 'gerund': 'holding'}, 'hurt': {'normal': 'hurt', 'present': ['hurt', 'hurts'], 'past': 'hurt', 'past participle': 'hurt', 'gerund': 'hurting'}, 'keep': {'normal': 'keep', 'present': ['keep', 'keeps'], 'past': 'kept', 'past participle': 'kept', 'gerund': 'keeping'}, 'know': {'normal': 'know', 'present': ['know', 'knows'], 'past': 'knew', 'past participle': 'known', 'gerund': 'knowing'}, 'lead': {'normal': 'lead', 'present': ['lead', 'leads'], 'past': 'led', 'past participle': 'led', 'gerund': 'leading'}, 'leave': {'normal': 'leave', 'present': ['leave', 'leaves'], 'past': 'left', 'past participle': 'left', 'gerund': 'leaving'}, 'lend': {'normal': 'lend', 'present': ['lend', 'lends'], 'past': 'lent', 'past participle': 'lent', 'gerund': 'lending'}, 'lie': {'normal': 'lie', 'present': ['lie', 'lies'], 'past': 'lay', 'past participle': 'lain', 'gerund': 'lying'}, 'lose': {'normal': 'lose', 'present': ['lose', 'loses'], 'past': 'lost', 'past participle': 'lost', 'gerund': 'losing'}, 'make': {'normal': 'make', 'present': ['make', 'makes'], 'past': 'made', 'past participle': 'made', 'gerund': 'making'}, 'mean': {'normal': 'mean', 'present': ['mean', 'means'], 'past': 'meant', 'past participle': 'meant', 'gerund': 'meaning'}, 'meet': {'normal': 'meet', 'present': ['meet', 'meets'], 'past': 'met', 'past participle': 'met', 'gerund': 'meeting'}, 'put': {'normal': 'put', 'present': ['put', 'puts'], 'past': 'put', 'past participle': 'put', 'gerund': 'putting'}, 'read': {'normal': 'read', 'present': ['read', 'reads'], 'past': 'read', 'past participle': 'read', 'gerund': 'reading'}, 'ride': {'normal': 'ride', 'present': ['ride', 'rides'], 'past': 'rode', 'past participle': 'ridden', 'gerund': 'riding'}, 'ring': {'normal': 'ring', 'present': ['ring', 'rings'], 'past': 'rang', 'past participle': 'rung', 'gerund': 'ringing'}, 'run': {'normal': 'run', 'present': ['run', 'runs'], 'past': 'ran', 'past participle': 'run', 'gerund': 'running'}, 'say': {'normal': 'say', 'present': ['say', 'says'], 'past': 'said', 'past participle': 'said', 'gerund': 'saying'}, 'see': {'normal': 'see', 'present': ['see', 'sees'], 'past': 'saw', 'past participle': 'seen', 'gerund': 'seeing'}, 'sell': {'normal': 'sell', 'present': ['sell', 'sells'], 'past': 'sold', 'past participle': 'sold', 'gerund': 'selling'}, 'send': {'normal': 'send', 'present': ['send', 'sends'], 'past': 'sent', 'past participle': 'sent', 'gerund': 'sending'}, 'shake': {'normal': 'shake', 'present': ['shake', 'shakes'], 'past': 'shook', 'past participle': 'shaken', 'gerund': 'shaking'}, 'show': {'normal': 'show', 'present': ['show', 'shows'], 'past': 'showed', 'past participle': 'shown', 'gerund': 'showing'}, 'shut': {'normal': 'shut', 'present': ['shut', 'shuts'], 'past': 'shut', 'past participle': 'shut', 'gerund': 'shutting'}, 'sing': {'normal': 'sing', 'present': ['sing', 'sings'], 'past': 'sang', 'past participle': 'sung', 'gerund': 'singing'}, 'sit': {'normal': 'sit', 'present': ['sit', 'sits'], 'past': 'sat', 'past participle': 'sat', 'gerund': 'sitting'}, 'sleep': {'normal': 'sleep', 'present': ['sleep', 'sleeps'], 'past': 'slept', 'past participle': 'slept', 'gerund': 'sleeping'}, 'smell': {'normal': 'smell', 'present': ['smell', 'smells'], 'past': 'smelled,smelt', 'past participle': 'smelled,smelt', 'gerund': 'smelling'}, 'speak': {'normal': 'speak', 'present': ['speak', 'speaks'], 'past': 'spoke', 'past participle': 'spoken', 'gerund': 'speaking'}, 'spend': {'normal': 'spend', 'present': ['spend', 'spends'], 'past': 'spent', 'past participle': 'spent', 'gerund': 'spending'}, 'stand': {'normal': 'stand', 'present': ['stand', 'stands'], 'past': 'stood', 'past participle': 'stood', 'gerund': 'standing'}, 'swim': {'normal': 'swim', 'present': ['swim', 'swims'], 'past': 'swam', 'past participle': 'swum', 'gerund': 'swimming'}, 'take': {'normal': 'take', 'present': ['take', 'takes'], 'past': 'took', 'past participle': 'taken', 'gerund': 'taking'}, 'teach': {'normal': 'teach', 'present': ['teach', 'teaches'], 'past': 'taught', 'past participle': 'taught', 'gerund': 'teaching'}, 'tell': {'normal': 'tell', 'present': ['tell', 'tells'], 'past': 'told', 'past participle': 'told', 'gerund': 'telling'}, 'think': {'normal': 'think', 'present': ['think', 'thinks'], 'past': 'thought', 'past participle': 'thought', 'gerund': 'thinking'}, 'throw': {'normal': 'throw', 'present': ['throw', 'throws'], 'past': 'threw', 'past participle': 'thrown', 'gerund': 'throwing'}, 'understand': {'normal': 'understand', 'present': ['understand', 'understands'], 'past': 'understood', 'past participle': 'understood', 'gerund': 'unerstanding'}, 'wear': {'normal': 'wear', 'present': ['wear', 'wears'], 'past': 'wore', 'past participle': 'worn', 'gerund': 'wearing'}, 'win': {'normal': 'win', 'present': ['win', 'wins'], 'past': 'won', 'past participle': 'won', 'gerund': 'winning'}, 'write': {'normal': 'write', 'present': ['write', 'writes'], 'past': 'wrote', 'past participle': 'written', 'gerund': 'writing'}}
"""Role testing files using testinfra""" def test_config_directory(host): """Check config directory""" f = host.file("/etc/influxdb") assert f.is_directory assert f.user == "influxdb" assert f.group == "root" assert f.mode == 0o775 def test_data_directory(host): """Check data directory""" d = host.file("/var/lib/influxdb") assert d.is_directory assert d.user == "influxdb" assert d.group == "root" assert d.mode == 0o700 def test_backup_directory(host): """Check backup directory""" b = host.file("/var/backups/influxdb") assert b.is_directory assert b.user == "influxdb" assert b.group == "root" assert b.mode == 0o775 def test_influxdb_service(host): """Check InfluxDB service""" s = host.service("influxdb") assert s.is_running assert s.is_enabled def test_influxdb_docker_container(host): """Check InfluxDB docker container""" d = host.docker("influxdb.service").inspect() assert d["HostConfig"]["Memory"] == 1073741824 assert d["Config"]["Image"] == "influxdb:latest" assert d["Config"]["Labels"]["maintainer"] == "me@example.com" assert "INFLUXD_REPORTING_DISABLED=true" in d["Config"]["Env"] assert "internal" in d["NetworkSettings"]["Networks"] assert \ "influxdb" in d["NetworkSettings"]["Networks"]["internal"]["Aliases"] def test_backup(host): """Check if the backup runs successfully""" cmd = host.run("/usr/local/bin/backup-influxdb.sh") assert cmd.succeeded def test_backup_cron_job(host): """Check backup cron job""" f = host.file("/var/spool/cron/crontabs/root") assert "/usr/local/bin/backup-influxdb.sh" in f.content_string def test_restore(host): """Check if the restore runs successfully""" cmd = host.run("/usr/local/bin/restore-influxdb.sh") assert cmd.succeeded
"""Role testing files using testinfra""" def test_config_directory(host): """Check config directory""" f = host.file('/etc/influxdb') assert f.is_directory assert f.user == 'influxdb' assert f.group == 'root' assert f.mode == 509 def test_data_directory(host): """Check data directory""" d = host.file('/var/lib/influxdb') assert d.is_directory assert d.user == 'influxdb' assert d.group == 'root' assert d.mode == 448 def test_backup_directory(host): """Check backup directory""" b = host.file('/var/backups/influxdb') assert b.is_directory assert b.user == 'influxdb' assert b.group == 'root' assert b.mode == 509 def test_influxdb_service(host): """Check InfluxDB service""" s = host.service('influxdb') assert s.is_running assert s.is_enabled def test_influxdb_docker_container(host): """Check InfluxDB docker container""" d = host.docker('influxdb.service').inspect() assert d['HostConfig']['Memory'] == 1073741824 assert d['Config']['Image'] == 'influxdb:latest' assert d['Config']['Labels']['maintainer'] == 'me@example.com' assert 'INFLUXD_REPORTING_DISABLED=true' in d['Config']['Env'] assert 'internal' in d['NetworkSettings']['Networks'] assert 'influxdb' in d['NetworkSettings']['Networks']['internal']['Aliases'] def test_backup(host): """Check if the backup runs successfully""" cmd = host.run('/usr/local/bin/backup-influxdb.sh') assert cmd.succeeded def test_backup_cron_job(host): """Check backup cron job""" f = host.file('/var/spool/cron/crontabs/root') assert '/usr/local/bin/backup-influxdb.sh' in f.content_string def test_restore(host): """Check if the restore runs successfully""" cmd = host.run('/usr/local/bin/restore-influxdb.sh') assert cmd.succeeded
def apply(con, target_language="E"): dict_field_desc = {} try: df = con.prepare_and_execute_query("DD03T", ["DDLANGUAGE", "FIELDNAME", "DDTEXT"], " WHERE DDLANGUAGE = '"+target_language+"'") stream = df.to_dict("records") for el in stream: dict_field_desc[el["FIELDNAME"]] = el["DDTEXT"] except: pass return dict_field_desc
def apply(con, target_language='E'): dict_field_desc = {} try: df = con.prepare_and_execute_query('DD03T', ['DDLANGUAGE', 'FIELDNAME', 'DDTEXT'], " WHERE DDLANGUAGE = '" + target_language + "'") stream = df.to_dict('records') for el in stream: dict_field_desc[el['FIELDNAME']] = el['DDTEXT'] except: pass return dict_field_desc
#AFTER PREPROCESSING AND TARGETS DEFINITION newdataset.describe() LET_IS.value_counts() LET_IS.value_counts().plot(kind='bar', color='c') Y_unica.value_counts() Y_unica.value_counts().plot(kind='bar', color='c') ZSN.value_counts().plot(kind='bar', color='c') Survive.value_counts().plot(kind='bar', color='c')
newdataset.describe() LET_IS.value_counts() LET_IS.value_counts().plot(kind='bar', color='c') Y_unica.value_counts() Y_unica.value_counts().plot(kind='bar', color='c') ZSN.value_counts().plot(kind='bar', color='c') Survive.value_counts().plot(kind='bar', color='c')
def binarySearch(inputArray, searchElement): minIndex = -1 maxIndex = len(inputArray) while minIndex < maxIndex - 1: currentIndex = (minIndex + maxIndex) // 2 currentElement = inputArray[currentIndex] if currentElement < searchElement: minIndex = currentIndex else: maxIndex = currentIndex if maxIndex == len(inputArray) or inputArray[maxIndex] != searchElement: return -1 return maxIndex
def binary_search(inputArray, searchElement): min_index = -1 max_index = len(inputArray) while minIndex < maxIndex - 1: current_index = (minIndex + maxIndex) // 2 current_element = inputArray[currentIndex] if currentElement < searchElement: min_index = currentIndex else: max_index = currentIndex if maxIndex == len(inputArray) or inputArray[maxIndex] != searchElement: return -1 return maxIndex
d_soldiers = [] class Soldier: def __init__(self, id, name, team): self.id = id self.name = name self.team = team self.x = 0 self.y = 0 self.xVelo = 0 self.yVelo = 0 self.kills = 0 self.deaths = 0 self.alive = 'true' self.driving = 'false' self.gun = 0 self.ammo = 0 self.reloading = 'false' def setPosition(self, x, y, xv, yv): self.x = x self.y = y self.xVelo = xv self.yVelo = yv def setName(self, name): self.name = name def setTeam(self, team): self.team = team def setGun(self, gun): self.gun = gun def setGunInfo(self, gun, ammo, reloading): self.gun = gun self.ammo = ammo self.reloading = reloading def die(self): self.alive = 'false' self.driving = 'false' self.deaths += 1 def respawn(self): self.alive = 'true' def teleport(self, x, y): global com self.x = x self.y = y com += 'f_t s '+str(self.id)+' '+str(self.x)+' '+str(self.y)+';' def applyForce(self, xf, yf): global com com += 'f_af s '+str(self.id)+' '+str(xf)+' '+str(yf)+';' def setVelocity(self, xf, yf): global com self.xVelo = xf self.yVelo = yf com += 'f_v s '+str(self.id)+' '+str(self.xVelo)+' '+str(self.yVelo)+';' def changeTeam(self, team): global com self.team = team com += 's_ct '+str(self.id)+' '+str(self.team)+';' def changeGun(self, gun): global com self.gun = gun com += 's_cg '+str(self.id)+' '+str(self.gun)+';' def changeAttachment(self, type, amount): global com com += 's_ca '+str(self.id)+' '+str(type)+' '+str(amount)+';' def killSoldier(self): global com self.alive = false com += 's_ks '+str(id)+';' def respawnSoldier(self, spawn): global com com += 's_rs '+str(self.id)+' '+str(spawn)+';' def enterVehicle(self, vehicleId): global com com += 's_en '+str(self.id)+' '+str(vehicleId)+';' def exitVehicle(self): global com com += 's_ex '+str(self.id)+';' def addKill(self): global com self.kills += 1 com += 's_ak '+str(self.id)+';' def addDeath(self): global com self.deaths += 1 com += 's_ad '+str(self.id)+';' def dropGun(self): global com com += 's_dg '+str(self.id)+';' def addSoldier(team): global com com += 'a s '+str(team)+';' def getSoldier(n): global d_soldiers return d_soldiers[n] def getSoldierById(id): global d_soldiers for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.id == id: return s def getSoldiers(): global d_soldiers return d_soldiers def getSoldierCount(): global d_soldiers return len(d_soldiers) def getTeamKills(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += s.kills return amount def getTeamDeaths(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += s.deaths return amount def getTeamSize(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += 1 return amount
d_soldiers = [] class Soldier: def __init__(self, id, name, team): self.id = id self.name = name self.team = team self.x = 0 self.y = 0 self.xVelo = 0 self.yVelo = 0 self.kills = 0 self.deaths = 0 self.alive = 'true' self.driving = 'false' self.gun = 0 self.ammo = 0 self.reloading = 'false' def set_position(self, x, y, xv, yv): self.x = x self.y = y self.xVelo = xv self.yVelo = yv def set_name(self, name): self.name = name def set_team(self, team): self.team = team def set_gun(self, gun): self.gun = gun def set_gun_info(self, gun, ammo, reloading): self.gun = gun self.ammo = ammo self.reloading = reloading def die(self): self.alive = 'false' self.driving = 'false' self.deaths += 1 def respawn(self): self.alive = 'true' def teleport(self, x, y): global com self.x = x self.y = y com += 'f_t s ' + str(self.id) + ' ' + str(self.x) + ' ' + str(self.y) + ';' def apply_force(self, xf, yf): global com com += 'f_af s ' + str(self.id) + ' ' + str(xf) + ' ' + str(yf) + ';' def set_velocity(self, xf, yf): global com self.xVelo = xf self.yVelo = yf com += 'f_v s ' + str(self.id) + ' ' + str(self.xVelo) + ' ' + str(self.yVelo) + ';' def change_team(self, team): global com self.team = team com += 's_ct ' + str(self.id) + ' ' + str(self.team) + ';' def change_gun(self, gun): global com self.gun = gun com += 's_cg ' + str(self.id) + ' ' + str(self.gun) + ';' def change_attachment(self, type, amount): global com com += 's_ca ' + str(self.id) + ' ' + str(type) + ' ' + str(amount) + ';' def kill_soldier(self): global com self.alive = false com += 's_ks ' + str(id) + ';' def respawn_soldier(self, spawn): global com com += 's_rs ' + str(self.id) + ' ' + str(spawn) + ';' def enter_vehicle(self, vehicleId): global com com += 's_en ' + str(self.id) + ' ' + str(vehicleId) + ';' def exit_vehicle(self): global com com += 's_ex ' + str(self.id) + ';' def add_kill(self): global com self.kills += 1 com += 's_ak ' + str(self.id) + ';' def add_death(self): global com self.deaths += 1 com += 's_ad ' + str(self.id) + ';' def drop_gun(self): global com com += 's_dg ' + str(self.id) + ';' def add_soldier(team): global com com += 'a s ' + str(team) + ';' def get_soldier(n): global d_soldiers return d_soldiers[n] def get_soldier_by_id(id): global d_soldiers for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.id == id: return s def get_soldiers(): global d_soldiers return d_soldiers def get_soldier_count(): global d_soldiers return len(d_soldiers) def get_team_kills(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += s.kills return amount def get_team_deaths(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += s.deaths return amount def get_team_size(team): amount = 0 for n in xrange(len(d_soldiers)): s = d_soldiers[n] if s.team == team: amount += 1 return amount
#from http://rosettacode.org/wiki/Greatest_subsequential_sum#Python #pythran export maxsum(int list) #pythran export maxsumseq(int list) #pythran export maxsumit(int list) #runas maxsum([0, 1, 0]) #runas maxsumseq([-1, 2, -1, 3, -1]) #runas maxsumit([-1, 1, 2, -5, -6]) def maxsum(sequence): """Return maximum sum.""" maxsofar, maxendinghere = 0, 0 for x in sequence: # invariant: ``maxendinghere`` and ``maxsofar`` are accurate for ``x[0..i-1]`` maxendinghere = max(maxendinghere + x, 0) maxsofar = max(maxsofar, maxendinghere) return maxsofar def maxsumseq(sequence): start, end, sum_start = -1, -1, -1 maxsum_, sum_ = 0, 0 for i, x in enumerate(sequence): sum_ += x if maxsum_ < sum_: # found maximal subsequence so far maxsum_ = sum_ start, end = sum_start, i elif sum_ < 0: # start new sequence sum_ = 0 sum_start = i assert maxsum_ == maxsum(sequence) assert maxsum_ == sum(sequence[start + 1:end + 1]) return sequence[start + 1:end + 1] def maxsumit(iterable): maxseq = seq = [] start, end, sum_start = -1, -1, -1 maxsum_, sum_ = 0, 0 for i, x in enumerate(iterable): seq.append(x); sum_ += x if maxsum_ < sum_: maxseq = seq; maxsum_ = sum_ start, end = sum_start, i elif sum_ < 0: seq = []; sum_ = 0 sum_start = i assert maxsum_ == sum(maxseq[:end - start]) return maxseq[:end - start]
def maxsum(sequence): """Return maximum sum.""" (maxsofar, maxendinghere) = (0, 0) for x in sequence: maxendinghere = max(maxendinghere + x, 0) maxsofar = max(maxsofar, maxendinghere) return maxsofar def maxsumseq(sequence): (start, end, sum_start) = (-1, -1, -1) (maxsum_, sum_) = (0, 0) for (i, x) in enumerate(sequence): sum_ += x if maxsum_ < sum_: maxsum_ = sum_ (start, end) = (sum_start, i) elif sum_ < 0: sum_ = 0 sum_start = i assert maxsum_ == maxsum(sequence) assert maxsum_ == sum(sequence[start + 1:end + 1]) return sequence[start + 1:end + 1] def maxsumit(iterable): maxseq = seq = [] (start, end, sum_start) = (-1, -1, -1) (maxsum_, sum_) = (0, 0) for (i, x) in enumerate(iterable): seq.append(x) sum_ += x if maxsum_ < sum_: maxseq = seq maxsum_ = sum_ (start, end) = (sum_start, i) elif sum_ < 0: seq = [] sum_ = 0 sum_start = i assert maxsum_ == sum(maxseq[:end - start]) return maxseq[:end - start]
def task_clean_junk(): """Remove junk file""" return { 'actions': ['rm -rdf $(find . | grep pycache)'], 'clean': True, }
def task_clean_junk(): """Remove junk file""" return {'actions': ['rm -rdf $(find . | grep pycache)'], 'clean': True}
def gfg(x,l = []): for i in range(x): l.append(i*i) print(l) gfg(2) gfg(3,[3,2,1]) gfg(3)
def gfg(x, l=[]): for i in range(x): l.append(i * i) print(l) gfg(2) gfg(3, [3, 2, 1]) gfg(3)
"""Module help_info.""" __author__ = 'Joan A. Pinol (japinol)' class HelpInfo: """Manages information used for help purposes.""" def print_help_keys(self): print(' F1: \t show a help screen while playing the game' ' t: \t stats on/off\n' ' L_Ctrl + R_Alt + g: grid\n' ' p: \t pause\n' ' ESC: exit game\n' ' ^m: \t pause/resume music\n' ' ^s: \t sound effects on/off\n' ' Alt + Enter: change full screen / normal screen mode\n' ' ^h: \t shows this help\n' ' \t left, a: move snake to the left\n' ' \t right, d: move snake to the right\n' ' \t up, w: move snake up\n' ' \t down, s: move snake down\n' ' \t u 4: fire a light shot\n' ' \t i 5: fire a medium shot\n' ' \t j 1: fire a strong shot\n' ' \t k 2: fire a heavy shot\n' )
"""Module help_info.""" __author__ = 'Joan A. Pinol (japinol)' class Helpinfo: """Manages information used for help purposes.""" def print_help_keys(self): print(' F1: \t show a help screen while playing the game t: \t stats on/off\n L_Ctrl + R_Alt + g: grid\n p: \t pause\n ESC: exit game\n ^m: \t pause/resume music\n ^s: \t sound effects on/off\n Alt + Enter: change full screen / normal screen mode\n ^h: \t shows this help\n \t left, a: move snake to the left\n \t right, d: move snake to the right\n \t up, w: move snake up\n \t down, s: move snake down\n \t u 4: fire a light shot\n \t i 5: fire a medium shot\n \t j 1: fire a strong shot\n \t k 2: fire a heavy shot\n')
def format_sql(schedule, table): for week, schedule in schedule.items(): print(f"UPDATE {table} SET `block`=0, `week`={week} WHERE `name`='{schedule.leader}';") for block, staffs in schedule.staffs.items(): for staff in staffs: print(f"UPDATE {table} SET `block`={block}, `week`={week} WHERE `name`='{staff}';") pass
def format_sql(schedule, table): for (week, schedule) in schedule.items(): print(f"UPDATE {table} SET `block`=0, `week`={week} WHERE `name`='{schedule.leader}';") for (block, staffs) in schedule.staffs.items(): for staff in staffs: print(f"UPDATE {table} SET `block`={block}, `week`={week} WHERE `name`='{staff}';") pass
class Node(object): # XXX: legacy code support kind = property(lambda self: self.__class__) def _iterChildren(self): for name in self.childAttrNames: yield (name, getattr(self, name)) return children = property(_iterChildren) def dump(self, stream, indent=0): # XXX: Expand argument lists? Show declspecs? (Ditto for # 'graphviz'.) for attr, child in self.children: print >>stream, "%s%s: %r" % (" " * indent, attr, child) if hasattr(child, 'dump'): child.dump(stream, indent + 1) return def graphviz(self, stream): print >>stream, ' n%d[label="%r"];' % (id(self), self) for attr, child in self.children: if child is None: pass elif hasattr(child, 'graphviz'): child.graphviz(stream) else: print >>stream, ' n%d[label="%r"];' % (id(child), child) print >>stream for attr, child in self.children: if child is None: continue print >>stream, ' n%d->n%d[label="%s"];' % ( id(self), id(child), attr) return
class Node(object): kind = property(lambda self: self.__class__) def _iter_children(self): for name in self.childAttrNames: yield (name, getattr(self, name)) return children = property(_iterChildren) def dump(self, stream, indent=0): for (attr, child) in self.children: (print >> stream, '%s%s: %r' % (' ' * indent, attr, child)) if hasattr(child, 'dump'): child.dump(stream, indent + 1) return def graphviz(self, stream): (print >> stream, ' n%d[label="%r"];' % (id(self), self)) for (attr, child) in self.children: if child is None: pass elif hasattr(child, 'graphviz'): child.graphviz(stream) else: (print >> stream, ' n%d[label="%r"];' % (id(child), child)) print >> stream for (attr, child) in self.children: if child is None: continue (print >> stream, ' n%d->n%d[label="%s"];' % (id(self), id(child), attr)) return
friendly_camera_mapping = { "GM1913": "Oneplus 7 Pro", "FC3170": "Mavic Air 2", # An analogue scanner in FilmNeverDie "SP500": "Canon AE-1 Program" }
friendly_camera_mapping = {'GM1913': 'Oneplus 7 Pro', 'FC3170': 'Mavic Air 2', 'SP500': 'Canon AE-1 Program'}
# Defutils.py -- Contains parsing functions for definition files. # Produces an organized list of tokens in the file. def parse(filename): f=open(filename, "r") contents=f.read() f.close() # Tokenize the file: #contents=contents.replace('\t', '\n') lines=contents.splitlines() outList=[] for l in lines: if l[len(l)-1]==':': outList.append([l.rstrip(':')]) elif l!="": outList[len(outList)-1].append(l) return outList def search(tokList, key): for tok in tokList: if tok[0]==key: return tok return [] def write(tokList, filename): f=open(filename, "w") for tok in tokList: f.write(tok[0]+":\n") for i in range(1, len(tok), 1): f.write(tok[i]+"\n") f.close() class InvalidTypeException(Exception): typestr="" def __init__(self, value="File cannot be read properly."): typestr=value def __str__(self): return "InvalidTypeException: "+typestr class DefFormatException(Exception): typestr="" def __init__(self, value="Definition format error."): typestr=value def __str__(self): return "DefFormatException: "+typestr
def parse(filename): f = open(filename, 'r') contents = f.read() f.close() lines = contents.splitlines() out_list = [] for l in lines: if l[len(l) - 1] == ':': outList.append([l.rstrip(':')]) elif l != '': outList[len(outList) - 1].append(l) return outList def search(tokList, key): for tok in tokList: if tok[0] == key: return tok return [] def write(tokList, filename): f = open(filename, 'w') for tok in tokList: f.write(tok[0] + ':\n') for i in range(1, len(tok), 1): f.write(tok[i] + '\n') f.close() class Invalidtypeexception(Exception): typestr = '' def __init__(self, value='File cannot be read properly.'): typestr = value def __str__(self): return 'InvalidTypeException: ' + typestr class Defformatexception(Exception): typestr = '' def __init__(self, value='Definition format error.'): typestr = value def __str__(self): return 'DefFormatException: ' + typestr
class Solution: # @param s, a string # @param wordDict, a set<string> # @return a string[] def wordBreak(self, s, wordDict): n = len(s) res = [] chars = ''.join(wordDict) for i in xrange(n): if s[i] not in chars: return res lw = s[-1] lw_end = False for word in wordDict: if word[-1] == lw: lw_end = True if not lw_end: return res self.dfs(s,[],wordDict,res) return res def dfs(self, s, path,wordDict,res): if not s: res.append(' '.join(path[:])) return for i in range(1,len(s)+1): c = s[:i] if c in wordDict: path.append(c) self.dfs(s[i:],path,wordDict,res) path.pop()
class Solution: def word_break(self, s, wordDict): n = len(s) res = [] chars = ''.join(wordDict) for i in xrange(n): if s[i] not in chars: return res lw = s[-1] lw_end = False for word in wordDict: if word[-1] == lw: lw_end = True if not lw_end: return res self.dfs(s, [], wordDict, res) return res def dfs(self, s, path, wordDict, res): if not s: res.append(' '.join(path[:])) return for i in range(1, len(s) + 1): c = s[:i] if c in wordDict: path.append(c) self.dfs(s[i:], path, wordDict, res) path.pop()
# -*- coding:utf-8 -*- class BaseProvider(object): @staticmethod def loads(link_url): raise NotImplementedError("Implemetion required.") @staticmethod def dumps(conf): raise NotImplementedError("Implemetion required.")
class Baseprovider(object): @staticmethod def loads(link_url): raise not_implemented_error('Implemetion required.') @staticmethod def dumps(conf): raise not_implemented_error('Implemetion required.')
session.forget() def get(args): if args[0].startswith('__'): return None try: obj = globals(), get(args[0]) for k in range(1, len(args)): obj = getattr(obj, args[k]) return obj except: return None def vars(): """the running controller function!""" title = '.'.join(request.args) attributes = {} if not request.args: (doc, keys, t, c, d, value) = ('Global variables', globals(), None, None, [], None) elif len(request.args) < 3: obj = get(request.args) if obj: doc = getattr(obj, '__doc__', 'no documentation') keys = dir(obj) t = type(obj) c = getattr(obj, '__class__', None) d = getattr(obj, '__bases__', None) for key in keys: a = getattr(obj, key, None) if a and not isinstance(a, DAL): doc1 = getattr(a, '__doc__', '') t1 = type(a) c1 = getattr(a, '__class__', None) d1 = getattr(a, '__bases__', None) key = '.'.join(request.args) + '.' + key attributes[key] = (doc1, t1, c1, d1) else: doc = 'Unkown' keys = [] t = c = d = None else: raise HTTP(400) return dict( title=title, args=request.args, t=t, c=c, d=d, doc=doc, attributes=attributes, )
session.forget() def get(args): if args[0].startswith('__'): return None try: obj = (globals(), get(args[0])) for k in range(1, len(args)): obj = getattr(obj, args[k]) return obj except: return None def vars(): """the running controller function!""" title = '.'.join(request.args) attributes = {} if not request.args: (doc, keys, t, c, d, value) = ('Global variables', globals(), None, None, [], None) elif len(request.args) < 3: obj = get(request.args) if obj: doc = getattr(obj, '__doc__', 'no documentation') keys = dir(obj) t = type(obj) c = getattr(obj, '__class__', None) d = getattr(obj, '__bases__', None) for key in keys: a = getattr(obj, key, None) if a and (not isinstance(a, DAL)): doc1 = getattr(a, '__doc__', '') t1 = type(a) c1 = getattr(a, '__class__', None) d1 = getattr(a, '__bases__', None) key = '.'.join(request.args) + '.' + key attributes[key] = (doc1, t1, c1, d1) else: doc = 'Unkown' keys = [] t = c = d = None else: raise http(400) return dict(title=title, args=request.args, t=t, c=c, d=d, doc=doc, attributes=attributes)
# https://codegolf.stackexchange.com/a/11480 multiplication = [] for i in range(10): multiplication.append(i * (i + 1)) for x in multiplication: print(x)
multiplication = [] for i in range(10): multiplication.append(i * (i + 1)) for x in multiplication: print(x)
""" PSET-7 Part 2: Triggers (PhraseTriggers) At this point, you have no way of writing a trigger that matches on "New York City" -- the only triggers you know how to write would be a trigger that would fire on "New" AND "York" AND "City" -- which also fires on the phrase "New students at York University love the city". It's time to fix this. Since here you're asking for an exact match, we will require that the cases match, but we'll be a little more flexible on word matching. So, "New York City" will match: * New York City sees movie premiere * In the heart of New York City's famous cafe * New York Cityrandomtexttoproveapointhere but will not match: * I love new york city * I love New York City!!!!!!!!!!!!!! PROBLEM 9 Implement a phrase trigger (PhraseTrigger) that fires when a given phrase is in any of the story's subject, title, or summary. The phrase should be an argument to the class's constructor. """ # Enter your code for WordTrigger, TitleTrigger, # SubjectTrigger, SummaryTrigger, and PhraseTrigger in this box class WordTrigger(Trigger): def __init__(self, word): self.word = word def internalAreCharsEqualIgnoreCase(self, c1, c2): if type(c1) != str or type(c2) != str: raise TypeError("Arg not of type str") if len(c1) > 1 or len(c2) > 1: raise TypeError("Expected a char. Length not equal to 1") return c1[0] == c2[0] or \ (ord(c1[0]) > 0x60 and (ord(c1[0]) - 0x20 == ord(c2[0])) or ord(c1[0]) < 0x5A and (ord(c1[0]) + 0x20 == ord(c2[0]))) def isWordIn(self, text): """ Returns True if word is present in text as whole word. False otherwise. """ charsMatched = 0 firstCharMatchInd = -1 for i in range( len(text) ): if self.internalAreCharsEqualIgnoreCase(text[i], self.word[0]): # case-insensitive check for text[i] == self.word[0] firstCharMatchInd = i charsMatched += 1 wordInd = 1 while wordInd < len(self.word) and wordInd + firstCharMatchInd < len(text): if self.internalAreCharsEqualIgnoreCase(self.word[wordInd], text[wordInd + firstCharMatchInd]): # case-insensitive check for self.word[wordInd] == text[wordInd + firstCharMatchInd] charsMatched += 1 wordInd += 1 elif self.internalAreCharsEqualIgnoreCase(self.word[wordInd], self.word[0]): # case-insensitive check for text[i] == self.word[0] charsMatched = 1 firstCharMatchInd = wordInd + firstCharMatchInd wordInd = firstCharMatchInd continue else: charsMatched = 0 i = wordInd + firstCharMatchInd break if charsMatched == len(self.word): if len(self.word) == len(text): return True elif firstCharMatchInd > 0 and firstCharMatchInd + len(self.word) == len(text): if text[firstCharMatchInd - 1].isspace() or text[firstCharMatchInd - 1] in string.punctuation: return True elif firstCharMatchInd == 0 and firstCharMatchInd + len(self.word) + 1 < len(text): if text[firstCharMatchInd + len(self.word)].isspace() or text[firstCharMatchInd + len(self.word)] in string.punctuation: return True else: if (text[firstCharMatchInd - 1].isspace() or text[firstCharMatchInd - 1] in string.punctuation) \ and (text[firstCharMatchInd + len(self.word)].isspace() or text[firstCharMatchInd + len(self.word)] in string.punctuation): return True return False class TitleTrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn( story.getTitle() ) class SubjectTrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn( story.getSubject() ) class SummaryTrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn( story.getSummary() ) class PhraseTrigger(Trigger): def __init__(self, phrase): self.word = phrase def isWordIn(self, text): charsMatched = 0 firstCharMatchInd = -1 for i in range( len(text) ): if text[i] == self.word[0]: firstCharMatchInd = i charsMatched += 1 wordInd = 1 while wordInd < len(self.word) and wordInd + firstCharMatchInd < len(text): if self.word[wordInd] == text[wordInd + firstCharMatchInd]: charsMatched += 1 wordInd += 1 elif self.word[wordInd] == self.word[0]: charsMatched = 1 firstCharMatchInd = wordInd + firstCharMatchInd wordInd = firstCharMatchInd continue else: charsMatched = 0 i = wordInd + firstCharMatchInd break if charsMatched == len(self.word): return True return False def evaluate(self, story): return self.isWordIn( story.getTitle() ) or \ self.isWordIn( story.getSubject() ) or \ self.isWordIn( story.getSummary() )
""" PSET-7 Part 2: Triggers (PhraseTriggers) At this point, you have no way of writing a trigger that matches on "New York City" -- the only triggers you know how to write would be a trigger that would fire on "New" AND "York" AND "City" -- which also fires on the phrase "New students at York University love the city". It's time to fix this. Since here you're asking for an exact match, we will require that the cases match, but we'll be a little more flexible on word matching. So, "New York City" will match: * New York City sees movie premiere * In the heart of New York City's famous cafe * New York Cityrandomtexttoproveapointhere but will not match: * I love new york city * I love New York City!!!!!!!!!!!!!! PROBLEM 9 Implement a phrase trigger (PhraseTrigger) that fires when a given phrase is in any of the story's subject, title, or summary. The phrase should be an argument to the class's constructor. """ class Wordtrigger(Trigger): def __init__(self, word): self.word = word def internal_are_chars_equal_ignore_case(self, c1, c2): if type(c1) != str or type(c2) != str: raise type_error('Arg not of type str') if len(c1) > 1 or len(c2) > 1: raise type_error('Expected a char. Length not equal to 1') return c1[0] == c2[0] or (ord(c1[0]) > 96 and ord(c1[0]) - 32 == ord(c2[0]) or (ord(c1[0]) < 90 and ord(c1[0]) + 32 == ord(c2[0]))) def is_word_in(self, text): """ Returns True if word is present in text as whole word. False otherwise. """ chars_matched = 0 first_char_match_ind = -1 for i in range(len(text)): if self.internalAreCharsEqualIgnoreCase(text[i], self.word[0]): first_char_match_ind = i chars_matched += 1 word_ind = 1 while wordInd < len(self.word) and wordInd + firstCharMatchInd < len(text): if self.internalAreCharsEqualIgnoreCase(self.word[wordInd], text[wordInd + firstCharMatchInd]): chars_matched += 1 word_ind += 1 elif self.internalAreCharsEqualIgnoreCase(self.word[wordInd], self.word[0]): chars_matched = 1 first_char_match_ind = wordInd + firstCharMatchInd word_ind = firstCharMatchInd continue else: chars_matched = 0 i = wordInd + firstCharMatchInd break if charsMatched == len(self.word): if len(self.word) == len(text): return True elif firstCharMatchInd > 0 and firstCharMatchInd + len(self.word) == len(text): if text[firstCharMatchInd - 1].isspace() or text[firstCharMatchInd - 1] in string.punctuation: return True elif firstCharMatchInd == 0 and firstCharMatchInd + len(self.word) + 1 < len(text): if text[firstCharMatchInd + len(self.word)].isspace() or text[firstCharMatchInd + len(self.word)] in string.punctuation: return True elif (text[firstCharMatchInd - 1].isspace() or text[firstCharMatchInd - 1] in string.punctuation) and (text[firstCharMatchInd + len(self.word)].isspace() or text[firstCharMatchInd + len(self.word)] in string.punctuation): return True return False class Titletrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn(story.getTitle()) class Subjecttrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn(story.getSubject()) class Summarytrigger(WordTrigger): def evaluate(self, story): """ Returns True if an alert should be generated for the given news item, or False otherwise. """ return self.isWordIn(story.getSummary()) class Phrasetrigger(Trigger): def __init__(self, phrase): self.word = phrase def is_word_in(self, text): chars_matched = 0 first_char_match_ind = -1 for i in range(len(text)): if text[i] == self.word[0]: first_char_match_ind = i chars_matched += 1 word_ind = 1 while wordInd < len(self.word) and wordInd + firstCharMatchInd < len(text): if self.word[wordInd] == text[wordInd + firstCharMatchInd]: chars_matched += 1 word_ind += 1 elif self.word[wordInd] == self.word[0]: chars_matched = 1 first_char_match_ind = wordInd + firstCharMatchInd word_ind = firstCharMatchInd continue else: chars_matched = 0 i = wordInd + firstCharMatchInd break if charsMatched == len(self.word): return True return False def evaluate(self, story): return self.isWordIn(story.getTitle()) or self.isWordIn(story.getSubject()) or self.isWordIn(story.getSummary())
# flake8: noqa # errmsg.h CR_ERROR_FIRST = 2000 CR_UNKNOWN_ERROR = 2000 CR_SOCKET_CREATE_ERROR = 2001 CR_CONNECTION_ERROR = 2002 CR_CONN_HOST_ERROR = 2003 CR_IPSOCK_ERROR = 2004 CR_UNKNOWN_HOST = 2005 CR_SERVER_GONE_ERROR = 2006 CR_VERSION_ERROR = 2007 CR_OUT_OF_MEMORY = 2008 CR_WRONG_HOST_INFO = 2009 CR_LOCALHOST_CONNECTION = 2010 CR_TCP_CONNECTION = 2011 CR_SERVER_HANDSHAKE_ERR = 2012 CR_SERVER_LOST = 2013 CR_COMMANDS_OUT_OF_SYNC = 2014 CR_NAMEDPIPE_CONNECTION = 2015 CR_NAMEDPIPEWAIT_ERROR = 2016 CR_NAMEDPIPEOPEN_ERROR = 2017 CR_NAMEDPIPESETSTATE_ERROR = 2018 CR_CANT_READ_CHARSET = 2019 CR_NET_PACKET_TOO_LARGE = 2020 CR_EMBEDDED_CONNECTION = 2021 CR_PROBE_SLAVE_STATUS = 2022 CR_PROBE_SLAVE_HOSTS = 2023 CR_PROBE_SLAVE_CONNECT = 2024 CR_PROBE_MASTER_CONNECT = 2025 CR_SSL_CONNECTION_ERROR = 2026 CR_MALFORMED_PACKET = 2027 CR_WRONG_LICENSE = 2028 CR_NULL_POINTER = 2029 CR_NO_PREPARE_STMT = 2030 CR_PARAMS_NOT_BOUND = 2031 CR_DATA_TRUNCATED = 2032 CR_NO_PARAMETERS_EXISTS = 2033 CR_INVALID_PARAMETER_NO = 2034 CR_INVALID_BUFFER_USE = 2035 CR_UNSUPPORTED_PARAM_TYPE = 2036 CR_SHARED_MEMORY_CONNECTION = 2037 CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR = 2038 CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR = 2039 CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR = 2040 CR_SHARED_MEMORY_CONNECT_MAP_ERROR = 2041 CR_SHARED_MEMORY_FILE_MAP_ERROR = 2042 CR_SHARED_MEMORY_MAP_ERROR = 2043 CR_SHARED_MEMORY_EVENT_ERROR = 2044 CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR = 2045 CR_SHARED_MEMORY_CONNECT_SET_ERROR = 2046 CR_CONN_UNKNOW_PROTOCOL = 2047 CR_INVALID_CONN_HANDLE = 2048 CR_SECURE_AUTH = 2049 CR_FETCH_CANCELED = 2050 CR_NO_DATA = 2051 CR_NO_STMT_METADATA = 2052 CR_NO_RESULT_SET = 2053 CR_NOT_IMPLEMENTED = 2054 CR_SERVER_LOST_EXTENDED = 2055 CR_STMT_CLOSED = 2056 CR_NEW_STMT_METADATA = 2057 CR_ALREADY_CONNECTED = 2058 CR_AUTH_PLUGIN_CANNOT_LOAD = 2059 CR_DUPLICATE_CONNECTION_ATTR = 2060 CR_AUTH_PLUGIN_ERR = 2061 CR_ERROR_LAST = 2061
cr_error_first = 2000 cr_unknown_error = 2000 cr_socket_create_error = 2001 cr_connection_error = 2002 cr_conn_host_error = 2003 cr_ipsock_error = 2004 cr_unknown_host = 2005 cr_server_gone_error = 2006 cr_version_error = 2007 cr_out_of_memory = 2008 cr_wrong_host_info = 2009 cr_localhost_connection = 2010 cr_tcp_connection = 2011 cr_server_handshake_err = 2012 cr_server_lost = 2013 cr_commands_out_of_sync = 2014 cr_namedpipe_connection = 2015 cr_namedpipewait_error = 2016 cr_namedpipeopen_error = 2017 cr_namedpipesetstate_error = 2018 cr_cant_read_charset = 2019 cr_net_packet_too_large = 2020 cr_embedded_connection = 2021 cr_probe_slave_status = 2022 cr_probe_slave_hosts = 2023 cr_probe_slave_connect = 2024 cr_probe_master_connect = 2025 cr_ssl_connection_error = 2026 cr_malformed_packet = 2027 cr_wrong_license = 2028 cr_null_pointer = 2029 cr_no_prepare_stmt = 2030 cr_params_not_bound = 2031 cr_data_truncated = 2032 cr_no_parameters_exists = 2033 cr_invalid_parameter_no = 2034 cr_invalid_buffer_use = 2035 cr_unsupported_param_type = 2036 cr_shared_memory_connection = 2037 cr_shared_memory_connect_request_error = 2038 cr_shared_memory_connect_answer_error = 2039 cr_shared_memory_connect_file_map_error = 2040 cr_shared_memory_connect_map_error = 2041 cr_shared_memory_file_map_error = 2042 cr_shared_memory_map_error = 2043 cr_shared_memory_event_error = 2044 cr_shared_memory_connect_abandoned_error = 2045 cr_shared_memory_connect_set_error = 2046 cr_conn_unknow_protocol = 2047 cr_invalid_conn_handle = 2048 cr_secure_auth = 2049 cr_fetch_canceled = 2050 cr_no_data = 2051 cr_no_stmt_metadata = 2052 cr_no_result_set = 2053 cr_not_implemented = 2054 cr_server_lost_extended = 2055 cr_stmt_closed = 2056 cr_new_stmt_metadata = 2057 cr_already_connected = 2058 cr_auth_plugin_cannot_load = 2059 cr_duplicate_connection_attr = 2060 cr_auth_plugin_err = 2061 cr_error_last = 2061
# -*- coding: utf-8 -*- class HTTP: BAD_REQUEST = 400 UNAUTHORIZED = 401 FORBIDDEN = 403 NOT_FOUND = 404 METHOD_NOT_ALLOWED = 405 CONFLICT = 409 UNSUPPORTED_MEDIA_TYPE = 415
class Http: bad_request = 400 unauthorized = 401 forbidden = 403 not_found = 404 method_not_allowed = 405 conflict = 409 unsupported_media_type = 415
"""EnvSpec class.""" class EnvSpec: """EnvSpec class. Args: observation_space (akro.Space): The observation space of the env. action_space (akro.Space): The action space of the env. """ def __init__(self, observation_space, action_space): self.observation_space = observation_space self.action_space = action_space
"""EnvSpec class.""" class Envspec: """EnvSpec class. Args: observation_space (akro.Space): The observation space of the env. action_space (akro.Space): The action space of the env. """ def __init__(self, observation_space, action_space): self.observation_space = observation_space self.action_space = action_space
# # PySNMP MIB module CISCO-DIAMETER-BASE-PROTOCOL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DIAMETER-BASE-PROTOCOL-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:54:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") Gauge32, ObjectIdentity, Unsigned32, NotificationType, iso, MibIdentifier, Counter64, Counter32, Bits, Integer32, ModuleIdentity, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ObjectIdentity", "Unsigned32", "NotificationType", "iso", "MibIdentifier", "Counter64", "Counter32", "Bits", "Integer32", "ModuleIdentity", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks") RowStatus, StorageType, TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "StorageType", "TruthValue", "DisplayString", "TextualConvention") ciscoDiameterBasePMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 133)) ciscoDiameterBasePMIB.setRevisions(('2006-08-24 00:01',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setLastUpdated('200608240001Z') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-aaa@cisco.com') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setDescription("The MIB module for entities implementing the Diameter Base Protocol. Initial Cisco'ized version of the IETF draft draft-zorn-dime-diameter-base-protocol-mib-00.txt.") ciscoDiameterBasePMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 0)) ciscoDiameterBasePMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1)) ciscoDiameterBasePMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2)) cdbpLocalCfgs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1)) cdbpLocalStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2)) cdbpPeerCfgs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3)) cdbpPeerStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4)) cdbpRealmCfgs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5)) cdbpRealmStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6)) cdbpTrapCfgs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7)) ciscoDiaBaseProtEnableProtocolErrorNotif = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoDiaBaseProtEnableProtocolErrorNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableProtocolErrorNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtProtocolErrorNotif notification.') ciscoDiaBaseProtProtocolErrorNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 1)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsProtocolErrors")) if mibBuilder.loadTexts: ciscoDiaBaseProtProtocolErrorNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtProtocolErrorNotif.setDescription('An ciscoDiaBaseProtProtocolErrorNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnableProtocolErrorNotif is true(1) 2) the value of cdbpPeerStatsProtocolErrors changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') ciscoDiaBaseProtEnableTransientFailureNotif = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoDiaBaseProtEnableTransientFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableTransientFailureNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtTransientFailureNotif notification.') ciscoDiaBaseProtTransientFailureNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 2)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsTransientFailures")) if mibBuilder.loadTexts: ciscoDiaBaseProtTransientFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtTransientFailureNotif.setDescription('An ciscoDiaBaseProtTransientFailureNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnableTransientFailureNotif is true(1) 2) the value of cdbpPeerStatsTransientFailures changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') ciscoDiaBaseProtEnablePermanentFailureNotif = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePermanentFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePermanentFailureNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPermanentFailureNotif notification.') ciscoDiaBaseProtPermanentFailureNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 3)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsPermanentFailures")) if mibBuilder.loadTexts: ciscoDiaBaseProtPermanentFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPermanentFailureNotif.setDescription('An ciscoDiaBaseProtPermanentFailureNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePermanentFailureNotif is true(1) 2) the value of cdbpPeerStatsPermanentFailures changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') ciscoDiaBaseProtEnablePeerConnectionDownNotif = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 4), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionDownNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionDownNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPeerConnectionDownNotif notification.') ciscoDiaBaseProtPeerConnectionDownNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 4)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId")) if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionDownNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionDownNotif.setDescription('An ciscoDiaBaseProtPeerConnectionDownNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePeerConnectionDownNotif is true(1) 2) cdbpPeerStatsState changes to closed(1). It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') ciscoDiaBaseProtEnablePeerConnectionUpNotif = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 5), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionUpNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionUpNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPeerConnectionUpNotif notification.') ciscoDiaBaseProtPeerConnectionUpNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 5)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId")) if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionUpNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionUpNotif.setDescription('An ciscoDiaBaseProtPeerConnectionUpNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePeerConnectionUpNotif is true(1) 2) the value of cdbpPeerStatsState changes to either rOpen(6)or iOpen(7). It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cdbpLocalId = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalId.setStatus('current') if mibBuilder.loadTexts: cdbpLocalId.setDescription("The implementation identification string for the Diameter software in use on the system, for example; 'diameterd'") cdbpLocalIpAddrTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2), ) if mibBuilder.loadTexts: cdbpLocalIpAddrTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrTable.setDescription("The table listing the Diameter local host's IP Addresses.") cdbpLocalIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalIpAddrIndex")) if mibBuilder.loadTexts: cdbpLocalIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrEntry.setDescription('A row entry representing a Diameter local host IP Address.') cdbpLocalIpAddrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalIpAddrIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrIndex.setDescription('A number uniquely identifying the number of IP Addresses supported by this Diameter host.') cdbpLocalIpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalIpAddrType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrType.setDescription('The type of internet address stored in cdbpLocalIpAddress.') cdbpLocalIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 3), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalIpAddress.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddress.setDescription('The IP-Address of the host, which is of the type specified in cdbpLocalIpAddrType.') cdbpLocalTcpListenPort = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalTcpListenPort.setStatus('current') if mibBuilder.loadTexts: cdbpLocalTcpListenPort.setDescription("This object represents Diameter TCP 'listen' port.") cdbpLocalSctpListenPort = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalSctpListenPort.setStatus('current') if mibBuilder.loadTexts: cdbpLocalSctpListenPort.setDescription("This object represents Diameter SCTP 'listen' port.") cdbpLocalOriginHost = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 5), SnmpAdminString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cdbpLocalOriginHost.setStatus('current') if mibBuilder.loadTexts: cdbpLocalOriginHost.setDescription('This object represents the Local Origin Host.') cdbpLocalRealm = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 6), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalRealm.setStatus('current') if mibBuilder.loadTexts: cdbpLocalRealm.setDescription('This object represents the Local Realm Name.') cdbpRedundancyEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 7), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cdbpRedundancyEnabled.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyEnabled.setDescription('This parameter indicates if cisco redundancy has been enabled, it is enabled if set to true and disabled if set to false.') cdbpRedundancyInfraState = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=NamedValues(("rfUnknown", 0), ("rfDisabled", 1), ("rfInitialization", 2), ("rfNegotiation", 3), ("rfStandbyCold", 4), ("rfStandbyConfig", 5), ("rfStandbyFileSys", 6), ("rfStandbyBulk", 7), ("rfStandbyHot", 8), ("rfActiveFast", 9), ("rfActiveDrain", 10), ("rfActivePreconfig", 11), ("rfActivePostconfig", 12), ("rfActive", 13), ("rfActiveExtraload", 14)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRedundancyInfraState.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyInfraState.setDescription("This parameter indicates the current state of cisco redundancy infrastructure state. rfUnknown(0) - unknown state rfDisabled(1) - RF is not functioning at this time rfInitialization(2) - co-ordinating init with platform rfNegotiation(3) - initial negotiation with peer to determine active-standby rfStandbyCold(4) - peer is active, we're cold rfStandbyConfig(5) - sync config from active to standby rfStandbyFileSys(6) - sync file sys from active to standby rfStandbyBulk(7) - clients bulk sync from active to standby rfStandbyHot(8) - standby ready-n-able to be active rfActiveFast(9) - immediate notification of standby going active rfActiveDrain(10) - drain queued messages from peer rfActivePreconfig(11) - active and before config rfActivePostconfig(12) - active and post config rfActive(13) - actively processing new calls rfActiveExtraload(14) - actively processing new calls extra resources other Processing is failed and I have extra load.") cdbpRedundancyLastSwitchover = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 9), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRedundancyLastSwitchover.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyLastSwitchover.setDescription('This object represents the Last Switchover Time.') cdbpLocalApplTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10), ) if mibBuilder.loadTexts: cdbpLocalApplTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplTable.setDescription('The table listing the Diameter applications supported by this server.') cdbpLocalApplEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalApplIndex")) if mibBuilder.loadTexts: cdbpLocalApplEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplEntry.setDescription('A row entry representing a Diameter application on this server.') cdbpLocalApplIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalApplIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplIndex.setDescription('A number uniquely identifying a supported Diameter application. Upon reload, cdbpLocalApplIndex values may be changed.') cdbpLocalApplStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 2), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpLocalApplStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpLocalApplStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplStorageType.setDescription('The storage type for this conceptual row. None of the columnar objects is writable when the conceptual row is permanent.') cdbpLocalApplRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpLocalApplRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdsgStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpLocalApplIndex has been set. cdbpLocalApplIndex may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpLocalApplStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpLocalApplStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpLocalApplStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbpLocalVendorTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11), ) if mibBuilder.loadTexts: cdbpLocalVendorTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorTable.setDescription('The table listing the vendor IDs supported by local Diameter.') cdbpLocalVendorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalVendorIndex")) if mibBuilder.loadTexts: cdbpLocalVendorEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorEntry.setDescription('A row entry representing a vendor ID supported by local Diameter.') cdbpLocalVendorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalVendorIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorIndex.setDescription('A number uniquely identifying the vendor ID supported by local Diameter. Upon reload, cdbpLocalVendorIndex values may be changed.') cdbpLocalVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 9, 10415, 12645))).clone(namedValues=NamedValues(("diameterVendorIetf", 0), ("diameterVendorCisco", 9), ("diameterVendor3gpp", 10415), ("diameterVendorVodafone", 12645))).clone('diameterVendorIetf')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpLocalVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorId.setDescription('The active vendor ID used for peer connections. diameterVendorIetf(0) - Diameter vendor id ietf diameterVendorCisco(9) - Diameter vendor id cisco diameterVendor3gpp(10415) - Diameter vendor id 3gpp diameterVendorVodafone(12645) - Diameter vendor id vodafone.') cdbpLocalVendorStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 3), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbpLocalVendorRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpLocalVendorRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpLocalVendorRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpLocalVendorId has been set. cdbpLocalVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpLocalVendorRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpLocalVendorRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpLocalVendorRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbpAppAdvToPeerTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12), ) if mibBuilder.loadTexts: cdbpAppAdvToPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerTable.setDescription('The table listing the applications advertised by this host to each peer and the types of service supported: accounting, authentication or both.') cdbpAppAdvToPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvToPeerVendorId"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvToPeerIndex")) if mibBuilder.loadTexts: cdbpAppAdvToPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbpAppAdvToPeerVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvToPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerVendorId.setDescription('The IANA Enterprise Code value assigned to the vendor of the Diameter device.') cdbpAppAdvToPeerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvToPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerIndex.setDescription('A number uniquely identifying the Diameter applications advertised as supported by this host to each peer. Upon reload, cdbpAppAdvToPeerIndex values may be changed.') cdbpAppAdvToPeerServices = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("acct", 1), ("auth", 2), ("both", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpAppAdvToPeerServices.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerServices.setDescription('The type of services supported for each application, accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbpAppAdvToPeerStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbpAppAdvToPeerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpAppAdvToPeerRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpAppAdvToPeerRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpAppAdvToPeerVendorId has been set. cdbpAppAdvToPeerVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpAppAdvToPeerRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpAppAdvToPeerRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpAppAdvToPeerRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbpLocalStatsTotalPacketsIn = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 1), Counter32()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsIn.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsIn.setDescription('The total number of packets received by Diameter Base Protocol.') cdbpLocalStatsTotalPacketsOut = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 2), Counter32()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsOut.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsOut.setDescription('The total number of packets transmitted by Diameter Base Protocol.') cdbpLocalStatsTotalUpTime = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalStatsTotalUpTime.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalUpTime.setDescription('This object represents the total time the Diameter server has been up until now.') cdbpLocalResetTime = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpLocalResetTime.setStatus('current') if mibBuilder.loadTexts: cdbpLocalResetTime.setDescription("If the server keeps persistent state (e.g., a process) and supports a 'reset' operation (e.g., can be told to re-read configuration files), this value will be the time elapsed (in hundredths of a second) since the server was 'reset'. For software that does not have persistence or does not support a 'reset' operation, this value will be zero.") cdbpLocalConfigReset = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("reset", 2), ("initializing", 3), ("running", 4))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cdbpLocalConfigReset.setStatus('current') if mibBuilder.loadTexts: cdbpLocalConfigReset.setDescription('Status/action object to reinitialize any persistent server state. When set to reset(2), any persistent server state (such as a process) is reinitialized as if the server had just been started. This value will never be returned by a read operation. When read, one of the following values will be returned: other(1) - server in some unknown state. reset(2) - command to reinitialize server state. initializing(3) - server (re)initializing. running(4) - server currently running.') cdbpPeerTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1), ) if mibBuilder.loadTexts: cdbpPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerTable.setDescription('The table listing information regarding the discovered or configured Diameter peer servers.') cdbpPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex")) if mibBuilder.loadTexts: cdbpPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbpPeerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIndex.setDescription('A number uniquely identifying each Diameter peer with which the host server communicates. Upon reload, cdbpPeerIndex values may be changed.') cdbpPeerId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 2), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerId.setStatus('current') if mibBuilder.loadTexts: cdbpPeerId.setDescription('The server identifier for the Diameter peer. It must be unique and non-empty.') cdbpPeerPortConnect = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerPortConnect.setStatus('current') if mibBuilder.loadTexts: cdbpPeerPortConnect.setDescription('The connection port this server used to connect to the Diameter peer. If there is no active connection, this value will be zero(0).') cdbpPeerPortListen = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(3868)).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerPortListen.setStatus('current') if mibBuilder.loadTexts: cdbpPeerPortListen.setDescription('The port the server is listening on.') cdbpPeerProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("tcp", 1), ("sctp", 2))).clone('tcp')).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerProtocol.setStatus('current') if mibBuilder.loadTexts: cdbpPeerProtocol.setDescription('The transport protocol (tcp/sctp) the Diameter peer is using. tcp(1) - Transmission Control Protocol sctp(2) - Stream Control Transmission Protocol.') cdbpPeerSecurity = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("tls", 2), ("ipsec", 3))).clone('other')).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerSecurity.setStatus('current') if mibBuilder.loadTexts: cdbpPeerSecurity.setDescription('The security the Diameter peer is using. other(1) - Unknown Security Protocol. tls(2) - Transport Layer Security Protocol. ipsec(3) - Internet Protocol Security.') cdbpPeerFirmwareRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerFirmwareRevision.setStatus('current') if mibBuilder.loadTexts: cdbpPeerFirmwareRevision.setDescription('Firmware revision of peer. If no firmware revision, the revision of the Diameter software module may be reported instead.') cdbpPeerStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 8), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpPeerStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStorageType.setDescription('The storage type for this conceptual row. Only cdbpPeerPortListen object is writable when the conceptual row is permanent.') cdbpPeerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpPeerRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpPeerId has been set. cdbpPeerId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpPeerRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpPeerRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpPeerRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbpPeerIpAddrTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2), ) if mibBuilder.loadTexts: cdbpPeerIpAddrTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddrTable.setDescription('The table listing the Diameter server IP Addresses.') cdbpPeerIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIpAddressIndex")) if mibBuilder.loadTexts: cdbpPeerIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddrEntry.setDescription('A row entry representing peer Diameter server IP Addresses.') cdbpPeerIpAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerIpAddressIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddressIndex.setDescription('A number uniquely identifying the number of IP Addresses supported by all Diameter peers.') cdbpPeerIpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerIpAddressType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddressType.setDescription('The type of address stored in diameterPeerIpAddress.') cdbpPeerIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cdbpPeerIpAddress.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddress.setDescription('The active IP Address(es) used for connections.') cdbpAppAdvFromPeerTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3), ) if mibBuilder.loadTexts: cdbpAppAdvFromPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerTable.setDescription('The table listing the applications advertised by each peer to this host and the types of service supported: accounting, authentication or both.') cdbpAppAdvFromPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvFromPeerVendorId"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvFromPeerIndex")) if mibBuilder.loadTexts: cdbpAppAdvFromPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbpAppAdvFromPeerVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvFromPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerVendorId.setDescription('The IANA Enterprise Code value assigned to the vendor of the Diameter device.') cdbpAppAdvFromPeerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvFromPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerIndex.setDescription('A number uniquely identifying the applications advertised as supported from each Diameter peer.') cdbpAppAdvFromPeerType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("acct", 1), ("auth", 2), ("both", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpAppAdvFromPeerType.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerType.setDescription('The type of services supported for each application, accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbpPeerVendorTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4), ) if mibBuilder.loadTexts: cdbpPeerVendorTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorTable.setDescription('The table listing the Vendor IDs supported by the peer.') cdbpPeerVendorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerVendorIndex")) if mibBuilder.loadTexts: cdbpPeerVendorEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorEntry.setDescription('A row entry representing a Vendor ID supported by the peer.') cdbpPeerVendorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerVendorIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorIndex.setDescription('A number uniquely identifying the Vendor ID supported by the peer. Upon reload, cdbpPeerVendorIndex values may be changed.') cdbpPeerVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 9, 10415, 12645))).clone(namedValues=NamedValues(("diameterVendorIetf", 0), ("diameterVendorCisco", 9), ("diameterVendor3gpp", 10415), ("diameterVendorVodafone", 12645))).clone('diameterVendorIetf')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorId.setDescription('The active vendor ID used for peer connections. diameterVendorIetf(0) - Diameter vendor id ietf diameterVendorCisco(9) - Diameter vendor id cisco diameterVendor3gpp(10415) - Diameter vendor id 3gpp diameterVendorVodafone(12645) - Diameter vendor id vodafone.') cdbpPeerVendorStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 3), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbpPeerVendorRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cdbpPeerVendorRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpPeerVendorRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpPeerVendorId has been set. Also, a newly created row cannot be made active until the corresponding 'cdbpPeerIndex' has been set. cdbpPeerVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpPeerVendorRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpPeerVendorRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpPeerVendorRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbpPeerStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1), ) if mibBuilder.loadTexts: cdbpPeerStatsTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTable.setDescription('The table listing the Diameter peer statistics.') cdbpPeerStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIndex")) if mibBuilder.loadTexts: cdbpPeerStatsEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsEntry.setDescription('A row entry representing a Diameter peer.') cdbpPeerStatsState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("closed", 1), ("waitConnAck", 2), ("waitICEA", 3), ("elect", 4), ("waitReturns", 5), ("rOpen", 6), ("iOpen", 7), ("closing", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsState.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsState.setDescription('Connection state in the Peer State Machine of the peer with which this Diameter server is communicating. closed(1) - Connection closed with this peer. waitConnAck(2) - Waiting for an acknowledgment from this peer. waitICEA(3) - Waiting for a Capabilities-Exchange- Answer from this peer. elect(4) - When the peer and the server are both trying to bring up a connection with each other at the same time. An election process begins which determines which socket remains open. waitReturns(5) - Waiting for election returns. r-open(6) - Responder transport connection is used for communication. i-open(7) - Initiator transport connection is used for communication. closing(8) - Actively closing and doing cleanup.') cdbpPeerStatsStateDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsStateDuration.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsStateDuration.setDescription('This object represents the Peer state duration.') cdbpPeerStatsLastDiscCause = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("rebooting", 1), ("busy", 2), ("doNotWantToTalk", 3), ("election", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsLastDiscCause.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsLastDiscCause.setDescription("The last cause for a peers disconnection. rebooting(1) - A scheduled reboot is imminent. busy(2) - The peer's internal resources are constrained, and it has determined that the transport connection needs to be shutdown. doNotWantToTalk(3) - The peer has determined that it does not see a need for the transport connection to exist, since it does not expect any messages to be exchanged in the foreseeable future. electionLost(4) - The peer has determined that it has lost the election process and has therefore disconnected the transport connection.") cdbpPeerStatsWhoInitDisconnect = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("host", 1), ("peer", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsWhoInitDisconnect.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsWhoInitDisconnect.setDescription('Did the host or peer initiate the disconnect? host(1) - If this server initiated the disconnect. peer(2) - If the peer with which this server was connected initiated the disconnect.') cdbpPeerStatsDWCurrentStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("okay", 1), ("suspect", 2), ("down", 3), ("reopen", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWCurrentStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWCurrentStatus.setDescription('This object indicates the connection status. okay(1) - Indicates the connection is presumed working. suspect(2) - Indicates the connection is possibly congested or down. down(3) - The peer is no longer reachable, causing the transport connection to be shutdown. reopen(4) - Three watchdog messages are exchanged with accepted round trip times, and the connection to the peer is considered stabilized.') cdbpPeerStatsTimeoutConnAtmpts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 6), Counter32()).setUnits('attempts').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsTimeoutConnAtmpts.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTimeoutConnAtmpts.setDescription('If there is no transport connection with a peer, this is the number of times the server attempts to connect to that peer. This is reset on disconnection.') cdbpPeerStatsASRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 7), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsASRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASRsIn.setDescription('Abort-Session-Request messages received from the peer.') cdbpPeerStatsASRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 8), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsASRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASRsOut.setDescription('Abort-Session-Request messages sent to the peer.') cdbpPeerStatsASAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 9), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsASAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASAsIn.setDescription('Number of Abort-Session-Answer messages received from the peer.') cdbpPeerStatsASAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 10), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsASAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASAsOut.setDescription('Number of Abort-Session-Answer messages sent to the peer.') cdbpPeerStatsACRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 11), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsACRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACRsIn.setDescription('Number of Accounting-Request messages received from the peer.') cdbpPeerStatsACRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 12), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsACRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACRsOut.setDescription('Number of Accounting-Request messages sent to the peer.') cdbpPeerStatsACAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 13), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsACAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACAsIn.setDescription('Number of Accounting-Answer messages received from the peer.') cdbpPeerStatsACAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 14), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsACAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACAsOut.setDescription('Number of Accounting-Answer messages sent to the peer.') cdbpPeerStatsCERsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 15), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsCERsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCERsIn.setDescription('Number of Capabilities-Exchange-Request messages received from the peer.') cdbpPeerStatsCERsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 16), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsCERsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCERsOut.setDescription('Number of Capabilities-Exchange-Request messages sent to the peer.') cdbpPeerStatsCEAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 17), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsCEAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCEAsIn.setDescription('Number of Capabilities-Exchange-Answer messages received from the peer.') cdbpPeerStatsCEAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 18), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsCEAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCEAsOut.setDescription('Number of Capabilities-Exchange-Answer messages sent to the peer.') cdbpPeerStatsDWRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 19), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWRsIn.setDescription('Number of Device-Watchdog-Request messages received from the peer.') cdbpPeerStatsDWRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 20), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWRsOut.setDescription('Number of Device-Watchdog-Request messages sent to the peer.') cdbpPeerStatsDWAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 21), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWAsIn.setDescription('Number of Device-Watchdog-Answer messages received from the peer.') cdbpPeerStatsDWAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 22), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWAsOut.setDescription('Number of Device-Watchdog-Answer messages sent to the peer.') cdbpPeerStatsDPRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 23), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDPRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPRsIn.setDescription('Number of Disconnect-Peer-Request messages received.') cdbpPeerStatsDPRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 24), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDPRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPRsOut.setDescription('Number of Disconnect-Peer-Request messages sent.') cdbpPeerStatsDPAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 25), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDPAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPAsIn.setDescription('Number of Disconnect-Peer-Answer messages received.') cdbpPeerStatsDPAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 26), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDPAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPAsOut.setDescription('Number of Disconnect-Peer-Answer messages sent.') cdbpPeerStatsRARsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 27), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsRARsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRARsIn.setDescription('Number of Re-Auth-Request messages received.') cdbpPeerStatsRARsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 28), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsRARsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRARsOut.setDescription('Number of Re-Auth-Request messages sent.') cdbpPeerStatsRAAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 29), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsRAAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRAAsIn.setDescription('Number of Re-Auth-Answer messages received.') cdbpPeerStatsRAAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 30), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsRAAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRAAsOut.setDescription('Number of Re-Auth-Answer messages sent.') cdbpPeerStatsSTRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 31), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsSTRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTRsIn.setDescription('Number of Session-Termination-Request messages received from the peer.') cdbpPeerStatsSTRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 32), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsSTRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTRsOut.setDescription('Number of Session-Termination-Request messages sent to the peer.') cdbpPeerStatsSTAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 33), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsSTAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTAsIn.setDescription('Number of Session-Termination-Answer messages received from the peer.') cdbpPeerStatsSTAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 34), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsSTAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTAsOut.setDescription('Number of Session-Termination-Answer messages sent to the peer.') cdbpPeerStatsDWReqTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 35), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsDWReqTimer.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWReqTimer.setDescription('Device-Watchdog Request Timer, which is the interval between packets sent to peers.') cdbpPeerStatsRedirectEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsRedirectEvents.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRedirectEvents.setDescription('Redirect Event count, which is the number of redirects sent from a peer.') cdbpPeerStatsAccDupRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 37), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsAccDupRequests.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccDupRequests.setDescription('The number of duplicate Diameter Accounting-Request packets received.') cdbpPeerStatsMalformedReqsts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsMalformedReqsts.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsMalformedReqsts.setDescription('The number of malformed Diameter packets received.') cdbpPeerStatsAccsNotRecorded = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsAccsNotRecorded.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccsNotRecorded.setDescription('The number of Diameter Accounting-Request packets which were received and responded to but not recorded.') cdbpPeerStatsAccRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsAccRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccRetrans.setDescription('The number of Diameter Accounting-Request packets retransmitted to this Diameter server.') cdbpPeerStatsTotalRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 41), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsTotalRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTotalRetrans.setDescription('The number of Diameter packets retransmitted to this Diameter server, not to include Diameter Accounting-Request packets retransmitted.') cdbpPeerStatsAccPendReqstsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 42), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsAccPendReqstsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccPendReqstsOut.setDescription('The number of Diameter Accounting-Request packets sent to this peer that have not yet timed out or received a response. This variable is incremented when an Accounting-Request is sent to this server and decremented due to receipt of an Accounting-Response, a timeout or a retransmission.') cdbpPeerStatsAccReqstsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 43), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsAccReqstsDropped.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccReqstsDropped.setDescription('The number of Accounting-Requests to this server that have been dropped.') cdbpPeerStatsHByHDropMessages = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsHByHDropMessages.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsHByHDropMessages.setDescription('An answer message that is received with an unknown hop-by-hop identifier. Does not include accounting requests dropped.') cdbpPeerStatsEToEDupMessages = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 45), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsEToEDupMessages.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsEToEDupMessages.setDescription('Duplicate answer messages that are to be locally consumed. Does not include duplicate accounting requests received.') cdbpPeerStatsUnknownTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsUnknownTypes.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsUnknownTypes.setDescription('The number of Diameter packets of unknown type which were received.') cdbpPeerStatsProtocolErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 47), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsProtocolErrors.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsProtocolErrors.setDescription('This object represents the Number of protocol errors returned to peer, but not including redirects.') cdbpPeerStatsTransientFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsTransientFailures.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTransientFailures.setDescription('This object represents the transient failure count.') cdbpPeerStatsPermanentFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 49), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsPermanentFailures.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsPermanentFailures.setDescription('This object represents the Number of permanent failures returned to peer.') cdbpPeerStatsTransportDown = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 50), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpPeerStatsTransportDown.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTransportDown.setDescription('This object represents the Number of unexpected transport failures.') cdbpRealmKnownPeersTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1), ) if mibBuilder.loadTexts: cdbpRealmKnownPeersTable.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersTable.setDescription('The table listing the Diameter realms and known peers.') cdbpRealmKnownPeersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteIndex"), (0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmKnownPeersIndex")) if mibBuilder.loadTexts: cdbpRealmKnownPeersEntry.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersEntry.setDescription('A row entry representing a Diameter realm and known peers.') cdbpRealmKnownPeersIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpRealmKnownPeersIndex.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersIndex.setDescription('A number uniquely identifying a peer known to this realm. Upon reload, cdbpRealmKnownPeersIndex values may be changed.') cdbpRealmKnownPeers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmKnownPeers.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeers.setDescription('The index of the peer this realm knows about. This is an ordered list, where the ordering signifies the order in which the peers are tried. Same as the cdbpPeerIndex') cdbpRealmKnownPeersChosen = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("roundRobin", 1), ("loadBalance", 2), ("firstPreferred", 3), ("mostRecentFirst", 4), ("other", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmKnownPeersChosen.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersChosen.setDescription('How the realm chooses which peer to send packets to. roundRobin(1) - The peer used for each transaction is selected based on the order in which peers are configured. loadBalance(2) - The peer used for each transaction is based on the load metric (maybe implementation dependent) of all peers defined for the realm, with the least loaded server selected first. firstPreferred(3) - The first defined server is always used for transactions unless failover occurs. mostRecentFirst(4) - The most recently used server is used first for each transaction.') cdbpRealmMessageRouteTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1), ) if mibBuilder.loadTexts: cdbpRealmMessageRouteTable.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteTable.setDescription('The table listing the Diameter realm-based message route information.') cdbpRealmMessageRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1), ).setIndexNames((0, "CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteIndex")) if mibBuilder.loadTexts: cdbpRealmMessageRouteEntry.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteEntry.setDescription('A row entry representing a Diameter realm based message route server.') cdbpRealmMessageRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpRealmMessageRouteIndex.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteIndex.setDescription('A number uniquely identifying each realm.') cdbpRealmMessageRouteRealm = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteRealm.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRealm.setDescription('This object represents the realm name') cdbpRealmMessageRouteApp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteApp.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteApp.setDescription('Application id used to route packets to this realm.') cdbpRealmMessageRouteType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("acct", 1), ("auth", 2), ("both", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteType.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteType.setDescription('The types of service supported for each realm application: accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbpRealmMessageRouteAction = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("local", 1), ("relay", 2), ("proxy", 3), ("redirect", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteAction.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAction.setDescription('The action is used to identify how a message should be treated based on the realm, application and type. local(1) - Diameter messages that resolve to a route entry with the Local Action set to Local can be satisfied locally, and do not need to be routed to another server. relay(2) - All Diameter messages that fall within this category MUST be routed to a next-hop server, without modifying any non-routing AVPs. proxy(3) - All Diameter messages that fall within this category MUST be routed to a next-hop server. redirect(4) - Diameter messages that fall within this category MUST have the identity of the home Diameter server(s) appended, and returned to the sender of the message.') cdbpRealmMessageRouteACRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 6), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsIn.setDescription('Number of Accounting-Request messages received from the realm.') cdbpRealmMessageRouteACRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 7), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsOut.setDescription('Number of Accounting-Request messages sent to the realm.') cdbpRealmMessageRouteACAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 8), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsIn.setDescription('Number of Accounting-Answer messages received from the realm.') cdbpRealmMessageRouteACAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 9), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsOut.setDescription('Number of Accounting-Answer messages sent to the realm.') cdbpRealmMessageRouteRARsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 10), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsIn.setDescription('Number of Re-Auth-Request messages received from the realm.') cdbpRealmMessageRouteRARsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 11), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsOut.setDescription('Number of Re-Auth-Request messages sent to the realm.') cdbpRealmMessageRouteRAAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 12), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsIn.setDescription('Number of Re-Auth-Answer messages received from the realm.') cdbpRealmMessageRouteRAAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 13), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsOut.setDescription('Number of Re-Auth-Answer messages sent to the realm.') cdbpRealmMessageRouteSTRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 14), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsIn.setDescription('Number of Session-Termination-Request messages received from the realm.') cdbpRealmMessageRouteSTRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 15), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsOut.setDescription('Number of Session-Termination-Request messages sent to the realm.') cdbpRealmMessageRouteSTAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 16), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsIn.setDescription('Number of Session-Termination-Answer messages received from the realm.') cdbpRealmMessageRouteSTAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 17), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsOut.setDescription('Number of Session-Termination-Answer messages sent to the realm.') cdbpRealmMessageRouteASRsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 18), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsIn.setDescription('Number of Abort-Session-Request messages received from the realm.') cdbpRealmMessageRouteASRsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 19), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsOut.setDescription('Number of Abort-Session-Request messages sent to the realm.') cdbpRealmMessageRouteASAsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 20), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsIn.setDescription('Number of Abort-Session-Answer messages received from the realm.') cdbpRealmMessageRouteASAsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 21), Counter32()).setUnits('messages').setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsOut.setDescription('Number of Abort-Session-Answer messages sent to the realm.') cdbpRealmMessageRouteAccRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteAccRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccRetrans.setDescription('The number of Diameter accounting packets retransmitted to this realm.') cdbpRealmMessageRouteAccDupReqsts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteAccDupReqsts.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccDupReqsts.setDescription('The number of duplicate Diameter accounting packets sent to this realm.') cdbpRealmMessageRoutePendReqstsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 24), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRoutePendReqstsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRoutePendReqstsOut.setDescription('The number of Diameter Accounting-Request packets sent to this peer that have not yet timed out or received a response. This variable is incremented when an Accounting-Request is sent to this server and decremented due to receipt of an Accounting-Response, a timeout or a retransmission.') cdbpRealmMessageRouteReqstsDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cdbpRealmMessageRouteReqstsDrop.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteReqstsDrop.setDescription('The number of requests dropped by this realm.') ciscoDiameterBasePMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 1)) ciscoDiameterBasePMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2)) ciscoDiameterBasePMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 1, 1)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBLocalCfgGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBPeerCfgGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBPeerStatsGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBNotificationsGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBTrapCfgGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBLocalCfgSkippedGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBLocalStatsSkippedGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBPeerCfgSkippedGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBPeerStatsSkippedGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBRealmCfgSkippedGroup"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiameterBasePMIBRealmStatsSkippedGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBCompliance = ciscoDiameterBasePMIBCompliance.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBCompliance.setDescription('The compliance statement for Diameter Base Protocol entities.') ciscoDiameterBasePMIBLocalCfgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 1)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalRealm"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRedundancyEnabled"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRedundancyInfraState"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRedundancyLastSwitchover"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalOriginHost"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalVendorId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalVendorStorageType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalVendorRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBLocalCfgGroup = ciscoDiameterBasePMIBLocalCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalCfgGroup.setDescription('A collection of objects providing configuration common to the server.') ciscoDiameterBasePMIBPeerCfgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 2)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerPortConnect"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerPortListen"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerProtocol"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerSecurity"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerFirmwareRevision"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStorageType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerRowStatus"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIpAddressType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerIpAddress"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerVendorId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerVendorStorageType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerVendorRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBPeerCfgGroup = ciscoDiameterBasePMIBPeerCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerCfgGroup.setDescription('A collection of objects providing configuration of the Diameter peers.') ciscoDiameterBasePMIBPeerStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 3)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsState"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsStateDuration"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsLastDiscCause"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsWhoInitDisconnect"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWCurrentStatus"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsTimeoutConnAtmpts"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsASRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsASRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsASAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsASAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsACRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsACRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsACAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsACAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsCERsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsCERsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsCEAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsCEAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDPRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDPRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDPAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDPAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRARsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRARsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRAAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRAAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsSTRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsSTRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsSTAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsSTAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWReqTimer"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRedirectEvents"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccDupRequests"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsMalformedReqsts"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccsNotRecorded"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccRetrans"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsTotalRetrans"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccPendReqstsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccReqstsDropped"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsHByHDropMessages"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsEToEDupMessages"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsUnknownTypes"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsProtocolErrors"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsTransientFailures"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsPermanentFailures"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsTransportDown")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBPeerStatsGroup = ciscoDiameterBasePMIBPeerStatsGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerStatsGroup.setDescription('A collection of objects providing statistics of the Diameter peers.') ciscoDiameterBasePMIBNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 4)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtProtocolErrorNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtTransientFailureNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtPermanentFailureNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtPeerConnectionDownNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtPeerConnectionUpNotif")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBNotificationsGroup = ciscoDiameterBasePMIBNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBNotificationsGroup.setDescription('The set of notifications which an agent is required to implement.') ciscoDiameterBasePMIBTrapCfgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 5)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtEnableProtocolErrorNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtEnableTransientFailureNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtEnablePermanentFailureNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtEnablePeerConnectionDownNotif"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "ciscoDiaBaseProtEnablePeerConnectionUpNotif")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBTrapCfgGroup = ciscoDiameterBasePMIBTrapCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBTrapCfgGroup.setDescription('A collection of objects providing configuration for base protocol notifications.') ciscoDiameterBasePMIBLocalCfgSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 6)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalId"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalIpAddrType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalIpAddress"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalTcpListenPort"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalSctpListenPort"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalPacketsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalPacketsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalUpTime"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalResetTime"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalConfigReset"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalApplStorageType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalApplRowStatus"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvToPeerServices"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvToPeerStorageType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvToPeerRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBLocalCfgSkippedGroup = ciscoDiameterBasePMIBLocalCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalCfgSkippedGroup.setDescription('A collection of objects providing configuration common to the server.') ciscoDiameterBasePMIBLocalStatsSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 7)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalPacketsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalPacketsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalStatsTotalUpTime"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalResetTime"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpLocalConfigReset")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBLocalStatsSkippedGroup = ciscoDiameterBasePMIBLocalStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalStatsSkippedGroup.setDescription('A collection of objects providing statistics common to the server.') ciscoDiameterBasePMIBPeerCfgSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 8)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpAppAdvFromPeerType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBPeerCfgSkippedGroup = ciscoDiameterBasePMIBPeerCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerCfgSkippedGroup.setDescription('A collection of objects providing configuration for Diameter peers.') ciscoDiameterBasePMIBPeerStatsSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 9)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWCurrentStatus"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsDWReqTimer"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsRedirectEvents"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsAccDupRequests"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpPeerStatsEToEDupMessages")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBPeerStatsSkippedGroup = ciscoDiameterBasePMIBPeerStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerStatsSkippedGroup.setDescription('A collection of objects providing statistics of Diameter peers.') ciscoDiameterBasePMIBRealmCfgSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 10)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmKnownPeers"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmKnownPeersChosen")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBRealmCfgSkippedGroup = ciscoDiameterBasePMIBRealmCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBRealmCfgSkippedGroup.setDescription('A collection of objects providing configuration for realm message routing.') ciscoDiameterBasePMIBRealmStatsSkippedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 11)).setObjects(("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteRealm"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteApp"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteType"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteAction"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteACRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteACRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteACAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteACAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteRARsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteRARsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteRAAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteRAAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteSTRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteSTRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteSTAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteSTAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteASRsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteASRsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteASAsIn"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteASAsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteAccRetrans"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteAccDupReqsts"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRoutePendReqstsOut"), ("CISCO-DIAMETER-BASE-PROTOCOL-MIB", "cdbpRealmMessageRouteReqstsDrop")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDiameterBasePMIBRealmStatsSkippedGroup = ciscoDiameterBasePMIBRealmStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBRealmStatsSkippedGroup.setDescription('A collection of objects providing statistics of realm message routing.') mibBuilder.exportSymbols("CISCO-DIAMETER-BASE-PROTOCOL-MIB", cdbpRealmMessageRouteACRsIn=cdbpRealmMessageRouteACRsIn, cdbpRealmStats=cdbpRealmStats, ciscoDiameterBasePMIBCompliance=ciscoDiameterBasePMIBCompliance, cdbpPeerStatsSTAsOut=cdbpPeerStatsSTAsOut, cdbpPeerProtocol=cdbpPeerProtocol, cdbpPeerTable=cdbpPeerTable, ciscoDiaBaseProtPeerConnectionDownNotif=ciscoDiaBaseProtPeerConnectionDownNotif, cdbpLocalVendorIndex=cdbpLocalVendorIndex, cdbpPeerStatsDWReqTimer=cdbpPeerStatsDWReqTimer, cdbpPeerStatsACAsIn=cdbpPeerStatsACAsIn, cdbpPeerStatsDWRsOut=cdbpPeerStatsDWRsOut, ciscoDiaBaseProtEnablePeerConnectionDownNotif=ciscoDiaBaseProtEnablePeerConnectionDownNotif, cdbpPeerStatsDPAsIn=cdbpPeerStatsDPAsIn, cdbpPeerId=cdbpPeerId, cdbpAppAdvFromPeerTable=cdbpAppAdvFromPeerTable, cdbpRealmMessageRouteSTRsIn=cdbpRealmMessageRouteSTRsIn, cdbpRealmMessageRouteApp=cdbpRealmMessageRouteApp, cdbpLocalVendorEntry=cdbpLocalVendorEntry, cdbpRealmMessageRouteAccDupReqsts=cdbpRealmMessageRouteAccDupReqsts, cdbpAppAdvToPeerVendorId=cdbpAppAdvToPeerVendorId, cdbpLocalIpAddrType=cdbpLocalIpAddrType, cdbpPeerSecurity=cdbpPeerSecurity, ciscoDiaBaseProtTransientFailureNotif=ciscoDiaBaseProtTransientFailureNotif, cdbpPeerStatsAccPendReqstsOut=cdbpPeerStatsAccPendReqstsOut, ciscoDiameterBasePMIBLocalCfgGroup=ciscoDiameterBasePMIBLocalCfgGroup, cdbpRealmMessageRouteRealm=cdbpRealmMessageRouteRealm, cdbpPeerEntry=cdbpPeerEntry, cdbpRedundancyLastSwitchover=cdbpRedundancyLastSwitchover, cdbpRealmMessageRouteAction=cdbpRealmMessageRouteAction, cdbpPeerIpAddrTable=cdbpPeerIpAddrTable, cdbpPeerStatsSTAsIn=cdbpPeerStatsSTAsIn, cdbpRealmCfgs=cdbpRealmCfgs, cdbpPeerStatsTransientFailures=cdbpPeerStatsTransientFailures, cdbpRealmKnownPeersIndex=cdbpRealmKnownPeersIndex, cdbpLocalVendorTable=cdbpLocalVendorTable, cdbpPeerStorageType=cdbpPeerStorageType, cdbpAppAdvFromPeerVendorId=cdbpAppAdvFromPeerVendorId, cdbpPeerStatsRAAsOut=cdbpPeerStatsRAAsOut, cdbpLocalId=cdbpLocalId, ciscoDiameterBasePMIBNotifs=ciscoDiameterBasePMIBNotifs, ciscoDiameterBasePMIBGroups=ciscoDiameterBasePMIBGroups, cdbpPeerStats=cdbpPeerStats, cdbpRealmMessageRouteASRsOut=cdbpRealmMessageRouteASRsOut, cdbpRealmMessageRouteAccRetrans=cdbpRealmMessageRouteAccRetrans, cdbpAppAdvToPeerServices=cdbpAppAdvToPeerServices, cdbpPeerStatsACRsOut=cdbpPeerStatsACRsOut, cdbpRedundancyEnabled=cdbpRedundancyEnabled, cdbpPeerVendorRowStatus=cdbpPeerVendorRowStatus, cdbpPeerStatsUnknownTypes=cdbpPeerStatsUnknownTypes, ciscoDiameterBasePMIBCompliances=ciscoDiameterBasePMIBCompliances, cdbpPeerStatsEToEDupMessages=cdbpPeerStatsEToEDupMessages, cdbpPeerVendorEntry=cdbpPeerVendorEntry, ciscoDiaBaseProtEnableProtocolErrorNotif=ciscoDiaBaseProtEnableProtocolErrorNotif, cdbpPeerStatsTable=cdbpPeerStatsTable, cdbpPeerIpAddrEntry=cdbpPeerIpAddrEntry, ciscoDiameterBasePMIBConform=ciscoDiameterBasePMIBConform, cdbpPeerStatsSTRsOut=cdbpPeerStatsSTRsOut, cdbpRealmMessageRouteIndex=cdbpRealmMessageRouteIndex, cdbpAppAdvToPeerIndex=cdbpAppAdvToPeerIndex, ciscoDiameterBasePMIBPeerStatsGroup=ciscoDiameterBasePMIBPeerStatsGroup, ciscoDiaBaseProtEnablePeerConnectionUpNotif=ciscoDiaBaseProtEnablePeerConnectionUpNotif, cdbpLocalApplRowStatus=cdbpLocalApplRowStatus, ciscoDiaBaseProtEnablePermanentFailureNotif=ciscoDiaBaseProtEnablePermanentFailureNotif, ciscoDiameterBasePMIBPeerStatsSkippedGroup=ciscoDiameterBasePMIBPeerStatsSkippedGroup, PYSNMP_MODULE_ID=ciscoDiameterBasePMIB, ciscoDiameterBasePMIBObjects=ciscoDiameterBasePMIBObjects, cdbpLocalRealm=cdbpLocalRealm, cdbpLocalVendorId=cdbpLocalVendorId, cdbpLocalResetTime=cdbpLocalResetTime, ciscoDiameterBasePMIBRealmCfgSkippedGroup=ciscoDiameterBasePMIBRealmCfgSkippedGroup, cdbpPeerStatsDPRsIn=cdbpPeerStatsDPRsIn, cdbpPeerStatsEntry=cdbpPeerStatsEntry, cdbpPeerStatsAccDupRequests=cdbpPeerStatsAccDupRequests, cdbpRealmMessageRoutePendReqstsOut=cdbpRealmMessageRoutePendReqstsOut, cdbpTrapCfgs=cdbpTrapCfgs, ciscoDiameterBasePMIBTrapCfgGroup=ciscoDiameterBasePMIBTrapCfgGroup, cdbpAppAdvFromPeerType=cdbpAppAdvFromPeerType, cdbpPeerIndex=cdbpPeerIndex, cdbpPeerVendorId=cdbpPeerVendorId, cdbpAppAdvToPeerRowStatus=cdbpAppAdvToPeerRowStatus, cdbpLocalStatsTotalPacketsOut=cdbpLocalStatsTotalPacketsOut, cdbpPeerStatsHByHDropMessages=cdbpPeerStatsHByHDropMessages, cdbpRealmMessageRouteASAsIn=cdbpRealmMessageRouteASAsIn, cdbpLocalStats=cdbpLocalStats, cdbpPeerStatsRedirectEvents=cdbpPeerStatsRedirectEvents, cdbpPeerStatsASRsOut=cdbpPeerStatsASRsOut, cdbpPeerStatsTotalRetrans=cdbpPeerStatsTotalRetrans, cdbpRealmMessageRouteEntry=cdbpRealmMessageRouteEntry, cdbpPeerStatsState=cdbpPeerStatsState, cdbpPeerStatsSTRsIn=cdbpPeerStatsSTRsIn, cdbpPeerFirmwareRevision=cdbpPeerFirmwareRevision, cdbpLocalTcpListenPort=cdbpLocalTcpListenPort, cdbpPeerStatsCERsOut=cdbpPeerStatsCERsOut, cdbpLocalApplStorageType=cdbpLocalApplStorageType, cdbpPeerStatsAccRetrans=cdbpPeerStatsAccRetrans, cdbpPeerStatsPermanentFailures=cdbpPeerStatsPermanentFailures, cdbpLocalIpAddrIndex=cdbpLocalIpAddrIndex, cdbpRealmKnownPeersEntry=cdbpRealmKnownPeersEntry, cdbpPeerStatsDWAsIn=cdbpPeerStatsDWAsIn, cdbpLocalStatsTotalUpTime=cdbpLocalStatsTotalUpTime, cdbpPeerStatsDPAsOut=cdbpPeerStatsDPAsOut, ciscoDiaBaseProtPermanentFailureNotif=ciscoDiaBaseProtPermanentFailureNotif, ciscoDiameterBasePMIBLocalStatsSkippedGroup=ciscoDiameterBasePMIBLocalStatsSkippedGroup, cdbpPeerStatsRAAsIn=cdbpPeerStatsRAAsIn, cdbpPeerStatsStateDuration=cdbpPeerStatsStateDuration, cdbpPeerStatsProtocolErrors=cdbpPeerStatsProtocolErrors, ciscoDiameterBasePMIBNotificationsGroup=ciscoDiameterBasePMIBNotificationsGroup, cdbpRealmMessageRouteACRsOut=cdbpRealmMessageRouteACRsOut, cdbpLocalApplEntry=cdbpLocalApplEntry, cdbpPeerStatsDWAsOut=cdbpPeerStatsDWAsOut, cdbpPeerStatsAccReqstsDropped=cdbpPeerStatsAccReqstsDropped, cdbpRealmKnownPeersTable=cdbpRealmKnownPeersTable, cdbpPeerStatsAccsNotRecorded=cdbpPeerStatsAccsNotRecorded, cdbpLocalVendorRowStatus=cdbpLocalVendorRowStatus, cdbpLocalIpAddress=cdbpLocalIpAddress, cdbpLocalIpAddrEntry=cdbpLocalIpAddrEntry, cdbpRealmMessageRouteRARsIn=cdbpRealmMessageRouteRARsIn, cdbpRealmMessageRouteACAsIn=cdbpRealmMessageRouteACAsIn, cdbpLocalOriginHost=cdbpLocalOriginHost, cdbpRealmMessageRouteRAAsIn=cdbpRealmMessageRouteRAAsIn, cdbpRealmMessageRouteRAAsOut=cdbpRealmMessageRouteRAAsOut, ciscoDiameterBasePMIBPeerCfgSkippedGroup=ciscoDiameterBasePMIBPeerCfgSkippedGroup, cdbpPeerPortConnect=cdbpPeerPortConnect, cdbpPeerStatsWhoInitDisconnect=cdbpPeerStatsWhoInitDisconnect, cdbpPeerStatsCEAsOut=cdbpPeerStatsCEAsOut, cdbpAppAdvFromPeerIndex=cdbpAppAdvFromPeerIndex, cdbpRealmMessageRouteASRsIn=cdbpRealmMessageRouteASRsIn, cdbpPeerStatsLastDiscCause=cdbpPeerStatsLastDiscCause, cdbpPeerStatsASAsIn=cdbpPeerStatsASAsIn, cdbpPeerIpAddressType=cdbpPeerIpAddressType, cdbpPeerStatsRARsOut=cdbpPeerStatsRARsOut, cdbpPeerStatsDWCurrentStatus=cdbpPeerStatsDWCurrentStatus, cdbpRealmMessageRouteSTRsOut=cdbpRealmMessageRouteSTRsOut, cdbpLocalCfgs=cdbpLocalCfgs, cdbpRealmMessageRouteReqstsDrop=cdbpRealmMessageRouteReqstsDrop, cdbpLocalStatsTotalPacketsIn=cdbpLocalStatsTotalPacketsIn, cdbpPeerCfgs=cdbpPeerCfgs, cdbpRealmKnownPeers=cdbpRealmKnownPeers, cdbpPeerStatsMalformedReqsts=cdbpPeerStatsMalformedReqsts, cdbpRealmMessageRouteRARsOut=cdbpRealmMessageRouteRARsOut, cdbpRealmMessageRouteSTAsOut=cdbpRealmMessageRouteSTAsOut, cdbpLocalIpAddrTable=cdbpLocalIpAddrTable, cdbpPeerStatsACRsIn=cdbpPeerStatsACRsIn, ciscoDiameterBasePMIBRealmStatsSkippedGroup=ciscoDiameterBasePMIBRealmStatsSkippedGroup, cdbpRealmKnownPeersChosen=cdbpRealmKnownPeersChosen, cdbpLocalApplTable=cdbpLocalApplTable, cdbpRealmMessageRouteType=cdbpRealmMessageRouteType, cdbpPeerStatsASRsIn=cdbpPeerStatsASRsIn, cdbpPeerStatsTransportDown=cdbpPeerStatsTransportDown, cdbpRedundancyInfraState=cdbpRedundancyInfraState, ciscoDiameterBasePMIBPeerCfgGroup=ciscoDiameterBasePMIBPeerCfgGroup, cdbpRealmMessageRouteACAsOut=cdbpRealmMessageRouteACAsOut, cdbpAppAdvFromPeerEntry=cdbpAppAdvFromPeerEntry, ciscoDiaBaseProtEnableTransientFailureNotif=ciscoDiaBaseProtEnableTransientFailureNotif, cdbpLocalConfigReset=cdbpLocalConfigReset, cdbpPeerIpAddress=cdbpPeerIpAddress, cdbpAppAdvToPeerTable=cdbpAppAdvToPeerTable, cdbpPeerStatsTimeoutConnAtmpts=cdbpPeerStatsTimeoutConnAtmpts, cdbpPeerStatsDWRsIn=cdbpPeerStatsDWRsIn, cdbpRealmMessageRouteTable=cdbpRealmMessageRouteTable, cdbpPeerStatsRARsIn=cdbpPeerStatsRARsIn, cdbpPeerStatsACAsOut=cdbpPeerStatsACAsOut, cdbpRealmMessageRouteSTAsIn=cdbpRealmMessageRouteSTAsIn, cdbpPeerStatsASAsOut=cdbpPeerStatsASAsOut, cdbpPeerStatsDPRsOut=cdbpPeerStatsDPRsOut, cdbpPeerVendorTable=cdbpPeerVendorTable, ciscoDiaBaseProtPeerConnectionUpNotif=ciscoDiaBaseProtPeerConnectionUpNotif, cdbpPeerVendorStorageType=cdbpPeerVendorStorageType, cdbpPeerVendorIndex=cdbpPeerVendorIndex, cdbpPeerStatsCERsIn=cdbpPeerStatsCERsIn, cdbpRealmMessageRouteASAsOut=cdbpRealmMessageRouteASAsOut, ciscoDiameterBasePMIBLocalCfgSkippedGroup=ciscoDiameterBasePMIBLocalCfgSkippedGroup, cdbpPeerPortListen=cdbpPeerPortListen, cdbpAppAdvToPeerEntry=cdbpAppAdvToPeerEntry, ciscoDiaBaseProtProtocolErrorNotif=ciscoDiaBaseProtProtocolErrorNotif, ciscoDiameterBasePMIB=ciscoDiameterBasePMIB, cdbpLocalApplIndex=cdbpLocalApplIndex, cdbpAppAdvToPeerStorageType=cdbpAppAdvToPeerStorageType, cdbpLocalVendorStorageType=cdbpLocalVendorStorageType, cdbpPeerIpAddressIndex=cdbpPeerIpAddressIndex, cdbpPeerRowStatus=cdbpPeerRowStatus, cdbpLocalSctpListenPort=cdbpLocalSctpListenPort, cdbpPeerStatsCEAsIn=cdbpPeerStatsCEAsIn)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_union, value_range_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint') (cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (gauge32, object_identity, unsigned32, notification_type, iso, mib_identifier, counter64, counter32, bits, integer32, module_identity, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'ObjectIdentity', 'Unsigned32', 'NotificationType', 'iso', 'MibIdentifier', 'Counter64', 'Counter32', 'Bits', 'Integer32', 'ModuleIdentity', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks') (row_status, storage_type, truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'StorageType', 'TruthValue', 'DisplayString', 'TextualConvention') cisco_diameter_base_pmib = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 133)) ciscoDiameterBasePMIB.setRevisions(('2006-08-24 00:01',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setLastUpdated('200608240001Z') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-aaa@cisco.com') if mibBuilder.loadTexts: ciscoDiameterBasePMIB.setDescription("The MIB module for entities implementing the Diameter Base Protocol. Initial Cisco'ized version of the IETF draft draft-zorn-dime-diameter-base-protocol-mib-00.txt.") cisco_diameter_base_pmib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 0)) cisco_diameter_base_pmib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1)) cisco_diameter_base_pmib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2)) cdbp_local_cfgs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1)) cdbp_local_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2)) cdbp_peer_cfgs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3)) cdbp_peer_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4)) cdbp_realm_cfgs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5)) cdbp_realm_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6)) cdbp_trap_cfgs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7)) cisco_dia_base_prot_enable_protocol_error_notif = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableProtocolErrorNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableProtocolErrorNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtProtocolErrorNotif notification.') cisco_dia_base_prot_protocol_error_notif = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 1)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsProtocolErrors')) if mibBuilder.loadTexts: ciscoDiaBaseProtProtocolErrorNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtProtocolErrorNotif.setDescription('An ciscoDiaBaseProtProtocolErrorNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnableProtocolErrorNotif is true(1) 2) the value of cdbpPeerStatsProtocolErrors changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cisco_dia_base_prot_enable_transient_failure_notif = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableTransientFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnableTransientFailureNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtTransientFailureNotif notification.') cisco_dia_base_prot_transient_failure_notif = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 2)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsTransientFailures')) if mibBuilder.loadTexts: ciscoDiaBaseProtTransientFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtTransientFailureNotif.setDescription('An ciscoDiaBaseProtTransientFailureNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnableTransientFailureNotif is true(1) 2) the value of cdbpPeerStatsTransientFailures changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cisco_dia_base_prot_enable_permanent_failure_notif = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePermanentFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePermanentFailureNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPermanentFailureNotif notification.') cisco_dia_base_prot_permanent_failure_notif = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 3)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsPermanentFailures')) if mibBuilder.loadTexts: ciscoDiaBaseProtPermanentFailureNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPermanentFailureNotif.setDescription('An ciscoDiaBaseProtPermanentFailureNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePermanentFailureNotif is true(1) 2) the value of cdbpPeerStatsPermanentFailures changes. It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cisco_dia_base_prot_enable_peer_connection_down_notif = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 4), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionDownNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionDownNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPeerConnectionDownNotif notification.') cisco_dia_base_prot_peer_connection_down_notif = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 4)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId')) if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionDownNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionDownNotif.setDescription('An ciscoDiaBaseProtPeerConnectionDownNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePeerConnectionDownNotif is true(1) 2) cdbpPeerStatsState changes to closed(1). It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cisco_dia_base_prot_enable_peer_connection_up_notif = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 7, 5), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionUpNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtEnablePeerConnectionUpNotif.setDescription('Setting the value of this object to true(1) enables the ciscoDiaBaseProtPeerConnectionUpNotif notification.') cisco_dia_base_prot_peer_connection_up_notif = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 133, 0, 5)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId')) if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionUpNotif.setStatus('current') if mibBuilder.loadTexts: ciscoDiaBaseProtPeerConnectionUpNotif.setDescription('An ciscoDiaBaseProtPeerConnectionUpNotif notification is sent when both the following conditions are true: 1) the value of ciscoDiaBaseProtEnablePeerConnectionUpNotif is true(1) 2) the value of cdbpPeerStatsState changes to either rOpen(6)or iOpen(7). It can be utilized by an NMS to trigger logical/physical entity table maintenance polls.') cdbp_local_id = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalId.setStatus('current') if mibBuilder.loadTexts: cdbpLocalId.setDescription("The implementation identification string for the Diameter software in use on the system, for example; 'diameterd'") cdbp_local_ip_addr_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2)) if mibBuilder.loadTexts: cdbpLocalIpAddrTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrTable.setDescription("The table listing the Diameter local host's IP Addresses.") cdbp_local_ip_addr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalIpAddrIndex')) if mibBuilder.loadTexts: cdbpLocalIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrEntry.setDescription('A row entry representing a Diameter local host IP Address.') cdbp_local_ip_addr_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalIpAddrIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrIndex.setDescription('A number uniquely identifying the number of IP Addresses supported by this Diameter host.') cdbp_local_ip_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 2), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalIpAddrType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddrType.setDescription('The type of internet address stored in cdbpLocalIpAddress.') cdbp_local_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 2, 1, 3), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalIpAddress.setStatus('current') if mibBuilder.loadTexts: cdbpLocalIpAddress.setDescription('The IP-Address of the host, which is of the type specified in cdbpLocalIpAddrType.') cdbp_local_tcp_listen_port = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalTcpListenPort.setStatus('current') if mibBuilder.loadTexts: cdbpLocalTcpListenPort.setDescription("This object represents Diameter TCP 'listen' port.") cdbp_local_sctp_listen_port = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalSctpListenPort.setStatus('current') if mibBuilder.loadTexts: cdbpLocalSctpListenPort.setDescription("This object represents Diameter SCTP 'listen' port.") cdbp_local_origin_host = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 5), snmp_admin_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cdbpLocalOriginHost.setStatus('current') if mibBuilder.loadTexts: cdbpLocalOriginHost.setDescription('This object represents the Local Origin Host.') cdbp_local_realm = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 6), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalRealm.setStatus('current') if mibBuilder.loadTexts: cdbpLocalRealm.setDescription('This object represents the Local Realm Name.') cdbp_redundancy_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 7), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cdbpRedundancyEnabled.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyEnabled.setDescription('This parameter indicates if cisco redundancy has been enabled, it is enabled if set to true and disabled if set to false.') cdbp_redundancy_infra_state = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=named_values(('rfUnknown', 0), ('rfDisabled', 1), ('rfInitialization', 2), ('rfNegotiation', 3), ('rfStandbyCold', 4), ('rfStandbyConfig', 5), ('rfStandbyFileSys', 6), ('rfStandbyBulk', 7), ('rfStandbyHot', 8), ('rfActiveFast', 9), ('rfActiveDrain', 10), ('rfActivePreconfig', 11), ('rfActivePostconfig', 12), ('rfActive', 13), ('rfActiveExtraload', 14)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRedundancyInfraState.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyInfraState.setDescription("This parameter indicates the current state of cisco redundancy infrastructure state. rfUnknown(0) - unknown state rfDisabled(1) - RF is not functioning at this time rfInitialization(2) - co-ordinating init with platform rfNegotiation(3) - initial negotiation with peer to determine active-standby rfStandbyCold(4) - peer is active, we're cold rfStandbyConfig(5) - sync config from active to standby rfStandbyFileSys(6) - sync file sys from active to standby rfStandbyBulk(7) - clients bulk sync from active to standby rfStandbyHot(8) - standby ready-n-able to be active rfActiveFast(9) - immediate notification of standby going active rfActiveDrain(10) - drain queued messages from peer rfActivePreconfig(11) - active and before config rfActivePostconfig(12) - active and post config rfActive(13) - actively processing new calls rfActiveExtraload(14) - actively processing new calls extra resources other Processing is failed and I have extra load.") cdbp_redundancy_last_switchover = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 9), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRedundancyLastSwitchover.setStatus('current') if mibBuilder.loadTexts: cdbpRedundancyLastSwitchover.setDescription('This object represents the Last Switchover Time.') cdbp_local_appl_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10)) if mibBuilder.loadTexts: cdbpLocalApplTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplTable.setDescription('The table listing the Diameter applications supported by this server.') cdbp_local_appl_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalApplIndex')) if mibBuilder.loadTexts: cdbpLocalApplEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplEntry.setDescription('A row entry representing a Diameter application on this server.') cdbp_local_appl_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalApplIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplIndex.setDescription('A number uniquely identifying a supported Diameter application. Upon reload, cdbpLocalApplIndex values may be changed.') cdbp_local_appl_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 2), storage_type().clone('nonVolatile')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpLocalApplStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpLocalApplStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplStorageType.setDescription('The storage type for this conceptual row. None of the columnar objects is writable when the conceptual row is permanent.') cdbp_local_appl_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 10, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpLocalApplRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpLocalApplRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdsgStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpLocalApplIndex has been set. cdbpLocalApplIndex may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpLocalApplStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpLocalApplStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpLocalApplStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbp_local_vendor_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11)) if mibBuilder.loadTexts: cdbpLocalVendorTable.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorTable.setDescription('The table listing the vendor IDs supported by local Diameter.') cdbp_local_vendor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalVendorIndex')) if mibBuilder.loadTexts: cdbpLocalVendorEntry.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorEntry.setDescription('A row entry representing a vendor ID supported by local Diameter.') cdbp_local_vendor_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpLocalVendorIndex.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorIndex.setDescription('A number uniquely identifying the vendor ID supported by local Diameter. Upon reload, cdbpLocalVendorIndex values may be changed.') cdbp_local_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 9, 10415, 12645))).clone(namedValues=named_values(('diameterVendorIetf', 0), ('diameterVendorCisco', 9), ('diameterVendor3gpp', 10415), ('diameterVendorVodafone', 12645))).clone('diameterVendorIetf')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpLocalVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorId.setDescription('The active vendor ID used for peer connections. diameterVendorIetf(0) - Diameter vendor id ietf diameterVendorCisco(9) - Diameter vendor id cisco diameterVendor3gpp(10415) - Diameter vendor id 3gpp diameterVendorVodafone(12645) - Diameter vendor id vodafone.') cdbp_local_vendor_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 3), storage_type().clone('nonVolatile')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbp_local_vendor_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 11, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpLocalVendorRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpLocalVendorRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpLocalVendorRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpLocalVendorId has been set. cdbpLocalVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpLocalVendorRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpLocalVendorRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpLocalVendorRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbp_app_adv_to_peer_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12)) if mibBuilder.loadTexts: cdbpAppAdvToPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerTable.setDescription('The table listing the applications advertised by this host to each peer and the types of service supported: accounting, authentication or both.') cdbp_app_adv_to_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvToPeerVendorId'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvToPeerIndex')) if mibBuilder.loadTexts: cdbpAppAdvToPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbp_app_adv_to_peer_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvToPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerVendorId.setDescription('The IANA Enterprise Code value assigned to the vendor of the Diameter device.') cdbp_app_adv_to_peer_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvToPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerIndex.setDescription('A number uniquely identifying the Diameter applications advertised as supported by this host to each peer. Upon reload, cdbpAppAdvToPeerIndex values may be changed.') cdbp_app_adv_to_peer_services = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('acct', 1), ('auth', 2), ('both', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpAppAdvToPeerServices.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerServices.setDescription('The type of services supported for each application, accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbp_app_adv_to_peer_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 4), storage_type().clone('nonVolatile')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbp_app_adv_to_peer_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 1, 12, 1, 5), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpAppAdvToPeerRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvToPeerRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpAppAdvToPeerRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpAppAdvToPeerVendorId has been set. cdbpAppAdvToPeerVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpAppAdvToPeerRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpAppAdvToPeerRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpAppAdvToPeerRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbp_local_stats_total_packets_in = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 1), counter32()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsIn.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsIn.setDescription('The total number of packets received by Diameter Base Protocol.') cdbp_local_stats_total_packets_out = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 2), counter32()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsOut.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalPacketsOut.setDescription('The total number of packets transmitted by Diameter Base Protocol.') cdbp_local_stats_total_up_time = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalStatsTotalUpTime.setStatus('current') if mibBuilder.loadTexts: cdbpLocalStatsTotalUpTime.setDescription('This object represents the total time the Diameter server has been up until now.') cdbp_local_reset_time = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 4), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpLocalResetTime.setStatus('current') if mibBuilder.loadTexts: cdbpLocalResetTime.setDescription("If the server keeps persistent state (e.g., a process) and supports a 'reset' operation (e.g., can be told to re-read configuration files), this value will be the time elapsed (in hundredths of a second) since the server was 'reset'. For software that does not have persistence or does not support a 'reset' operation, this value will be zero.") cdbp_local_config_reset = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 2, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('reset', 2), ('initializing', 3), ('running', 4))).clone('other')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cdbpLocalConfigReset.setStatus('current') if mibBuilder.loadTexts: cdbpLocalConfigReset.setDescription('Status/action object to reinitialize any persistent server state. When set to reset(2), any persistent server state (such as a process) is reinitialized as if the server had just been started. This value will never be returned by a read operation. When read, one of the following values will be returned: other(1) - server in some unknown state. reset(2) - command to reinitialize server state. initializing(3) - server (re)initializing. running(4) - server currently running.') cdbp_peer_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1)) if mibBuilder.loadTexts: cdbpPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerTable.setDescription('The table listing information regarding the discovered or configured Diameter peer servers.') cdbp_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex')) if mibBuilder.loadTexts: cdbpPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbp_peer_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIndex.setDescription('A number uniquely identifying each Diameter peer with which the host server communicates. Upon reload, cdbpPeerIndex values may be changed.') cdbp_peer_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 2), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerId.setStatus('current') if mibBuilder.loadTexts: cdbpPeerId.setDescription('The server identifier for the Diameter peer. It must be unique and non-empty.') cdbp_peer_port_connect = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerPortConnect.setStatus('current') if mibBuilder.loadTexts: cdbpPeerPortConnect.setDescription('The connection port this server used to connect to the Diameter peer. If there is no active connection, this value will be zero(0).') cdbp_peer_port_listen = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(3868)).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerPortListen.setStatus('current') if mibBuilder.loadTexts: cdbpPeerPortListen.setDescription('The port the server is listening on.') cdbp_peer_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('tcp', 1), ('sctp', 2))).clone('tcp')).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerProtocol.setStatus('current') if mibBuilder.loadTexts: cdbpPeerProtocol.setDescription('The transport protocol (tcp/sctp) the Diameter peer is using. tcp(1) - Transmission Control Protocol sctp(2) - Stream Control Transmission Protocol.') cdbp_peer_security = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('tls', 2), ('ipsec', 3))).clone('other')).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerSecurity.setStatus('current') if mibBuilder.loadTexts: cdbpPeerSecurity.setDescription('The security the Diameter peer is using. other(1) - Unknown Security Protocol. tls(2) - Transport Layer Security Protocol. ipsec(3) - Internet Protocol Security.') cdbp_peer_firmware_revision = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerFirmwareRevision.setStatus('current') if mibBuilder.loadTexts: cdbpPeerFirmwareRevision.setDescription('Firmware revision of peer. If no firmware revision, the revision of the Diameter software module may be reported instead.') cdbp_peer_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 8), storage_type().clone('nonVolatile')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpPeerStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStorageType.setDescription('The storage type for this conceptual row. Only cdbpPeerPortListen object is writable when the conceptual row is permanent.') cdbp_peer_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 1, 1, 9), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpPeerRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpPeerId has been set. cdbpPeerId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpPeerRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpPeerRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpPeerRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbp_peer_ip_addr_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2)) if mibBuilder.loadTexts: cdbpPeerIpAddrTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddrTable.setDescription('The table listing the Diameter server IP Addresses.') cdbp_peer_ip_addr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIpAddressIndex')) if mibBuilder.loadTexts: cdbpPeerIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddrEntry.setDescription('A row entry representing peer Diameter server IP Addresses.') cdbp_peer_ip_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerIpAddressIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddressIndex.setDescription('A number uniquely identifying the number of IP Addresses supported by all Diameter peers.') cdbp_peer_ip_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 2), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerIpAddressType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddressType.setDescription('The type of address stored in diameterPeerIpAddress.') cdbp_peer_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 2, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cdbpPeerIpAddress.setStatus('current') if mibBuilder.loadTexts: cdbpPeerIpAddress.setDescription('The active IP Address(es) used for connections.') cdbp_app_adv_from_peer_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3)) if mibBuilder.loadTexts: cdbpAppAdvFromPeerTable.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerTable.setDescription('The table listing the applications advertised by each peer to this host and the types of service supported: accounting, authentication or both.') cdbp_app_adv_from_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvFromPeerVendorId'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvFromPeerIndex')) if mibBuilder.loadTexts: cdbpAppAdvFromPeerEntry.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerEntry.setDescription('A row entry representing a discovered or configured Diameter peer server.') cdbp_app_adv_from_peer_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvFromPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerVendorId.setDescription('The IANA Enterprise Code value assigned to the vendor of the Diameter device.') cdbp_app_adv_from_peer_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpAppAdvFromPeerIndex.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerIndex.setDescription('A number uniquely identifying the applications advertised as supported from each Diameter peer.') cdbp_app_adv_from_peer_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('acct', 1), ('auth', 2), ('both', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpAppAdvFromPeerType.setStatus('current') if mibBuilder.loadTexts: cdbpAppAdvFromPeerType.setDescription('The type of services supported for each application, accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbp_peer_vendor_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4)) if mibBuilder.loadTexts: cdbpPeerVendorTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorTable.setDescription('The table listing the Vendor IDs supported by the peer.') cdbp_peer_vendor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerVendorIndex')) if mibBuilder.loadTexts: cdbpPeerVendorEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorEntry.setDescription('A row entry representing a Vendor ID supported by the peer.') cdbp_peer_vendor_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpPeerVendorIndex.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorIndex.setDescription('A number uniquely identifying the Vendor ID supported by the peer. Upon reload, cdbpPeerVendorIndex values may be changed.') cdbp_peer_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 9, 10415, 12645))).clone(namedValues=named_values(('diameterVendorIetf', 0), ('diameterVendorCisco', 9), ('diameterVendor3gpp', 10415), ('diameterVendorVodafone', 12645))).clone('diameterVendorIetf')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerVendorId.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorId.setDescription('The active vendor ID used for peer connections. diameterVendorIetf(0) - Diameter vendor id ietf diameterVendorCisco(9) - Diameter vendor id cisco diameterVendor3gpp(10415) - Diameter vendor id 3gpp diameterVendorVodafone(12645) - Diameter vendor id vodafone.') cdbp_peer_vendor_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 3), storage_type().clone('nonVolatile')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setReference('Textual Conventions for SMIv2, Section 2.') if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorStorageType.setDescription('The storage type for this conceptual row. None of the objects are writable when the conceptual row is permanent.') cdbp_peer_vendor_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 3, 4, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cdbpPeerVendorRowStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerVendorRowStatus.setDescription("The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the cdbpPeerVendorRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding cdbpPeerVendorId has been set. Also, a newly created row cannot be made active until the corresponding 'cdbpPeerIndex' has been set. cdbpPeerVendorId may not be modified while the value of this object is active(1): An attempt to set these objects while the value of cdbpPeerVendorRowStatus is active(1) will result in an inconsistentValue error. Entries in this table with cdbpPeerVendorRowStatus equal to active(1) remain in the table until destroyed. Entries in this table with cdbpPeerVendorRowStatus equal to values other than active(1) will be destroyed after timeout (5 minutes).") cdbp_peer_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1)) if mibBuilder.loadTexts: cdbpPeerStatsTable.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTable.setDescription('The table listing the Diameter peer statistics.') cdbp_peer_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIndex')) if mibBuilder.loadTexts: cdbpPeerStatsEntry.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsEntry.setDescription('A row entry representing a Diameter peer.') cdbp_peer_stats_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('closed', 1), ('waitConnAck', 2), ('waitICEA', 3), ('elect', 4), ('waitReturns', 5), ('rOpen', 6), ('iOpen', 7), ('closing', 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsState.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsState.setDescription('Connection state in the Peer State Machine of the peer with which this Diameter server is communicating. closed(1) - Connection closed with this peer. waitConnAck(2) - Waiting for an acknowledgment from this peer. waitICEA(3) - Waiting for a Capabilities-Exchange- Answer from this peer. elect(4) - When the peer and the server are both trying to bring up a connection with each other at the same time. An election process begins which determines which socket remains open. waitReturns(5) - Waiting for election returns. r-open(6) - Responder transport connection is used for communication. i-open(7) - Initiator transport connection is used for communication. closing(8) - Actively closing and doing cleanup.') cdbp_peer_stats_state_duration = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 2), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsStateDuration.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsStateDuration.setDescription('This object represents the Peer state duration.') cdbp_peer_stats_last_disc_cause = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('rebooting', 1), ('busy', 2), ('doNotWantToTalk', 3), ('election', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsLastDiscCause.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsLastDiscCause.setDescription("The last cause for a peers disconnection. rebooting(1) - A scheduled reboot is imminent. busy(2) - The peer's internal resources are constrained, and it has determined that the transport connection needs to be shutdown. doNotWantToTalk(3) - The peer has determined that it does not see a need for the transport connection to exist, since it does not expect any messages to be exchanged in the foreseeable future. electionLost(4) - The peer has determined that it has lost the election process and has therefore disconnected the transport connection.") cdbp_peer_stats_who_init_disconnect = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('host', 1), ('peer', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsWhoInitDisconnect.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsWhoInitDisconnect.setDescription('Did the host or peer initiate the disconnect? host(1) - If this server initiated the disconnect. peer(2) - If the peer with which this server was connected initiated the disconnect.') cdbp_peer_stats_dw_current_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('okay', 1), ('suspect', 2), ('down', 3), ('reopen', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWCurrentStatus.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWCurrentStatus.setDescription('This object indicates the connection status. okay(1) - Indicates the connection is presumed working. suspect(2) - Indicates the connection is possibly congested or down. down(3) - The peer is no longer reachable, causing the transport connection to be shutdown. reopen(4) - Three watchdog messages are exchanged with accepted round trip times, and the connection to the peer is considered stabilized.') cdbp_peer_stats_timeout_conn_atmpts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 6), counter32()).setUnits('attempts').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsTimeoutConnAtmpts.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTimeoutConnAtmpts.setDescription('If there is no transport connection with a peer, this is the number of times the server attempts to connect to that peer. This is reset on disconnection.') cdbp_peer_stats_as_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 7), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsASRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASRsIn.setDescription('Abort-Session-Request messages received from the peer.') cdbp_peer_stats_as_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 8), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsASRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASRsOut.setDescription('Abort-Session-Request messages sent to the peer.') cdbp_peer_stats_as_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 9), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsASAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASAsIn.setDescription('Number of Abort-Session-Answer messages received from the peer.') cdbp_peer_stats_as_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 10), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsASAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsASAsOut.setDescription('Number of Abort-Session-Answer messages sent to the peer.') cdbp_peer_stats_ac_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 11), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsACRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACRsIn.setDescription('Number of Accounting-Request messages received from the peer.') cdbp_peer_stats_ac_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 12), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsACRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACRsOut.setDescription('Number of Accounting-Request messages sent to the peer.') cdbp_peer_stats_ac_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 13), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsACAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACAsIn.setDescription('Number of Accounting-Answer messages received from the peer.') cdbp_peer_stats_ac_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 14), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsACAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsACAsOut.setDescription('Number of Accounting-Answer messages sent to the peer.') cdbp_peer_stats_ce_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 15), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsCERsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCERsIn.setDescription('Number of Capabilities-Exchange-Request messages received from the peer.') cdbp_peer_stats_ce_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 16), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsCERsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCERsOut.setDescription('Number of Capabilities-Exchange-Request messages sent to the peer.') cdbp_peer_stats_ce_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 17), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsCEAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCEAsIn.setDescription('Number of Capabilities-Exchange-Answer messages received from the peer.') cdbp_peer_stats_ce_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 18), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsCEAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsCEAsOut.setDescription('Number of Capabilities-Exchange-Answer messages sent to the peer.') cdbp_peer_stats_dw_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 19), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWRsIn.setDescription('Number of Device-Watchdog-Request messages received from the peer.') cdbp_peer_stats_dw_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 20), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWRsOut.setDescription('Number of Device-Watchdog-Request messages sent to the peer.') cdbp_peer_stats_dw_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 21), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWAsIn.setDescription('Number of Device-Watchdog-Answer messages received from the peer.') cdbp_peer_stats_dw_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 22), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWAsOut.setDescription('Number of Device-Watchdog-Answer messages sent to the peer.') cdbp_peer_stats_dp_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 23), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDPRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPRsIn.setDescription('Number of Disconnect-Peer-Request messages received.') cdbp_peer_stats_dp_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 24), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDPRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPRsOut.setDescription('Number of Disconnect-Peer-Request messages sent.') cdbp_peer_stats_dp_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 25), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDPAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPAsIn.setDescription('Number of Disconnect-Peer-Answer messages received.') cdbp_peer_stats_dp_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 26), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDPAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDPAsOut.setDescription('Number of Disconnect-Peer-Answer messages sent.') cdbp_peer_stats_ra_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 27), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsRARsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRARsIn.setDescription('Number of Re-Auth-Request messages received.') cdbp_peer_stats_ra_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 28), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsRARsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRARsOut.setDescription('Number of Re-Auth-Request messages sent.') cdbp_peer_stats_ra_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 29), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsRAAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRAAsIn.setDescription('Number of Re-Auth-Answer messages received.') cdbp_peer_stats_ra_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 30), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsRAAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRAAsOut.setDescription('Number of Re-Auth-Answer messages sent.') cdbp_peer_stats_st_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 31), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsSTRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTRsIn.setDescription('Number of Session-Termination-Request messages received from the peer.') cdbp_peer_stats_st_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 32), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsSTRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTRsOut.setDescription('Number of Session-Termination-Request messages sent to the peer.') cdbp_peer_stats_st_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 33), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsSTAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTAsIn.setDescription('Number of Session-Termination-Answer messages received from the peer.') cdbp_peer_stats_st_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 34), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsSTAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsSTAsOut.setDescription('Number of Session-Termination-Answer messages sent to the peer.') cdbp_peer_stats_dw_req_timer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 35), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsDWReqTimer.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsDWReqTimer.setDescription('Device-Watchdog Request Timer, which is the interval between packets sent to peers.') cdbp_peer_stats_redirect_events = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 36), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsRedirectEvents.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsRedirectEvents.setDescription('Redirect Event count, which is the number of redirects sent from a peer.') cdbp_peer_stats_acc_dup_requests = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 37), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsAccDupRequests.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccDupRequests.setDescription('The number of duplicate Diameter Accounting-Request packets received.') cdbp_peer_stats_malformed_reqsts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 38), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsMalformedReqsts.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsMalformedReqsts.setDescription('The number of malformed Diameter packets received.') cdbp_peer_stats_accs_not_recorded = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 39), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsAccsNotRecorded.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccsNotRecorded.setDescription('The number of Diameter Accounting-Request packets which were received and responded to but not recorded.') cdbp_peer_stats_acc_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 40), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsAccRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccRetrans.setDescription('The number of Diameter Accounting-Request packets retransmitted to this Diameter server.') cdbp_peer_stats_total_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 41), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsTotalRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTotalRetrans.setDescription('The number of Diameter packets retransmitted to this Diameter server, not to include Diameter Accounting-Request packets retransmitted.') cdbp_peer_stats_acc_pend_reqsts_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 42), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsAccPendReqstsOut.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccPendReqstsOut.setDescription('The number of Diameter Accounting-Request packets sent to this peer that have not yet timed out or received a response. This variable is incremented when an Accounting-Request is sent to this server and decremented due to receipt of an Accounting-Response, a timeout or a retransmission.') cdbp_peer_stats_acc_reqsts_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 43), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsAccReqstsDropped.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsAccReqstsDropped.setDescription('The number of Accounting-Requests to this server that have been dropped.') cdbp_peer_stats_h_by_h_drop_messages = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 44), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsHByHDropMessages.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsHByHDropMessages.setDescription('An answer message that is received with an unknown hop-by-hop identifier. Does not include accounting requests dropped.') cdbp_peer_stats_e_to_e_dup_messages = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 45), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsEToEDupMessages.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsEToEDupMessages.setDescription('Duplicate answer messages that are to be locally consumed. Does not include duplicate accounting requests received.') cdbp_peer_stats_unknown_types = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 46), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsUnknownTypes.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsUnknownTypes.setDescription('The number of Diameter packets of unknown type which were received.') cdbp_peer_stats_protocol_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 47), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsProtocolErrors.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsProtocolErrors.setDescription('This object represents the Number of protocol errors returned to peer, but not including redirects.') cdbp_peer_stats_transient_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 48), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsTransientFailures.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTransientFailures.setDescription('This object represents the transient failure count.') cdbp_peer_stats_permanent_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 49), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsPermanentFailures.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsPermanentFailures.setDescription('This object represents the Number of permanent failures returned to peer.') cdbp_peer_stats_transport_down = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 4, 1, 1, 50), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpPeerStatsTransportDown.setStatus('current') if mibBuilder.loadTexts: cdbpPeerStatsTransportDown.setDescription('This object represents the Number of unexpected transport failures.') cdbp_realm_known_peers_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1)) if mibBuilder.loadTexts: cdbpRealmKnownPeersTable.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersTable.setDescription('The table listing the Diameter realms and known peers.') cdbp_realm_known_peers_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteIndex'), (0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmKnownPeersIndex')) if mibBuilder.loadTexts: cdbpRealmKnownPeersEntry.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersEntry.setDescription('A row entry representing a Diameter realm and known peers.') cdbp_realm_known_peers_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpRealmKnownPeersIndex.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersIndex.setDescription('A number uniquely identifying a peer known to this realm. Upon reload, cdbpRealmKnownPeersIndex values may be changed.') cdbp_realm_known_peers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmKnownPeers.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeers.setDescription('The index of the peer this realm knows about. This is an ordered list, where the ordering signifies the order in which the peers are tried. Same as the cdbpPeerIndex') cdbp_realm_known_peers_chosen = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('roundRobin', 1), ('loadBalance', 2), ('firstPreferred', 3), ('mostRecentFirst', 4), ('other', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmKnownPeersChosen.setStatus('current') if mibBuilder.loadTexts: cdbpRealmKnownPeersChosen.setDescription('How the realm chooses which peer to send packets to. roundRobin(1) - The peer used for each transaction is selected based on the order in which peers are configured. loadBalance(2) - The peer used for each transaction is based on the load metric (maybe implementation dependent) of all peers defined for the realm, with the least loaded server selected first. firstPreferred(3) - The first defined server is always used for transactions unless failover occurs. mostRecentFirst(4) - The most recently used server is used first for each transaction.') cdbp_realm_message_route_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1)) if mibBuilder.loadTexts: cdbpRealmMessageRouteTable.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteTable.setDescription('The table listing the Diameter realm-based message route information.') cdbp_realm_message_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1)).setIndexNames((0, 'CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteIndex')) if mibBuilder.loadTexts: cdbpRealmMessageRouteEntry.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteEntry.setDescription('A row entry representing a Diameter realm based message route server.') cdbp_realm_message_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: cdbpRealmMessageRouteIndex.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteIndex.setDescription('A number uniquely identifying each realm.') cdbp_realm_message_route_realm = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteRealm.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRealm.setDescription('This object represents the realm name') cdbp_realm_message_route_app = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteApp.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteApp.setDescription('Application id used to route packets to this realm.') cdbp_realm_message_route_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('acct', 1), ('auth', 2), ('both', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteType.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteType.setDescription('The types of service supported for each realm application: accounting, authentication or both. acct(1) - accounting auth(2) - authentication both(3) - both accounting and authentication.') cdbp_realm_message_route_action = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('local', 1), ('relay', 2), ('proxy', 3), ('redirect', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteAction.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAction.setDescription('The action is used to identify how a message should be treated based on the realm, application and type. local(1) - Diameter messages that resolve to a route entry with the Local Action set to Local can be satisfied locally, and do not need to be routed to another server. relay(2) - All Diameter messages that fall within this category MUST be routed to a next-hop server, without modifying any non-routing AVPs. proxy(3) - All Diameter messages that fall within this category MUST be routed to a next-hop server. redirect(4) - Diameter messages that fall within this category MUST have the identity of the home Diameter server(s) appended, and returned to the sender of the message.') cdbp_realm_message_route_ac_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 6), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsIn.setDescription('Number of Accounting-Request messages received from the realm.') cdbp_realm_message_route_ac_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 7), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACRsOut.setDescription('Number of Accounting-Request messages sent to the realm.') cdbp_realm_message_route_ac_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 8), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsIn.setDescription('Number of Accounting-Answer messages received from the realm.') cdbp_realm_message_route_ac_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 9), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteACAsOut.setDescription('Number of Accounting-Answer messages sent to the realm.') cdbp_realm_message_route_ra_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 10), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsIn.setDescription('Number of Re-Auth-Request messages received from the realm.') cdbp_realm_message_route_ra_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 11), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRARsOut.setDescription('Number of Re-Auth-Request messages sent to the realm.') cdbp_realm_message_route_ra_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 12), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsIn.setDescription('Number of Re-Auth-Answer messages received from the realm.') cdbp_realm_message_route_ra_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 13), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteRAAsOut.setDescription('Number of Re-Auth-Answer messages sent to the realm.') cdbp_realm_message_route_st_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 14), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsIn.setDescription('Number of Session-Termination-Request messages received from the realm.') cdbp_realm_message_route_st_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 15), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTRsOut.setDescription('Number of Session-Termination-Request messages sent to the realm.') cdbp_realm_message_route_st_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 16), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsIn.setDescription('Number of Session-Termination-Answer messages received from the realm.') cdbp_realm_message_route_st_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 17), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteSTAsOut.setDescription('Number of Session-Termination-Answer messages sent to the realm.') cdbp_realm_message_route_as_rs_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 18), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsIn.setDescription('Number of Abort-Session-Request messages received from the realm.') cdbp_realm_message_route_as_rs_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 19), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASRsOut.setDescription('Number of Abort-Session-Request messages sent to the realm.') cdbp_realm_message_route_as_as_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 20), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsIn.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsIn.setDescription('Number of Abort-Session-Answer messages received from the realm.') cdbp_realm_message_route_as_as_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 21), counter32()).setUnits('messages').setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteASAsOut.setDescription('Number of Abort-Session-Answer messages sent to the realm.') cdbp_realm_message_route_acc_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccRetrans.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccRetrans.setDescription('The number of Diameter accounting packets retransmitted to this realm.') cdbp_realm_message_route_acc_dup_reqsts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccDupReqsts.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteAccDupReqsts.setDescription('The number of duplicate Diameter accounting packets sent to this realm.') cdbp_realm_message_route_pend_reqsts_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 24), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRoutePendReqstsOut.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRoutePendReqstsOut.setDescription('The number of Diameter Accounting-Request packets sent to this peer that have not yet timed out or received a response. This variable is incremented when an Accounting-Request is sent to this server and decremented due to receipt of an Accounting-Response, a timeout or a retransmission.') cdbp_realm_message_route_reqsts_drop = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 133, 1, 6, 1, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cdbpRealmMessageRouteReqstsDrop.setStatus('current') if mibBuilder.loadTexts: cdbpRealmMessageRouteReqstsDrop.setDescription('The number of requests dropped by this realm.') cisco_diameter_base_pmib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 1)) cisco_diameter_base_pmib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2)) cisco_diameter_base_pmib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 1, 1)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBLocalCfgGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBPeerCfgGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBPeerStatsGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBNotificationsGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBTrapCfgGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBLocalCfgSkippedGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBLocalStatsSkippedGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBPeerCfgSkippedGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBPeerStatsSkippedGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBRealmCfgSkippedGroup'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiameterBasePMIBRealmStatsSkippedGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_compliance = ciscoDiameterBasePMIBCompliance.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBCompliance.setDescription('The compliance statement for Diameter Base Protocol entities.') cisco_diameter_base_pmib_local_cfg_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 1)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalRealm'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRedundancyEnabled'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRedundancyInfraState'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRedundancyLastSwitchover'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalOriginHost'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalVendorId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalVendorStorageType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalVendorRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_local_cfg_group = ciscoDiameterBasePMIBLocalCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalCfgGroup.setDescription('A collection of objects providing configuration common to the server.') cisco_diameter_base_pmib_peer_cfg_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 2)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerPortConnect'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerPortListen'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerProtocol'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerSecurity'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerFirmwareRevision'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStorageType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerRowStatus'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIpAddressType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerIpAddress'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerVendorId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerVendorStorageType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerVendorRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_peer_cfg_group = ciscoDiameterBasePMIBPeerCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerCfgGroup.setDescription('A collection of objects providing configuration of the Diameter peers.') cisco_diameter_base_pmib_peer_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 3)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsState'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsStateDuration'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsLastDiscCause'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsWhoInitDisconnect'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWCurrentStatus'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsTimeoutConnAtmpts'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsASRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsASRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsASAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsASAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsACRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsACRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsACAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsACAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsCERsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsCERsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsCEAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsCEAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDPRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDPRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDPAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDPAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRARsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRARsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRAAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRAAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsSTRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsSTRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsSTAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsSTAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWReqTimer'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRedirectEvents'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccDupRequests'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsMalformedReqsts'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccsNotRecorded'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccRetrans'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsTotalRetrans'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccPendReqstsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccReqstsDropped'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsHByHDropMessages'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsEToEDupMessages'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsUnknownTypes'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsProtocolErrors'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsTransientFailures'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsPermanentFailures'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsTransportDown')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_peer_stats_group = ciscoDiameterBasePMIBPeerStatsGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerStatsGroup.setDescription('A collection of objects providing statistics of the Diameter peers.') cisco_diameter_base_pmib_notifications_group = notification_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 4)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtProtocolErrorNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtTransientFailureNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtPermanentFailureNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtPeerConnectionDownNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtPeerConnectionUpNotif')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_notifications_group = ciscoDiameterBasePMIBNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBNotificationsGroup.setDescription('The set of notifications which an agent is required to implement.') cisco_diameter_base_pmib_trap_cfg_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 5)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtEnableProtocolErrorNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtEnableTransientFailureNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtEnablePermanentFailureNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtEnablePeerConnectionDownNotif'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'ciscoDiaBaseProtEnablePeerConnectionUpNotif')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_trap_cfg_group = ciscoDiameterBasePMIBTrapCfgGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBTrapCfgGroup.setDescription('A collection of objects providing configuration for base protocol notifications.') cisco_diameter_base_pmib_local_cfg_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 6)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalId'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalIpAddrType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalIpAddress'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalTcpListenPort'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalSctpListenPort'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalPacketsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalPacketsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalUpTime'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalResetTime'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalConfigReset'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalApplStorageType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalApplRowStatus'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvToPeerServices'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvToPeerStorageType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvToPeerRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_local_cfg_skipped_group = ciscoDiameterBasePMIBLocalCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalCfgSkippedGroup.setDescription('A collection of objects providing configuration common to the server.') cisco_diameter_base_pmib_local_stats_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 7)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalPacketsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalPacketsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalStatsTotalUpTime'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalResetTime'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpLocalConfigReset')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_local_stats_skipped_group = ciscoDiameterBasePMIBLocalStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBLocalStatsSkippedGroup.setDescription('A collection of objects providing statistics common to the server.') cisco_diameter_base_pmib_peer_cfg_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 8)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpAppAdvFromPeerType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_peer_cfg_skipped_group = ciscoDiameterBasePMIBPeerCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerCfgSkippedGroup.setDescription('A collection of objects providing configuration for Diameter peers.') cisco_diameter_base_pmib_peer_stats_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 9)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWCurrentStatus'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsDWReqTimer'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsRedirectEvents'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsAccDupRequests'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpPeerStatsEToEDupMessages')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_peer_stats_skipped_group = ciscoDiameterBasePMIBPeerStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBPeerStatsSkippedGroup.setDescription('A collection of objects providing statistics of Diameter peers.') cisco_diameter_base_pmib_realm_cfg_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 10)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmKnownPeers'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmKnownPeersChosen')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_realm_cfg_skipped_group = ciscoDiameterBasePMIBRealmCfgSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBRealmCfgSkippedGroup.setDescription('A collection of objects providing configuration for realm message routing.') cisco_diameter_base_pmib_realm_stats_skipped_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 133, 2, 2, 11)).setObjects(('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteRealm'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteApp'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteType'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteAction'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteACRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteACRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteACAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteACAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteRARsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteRARsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteRAAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteRAAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteSTRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteSTRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteSTAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteSTAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteASRsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteASRsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteASAsIn'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteASAsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteAccRetrans'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteAccDupReqsts'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRoutePendReqstsOut'), ('CISCO-DIAMETER-BASE-PROTOCOL-MIB', 'cdbpRealmMessageRouteReqstsDrop')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_diameter_base_pmib_realm_stats_skipped_group = ciscoDiameterBasePMIBRealmStatsSkippedGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDiameterBasePMIBRealmStatsSkippedGroup.setDescription('A collection of objects providing statistics of realm message routing.') mibBuilder.exportSymbols('CISCO-DIAMETER-BASE-PROTOCOL-MIB', cdbpRealmMessageRouteACRsIn=cdbpRealmMessageRouteACRsIn, cdbpRealmStats=cdbpRealmStats, ciscoDiameterBasePMIBCompliance=ciscoDiameterBasePMIBCompliance, cdbpPeerStatsSTAsOut=cdbpPeerStatsSTAsOut, cdbpPeerProtocol=cdbpPeerProtocol, cdbpPeerTable=cdbpPeerTable, ciscoDiaBaseProtPeerConnectionDownNotif=ciscoDiaBaseProtPeerConnectionDownNotif, cdbpLocalVendorIndex=cdbpLocalVendorIndex, cdbpPeerStatsDWReqTimer=cdbpPeerStatsDWReqTimer, cdbpPeerStatsACAsIn=cdbpPeerStatsACAsIn, cdbpPeerStatsDWRsOut=cdbpPeerStatsDWRsOut, ciscoDiaBaseProtEnablePeerConnectionDownNotif=ciscoDiaBaseProtEnablePeerConnectionDownNotif, cdbpPeerStatsDPAsIn=cdbpPeerStatsDPAsIn, cdbpPeerId=cdbpPeerId, cdbpAppAdvFromPeerTable=cdbpAppAdvFromPeerTable, cdbpRealmMessageRouteSTRsIn=cdbpRealmMessageRouteSTRsIn, cdbpRealmMessageRouteApp=cdbpRealmMessageRouteApp, cdbpLocalVendorEntry=cdbpLocalVendorEntry, cdbpRealmMessageRouteAccDupReqsts=cdbpRealmMessageRouteAccDupReqsts, cdbpAppAdvToPeerVendorId=cdbpAppAdvToPeerVendorId, cdbpLocalIpAddrType=cdbpLocalIpAddrType, cdbpPeerSecurity=cdbpPeerSecurity, ciscoDiaBaseProtTransientFailureNotif=ciscoDiaBaseProtTransientFailureNotif, cdbpPeerStatsAccPendReqstsOut=cdbpPeerStatsAccPendReqstsOut, ciscoDiameterBasePMIBLocalCfgGroup=ciscoDiameterBasePMIBLocalCfgGroup, cdbpRealmMessageRouteRealm=cdbpRealmMessageRouteRealm, cdbpPeerEntry=cdbpPeerEntry, cdbpRedundancyLastSwitchover=cdbpRedundancyLastSwitchover, cdbpRealmMessageRouteAction=cdbpRealmMessageRouteAction, cdbpPeerIpAddrTable=cdbpPeerIpAddrTable, cdbpPeerStatsSTAsIn=cdbpPeerStatsSTAsIn, cdbpRealmCfgs=cdbpRealmCfgs, cdbpPeerStatsTransientFailures=cdbpPeerStatsTransientFailures, cdbpRealmKnownPeersIndex=cdbpRealmKnownPeersIndex, cdbpLocalVendorTable=cdbpLocalVendorTable, cdbpPeerStorageType=cdbpPeerStorageType, cdbpAppAdvFromPeerVendorId=cdbpAppAdvFromPeerVendorId, cdbpPeerStatsRAAsOut=cdbpPeerStatsRAAsOut, cdbpLocalId=cdbpLocalId, ciscoDiameterBasePMIBNotifs=ciscoDiameterBasePMIBNotifs, ciscoDiameterBasePMIBGroups=ciscoDiameterBasePMIBGroups, cdbpPeerStats=cdbpPeerStats, cdbpRealmMessageRouteASRsOut=cdbpRealmMessageRouteASRsOut, cdbpRealmMessageRouteAccRetrans=cdbpRealmMessageRouteAccRetrans, cdbpAppAdvToPeerServices=cdbpAppAdvToPeerServices, cdbpPeerStatsACRsOut=cdbpPeerStatsACRsOut, cdbpRedundancyEnabled=cdbpRedundancyEnabled, cdbpPeerVendorRowStatus=cdbpPeerVendorRowStatus, cdbpPeerStatsUnknownTypes=cdbpPeerStatsUnknownTypes, ciscoDiameterBasePMIBCompliances=ciscoDiameterBasePMIBCompliances, cdbpPeerStatsEToEDupMessages=cdbpPeerStatsEToEDupMessages, cdbpPeerVendorEntry=cdbpPeerVendorEntry, ciscoDiaBaseProtEnableProtocolErrorNotif=ciscoDiaBaseProtEnableProtocolErrorNotif, cdbpPeerStatsTable=cdbpPeerStatsTable, cdbpPeerIpAddrEntry=cdbpPeerIpAddrEntry, ciscoDiameterBasePMIBConform=ciscoDiameterBasePMIBConform, cdbpPeerStatsSTRsOut=cdbpPeerStatsSTRsOut, cdbpRealmMessageRouteIndex=cdbpRealmMessageRouteIndex, cdbpAppAdvToPeerIndex=cdbpAppAdvToPeerIndex, ciscoDiameterBasePMIBPeerStatsGroup=ciscoDiameterBasePMIBPeerStatsGroup, ciscoDiaBaseProtEnablePeerConnectionUpNotif=ciscoDiaBaseProtEnablePeerConnectionUpNotif, cdbpLocalApplRowStatus=cdbpLocalApplRowStatus, ciscoDiaBaseProtEnablePermanentFailureNotif=ciscoDiaBaseProtEnablePermanentFailureNotif, ciscoDiameterBasePMIBPeerStatsSkippedGroup=ciscoDiameterBasePMIBPeerStatsSkippedGroup, PYSNMP_MODULE_ID=ciscoDiameterBasePMIB, ciscoDiameterBasePMIBObjects=ciscoDiameterBasePMIBObjects, cdbpLocalRealm=cdbpLocalRealm, cdbpLocalVendorId=cdbpLocalVendorId, cdbpLocalResetTime=cdbpLocalResetTime, ciscoDiameterBasePMIBRealmCfgSkippedGroup=ciscoDiameterBasePMIBRealmCfgSkippedGroup, cdbpPeerStatsDPRsIn=cdbpPeerStatsDPRsIn, cdbpPeerStatsEntry=cdbpPeerStatsEntry, cdbpPeerStatsAccDupRequests=cdbpPeerStatsAccDupRequests, cdbpRealmMessageRoutePendReqstsOut=cdbpRealmMessageRoutePendReqstsOut, cdbpTrapCfgs=cdbpTrapCfgs, ciscoDiameterBasePMIBTrapCfgGroup=ciscoDiameterBasePMIBTrapCfgGroup, cdbpAppAdvFromPeerType=cdbpAppAdvFromPeerType, cdbpPeerIndex=cdbpPeerIndex, cdbpPeerVendorId=cdbpPeerVendorId, cdbpAppAdvToPeerRowStatus=cdbpAppAdvToPeerRowStatus, cdbpLocalStatsTotalPacketsOut=cdbpLocalStatsTotalPacketsOut, cdbpPeerStatsHByHDropMessages=cdbpPeerStatsHByHDropMessages, cdbpRealmMessageRouteASAsIn=cdbpRealmMessageRouteASAsIn, cdbpLocalStats=cdbpLocalStats, cdbpPeerStatsRedirectEvents=cdbpPeerStatsRedirectEvents, cdbpPeerStatsASRsOut=cdbpPeerStatsASRsOut, cdbpPeerStatsTotalRetrans=cdbpPeerStatsTotalRetrans, cdbpRealmMessageRouteEntry=cdbpRealmMessageRouteEntry, cdbpPeerStatsState=cdbpPeerStatsState, cdbpPeerStatsSTRsIn=cdbpPeerStatsSTRsIn, cdbpPeerFirmwareRevision=cdbpPeerFirmwareRevision, cdbpLocalTcpListenPort=cdbpLocalTcpListenPort, cdbpPeerStatsCERsOut=cdbpPeerStatsCERsOut, cdbpLocalApplStorageType=cdbpLocalApplStorageType, cdbpPeerStatsAccRetrans=cdbpPeerStatsAccRetrans, cdbpPeerStatsPermanentFailures=cdbpPeerStatsPermanentFailures, cdbpLocalIpAddrIndex=cdbpLocalIpAddrIndex, cdbpRealmKnownPeersEntry=cdbpRealmKnownPeersEntry, cdbpPeerStatsDWAsIn=cdbpPeerStatsDWAsIn, cdbpLocalStatsTotalUpTime=cdbpLocalStatsTotalUpTime, cdbpPeerStatsDPAsOut=cdbpPeerStatsDPAsOut, ciscoDiaBaseProtPermanentFailureNotif=ciscoDiaBaseProtPermanentFailureNotif, ciscoDiameterBasePMIBLocalStatsSkippedGroup=ciscoDiameterBasePMIBLocalStatsSkippedGroup, cdbpPeerStatsRAAsIn=cdbpPeerStatsRAAsIn, cdbpPeerStatsStateDuration=cdbpPeerStatsStateDuration, cdbpPeerStatsProtocolErrors=cdbpPeerStatsProtocolErrors, ciscoDiameterBasePMIBNotificationsGroup=ciscoDiameterBasePMIBNotificationsGroup, cdbpRealmMessageRouteACRsOut=cdbpRealmMessageRouteACRsOut, cdbpLocalApplEntry=cdbpLocalApplEntry, cdbpPeerStatsDWAsOut=cdbpPeerStatsDWAsOut, cdbpPeerStatsAccReqstsDropped=cdbpPeerStatsAccReqstsDropped, cdbpRealmKnownPeersTable=cdbpRealmKnownPeersTable, cdbpPeerStatsAccsNotRecorded=cdbpPeerStatsAccsNotRecorded, cdbpLocalVendorRowStatus=cdbpLocalVendorRowStatus, cdbpLocalIpAddress=cdbpLocalIpAddress, cdbpLocalIpAddrEntry=cdbpLocalIpAddrEntry, cdbpRealmMessageRouteRARsIn=cdbpRealmMessageRouteRARsIn, cdbpRealmMessageRouteACAsIn=cdbpRealmMessageRouteACAsIn, cdbpLocalOriginHost=cdbpLocalOriginHost, cdbpRealmMessageRouteRAAsIn=cdbpRealmMessageRouteRAAsIn, cdbpRealmMessageRouteRAAsOut=cdbpRealmMessageRouteRAAsOut, ciscoDiameterBasePMIBPeerCfgSkippedGroup=ciscoDiameterBasePMIBPeerCfgSkippedGroup, cdbpPeerPortConnect=cdbpPeerPortConnect, cdbpPeerStatsWhoInitDisconnect=cdbpPeerStatsWhoInitDisconnect, cdbpPeerStatsCEAsOut=cdbpPeerStatsCEAsOut, cdbpAppAdvFromPeerIndex=cdbpAppAdvFromPeerIndex, cdbpRealmMessageRouteASRsIn=cdbpRealmMessageRouteASRsIn, cdbpPeerStatsLastDiscCause=cdbpPeerStatsLastDiscCause, cdbpPeerStatsASAsIn=cdbpPeerStatsASAsIn, cdbpPeerIpAddressType=cdbpPeerIpAddressType, cdbpPeerStatsRARsOut=cdbpPeerStatsRARsOut, cdbpPeerStatsDWCurrentStatus=cdbpPeerStatsDWCurrentStatus, cdbpRealmMessageRouteSTRsOut=cdbpRealmMessageRouteSTRsOut, cdbpLocalCfgs=cdbpLocalCfgs, cdbpRealmMessageRouteReqstsDrop=cdbpRealmMessageRouteReqstsDrop, cdbpLocalStatsTotalPacketsIn=cdbpLocalStatsTotalPacketsIn, cdbpPeerCfgs=cdbpPeerCfgs, cdbpRealmKnownPeers=cdbpRealmKnownPeers, cdbpPeerStatsMalformedReqsts=cdbpPeerStatsMalformedReqsts, cdbpRealmMessageRouteRARsOut=cdbpRealmMessageRouteRARsOut, cdbpRealmMessageRouteSTAsOut=cdbpRealmMessageRouteSTAsOut, cdbpLocalIpAddrTable=cdbpLocalIpAddrTable, cdbpPeerStatsACRsIn=cdbpPeerStatsACRsIn, ciscoDiameterBasePMIBRealmStatsSkippedGroup=ciscoDiameterBasePMIBRealmStatsSkippedGroup, cdbpRealmKnownPeersChosen=cdbpRealmKnownPeersChosen, cdbpLocalApplTable=cdbpLocalApplTable, cdbpRealmMessageRouteType=cdbpRealmMessageRouteType, cdbpPeerStatsASRsIn=cdbpPeerStatsASRsIn, cdbpPeerStatsTransportDown=cdbpPeerStatsTransportDown, cdbpRedundancyInfraState=cdbpRedundancyInfraState, ciscoDiameterBasePMIBPeerCfgGroup=ciscoDiameterBasePMIBPeerCfgGroup, cdbpRealmMessageRouteACAsOut=cdbpRealmMessageRouteACAsOut, cdbpAppAdvFromPeerEntry=cdbpAppAdvFromPeerEntry, ciscoDiaBaseProtEnableTransientFailureNotif=ciscoDiaBaseProtEnableTransientFailureNotif, cdbpLocalConfigReset=cdbpLocalConfigReset, cdbpPeerIpAddress=cdbpPeerIpAddress, cdbpAppAdvToPeerTable=cdbpAppAdvToPeerTable, cdbpPeerStatsTimeoutConnAtmpts=cdbpPeerStatsTimeoutConnAtmpts, cdbpPeerStatsDWRsIn=cdbpPeerStatsDWRsIn, cdbpRealmMessageRouteTable=cdbpRealmMessageRouteTable, cdbpPeerStatsRARsIn=cdbpPeerStatsRARsIn, cdbpPeerStatsACAsOut=cdbpPeerStatsACAsOut, cdbpRealmMessageRouteSTAsIn=cdbpRealmMessageRouteSTAsIn, cdbpPeerStatsASAsOut=cdbpPeerStatsASAsOut, cdbpPeerStatsDPRsOut=cdbpPeerStatsDPRsOut, cdbpPeerVendorTable=cdbpPeerVendorTable, ciscoDiaBaseProtPeerConnectionUpNotif=ciscoDiaBaseProtPeerConnectionUpNotif, cdbpPeerVendorStorageType=cdbpPeerVendorStorageType, cdbpPeerVendorIndex=cdbpPeerVendorIndex, cdbpPeerStatsCERsIn=cdbpPeerStatsCERsIn, cdbpRealmMessageRouteASAsOut=cdbpRealmMessageRouteASAsOut, ciscoDiameterBasePMIBLocalCfgSkippedGroup=ciscoDiameterBasePMIBLocalCfgSkippedGroup, cdbpPeerPortListen=cdbpPeerPortListen, cdbpAppAdvToPeerEntry=cdbpAppAdvToPeerEntry, ciscoDiaBaseProtProtocolErrorNotif=ciscoDiaBaseProtProtocolErrorNotif, ciscoDiameterBasePMIB=ciscoDiameterBasePMIB, cdbpLocalApplIndex=cdbpLocalApplIndex, cdbpAppAdvToPeerStorageType=cdbpAppAdvToPeerStorageType, cdbpLocalVendorStorageType=cdbpLocalVendorStorageType, cdbpPeerIpAddressIndex=cdbpPeerIpAddressIndex, cdbpPeerRowStatus=cdbpPeerRowStatus, cdbpLocalSctpListenPort=cdbpLocalSctpListenPort, cdbpPeerStatsCEAsIn=cdbpPeerStatsCEAsIn)
cantidad= input("Cuantas personas van a cenar?") cant = int(cantidad) print(cant) if cant > 8: print("Lo siento, tendran que esperar") else: print("La mesa esta lista")
cantidad = input('Cuantas personas van a cenar?') cant = int(cantidad) print(cant) if cant > 8: print('Lo siento, tendran que esperar') else: print('La mesa esta lista')
def parse_cookie(query: str) -> dict: res = {} if query: data = query.split(';') for i in data: if '=' in i: res[i.split('=')[0]] = '='.join(i.split('=')[1:]) return res if __name__ == '__main__': assert parse_cookie('name=Dima;') == {'name': 'Dima'} assert parse_cookie('') == {} assert parse_cookie('name=Dima;age=28;') == {'name': 'Dima', 'age': '28'} assert parse_cookie('name=Dima=User;age=28;') == {'name': 'Dima=User', 'age': '28'}
def parse_cookie(query: str) -> dict: res = {} if query: data = query.split(';') for i in data: if '=' in i: res[i.split('=')[0]] = '='.join(i.split('=')[1:]) return res if __name__ == '__main__': assert parse_cookie('name=Dima;') == {'name': 'Dima'} assert parse_cookie('') == {} assert parse_cookie('name=Dima;age=28;') == {'name': 'Dima', 'age': '28'} assert parse_cookie('name=Dima=User;age=28;') == {'name': 'Dima=User', 'age': '28'}
dbConfig = { "user": "root", "password": "123567l098", "host": "localhost", "database": "trackMe_dev" }
db_config = {'user': 'root', 'password': '123567l098', 'host': 'localhost', 'database': 'trackMe_dev'}
def pol_V(offset=None): yield from mv(m1_simple_fbk,0) cur_mono_e = pgm.en.user_readback.value yield from mv(epu1.table,6) # 4 = 3rd harmonic; 6 = "testing V" 1st harmonic if offset is not None: yield from mv(epu1.offset,offset) yield from mv(epu1.phase,28.5) yield from mv(pgm.en,cur_mono_e+1) #TODO this is dirty trick. figure out how to process epu.table.input yield from mv(pgm.en,cur_mono_e) yield from mv(m1_simple_fbk,1) print('\nFinished moving the polarization to vertical.\n\tNote that the offset for epu calibration is {}eV.\n\n'.format(offset)) def pol_H(offset=None): yield from mv(m1_simple_fbk,0) cur_mono_e = pgm.en.user_readback.value yield from mv(epu1.table,5) # 2 = 3rd harmonic; 5 = "testing H" 1st harmonic if offset is not None: yield from mv(epu1.offset,offset) yield from mv(epu1.phase,0) yield from mv(pgm.en,cur_mono_e+1) #TODO this is dirty trick. figure out how to process epu.table.input yield from mv(pgm.en,cur_mono_e) yield from mv(m1_simple_fbk,1) print('\nFinished moving the polarization to horizontal.\n\tNote that the offset for epu calibration is {}eV.\n\n'.format(offset)) def m3_check(): yield from mv(m3_simple_fbk,0) sclr_enable() if pzshutter.value == 0: print('Piezo Shutter is disabled') flag = 0 if pzshutter.value == 2: print('Piezo Shutter is enabled: going to be disabled') yield from pzshutter_disable() flag = 1 temp_extslt_vg=extslt.vg.user_readback.value temp_extslt_hg=extslt.hg.user_readback.value temp_gcdiag = gcdiag.y.user_readback.value #yield from mv(qem07.averaging_time, 1) yield from mv(sclr.preset_time, 1) yield from mv(extslt.hg,10) yield from mv(extslt.vg,30) #yield from gcdiag.grid # RE-COMMENT THIS LINE 5/7/2019 #yield from rel_scan([qem07],m3.pit,-0.0005,0.0005,31, md = {'reason':'checking m3 before cff'}) yield from rel_scan([sclr],m3.pit,-0.0005,0.0005,31, md = {'reason':'checking m3'}) #yield from mv(m3.pit,peaks['cen']['gc_diag_grid']) yield from mv(m3.pit,peaks['cen']['sclr_channels_chan8']) #yield from mv(m3.pit,peaks['cen']['sclr_channels_chan2']) yield from mv(extslt.hg,temp_extslt_hg) yield from mv(extslt.vg,temp_extslt_vg) yield from mv(gcdiag.y,temp_gcdiag) yield from sleep(20) #yield from mv(m1_fbk_sp,extslt_cam.stats1.centroid.x.value) yield from mv(m3_simple_fbk_target,extslt_cam.stats1.centroid.x.value)#m3_simple_fbk_cen.value) yield from mv(m3_simple_fbk,1) if flag == 0: print('Piezo Shutter remains disabled') if flag == 1: print('Piezo Shutter is going to renabled') yield from pzshutter_enable() def m1_align_fine2(): m1x_init=m1.x.user_readback.value m1pit_init=m1.pit.user_readback.value m1pit_step=50 m1pit_start=m1pit_init-1*m1pit_step for i in range(0,5): yield from mv(m1.pit,m1pit_start+i*m1pit_step) yield from scan([qem05],m1.x,-3,3.8,35) yield from mv(m1.pit,m1pit_init) yield from mv(m1.x,m1x_init) def alignM3x(): # get the exit slit positions to return to at the end vg_init = extslt.vg.user_setpoint.value hg_init = extslt.hg.user_setpoint.value hc_init = extslt.hc.user_setpoint.value print('Saving exit slit positions for later') # get things out of the way yield from m3diag.out # read gas cell diode yield from gcdiag.grid # set detector e.g. gas cell diagnostics qem detList=[qem07] #[sclr] # set V exit slit value to get enough signal yield from mv(extslt.vg, 30) # open H slit full open yield from mv(extslt.hg, 9000) #move extslt.hs appropriately and scan m3.x yield from mv(extslt.hc,-9) yield from relative_scan(detList,m3.x,-6,6,61) yield from mv(extslt.hc,-3) yield from relative_scan(detList,m3.x,-6,6,61) yield from mv(extslt.hc,3) yield from relative_scan(detList,m3.x,-6,6,61) print('Returning exit slit positions to the inital values') yield from mv(extslt.hc,hc_init) yield from mv(extslt.vg, vg_init, extslt.hg, hg_init) def beamline_align(): yield from mv(m1_fbk,0) yield from align.m1pit yield from sleep(5) yield from m3_check() #yield from mv(m1_fbk_cam_time,0.002) #yield from mv(m1_fbk_th,1500) yield from sleep(5) yield from mv(m1_fbk_sp,extslt_cam.stats1.centroid.x.value) yield from mv(m1_fbk,1) def beamline_align_v2(): yield from mv(m1_simple_fbk,0) yield from mv(m3_simple_fbk,0) yield from mv(m1_fbk,0) yield from align.m1pit yield from sleep(5) yield from mv(m1_simple_fbk_target_ratio,m1_simple_fbk_ratio.value) yield from mv(m1_simple_fbk,1) yield from sleep(5) yield from m3_check() def xas(dets,motor,start_en,stop_en,num_points,sec_per_point): sclr_enable() sclr_set_time=sclr.preset_time.value if pzshutter.value == 0: print('Piezo Shutter is disabled') flag = 0 if pzshutter.value == 2: print('Piezo Shutter is enabled: going to be disabled') yield from pzshutter_disable() flag = 1 yield from mv(sclr.preset_time,sec_per_point) yield from scan(dets,pgm.en,start_en,stop_en,num_points) E_max = peaks['max']['sclr_channels_chan2'][0] E_com = peaks['com']['sclr_channels_chan2'] if flag == 0: print('Piezo Shutter remains disabled') if flag == 1: print('Piezo Shutter is going to renabled') yield from pzshutter_enable() yield from mv(sclr.preset_time,sclr_set_time) return E_com, E_max #TODO put this inside of rixscam def rixscam_get_threshold(Ei = None): '''Calculate the minimum and maximum threshold for RIXSCAM single photon counting (LS mode) Ei\t:\t float - incident energy (default is beamline current energy) ''' if Ei is None: Ei = pgm.en.user_readback.value t_min = 0.7987 * Ei - 97.964 t_max = 1.4907 * Ei + 38.249 print('\n\n\tMinimum value for RIXSCAM threshold (LS mode):\t{}'.format(t_min)) print('\tMaximum value for RIXSCAM threshold (LS mode):\t{}'.format(t_max)) print('\tFor Beamline Energy:\t\t\t\t{}'.format(Ei)) return t_min, t_max #TODO put this insdie of rixscam def rixscam_set_threshold(Ei=None): '''Setup the RIXSCAM.XIP plugin values for a specific energy for single photon counting and centroiding in LS mode. Ei\t:\t float - incident energy (default is beamline current energy) ''' if Ei is None: Ei = pgm.en.user_readback.value thold_min, thold_max = rixscam_get_threshold(Ei) yield from mv(rixscam.xip.beamline_energy, Ei, rixscam.xip.sum_3x3_threshold_min, thold_min, rixscam.xip.sum_3x3_threshold_max, thold_max) #TODO make official so that there is a m1_fbk device like m1fbk.setpoint m1_fbk = EpicsSignal('XF:02IDA-OP{FBck}Sts:FB-Sel', name = 'm1_fbk') m1_fbk_sp = EpicsSignal('XF:02IDA-OP{FBck}PID-SP', name = 'm1_fbk_sp') m1_fbk_th = extslt_cam.stats1.centroid_threshold #m1_fbk_pix_x = extslt_cam.stats1.centroid.x.value m1_fbk_cam_time = extslt_cam.cam.acquire_time #(mv(m1_fbk_th,1500) m1_simple_fbk = EpicsSignal('XF:02IDA-OP{M1_simp_feed}FB-Ena', name = 'm1_simple_fbk') m1_simple_fbk_target_ratio = EpicsSignal('XF:02IDA-OP{M1_simp_feed}FB-TarRat', name = 'm1_simple_fbk_target_ratio') m1_simple_fbk_ratio = EpicsSignal('XF:02IDA-OP{M1_simp_feed}FB-Ratio', name = 'm1_simple_fbk_ratio') m3_simple_fbk = EpicsSignal('XF:02IDA-OP{M3_simp_feed}FB-Ena', name = 'm3_simple_fbk') m3_simple_fbk_target = EpicsSignal('XF:02IDA-OP{M3_simp_feed}FB-Targ', name = 'm3_simple_fbk_target') m3_simple_fbk_cen = EpicsSignal('XF:02IDA-OP{M3_simp_feed}FB_inpbuf', name = 'm3_simple_fbk_cen')
def pol_v(offset=None): yield from mv(m1_simple_fbk, 0) cur_mono_e = pgm.en.user_readback.value yield from mv(epu1.table, 6) if offset is not None: yield from mv(epu1.offset, offset) yield from mv(epu1.phase, 28.5) yield from mv(pgm.en, cur_mono_e + 1) yield from mv(pgm.en, cur_mono_e) yield from mv(m1_simple_fbk, 1) print('\nFinished moving the polarization to vertical.\n\tNote that the offset for epu calibration is {}eV.\n\n'.format(offset)) def pol_h(offset=None): yield from mv(m1_simple_fbk, 0) cur_mono_e = pgm.en.user_readback.value yield from mv(epu1.table, 5) if offset is not None: yield from mv(epu1.offset, offset) yield from mv(epu1.phase, 0) yield from mv(pgm.en, cur_mono_e + 1) yield from mv(pgm.en, cur_mono_e) yield from mv(m1_simple_fbk, 1) print('\nFinished moving the polarization to horizontal.\n\tNote that the offset for epu calibration is {}eV.\n\n'.format(offset)) def m3_check(): yield from mv(m3_simple_fbk, 0) sclr_enable() if pzshutter.value == 0: print('Piezo Shutter is disabled') flag = 0 if pzshutter.value == 2: print('Piezo Shutter is enabled: going to be disabled') yield from pzshutter_disable() flag = 1 temp_extslt_vg = extslt.vg.user_readback.value temp_extslt_hg = extslt.hg.user_readback.value temp_gcdiag = gcdiag.y.user_readback.value yield from mv(sclr.preset_time, 1) yield from mv(extslt.hg, 10) yield from mv(extslt.vg, 30) yield from rel_scan([sclr], m3.pit, -0.0005, 0.0005, 31, md={'reason': 'checking m3'}) yield from mv(m3.pit, peaks['cen']['sclr_channels_chan8']) yield from mv(extslt.hg, temp_extslt_hg) yield from mv(extslt.vg, temp_extslt_vg) yield from mv(gcdiag.y, temp_gcdiag) yield from sleep(20) yield from mv(m3_simple_fbk_target, extslt_cam.stats1.centroid.x.value) yield from mv(m3_simple_fbk, 1) if flag == 0: print('Piezo Shutter remains disabled') if flag == 1: print('Piezo Shutter is going to renabled') yield from pzshutter_enable() def m1_align_fine2(): m1x_init = m1.x.user_readback.value m1pit_init = m1.pit.user_readback.value m1pit_step = 50 m1pit_start = m1pit_init - 1 * m1pit_step for i in range(0, 5): yield from mv(m1.pit, m1pit_start + i * m1pit_step) yield from scan([qem05], m1.x, -3, 3.8, 35) yield from mv(m1.pit, m1pit_init) yield from mv(m1.x, m1x_init) def align_m3x(): vg_init = extslt.vg.user_setpoint.value hg_init = extslt.hg.user_setpoint.value hc_init = extslt.hc.user_setpoint.value print('Saving exit slit positions for later') yield from m3diag.out yield from gcdiag.grid det_list = [qem07] yield from mv(extslt.vg, 30) yield from mv(extslt.hg, 9000) yield from mv(extslt.hc, -9) yield from relative_scan(detList, m3.x, -6, 6, 61) yield from mv(extslt.hc, -3) yield from relative_scan(detList, m3.x, -6, 6, 61) yield from mv(extslt.hc, 3) yield from relative_scan(detList, m3.x, -6, 6, 61) print('Returning exit slit positions to the inital values') yield from mv(extslt.hc, hc_init) yield from mv(extslt.vg, vg_init, extslt.hg, hg_init) def beamline_align(): yield from mv(m1_fbk, 0) yield from align.m1pit yield from sleep(5) yield from m3_check() yield from sleep(5) yield from mv(m1_fbk_sp, extslt_cam.stats1.centroid.x.value) yield from mv(m1_fbk, 1) def beamline_align_v2(): yield from mv(m1_simple_fbk, 0) yield from mv(m3_simple_fbk, 0) yield from mv(m1_fbk, 0) yield from align.m1pit yield from sleep(5) yield from mv(m1_simple_fbk_target_ratio, m1_simple_fbk_ratio.value) yield from mv(m1_simple_fbk, 1) yield from sleep(5) yield from m3_check() def xas(dets, motor, start_en, stop_en, num_points, sec_per_point): sclr_enable() sclr_set_time = sclr.preset_time.value if pzshutter.value == 0: print('Piezo Shutter is disabled') flag = 0 if pzshutter.value == 2: print('Piezo Shutter is enabled: going to be disabled') yield from pzshutter_disable() flag = 1 yield from mv(sclr.preset_time, sec_per_point) yield from scan(dets, pgm.en, start_en, stop_en, num_points) e_max = peaks['max']['sclr_channels_chan2'][0] e_com = peaks['com']['sclr_channels_chan2'] if flag == 0: print('Piezo Shutter remains disabled') if flag == 1: print('Piezo Shutter is going to renabled') yield from pzshutter_enable() yield from mv(sclr.preset_time, sclr_set_time) return (E_com, E_max) def rixscam_get_threshold(Ei=None): """Calculate the minimum and maximum threshold for RIXSCAM single photon counting (LS mode) Ei : float - incident energy (default is beamline current energy) """ if Ei is None: ei = pgm.en.user_readback.value t_min = 0.7987 * Ei - 97.964 t_max = 1.4907 * Ei + 38.249 print('\n\n\tMinimum value for RIXSCAM threshold (LS mode):\t{}'.format(t_min)) print('\tMaximum value for RIXSCAM threshold (LS mode):\t{}'.format(t_max)) print('\tFor Beamline Energy:\t\t\t\t{}'.format(Ei)) return (t_min, t_max) def rixscam_set_threshold(Ei=None): """Setup the RIXSCAM.XIP plugin values for a specific energy for single photon counting and centroiding in LS mode. Ei : float - incident energy (default is beamline current energy) """ if Ei is None: ei = pgm.en.user_readback.value (thold_min, thold_max) = rixscam_get_threshold(Ei) yield from mv(rixscam.xip.beamline_energy, Ei, rixscam.xip.sum_3x3_threshold_min, thold_min, rixscam.xip.sum_3x3_threshold_max, thold_max) m1_fbk = epics_signal('XF:02IDA-OP{FBck}Sts:FB-Sel', name='m1_fbk') m1_fbk_sp = epics_signal('XF:02IDA-OP{FBck}PID-SP', name='m1_fbk_sp') m1_fbk_th = extslt_cam.stats1.centroid_threshold m1_fbk_cam_time = extslt_cam.cam.acquire_time m1_simple_fbk = epics_signal('XF:02IDA-OP{M1_simp_feed}FB-Ena', name='m1_simple_fbk') m1_simple_fbk_target_ratio = epics_signal('XF:02IDA-OP{M1_simp_feed}FB-TarRat', name='m1_simple_fbk_target_ratio') m1_simple_fbk_ratio = epics_signal('XF:02IDA-OP{M1_simp_feed}FB-Ratio', name='m1_simple_fbk_ratio') m3_simple_fbk = epics_signal('XF:02IDA-OP{M3_simp_feed}FB-Ena', name='m3_simple_fbk') m3_simple_fbk_target = epics_signal('XF:02IDA-OP{M3_simp_feed}FB-Targ', name='m3_simple_fbk_target') m3_simple_fbk_cen = epics_signal('XF:02IDA-OP{M3_simp_feed}FB_inpbuf', name='m3_simple_fbk_cen')
COGNITO = "Cognito" SERVERLESS_REPO = "ServerlessRepo" MODE = "Mode" XRAY = "XRay" LAYERS = "Layers" HTTP_API = "HttpApi" IOT = "IoT" CODE_DEPLOY = "CodeDeploy" ARM = "ARM" GATEWAY_RESPONSES = "GatewayResponses" MSK = "MSK" KMS = "KMS" CWE_CWS_DLQ = "CweCwsDlq" CODE_SIGN = "CodeSign" MQ = "MQ" USAGE_PLANS = "UsagePlans" SCHEDULE_EVENT = "ScheduleEvent" DYNAMO_DB = "DynamoDB" KINESIS = "Kinesis" SNS = "SNS" SQS = "SQS" CUSTOM_DOMAIN = "CustomDomain"
cognito = 'Cognito' serverless_repo = 'ServerlessRepo' mode = 'Mode' xray = 'XRay' layers = 'Layers' http_api = 'HttpApi' iot = 'IoT' code_deploy = 'CodeDeploy' arm = 'ARM' gateway_responses = 'GatewayResponses' msk = 'MSK' kms = 'KMS' cwe_cws_dlq = 'CweCwsDlq' code_sign = 'CodeSign' mq = 'MQ' usage_plans = 'UsagePlans' schedule_event = 'ScheduleEvent' dynamo_db = 'DynamoDB' kinesis = 'Kinesis' sns = 'SNS' sqs = 'SQS' custom_domain = 'CustomDomain'
EDGE = '101' MIDDLE = '01010' CODES = { 'A': ( '0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011' ), 'B': ( '0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111' ), 'C': ( '1110010', '1100110', '1101100', '1000010', '1011100', '1001110', '1010000', '1000100', '1001000', '1110100' ), } LEFT_PATTERN = ( 'AAAAAA', 'AABABB', 'AABBAB', 'AABBBA', 'ABAABB', 'ABBAAB', 'ABBBAA', 'ABABAB', 'ABABBA', 'ABBABA' )
edge = '101' middle = '01010' codes = {'A': ('0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'), 'B': ('0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111'), 'C': ('1110010', '1100110', '1101100', '1000010', '1011100', '1001110', '1010000', '1000100', '1001000', '1110100')} left_pattern = ('AAAAAA', 'AABABB', 'AABBAB', 'AABBBA', 'ABAABB', 'ABBAAB', 'ABBBAA', 'ABABAB', 'ABABBA', 'ABBABA')
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST - Value can also be specified using C(INFOBLOX_HOST) environment variable. type: str required: true username: description: - Configures the username to use to authenticate the connection to the remote instance of NIOS. - Value can also be specified using C(INFOBLOX_USERNAME) environment variable. type: str password: description: - Specifies the password to use to authenticate the connection to the remote instance of NIOS. - Value can also be specified using C(INFOBLOX_PASSWORD) environment variable. type: str validate_certs: description: - Boolean value to enable or disable verifying SSL certificates - Value can also be specified using C(INFOBLOX_SSL_VERIFY) environment variable. type: bool default: no aliases: [ ssl_verify ] http_request_timeout: description: - The amount of time before to wait before receiving a response - Value can also be specified using C(INFOBLOX_HTTP_REQUEST_TIMEOUT) environment variable. type: int default: 10 max_retries: description: - Configures the number of attempted retries before the connection is declared usable - Value can also be specified using C(INFOBLOX_MAX_RETRIES) environment variable. type: int default: 3 wapi_version: description: - Specifies the version of WAPI to use - Value can also be specified using C(INFOBLOX_WAP_VERSION) environment variable. - Until ansible 2.8 the default WAPI was 1.4 type: str default: '2.1' max_results: description: - Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. - Value can also be specified using C(INFOBLOX_MAX_RESULTS) environment variable. type: int default: 1000 notes: - "This module must be run locally, which can be achieved by specifying C(connection: local)." - Please read the :ref:`nios_guide` for more detailed information on how to use Infoblox with Ansible. '''
class Moduledocfragment(object): documentation = '\noptions:\n provider:\n description:\n - A dict object containing connection details.\n type: dict\n suboptions:\n host:\n description:\n - Specifies the DNS host name or address for connecting to the remote\n instance of NIOS WAPI over REST\n - Value can also be specified using C(INFOBLOX_HOST) environment\n variable.\n type: str\n required: true\n username:\n description:\n - Configures the username to use to authenticate the connection to\n the remote instance of NIOS.\n - Value can also be specified using C(INFOBLOX_USERNAME) environment\n variable.\n type: str\n password:\n description:\n - Specifies the password to use to authenticate the connection to\n the remote instance of NIOS.\n - Value can also be specified using C(INFOBLOX_PASSWORD) environment\n variable.\n type: str\n validate_certs:\n description:\n - Boolean value to enable or disable verifying SSL certificates\n - Value can also be specified using C(INFOBLOX_SSL_VERIFY) environment\n variable.\n type: bool\n default: no\n aliases: [ ssl_verify ]\n http_request_timeout:\n description:\n - The amount of time before to wait before receiving a response\n - Value can also be specified using C(INFOBLOX_HTTP_REQUEST_TIMEOUT) environment\n variable.\n type: int\n default: 10\n max_retries:\n description:\n - Configures the number of attempted retries before the connection\n is declared usable\n - Value can also be specified using C(INFOBLOX_MAX_RETRIES) environment\n variable.\n type: int\n default: 3\n wapi_version:\n description:\n - Specifies the version of WAPI to use\n - Value can also be specified using C(INFOBLOX_WAP_VERSION) environment\n variable.\n - Until ansible 2.8 the default WAPI was 1.4\n type: str\n default: \'2.1\'\n max_results:\n description:\n - Specifies the maximum number of objects to be returned,\n if set to a negative number the appliance will return an error when the\n number of returned objects would exceed the setting.\n - Value can also be specified using C(INFOBLOX_MAX_RESULTS) environment\n variable.\n type: int\n default: 1000\nnotes:\n - "This module must be run locally, which can be achieved by specifying C(connection: local)."\n - Please read the :ref:`nios_guide` for more detailed information on how to use Infoblox with Ansible.\n\n'
class Display(): def __init__(self, width, height): self.width = width self.height = height def getSize(self): return (self.width, self.height)
class Display: def __init__(self, width, height): self.width = width self.height = height def get_size(self): return (self.width, self.height)
# O(n ** 2) def bubble_sort(slist, asc=True): need_exchanges = False for iteration in range(len(slist))[:: -1]: for j in range(iteration): if asc: if slist[j] > slist[j + 1]: need_exchanges = True slist[j], slist[j + 1] = slist[j + 1], slist[j] else: if slist[j] < slist[j + 1]: need_exchanges = True slist[j], slist[j + 1] = slist[j + 1], slist[j] if not need_exchanges: return slist return slist print(bubble_sort([8, 1, 13, 34, 5, 2, 21, 3, 1], False)) print(bubble_sort([1, 2, 3, 4, 5, 6]))
def bubble_sort(slist, asc=True): need_exchanges = False for iteration in range(len(slist))[::-1]: for j in range(iteration): if asc: if slist[j] > slist[j + 1]: need_exchanges = True (slist[j], slist[j + 1]) = (slist[j + 1], slist[j]) elif slist[j] < slist[j + 1]: need_exchanges = True (slist[j], slist[j + 1]) = (slist[j + 1], slist[j]) if not need_exchanges: return slist return slist print(bubble_sort([8, 1, 13, 34, 5, 2, 21, 3, 1], False)) print(bubble_sort([1, 2, 3, 4, 5, 6]))
class Solution(object): def convert(self, s, numRows): """ :type s: str :type numRows: int :rtype: str """ cycle = 2*(numRows-1) if numRows == 1: cycle = 1 map = [] for i in range(numRows): map.append('') for j in range(len(s)): mod = j % cycle if mod < numRows: map[mod] += s[j] else: map[2*(numRows-1)-mod] += s[j] result = '' for i in range(numRows): result += map[i]; return result
class Solution(object): def convert(self, s, numRows): """ :type s: str :type numRows: int :rtype: str """ cycle = 2 * (numRows - 1) if numRows == 1: cycle = 1 map = [] for i in range(numRows): map.append('') for j in range(len(s)): mod = j % cycle if mod < numRows: map[mod] += s[j] else: map[2 * (numRows - 1) - mod] += s[j] result = '' for i in range(numRows): result += map[i] return result
class Solution: def maxLength(self, arr) -> int: def helper(word): temp=[] temp[:0]=word res=set() for w in temp: if w not in res: res.add(w) else: return None return res memo=[] for a in arr: temp=helper(a) if temp is not None: memo.append(temp) memo.sort(key=lambda a:len(a),reverse=True) def dfs(index,path): if index==len(memo): return 0 res=0 for i in range(index,len(memo)): if len(path|memo[i])==len(path)+len(memo[i]): res=max(res,len(memo[i])+dfs(i+1,path|memo[i])) return res return dfs(0,set()) if __name__ == '__main__': sol=Solution() arr = ["un", "iq", "ue"] # arr = ["cha", "r", "act", "ers"] # arr = ["abcdefghijklmnopqrstuvwxyz"] # arr=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"] print(sol.maxLength(arr))
class Solution: def max_length(self, arr) -> int: def helper(word): temp = [] temp[:0] = word res = set() for w in temp: if w not in res: res.add(w) else: return None return res memo = [] for a in arr: temp = helper(a) if temp is not None: memo.append(temp) memo.sort(key=lambda a: len(a), reverse=True) def dfs(index, path): if index == len(memo): return 0 res = 0 for i in range(index, len(memo)): if len(path | memo[i]) == len(path) + len(memo[i]): res = max(res, len(memo[i]) + dfs(i + 1, path | memo[i])) return res return dfs(0, set()) if __name__ == '__main__': sol = solution() arr = ['un', 'iq', 'ue'] print(sol.maxLength(arr))
class Node(object): def __init__(self, name): self.name = name; self.adjacencyList = []; self.visited = False; self.predecessor = None; class BreadthFirstSearch(object): def bfs(self, startNode): queue = []; queue.append(startNode); startNode.visited = True; # BFS -> queue DFS --> stack BUT usually we implement it with recursion !!! while queue: actualNode = queue.pop(0); print("%s " % actualNode.name); for n in actualNode.adjacencyList: if not n.visited: n.visited = True; queue.append(n); node1 = Node("A"); node2 = Node("B"); node3 = Node("C"); node4 = Node("D"); node5 = Node("E"); node1.adjacencyList.append(node2); node1.adjacencyList.append(node3); node2.adjacencyList.append(node4); node4.adjacencyList.append(node5); bfs = BreadthFirstSearch(); bfs.bfs(node1);
class Node(object): def __init__(self, name): self.name = name self.adjacencyList = [] self.visited = False self.predecessor = None class Breadthfirstsearch(object): def bfs(self, startNode): queue = [] queue.append(startNode) startNode.visited = True while queue: actual_node = queue.pop(0) print('%s ' % actualNode.name) for n in actualNode.adjacencyList: if not n.visited: n.visited = True queue.append(n) node1 = node('A') node2 = node('B') node3 = node('C') node4 = node('D') node5 = node('E') node1.adjacencyList.append(node2) node1.adjacencyList.append(node3) node2.adjacencyList.append(node4) node4.adjacencyList.append(node5) bfs = breadth_first_search() bfs.bfs(node1)
# -*- coding: utf-8 -*- """ Created on Thu Apr 15 11:31:06 2021 @author: a77510jm """
""" Created on Thu Apr 15 11:31:06 2021 @author: a77510jm """
############################################################### # # This function is... INSUFFICIENT. It was developed as an # illustration of EDA lessons in the 2021 class. It's quick and # works well. # # Want a higher grade version of me? Then try pandas-profiling: # https://github.com/pandas-profiling/pandas-profiling # ############################################################### def insufficient_but_starting_eda(df,cat_vars_list=None): ''' Parameters ---------- df : DATAFRAME cat_vars_list : LIST, optional A list of strings containing variable names in the dataframe for variables where you want to see the number of unique values and the 10 most common values. Likely used for categorical values. Returns ------- None. It simply prints. Description ------- This function will print a MINIMUM amount of info about a new dataframe. You should ****look**** at all this output below and consider the data exploration and cleaning questions from https://ledatascifi.github.io/ledatascifi-2021/content/03/02e_eda_golden.html#member Also LOOK at more of the data manually. Then write up anything notable you observe. TIP: put this function in your codebook to reuse easily. PROTIP: Improve this function (better outputs, better formatting). FEATURE REQUEST: optionally print the nunique and top 10 values under the describe matrix FEATURE REQUEST: optionally print more stats (percentiles) ''' print(df.head(), '\n---') print(df.tail(), '\n---') print(df.columns, '\n---') print("The shape is: ",df.shape, '\n---') print("Info:",df.info(), '\n---') # memory usage, name, dtype, and # of non-null obs (--> # of missing obs) per variable print(df.describe(), '\n---') # summary stats, and you can customize the list! if cat_vars_list != None: for var in cat_vars_list: print(var,"has",df[var].nunique(),"values and its top 10 most common are:") print(df[var].value_counts().head(10), '\n---')
def insufficient_but_starting_eda(df, cat_vars_list=None): """ Parameters ---------- df : DATAFRAME cat_vars_list : LIST, optional A list of strings containing variable names in the dataframe for variables where you want to see the number of unique values and the 10 most common values. Likely used for categorical values. Returns ------- None. It simply prints. Description ------- This function will print a MINIMUM amount of info about a new dataframe. You should ****look**** at all this output below and consider the data exploration and cleaning questions from https://ledatascifi.github.io/ledatascifi-2021/content/03/02e_eda_golden.html#member Also LOOK at more of the data manually. Then write up anything notable you observe. TIP: put this function in your codebook to reuse easily. PROTIP: Improve this function (better outputs, better formatting). FEATURE REQUEST: optionally print the nunique and top 10 values under the describe matrix FEATURE REQUEST: optionally print more stats (percentiles) """ print(df.head(), '\n---') print(df.tail(), '\n---') print(df.columns, '\n---') print('The shape is: ', df.shape, '\n---') print('Info:', df.info(), '\n---') print(df.describe(), '\n---') if cat_vars_list != None: for var in cat_vars_list: print(var, 'has', df[var].nunique(), 'values and its top 10 most common are:') print(df[var].value_counts().head(10), '\n---')
""" Simple math operating functions for unit test """ def add(a, b): """ Adding to parameters and return result :param a: :param b: :return: """ return a + b def minus(a, b): """ subtraction :param a: :param b: :return: """ return a - b def multi(a, b): """ multiple :param a: :param b: :return: """ return a * b def divide(a, b): """ division :param a: :param b: :return: """ return a // b
""" Simple math operating functions for unit test """ def add(a, b): """ Adding to parameters and return result :param a: :param b: :return: """ return a + b def minus(a, b): """ subtraction :param a: :param b: :return: """ return a - b def multi(a, b): """ multiple :param a: :param b: :return: """ return a * b def divide(a, b): """ division :param a: :param b: :return: """ return a // b
""" flags.py . should be renamed helpers... . This file is scheduled for deletion """ """ valid accessory tags: "any_tag": {"code": "code_insert_as_string"} # execute arbitrary code to construct this key. "dialect": csv.excel_tab # dialect of the file, default = csv, set this to use tsv. or sniffer "skip_lines": number # number of lines to skip at the head of the file. "skiptill": skip until I see the first instance of <str> """ # lists of format-specifiers.
""" flags.py . should be renamed helpers... . This file is scheduled for deletion """ '\nvalid accessory tags:\n\n"any_tag": {"code": "code_insert_as_string"} # execute arbitrary code to construct this key.\n"dialect": csv.excel_tab # dialect of the file, default = csv, set this to use tsv. or sniffer\n"skip_lines": number # number of lines to skip at the head of the file.\n"skiptill": skip until I see the first instance of <str>\n\n'
def get(isamAppliance, check_mode=False, force=False): """ Retrieve an overview of updates and licensing information """ return isamAppliance.invoke_get("Retrieve an overview of updates and licensing information", "/updates/overview") def get_licensing_info(isamAppliance, check_mode=False, force=False): """ Retrieve the licensing information """ return isamAppliance.invoke_get("Retrieve the licensing information", "/lum/is_licensed")
def get(isamAppliance, check_mode=False, force=False): """ Retrieve an overview of updates and licensing information """ return isamAppliance.invoke_get('Retrieve an overview of updates and licensing information', '/updates/overview') def get_licensing_info(isamAppliance, check_mode=False, force=False): """ Retrieve the licensing information """ return isamAppliance.invoke_get('Retrieve the licensing information', '/lum/is_licensed')
"""Top-level package for etherscan-py.""" __author__ = """Julian Koh""" __email__ = 'juliankohtx@gmail.com' __version__ = '0.1.0'
"""Top-level package for etherscan-py.""" __author__ = 'Julian Koh' __email__ = 'juliankohtx@gmail.com' __version__ = '0.1.0'
# UC10 - Evaluate price # # User U exists and has valid account # We create two Users, User1_UC10, User2_UC10 and one new gasStation GasStationUC10 # # Registered on a 1920x1080p, Google Chrome 100% zoom ### SETUP #User1 click("1590678880209.png") click("1590678953637.png") wait(2) type("1590829373120.png", "User1_UC10" + Key.TAB + "user1uc10@polito.it" + Key.TAB + "user1") click("1590679157604.png") click("1590788841790.png") wait(2) # User2 click("1590678880209.png") wait(2) click("1590678953637.png") wait(2) type("1590829373120.png", "User2_UC10" + Key.TAB + "user2uc10@polito.it" + Key.TAB + "user2") click("1590679157604.png") click("1590788841790.png") # Admin creates a new GasStation click("1590678880209-1.png") wait(3) type("1590829943940.png", "admin@ezgas.com" + Key.TAB + "admin" ) click("1590784293656.png") wait(2) click("1590784369122.png") wait(2) wheel(WHEEL_DOWN, 6) wait(2) type("1590830169812.png", "GasStation_UC10" + Key.TAB + "Torino, corso duca") wait( "add_UC10.png" , 20) type(Key.DOWN + Key.ENTER) type("1590830389386.png", Key.DOWN + Key.DOWN + Key.ENTER) click("1590830256446.png") click("1590830265272.png") wait(2) click("1590785166092.png") wait(3) type(Key.HOME) click("1590788397797.png") wait(2) click("1590828906996.png") wait(2) click("1590788458524.png") # User1 searches the gasStation click("1590678880209.png") wait(3) type("1590829943940.png", "user1uc10@polito.it" + Key.TAB + "user1" ) click("1590784293656.png") wait(2) wheel(WHEEL_DOWN, 6) type("1590931278631.png" , "Torino, corso duca" ) wait( "add_UC10.png" , 20) type(Key.DOWN + Key.ENTER) wait(2) click("1590922172004.png") wait(2) wheel(WHEEL_DOWN, 4) wait(2) click(Pattern("1590922374562.png").targetOffset(543,-4)) wheel(WHEEL_DOWN, 4) wait(2) click(Pattern("1590930530512.png").targetOffset(73,1)) type("1.5") click(Pattern("1590930568512.png").targetOffset(73,0)) type("1.4") click("1590834482526.png") wait(3) type(Key.HOME) wait(3) click("1590788458524.png") # User2 login and evaluate prices wait(2) click("1590678880209.png") wait(3) type("1590829943940.png", "user2uc10@polito.it" + Key.TAB + "user2" ) click("1590784293656.png") wait(2) wheel(WHEEL_DOWN, 4) wait(2) type("1590918242822-1.png" , "Torino, corso duca" ) wait( "add_UC10.png" , 20) type(Key.DOWN + Key.ENTER) wait(2) click("1590918499196.png") wheel(WHEEL_DOWN, 3) click(Pattern("1591638408351.png").targetOffset(1068,-3)) # User2 clicks on the green button if the price is correct, otherwise clicks on the red button # If User clicks the green button, the User1 trustlevel increases +1, otherwise it decreases -1 # wait(3) type(Key.HOME) click("1590788458524.png") wait(2) # Admin deletes users and gasStation click("1590678880209-1.png") wait(3) type("1590829943940.png", "admin@ezgas.com" + Key.TAB + "admin" ) click("1590784293656.png") wait(2) click("1590784369122.png") wait(2) wheel(WHEEL_DOWN, 10) wait(2) click(Pattern("1590931822851.png").targetOffset(905,-27)) wait(2) wheel(WHEEL_UP, 15) wait(2) click(Pattern("1590931876805.png").targetOffset(560,-4)) wait(2) click(Pattern("1590931914901.png").targetOffset(556,-10)) wait(2) click("1590788397797.png") wait(2) click("1590828906996.png") wait(2) click("1590788458524.png") wait(2)
click('1590678880209.png') click('1590678953637.png') wait(2) type('1590829373120.png', 'User1_UC10' + Key.TAB + 'user1uc10@polito.it' + Key.TAB + 'user1') click('1590679157604.png') click('1590788841790.png') wait(2) click('1590678880209.png') wait(2) click('1590678953637.png') wait(2) type('1590829373120.png', 'User2_UC10' + Key.TAB + 'user2uc10@polito.it' + Key.TAB + 'user2') click('1590679157604.png') click('1590788841790.png') click('1590678880209-1.png') wait(3) type('1590829943940.png', 'admin@ezgas.com' + Key.TAB + 'admin') click('1590784293656.png') wait(2) click('1590784369122.png') wait(2) wheel(WHEEL_DOWN, 6) wait(2) type('1590830169812.png', 'GasStation_UC10' + Key.TAB + 'Torino, corso duca') wait('add_UC10.png', 20) type(Key.DOWN + Key.ENTER) type('1590830389386.png', Key.DOWN + Key.DOWN + Key.ENTER) click('1590830256446.png') click('1590830265272.png') wait(2) click('1590785166092.png') wait(3) type(Key.HOME) click('1590788397797.png') wait(2) click('1590828906996.png') wait(2) click('1590788458524.png') click('1590678880209.png') wait(3) type('1590829943940.png', 'user1uc10@polito.it' + Key.TAB + 'user1') click('1590784293656.png') wait(2) wheel(WHEEL_DOWN, 6) type('1590931278631.png', 'Torino, corso duca') wait('add_UC10.png', 20) type(Key.DOWN + Key.ENTER) wait(2) click('1590922172004.png') wait(2) wheel(WHEEL_DOWN, 4) wait(2) click(pattern('1590922374562.png').targetOffset(543, -4)) wheel(WHEEL_DOWN, 4) wait(2) click(pattern('1590930530512.png').targetOffset(73, 1)) type('1.5') click(pattern('1590930568512.png').targetOffset(73, 0)) type('1.4') click('1590834482526.png') wait(3) type(Key.HOME) wait(3) click('1590788458524.png') wait(2) click('1590678880209.png') wait(3) type('1590829943940.png', 'user2uc10@polito.it' + Key.TAB + 'user2') click('1590784293656.png') wait(2) wheel(WHEEL_DOWN, 4) wait(2) type('1590918242822-1.png', 'Torino, corso duca') wait('add_UC10.png', 20) type(Key.DOWN + Key.ENTER) wait(2) click('1590918499196.png') wheel(WHEEL_DOWN, 3) click(pattern('1591638408351.png').targetOffset(1068, -3)) wait(3) type(Key.HOME) click('1590788458524.png') wait(2) click('1590678880209-1.png') wait(3) type('1590829943940.png', 'admin@ezgas.com' + Key.TAB + 'admin') click('1590784293656.png') wait(2) click('1590784369122.png') wait(2) wheel(WHEEL_DOWN, 10) wait(2) click(pattern('1590931822851.png').targetOffset(905, -27)) wait(2) wheel(WHEEL_UP, 15) wait(2) click(pattern('1590931876805.png').targetOffset(560, -4)) wait(2) click(pattern('1590931914901.png').targetOffset(556, -10)) wait(2) click('1590788397797.png') wait(2) click('1590828906996.png') wait(2) click('1590788458524.png') wait(2)
self.description = "Install a package ('any' architecture)" p = pmpkg("dummy") p.files = ["bin/dummy", "usr/man/man1/dummy.1"] p.arch = 'any' self.addpkg(p) self.option["Architecture"] = ['auto'] self.args = "-U %s" % p.filename() self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=dummy") for f in p.files: self.addrule("FILE_EXIST=%s" % f)
self.description = "Install a package ('any' architecture)" p = pmpkg('dummy') p.files = ['bin/dummy', 'usr/man/man1/dummy.1'] p.arch = 'any' self.addpkg(p) self.option['Architecture'] = ['auto'] self.args = '-U %s' % p.filename() self.addrule('PACMAN_RETCODE=0') self.addrule('PKG_EXIST=dummy') for f in p.files: self.addrule('FILE_EXIST=%s' % f)
""" Good morning! Here's your coding interview problem for today. This problem was asked by Amazon. Implement a stack that has the following methods: push(val), which pushes an element onto the stack pop(), which pops off and returns the topmost element of the stack. If there are no elements in the stack, then it should throw an error or return null. max(), which returns the maximum value in the stack currently. If there are no elements in the stack, then it should throw an error or return null. Each method should run in constant time. https://www.geeksforgeeks.org/design-a-stack-that-supports-getmin-in-o1-time-and-o1-extra-space/ https://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/ """ # Class to make a Node class Node: # Constructor which assign argument to node's value def __init__(self, value): self.value = value self.next = None # This method returns the string representation of the object def __str__(self): return "Node({})".format(self.value) # __repr__ is same as __str__ __repr__ = __str__ class Stack: # Stack Constructor initialise top of stack and counter def __init__(self): self.top = None self.maximum = None self.count = 0 self.minimum = None # This method returns the string representation of the object (stack). def __str__(self): temp = self.top out = [] while temp: out.append(str(temp.value)) temp = temp.next out = '\n'.join(out) return ('Top {} \n\nStack :\n{}'.format(self.top, out)) # __repr__ is same as __str__ __repr__ = __str__ # This method is used to get minimum element of stack def getMin(self): if self.top is None: return "Stack is Empty" else: print("Minimum element in the stack is: {}".format(self.minimum.value)) # This method is used to get minimum element of stack def getMax(self): if self.top is None: return "Stack is Empty" else: print("Maximum element in the stack is: {}".format(self.maximum.value)) # Method to check if stack is Empty or not def isEmpty(self): # If top equals to None then stack is empty if self.top == None: return True else: # If top not equal to None then stack is empty return False def push(self, value): if self.top is None: self.top = Node(value) self.top.value = value self.minimum = Node(value) self.minimum.value = value self.maximum = Node(value) self.maximum.value = value elif value < self.minimum.value: new_node = Node(value) new_node_min = Node(value) new_node_max = Node(self.maximum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.top = new_node self.top.value = value self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value elif value > self.maximum.value: new_node = Node(value) new_node_max = Node(value) new_node_min = Node(self.minimum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.top = new_node self.top.value = value self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value else: new_node = Node(value) new_node_max = Node(self.maximum.value) new_node_min = Node(self.minimum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value self.top = new_node self.top.value = value print("Number Inserted: {}".format(value)) # This method is used to pop top of stack def pop(self): if self.top is None: print("Stack is empty") else: removedNode = self.top.value self.top = self.top.next self.minimum = self.minimum.next self.maximum = self.maximum.next print("Top Most Element Removed : {}".format(removedNode)) stack = Stack() stack.push(3) stack.push(5) stack.getMin() stack.getMax() stack.push(2) stack.push(1) stack.getMin() stack.getMax() stack.pop() stack.getMin() stack.getMax() stack.pop()
""" Good morning! Here's your coding interview problem for today. This problem was asked by Amazon. Implement a stack that has the following methods: push(val), which pushes an element onto the stack pop(), which pops off and returns the topmost element of the stack. If there are no elements in the stack, then it should throw an error or return null. max(), which returns the maximum value in the stack currently. If there are no elements in the stack, then it should throw an error or return null. Each method should run in constant time. https://www.geeksforgeeks.org/design-a-stack-that-supports-getmin-in-o1-time-and-o1-extra-space/ https://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/ """ class Node: def __init__(self, value): self.value = value self.next = None def __str__(self): return 'Node({})'.format(self.value) __repr__ = __str__ class Stack: def __init__(self): self.top = None self.maximum = None self.count = 0 self.minimum = None def __str__(self): temp = self.top out = [] while temp: out.append(str(temp.value)) temp = temp.next out = '\n'.join(out) return 'Top {} \n\nStack :\n{}'.format(self.top, out) __repr__ = __str__ def get_min(self): if self.top is None: return 'Stack is Empty' else: print('Minimum element in the stack is: {}'.format(self.minimum.value)) def get_max(self): if self.top is None: return 'Stack is Empty' else: print('Maximum element in the stack is: {}'.format(self.maximum.value)) def is_empty(self): if self.top == None: return True else: return False def push(self, value): if self.top is None: self.top = node(value) self.top.value = value self.minimum = node(value) self.minimum.value = value self.maximum = node(value) self.maximum.value = value elif value < self.minimum.value: new_node = node(value) new_node_min = node(value) new_node_max = node(self.maximum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.top = new_node self.top.value = value self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value elif value > self.maximum.value: new_node = node(value) new_node_max = node(value) new_node_min = node(self.minimum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.top = new_node self.top.value = value self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value else: new_node = node(value) new_node_max = node(self.maximum.value) new_node_min = node(self.minimum.value) new_node.next = self.top new_node_max.next = self.maximum new_node_min.next = self.minimum self.maximum = new_node_max self.maximum.value = value self.minimum = new_node_min self.minimum.value = value self.top = new_node self.top.value = value print('Number Inserted: {}'.format(value)) def pop(self): if self.top is None: print('Stack is empty') else: removed_node = self.top.value self.top = self.top.next self.minimum = self.minimum.next self.maximum = self.maximum.next print('Top Most Element Removed : {}'.format(removedNode)) stack = stack() stack.push(3) stack.push(5) stack.getMin() stack.getMax() stack.push(2) stack.push(1) stack.getMin() stack.getMax() stack.pop() stack.getMin() stack.getMax() stack.pop()
x:[int] = None x = [] print(x[0])
x: [int] = None x = [] print(x[0])
def remove_duplicates(lst): new = [] for x in lst: if x not in new: new.append(x) return new
def remove_duplicates(lst): new = [] for x in lst: if x not in new: new.append(x) return new
class Config: # helps to store settings for an experiment. def __init__(self, _experiments_folder_path='experiments', _dataset_name='dataset', _column_names='unknown', _types={1:'integer', 2:'string', 3:'float', 4:'boolean', 5:'gender', 6:'unknown', 7:'date-iso-8601', 8:'date-eu', 9:'date-non-std-subtype', 10:'date-non-std', 11:'positive integer', 12:'positive float'}): self.main_experiments_folder = _experiments_folder_path self.dataset_name = _dataset_name self.column_names = _column_names self.types = _types self.types_as_list = list(_types.values()) columns = ['missing', 'catch-all',] for key in _types: columns.append(_types[key]) self.columns = columns
class Config: def __init__(self, _experiments_folder_path='experiments', _dataset_name='dataset', _column_names='unknown', _types={1: 'integer', 2: 'string', 3: 'float', 4: 'boolean', 5: 'gender', 6: 'unknown', 7: 'date-iso-8601', 8: 'date-eu', 9: 'date-non-std-subtype', 10: 'date-non-std', 11: 'positive integer', 12: 'positive float'}): self.main_experiments_folder = _experiments_folder_path self.dataset_name = _dataset_name self.column_names = _column_names self.types = _types self.types_as_list = list(_types.values()) columns = ['missing', 'catch-all'] for key in _types: columns.append(_types[key]) self.columns = columns
data = ( 'Lun ', # 0x00 'Kua ', # 0x01 'Ling ', # 0x02 'Bei ', # 0x03 'Lu ', # 0x04 'Li ', # 0x05 'Qiang ', # 0x06 'Pou ', # 0x07 'Juan ', # 0x08 'Min ', # 0x09 'Zui ', # 0x0a 'Peng ', # 0x0b 'An ', # 0x0c 'Pi ', # 0x0d 'Xian ', # 0x0e 'Ya ', # 0x0f 'Zhui ', # 0x10 'Lei ', # 0x11 'A ', # 0x12 'Kong ', # 0x13 'Ta ', # 0x14 'Kun ', # 0x15 'Du ', # 0x16 'Wei ', # 0x17 'Chui ', # 0x18 'Zi ', # 0x19 'Zheng ', # 0x1a 'Ben ', # 0x1b 'Nie ', # 0x1c 'Cong ', # 0x1d 'Qun ', # 0x1e 'Tan ', # 0x1f 'Ding ', # 0x20 'Qi ', # 0x21 'Qian ', # 0x22 'Zhuo ', # 0x23 'Qi ', # 0x24 'Yu ', # 0x25 'Jin ', # 0x26 'Guan ', # 0x27 'Mao ', # 0x28 'Chang ', # 0x29 'Tian ', # 0x2a 'Xi ', # 0x2b 'Lian ', # 0x2c 'Tao ', # 0x2d 'Gu ', # 0x2e 'Cuo ', # 0x2f 'Shu ', # 0x30 'Zhen ', # 0x31 'Lu ', # 0x32 'Meng ', # 0x33 'Lu ', # 0x34 'Hua ', # 0x35 'Biao ', # 0x36 'Ga ', # 0x37 'Lai ', # 0x38 'Ken ', # 0x39 'Kazari ', # 0x3a 'Bu ', # 0x3b 'Nai ', # 0x3c 'Wan ', # 0x3d 'Zan ', # 0x3e '[?] ', # 0x3f 'De ', # 0x40 'Xian ', # 0x41 '[?] ', # 0x42 'Huo ', # 0x43 'Liang ', # 0x44 '[?] ', # 0x45 'Men ', # 0x46 'Kai ', # 0x47 'Ying ', # 0x48 'Di ', # 0x49 'Lian ', # 0x4a 'Guo ', # 0x4b 'Xian ', # 0x4c 'Du ', # 0x4d 'Tu ', # 0x4e 'Wei ', # 0x4f 'Cong ', # 0x50 'Fu ', # 0x51 'Rou ', # 0x52 'Ji ', # 0x53 'E ', # 0x54 'Rou ', # 0x55 'Chen ', # 0x56 'Ti ', # 0x57 'Zha ', # 0x58 'Hong ', # 0x59 'Yang ', # 0x5a 'Duan ', # 0x5b 'Xia ', # 0x5c 'Yu ', # 0x5d 'Keng ', # 0x5e 'Xing ', # 0x5f 'Huang ', # 0x60 'Wei ', # 0x61 'Fu ', # 0x62 'Zhao ', # 0x63 'Cha ', # 0x64 'Qie ', # 0x65 'She ', # 0x66 'Hong ', # 0x67 'Kui ', # 0x68 'Tian ', # 0x69 'Mou ', # 0x6a 'Qiao ', # 0x6b 'Qiao ', # 0x6c 'Hou ', # 0x6d 'Tou ', # 0x6e 'Cong ', # 0x6f 'Huan ', # 0x70 'Ye ', # 0x71 'Min ', # 0x72 'Jian ', # 0x73 'Duan ', # 0x74 'Jian ', # 0x75 'Song ', # 0x76 'Kui ', # 0x77 'Hu ', # 0x78 'Xuan ', # 0x79 'Duo ', # 0x7a 'Jie ', # 0x7b 'Zhen ', # 0x7c 'Bian ', # 0x7d 'Zhong ', # 0x7e 'Zi ', # 0x7f 'Xiu ', # 0x80 'Ye ', # 0x81 'Mei ', # 0x82 'Pai ', # 0x83 'Ai ', # 0x84 'Jie ', # 0x85 '[?] ', # 0x86 'Mei ', # 0x87 'Chuo ', # 0x88 'Ta ', # 0x89 'Bang ', # 0x8a 'Xia ', # 0x8b 'Lian ', # 0x8c 'Suo ', # 0x8d 'Xi ', # 0x8e 'Liu ', # 0x8f 'Zu ', # 0x90 'Ye ', # 0x91 'Nou ', # 0x92 'Weng ', # 0x93 'Rong ', # 0x94 'Tang ', # 0x95 'Suo ', # 0x96 'Qiang ', # 0x97 'Ge ', # 0x98 'Shuo ', # 0x99 'Chui ', # 0x9a 'Bo ', # 0x9b 'Pan ', # 0x9c 'Sa ', # 0x9d 'Bi ', # 0x9e 'Sang ', # 0x9f 'Gang ', # 0xa0 'Zi ', # 0xa1 'Wu ', # 0xa2 'Ying ', # 0xa3 'Huang ', # 0xa4 'Tiao ', # 0xa5 'Liu ', # 0xa6 'Kai ', # 0xa7 'Sun ', # 0xa8 'Sha ', # 0xa9 'Sou ', # 0xaa 'Wan ', # 0xab 'Hao ', # 0xac 'Zhen ', # 0xad 'Zhen ', # 0xae 'Luo ', # 0xaf 'Yi ', # 0xb0 'Yuan ', # 0xb1 'Tang ', # 0xb2 'Nie ', # 0xb3 'Xi ', # 0xb4 'Jia ', # 0xb5 'Ge ', # 0xb6 'Ma ', # 0xb7 'Juan ', # 0xb8 'Kasugai ', # 0xb9 'Habaki ', # 0xba 'Suo ', # 0xbb '[?] ', # 0xbc '[?] ', # 0xbd '[?] ', # 0xbe 'Na ', # 0xbf 'Lu ', # 0xc0 'Suo ', # 0xc1 'Ou ', # 0xc2 'Zu ', # 0xc3 'Tuan ', # 0xc4 'Xiu ', # 0xc5 'Guan ', # 0xc6 'Xuan ', # 0xc7 'Lian ', # 0xc8 'Shou ', # 0xc9 'Ao ', # 0xca 'Man ', # 0xcb 'Mo ', # 0xcc 'Luo ', # 0xcd 'Bi ', # 0xce 'Wei ', # 0xcf 'Liu ', # 0xd0 'Di ', # 0xd1 'Qiao ', # 0xd2 'Cong ', # 0xd3 'Yi ', # 0xd4 'Lu ', # 0xd5 'Ao ', # 0xd6 'Keng ', # 0xd7 'Qiang ', # 0xd8 'Cui ', # 0xd9 'Qi ', # 0xda 'Chang ', # 0xdb 'Tang ', # 0xdc 'Man ', # 0xdd 'Yong ', # 0xde 'Chan ', # 0xdf 'Feng ', # 0xe0 'Jing ', # 0xe1 'Biao ', # 0xe2 'Shu ', # 0xe3 'Lou ', # 0xe4 'Xiu ', # 0xe5 'Cong ', # 0xe6 'Long ', # 0xe7 'Zan ', # 0xe8 'Jian ', # 0xe9 'Cao ', # 0xea 'Li ', # 0xeb 'Xia ', # 0xec 'Xi ', # 0xed 'Kang ', # 0xee '[?] ', # 0xef 'Beng ', # 0xf0 '[?] ', # 0xf1 '[?] ', # 0xf2 'Zheng ', # 0xf3 'Lu ', # 0xf4 'Hua ', # 0xf5 'Ji ', # 0xf6 'Pu ', # 0xf7 'Hui ', # 0xf8 'Qiang ', # 0xf9 'Po ', # 0xfa 'Lin ', # 0xfb 'Suo ', # 0xfc 'Xiu ', # 0xfd 'San ', # 0xfe 'Cheng ', # 0xff )
data = ('Lun ', 'Kua ', 'Ling ', 'Bei ', 'Lu ', 'Li ', 'Qiang ', 'Pou ', 'Juan ', 'Min ', 'Zui ', 'Peng ', 'An ', 'Pi ', 'Xian ', 'Ya ', 'Zhui ', 'Lei ', 'A ', 'Kong ', 'Ta ', 'Kun ', 'Du ', 'Wei ', 'Chui ', 'Zi ', 'Zheng ', 'Ben ', 'Nie ', 'Cong ', 'Qun ', 'Tan ', 'Ding ', 'Qi ', 'Qian ', 'Zhuo ', 'Qi ', 'Yu ', 'Jin ', 'Guan ', 'Mao ', 'Chang ', 'Tian ', 'Xi ', 'Lian ', 'Tao ', 'Gu ', 'Cuo ', 'Shu ', 'Zhen ', 'Lu ', 'Meng ', 'Lu ', 'Hua ', 'Biao ', 'Ga ', 'Lai ', 'Ken ', 'Kazari ', 'Bu ', 'Nai ', 'Wan ', 'Zan ', '[?] ', 'De ', 'Xian ', '[?] ', 'Huo ', 'Liang ', '[?] ', 'Men ', 'Kai ', 'Ying ', 'Di ', 'Lian ', 'Guo ', 'Xian ', 'Du ', 'Tu ', 'Wei ', 'Cong ', 'Fu ', 'Rou ', 'Ji ', 'E ', 'Rou ', 'Chen ', 'Ti ', 'Zha ', 'Hong ', 'Yang ', 'Duan ', 'Xia ', 'Yu ', 'Keng ', 'Xing ', 'Huang ', 'Wei ', 'Fu ', 'Zhao ', 'Cha ', 'Qie ', 'She ', 'Hong ', 'Kui ', 'Tian ', 'Mou ', 'Qiao ', 'Qiao ', 'Hou ', 'Tou ', 'Cong ', 'Huan ', 'Ye ', 'Min ', 'Jian ', 'Duan ', 'Jian ', 'Song ', 'Kui ', 'Hu ', 'Xuan ', 'Duo ', 'Jie ', 'Zhen ', 'Bian ', 'Zhong ', 'Zi ', 'Xiu ', 'Ye ', 'Mei ', 'Pai ', 'Ai ', 'Jie ', '[?] ', 'Mei ', 'Chuo ', 'Ta ', 'Bang ', 'Xia ', 'Lian ', 'Suo ', 'Xi ', 'Liu ', 'Zu ', 'Ye ', 'Nou ', 'Weng ', 'Rong ', 'Tang ', 'Suo ', 'Qiang ', 'Ge ', 'Shuo ', 'Chui ', 'Bo ', 'Pan ', 'Sa ', 'Bi ', 'Sang ', 'Gang ', 'Zi ', 'Wu ', 'Ying ', 'Huang ', 'Tiao ', 'Liu ', 'Kai ', 'Sun ', 'Sha ', 'Sou ', 'Wan ', 'Hao ', 'Zhen ', 'Zhen ', 'Luo ', 'Yi ', 'Yuan ', 'Tang ', 'Nie ', 'Xi ', 'Jia ', 'Ge ', 'Ma ', 'Juan ', 'Kasugai ', 'Habaki ', 'Suo ', '[?] ', '[?] ', '[?] ', 'Na ', 'Lu ', 'Suo ', 'Ou ', 'Zu ', 'Tuan ', 'Xiu ', 'Guan ', 'Xuan ', 'Lian ', 'Shou ', 'Ao ', 'Man ', 'Mo ', 'Luo ', 'Bi ', 'Wei ', 'Liu ', 'Di ', 'Qiao ', 'Cong ', 'Yi ', 'Lu ', 'Ao ', 'Keng ', 'Qiang ', 'Cui ', 'Qi ', 'Chang ', 'Tang ', 'Man ', 'Yong ', 'Chan ', 'Feng ', 'Jing ', 'Biao ', 'Shu ', 'Lou ', 'Xiu ', 'Cong ', 'Long ', 'Zan ', 'Jian ', 'Cao ', 'Li ', 'Xia ', 'Xi ', 'Kang ', '[?] ', 'Beng ', '[?] ', '[?] ', 'Zheng ', 'Lu ', 'Hua ', 'Ji ', 'Pu ', 'Hui ', 'Qiang ', 'Po ', 'Lin ', 'Suo ', 'Xiu ', 'San ', 'Cheng ')
def three_sum(nums): """ Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. :param nums: list[int] :return: list[list[int]] """ if len(nums) < 3: return [] nums.sort() res = [] for i in range(len(nums) - 2): if i > 0 and nums[i - 1] == nums[i]: continue l, r = i + 1, len(nums) - 1 while l < r: s = nums[i] + nums[l] + nums[r] if s == 0: res.append([nums[i], nums[l], nums[r]]) l += 1; r -= 1 while l < r and nums[l] == nums[l - 1]: l += 1 while l < r and nums[r] == nums[r + 1]: r -= 1 elif s < 0: l += 1 else: r -= 1 return res
def three_sum(nums): """ Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. :param nums: list[int] :return: list[list[int]] """ if len(nums) < 3: return [] nums.sort() res = [] for i in range(len(nums) - 2): if i > 0 and nums[i - 1] == nums[i]: continue (l, r) = (i + 1, len(nums) - 1) while l < r: s = nums[i] + nums[l] + nums[r] if s == 0: res.append([nums[i], nums[l], nums[r]]) l += 1 r -= 1 while l < r and nums[l] == nums[l - 1]: l += 1 while l < r and nums[r] == nums[r + 1]: r -= 1 elif s < 0: l += 1 else: r -= 1 return res
class Allergies(object): def __init__(self, score): pass def allergic_to(self, item): pass @property def lst(self): pass
class Allergies(object): def __init__(self, score): pass def allergic_to(self, item): pass @property def lst(self): pass
# # PySNMP MIB module CISCO-IETF-PW-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-PW-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:43:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion") CpwVcType, CpwGroupID, CpwVcIndexType, CpwOperStatus, CpwVcIDType = mibBuilder.importSymbols("CISCO-IETF-PW-TC-MIB", "CpwVcType", "CpwGroupID", "CpwVcIndexType", "CpwOperStatus", "CpwVcIDType") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") Counter32, MibIdentifier, experimental, ModuleIdentity, Unsigned32, NotificationType, IpAddress, TimeTicks, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Gauge32, ObjectIdentity, Counter64, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibIdentifier", "experimental", "ModuleIdentity", "Unsigned32", "NotificationType", "IpAddress", "TimeTicks", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Gauge32", "ObjectIdentity", "Counter64", "Integer32") TruthValue, TimeStamp, StorageType, RowStatus, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TimeStamp", "StorageType", "RowStatus", "TextualConvention", "DisplayString") cpwVcMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 106)) cpwVcMIB.setRevisions(('2004-03-17 12:00', '2003-02-26 12:00', '2002-05-26 12:00', '2002-01-30 12:00', '2001-11-07 12:00', '2001-07-11 12:00',)) if mibBuilder.loadTexts: cpwVcMIB.setLastUpdated('200403171200Z') if mibBuilder.loadTexts: cpwVcMIB.setOrganization('Cisco Systems, Inc.') cpwVcObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 1)) cpwVcNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 2)) cpwVcConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3)) cpwVcIndexNext = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcIndexNext.setStatus('current') cpwVcTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2), ) if mibBuilder.loadTexts: cpwVcTable.setStatus('current') cpwVcEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcIndex")) if mibBuilder.loadTexts: cpwVcEntry.setStatus('current') cpwVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 1), CpwVcIndexType()) if mibBuilder.loadTexts: cpwVcIndex.setStatus('current') cpwVcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 2), CpwVcType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcType.setStatus('current') cpwVcOwner = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("manual", 1), ("maintenanceProtocol", 2), ("other", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcOwner.setStatus('current') cpwVcPsnType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("mpls", 1), ("l2tp", 2), ("ip", 3), ("mplsOverIp", 4), ("gre", 5), ("other", 6)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcPsnType.setStatus('current') cpwVcSetUpPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcSetUpPriority.setStatus('current') cpwVcHoldingPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcHoldingPriority.setStatus('current') cpwVcInboundMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("loose", 1), ("strict", 2))).clone('loose')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcInboundMode.setStatus('current') cpwVcPeerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 8), InetAddressType().clone('ipv4')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcPeerAddrType.setStatus('current') cpwVcPeerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 9), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcPeerAddr.setStatus('current') cpwVcID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 10), CpwVcIDType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcID.setStatus('current') cpwVcLocalGroupID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 11), CpwGroupID()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcLocalGroupID.setStatus('current') cpwVcControlWord = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 12), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcControlWord.setStatus('current') cpwVcLocalIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 13), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcLocalIfMtu.setStatus('current') cpwVcLocalIfString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 14), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcLocalIfString.setStatus('current') cpwVcRemoteGroupID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 15), CpwGroupID()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcRemoteGroupID.setStatus('current') cpwVcRemoteControlWord = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noControlWord", 1), ("withControlWord", 2), ("notYetKnown", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcRemoteControlWord.setStatus('current') cpwVcRemoteIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 17), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcRemoteIfMtu.setStatus('current') cpwVcRemoteIfString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 18), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcRemoteIfString.setStatus('current') cpwVcOutboundVcLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 19), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcOutboundVcLabel.setStatus('current') cpwVcInboundVcLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 20), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcInboundVcLabel.setStatus('current') cpwVcName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 21), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcName.setStatus('current') cpwVcDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 22), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcDescr.setStatus('current') cpwVcCreateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 23), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcCreateTime.setStatus('current') cpwVcUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 24), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcUpTime.setStatus('current') cpwVcAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcAdminStatus.setStatus('current') cpwVcOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 26), CpwOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcOperStatus.setStatus('current') cpwVcInboundOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 27), CpwOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcInboundOperStatus.setStatus('current') cpwVcOutboundOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 28), CpwOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcOutboundOperStatus.setStatus('current') cpwVcTimeElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 900))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcTimeElapsed.setStatus('current') cpwVcValidIntervals = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 96))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcValidIntervals.setStatus('current') cpwVcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 31), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcRowStatus.setStatus('current') cpwVcStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 32), StorageType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpwVcStorageType.setStatus('current') cpwVcPerfCurrentTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3), ) if mibBuilder.loadTexts: cpwVcPerfCurrentTable.setStatus('current') cpwVcPerfCurrentEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcIndex")) if mibBuilder.loadTexts: cpwVcPerfCurrentEntry.setStatus('current') cpwVcPerfCurrentInHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfCurrentInHCPackets.setStatus('current') cpwVcPerfCurrentInHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfCurrentInHCBytes.setStatus('current') cpwVcPerfCurrentOutHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfCurrentOutHCPackets.setStatus('current') cpwVcPerfCurrentOutHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfCurrentOutHCBytes.setStatus('current') cpwVcPerfIntervalTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4), ) if mibBuilder.loadTexts: cpwVcPerfIntervalTable.setStatus('current') cpwVcPerfIntervalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcIndex"), (0, "CISCO-IETF-PW-MIB", "cpwVcPerfIntervalNumber")) if mibBuilder.loadTexts: cpwVcPerfIntervalEntry.setStatus('current') cpwVcPerfIntervalNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 96))) if mibBuilder.loadTexts: cpwVcPerfIntervalNumber.setStatus('current') cpwVcPerfIntervalValidData = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalValidData.setStatus('current') cpwVcPerfIntervalTimeElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalTimeElapsed.setStatus('current') cpwVcPerfIntervalInHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalInHCPackets.setStatus('current') cpwVcPerfIntervalInHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalInHCBytes.setStatus('current') cpwVcPerfIntervalOutHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalOutHCPackets.setStatus('current') cpwVcPerfIntervalOutHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfIntervalOutHCBytes.setStatus('current') cpwVcPerfTotalTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5), ) if mibBuilder.loadTexts: cpwVcPerfTotalTable.setStatus('current') cpwVcPerfTotalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcIndex")) if mibBuilder.loadTexts: cpwVcPerfTotalEntry.setStatus('current') cpwVcPerfTotalInHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalInHCPackets.setStatus('current') cpwVcPerfTotalInHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalInHCBytes.setStatus('current') cpwVcPerfTotalOutHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalOutHCPackets.setStatus('current') cpwVcPerfTotalOutHCBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalOutHCBytes.setStatus('current') cpwVcPerfTotalDiscontinuityTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalDiscontinuityTime.setStatus('current') cpwVcPerfTotalErrorPackets = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPerfTotalErrorPackets.setStatus('current') cpwVcIdMappingTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7), ) if mibBuilder.loadTexts: cpwVcIdMappingTable.setStatus('current') cpwVcIdMappingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcIdMappingVcType"), (0, "CISCO-IETF-PW-MIB", "cpwVcIdMappingVcID"), (0, "CISCO-IETF-PW-MIB", "cpwVcIdMappingPeerAddrType"), (0, "CISCO-IETF-PW-MIB", "cpwVcIdMappingPeerAddr"), (0, "CISCO-IETF-PW-MIB", "cpwVcIdMappingVcIndex")) if mibBuilder.loadTexts: cpwVcIdMappingEntry.setStatus('current') cpwVcIdMappingVcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 1), CpwVcType()) if mibBuilder.loadTexts: cpwVcIdMappingVcType.setStatus('current') cpwVcIdMappingVcID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 2), CpwVcIDType()) if mibBuilder.loadTexts: cpwVcIdMappingVcID.setStatus('current') cpwVcIdMappingPeerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 3), InetAddressType()) if mibBuilder.loadTexts: cpwVcIdMappingPeerAddrType.setStatus('current') cpwVcIdMappingPeerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 4), InetAddress()) if mibBuilder.loadTexts: cpwVcIdMappingPeerAddr.setStatus('current') cpwVcIdMappingVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 5), CpwVcIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcIdMappingVcIndex.setStatus('current') cpwVcPeerMappingTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8), ) if mibBuilder.loadTexts: cpwVcPeerMappingTable.setStatus('current') cpwVcPeerMappingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1), ).setIndexNames((0, "CISCO-IETF-PW-MIB", "cpwVcPeerMappingPeerAddrType"), (0, "CISCO-IETF-PW-MIB", "cpwVcPeerMappingPeerAddr"), (0, "CISCO-IETF-PW-MIB", "cpwVcPeerMappingVcType"), (0, "CISCO-IETF-PW-MIB", "cpwVcPeerMappingVcID"), (0, "CISCO-IETF-PW-MIB", "cpwVcPeerMappingVcIndex")) if mibBuilder.loadTexts: cpwVcPeerMappingEntry.setStatus('current') cpwVcPeerMappingPeerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 1), InetAddressType()) if mibBuilder.loadTexts: cpwVcPeerMappingPeerAddrType.setStatus('current') cpwVcPeerMappingPeerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 2), InetAddress()) if mibBuilder.loadTexts: cpwVcPeerMappingPeerAddr.setStatus('current') cpwVcPeerMappingVcType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 3), CpwVcType()) if mibBuilder.loadTexts: cpwVcPeerMappingVcType.setStatus('current') cpwVcPeerMappingVcID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 4), CpwVcIDType()) if mibBuilder.loadTexts: cpwVcPeerMappingVcID.setStatus('current') cpwVcPeerMappingVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 5), CpwVcIndexType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpwVcPeerMappingVcIndex.setStatus('current') cpwVcUpDownNotifEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 9), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpwVcUpDownNotifEnable.setStatus('current') cpwVcNotifRate = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 10), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpwVcNotifRate.setStatus('current') cpwVcDown = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 106, 2, 1)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcOperStatus"), ("CISCO-IETF-PW-MIB", "cpwVcOperStatus")) if mibBuilder.loadTexts: cpwVcDown.setStatus('current') cpwVcUp = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 106, 2, 2)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcOperStatus"), ("CISCO-IETF-PW-MIB", "cpwVcOperStatus")) if mibBuilder.loadTexts: cpwVcUp.setStatus('current') cpwVcGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1)) cpwVcCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 2)) cpwModuleCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 2, 1)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcGroup"), ("CISCO-IETF-PW-MIB", "cpwVcPeformanceGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwModuleCompliance = cpwModuleCompliance.setStatus('current') cpwVcGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 1)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcIndexNext"), ("CISCO-IETF-PW-MIB", "cpwVcType"), ("CISCO-IETF-PW-MIB", "cpwVcOwner"), ("CISCO-IETF-PW-MIB", "cpwVcPsnType"), ("CISCO-IETF-PW-MIB", "cpwVcSetUpPriority"), ("CISCO-IETF-PW-MIB", "cpwVcHoldingPriority"), ("CISCO-IETF-PW-MIB", "cpwVcInboundMode"), ("CISCO-IETF-PW-MIB", "cpwVcPeerAddrType"), ("CISCO-IETF-PW-MIB", "cpwVcPeerAddr"), ("CISCO-IETF-PW-MIB", "cpwVcID"), ("CISCO-IETF-PW-MIB", "cpwVcLocalGroupID"), ("CISCO-IETF-PW-MIB", "cpwVcControlWord"), ("CISCO-IETF-PW-MIB", "cpwVcLocalIfMtu"), ("CISCO-IETF-PW-MIB", "cpwVcLocalIfString"), ("CISCO-IETF-PW-MIB", "cpwVcRemoteGroupID"), ("CISCO-IETF-PW-MIB", "cpwVcRemoteControlWord"), ("CISCO-IETF-PW-MIB", "cpwVcRemoteIfMtu"), ("CISCO-IETF-PW-MIB", "cpwVcRemoteIfString"), ("CISCO-IETF-PW-MIB", "cpwVcOutboundVcLabel"), ("CISCO-IETF-PW-MIB", "cpwVcInboundVcLabel"), ("CISCO-IETF-PW-MIB", "cpwVcName"), ("CISCO-IETF-PW-MIB", "cpwVcDescr"), ("CISCO-IETF-PW-MIB", "cpwVcCreateTime"), ("CISCO-IETF-PW-MIB", "cpwVcUpTime"), ("CISCO-IETF-PW-MIB", "cpwVcAdminStatus"), ("CISCO-IETF-PW-MIB", "cpwVcOperStatus"), ("CISCO-IETF-PW-MIB", "cpwVcOutboundOperStatus"), ("CISCO-IETF-PW-MIB", "cpwVcInboundOperStatus"), ("CISCO-IETF-PW-MIB", "cpwVcTimeElapsed"), ("CISCO-IETF-PW-MIB", "cpwVcValidIntervals"), ("CISCO-IETF-PW-MIB", "cpwVcRowStatus"), ("CISCO-IETF-PW-MIB", "cpwVcStorageType"), ("CISCO-IETF-PW-MIB", "cpwVcUpDownNotifEnable"), ("CISCO-IETF-PW-MIB", "cpwVcNotifRate")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcGroup = cpwVcGroup.setStatus('current') cpwVcPeformanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 2)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcPerfCurrentInHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfCurrentInHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfCurrentOutHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfCurrentOutHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalValidData"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalTimeElapsed"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalInHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalInHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalOutHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfIntervalOutHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalInHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalInHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalOutHCPackets"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalOutHCBytes"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalDiscontinuityTime"), ("CISCO-IETF-PW-MIB", "cpwVcPerfTotalErrorPackets")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcPeformanceGroup = cpwVcPeformanceGroup.setStatus('current') cpwVcMappingTablesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 3)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcIdMappingVcIndex"), ("CISCO-IETF-PW-MIB", "cpwVcPeerMappingVcIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcMappingTablesGroup = cpwVcMappingTablesGroup.setStatus('current') cpwVcNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 4)).setObjects(("CISCO-IETF-PW-MIB", "cpwVcUp"), ("CISCO-IETF-PW-MIB", "cpwVcDown")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpwVcNotificationsGroup = cpwVcNotificationsGroup.setStatus('current') mibBuilder.exportSymbols("CISCO-IETF-PW-MIB", cpwVcDown=cpwVcDown, cpwVcIdMappingVcType=cpwVcIdMappingVcType, cpwVcControlWord=cpwVcControlWord, cpwVcPerfIntervalValidData=cpwVcPerfIntervalValidData, cpwVcSetUpPriority=cpwVcSetUpPriority, cpwVcPsnType=cpwVcPsnType, cpwVcStorageType=cpwVcStorageType, cpwVcPeerMappingVcID=cpwVcPeerMappingVcID, cpwVcPeerMappingTable=cpwVcPeerMappingTable, cpwVcPerfTotalInHCBytes=cpwVcPerfTotalInHCBytes, PYSNMP_MODULE_ID=cpwVcMIB, cpwVcPerfIntervalTimeElapsed=cpwVcPerfIntervalTimeElapsed, cpwVcIdMappingPeerAddrType=cpwVcIdMappingPeerAddrType, cpwVcPeerAddrType=cpwVcPeerAddrType, cpwVcHoldingPriority=cpwVcHoldingPriority, cpwVcPerfTotalInHCPackets=cpwVcPerfTotalInHCPackets, cpwVcIndexNext=cpwVcIndexNext, cpwVcIdMappingTable=cpwVcIdMappingTable, cpwVcMappingTablesGroup=cpwVcMappingTablesGroup, cpwVcPeformanceGroup=cpwVcPeformanceGroup, cpwVcEntry=cpwVcEntry, cpwVcPeerAddr=cpwVcPeerAddr, cpwVcInboundVcLabel=cpwVcInboundVcLabel, cpwVcPerfTotalOutHCBytes=cpwVcPerfTotalOutHCBytes, cpwVcMIB=cpwVcMIB, cpwVcValidIntervals=cpwVcValidIntervals, cpwVcOwner=cpwVcOwner, cpwVcRemoteGroupID=cpwVcRemoteGroupID, cpwVcPerfIntervalTable=cpwVcPerfIntervalTable, cpwVcPeerMappingPeerAddr=cpwVcPeerMappingPeerAddr, cpwVcConformance=cpwVcConformance, cpwVcPerfIntervalOutHCPackets=cpwVcPerfIntervalOutHCPackets, cpwVcInboundOperStatus=cpwVcInboundOperStatus, cpwVcPerfCurrentTable=cpwVcPerfCurrentTable, cpwVcPerfTotalDiscontinuityTime=cpwVcPerfTotalDiscontinuityTime, cpwVcOutboundVcLabel=cpwVcOutboundVcLabel, cpwVcUp=cpwVcUp, cpwVcIdMappingVcID=cpwVcIdMappingVcID, cpwVcLocalIfString=cpwVcLocalIfString, cpwVcUpTime=cpwVcUpTime, cpwVcPeerMappingPeerAddrType=cpwVcPeerMappingPeerAddrType, cpwVcType=cpwVcType, cpwVcPeerMappingVcType=cpwVcPeerMappingVcType, cpwVcPerfIntervalEntry=cpwVcPerfIntervalEntry, cpwVcPerfIntervalNumber=cpwVcPerfIntervalNumber, cpwVcName=cpwVcName, cpwVcPerfIntervalOutHCBytes=cpwVcPerfIntervalOutHCBytes, cpwVcRemoteIfMtu=cpwVcRemoteIfMtu, cpwVcIdMappingPeerAddr=cpwVcIdMappingPeerAddr, cpwVcID=cpwVcID, cpwVcPerfIntervalInHCPackets=cpwVcPerfIntervalInHCPackets, cpwVcPerfTotalEntry=cpwVcPerfTotalEntry, cpwVcNotificationsGroup=cpwVcNotificationsGroup, cpwVcCreateTime=cpwVcCreateTime, cpwVcNotifRate=cpwVcNotifRate, cpwVcPerfCurrentInHCBytes=cpwVcPerfCurrentInHCBytes, cpwVcRemoteControlWord=cpwVcRemoteControlWord, cpwVcLocalIfMtu=cpwVcLocalIfMtu, cpwVcNotifications=cpwVcNotifications, cpwVcInboundMode=cpwVcInboundMode, cpwVcRemoteIfString=cpwVcRemoteIfString, cpwVcGroup=cpwVcGroup, cpwVcPerfTotalTable=cpwVcPerfTotalTable, cpwVcPerfTotalOutHCPackets=cpwVcPerfTotalOutHCPackets, cpwVcPeerMappingEntry=cpwVcPeerMappingEntry, cpwVcTable=cpwVcTable, cpwVcGroups=cpwVcGroups, cpwVcPerfIntervalInHCBytes=cpwVcPerfIntervalInHCBytes, cpwModuleCompliance=cpwModuleCompliance, cpwVcPerfCurrentOutHCPackets=cpwVcPerfCurrentOutHCPackets, cpwVcObjects=cpwVcObjects, cpwVcPeerMappingVcIndex=cpwVcPeerMappingVcIndex, cpwVcCompliances=cpwVcCompliances, cpwVcLocalGroupID=cpwVcLocalGroupID, cpwVcTimeElapsed=cpwVcTimeElapsed, cpwVcIndex=cpwVcIndex, cpwVcRowStatus=cpwVcRowStatus, cpwVcPerfTotalErrorPackets=cpwVcPerfTotalErrorPackets, cpwVcIdMappingEntry=cpwVcIdMappingEntry, cpwVcDescr=cpwVcDescr, cpwVcPerfCurrentEntry=cpwVcPerfCurrentEntry, cpwVcPerfCurrentInHCPackets=cpwVcPerfCurrentInHCPackets, cpwVcIdMappingVcIndex=cpwVcIdMappingVcIndex, cpwVcOperStatus=cpwVcOperStatus, cpwVcOutboundOperStatus=cpwVcOutboundOperStatus, cpwVcAdminStatus=cpwVcAdminStatus, cpwVcUpDownNotifEnable=cpwVcUpDownNotifEnable, cpwVcPerfCurrentOutHCBytes=cpwVcPerfCurrentOutHCBytes)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_intersection, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion') (cpw_vc_type, cpw_group_id, cpw_vc_index_type, cpw_oper_status, cpw_vc_id_type) = mibBuilder.importSymbols('CISCO-IETF-PW-TC-MIB', 'CpwVcType', 'CpwGroupID', 'CpwVcIndexType', 'CpwOperStatus', 'CpwVcIDType') (cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment') (inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (counter32, mib_identifier, experimental, module_identity, unsigned32, notification_type, ip_address, time_ticks, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, gauge32, object_identity, counter64, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'MibIdentifier', 'experimental', 'ModuleIdentity', 'Unsigned32', 'NotificationType', 'IpAddress', 'TimeTicks', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Gauge32', 'ObjectIdentity', 'Counter64', 'Integer32') (truth_value, time_stamp, storage_type, row_status, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TimeStamp', 'StorageType', 'RowStatus', 'TextualConvention', 'DisplayString') cpw_vc_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 106)) cpwVcMIB.setRevisions(('2004-03-17 12:00', '2003-02-26 12:00', '2002-05-26 12:00', '2002-01-30 12:00', '2001-11-07 12:00', '2001-07-11 12:00')) if mibBuilder.loadTexts: cpwVcMIB.setLastUpdated('200403171200Z') if mibBuilder.loadTexts: cpwVcMIB.setOrganization('Cisco Systems, Inc.') cpw_vc_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 1)) cpw_vc_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 2)) cpw_vc_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3)) cpw_vc_index_next = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcIndexNext.setStatus('current') cpw_vc_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2)) if mibBuilder.loadTexts: cpwVcTable.setStatus('current') cpw_vc_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcIndex')) if mibBuilder.loadTexts: cpwVcEntry.setStatus('current') cpw_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 1), cpw_vc_index_type()) if mibBuilder.loadTexts: cpwVcIndex.setStatus('current') cpw_vc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 2), cpw_vc_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcType.setStatus('current') cpw_vc_owner = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('manual', 1), ('maintenanceProtocol', 2), ('other', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcOwner.setStatus('current') cpw_vc_psn_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('mpls', 1), ('l2tp', 2), ('ip', 3), ('mplsOverIp', 4), ('gre', 5), ('other', 6)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcPsnType.setStatus('current') cpw_vc_set_up_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcSetUpPriority.setStatus('current') cpw_vc_holding_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcHoldingPriority.setStatus('current') cpw_vc_inbound_mode = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('loose', 1), ('strict', 2))).clone('loose')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcInboundMode.setStatus('current') cpw_vc_peer_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 8), inet_address_type().clone('ipv4')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcPeerAddrType.setStatus('current') cpw_vc_peer_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 9), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcPeerAddr.setStatus('current') cpw_vc_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 10), cpw_vc_id_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcID.setStatus('current') cpw_vc_local_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 11), cpw_group_id()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcLocalGroupID.setStatus('current') cpw_vc_control_word = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 12), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcControlWord.setStatus('current') cpw_vc_local_if_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 13), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcLocalIfMtu.setStatus('current') cpw_vc_local_if_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 14), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcLocalIfString.setStatus('current') cpw_vc_remote_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 15), cpw_group_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcRemoteGroupID.setStatus('current') cpw_vc_remote_control_word = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noControlWord', 1), ('withControlWord', 2), ('notYetKnown', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcRemoteControlWord.setStatus('current') cpw_vc_remote_if_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 17), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcRemoteIfMtu.setStatus('current') cpw_vc_remote_if_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 18), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcRemoteIfString.setStatus('current') cpw_vc_outbound_vc_label = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 19), unsigned32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcOutboundVcLabel.setStatus('current') cpw_vc_inbound_vc_label = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 20), unsigned32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcInboundVcLabel.setStatus('current') cpw_vc_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 21), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcName.setStatus('current') cpw_vc_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 22), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcDescr.setStatus('current') cpw_vc_create_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 23), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcCreateTime.setStatus('current') cpw_vc_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 24), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcUpTime.setStatus('current') cpw_vc_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcAdminStatus.setStatus('current') cpw_vc_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 26), cpw_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcOperStatus.setStatus('current') cpw_vc_inbound_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 27), cpw_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcInboundOperStatus.setStatus('current') cpw_vc_outbound_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 28), cpw_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcOutboundOperStatus.setStatus('current') cpw_vc_time_elapsed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(1, 900))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcTimeElapsed.setStatus('current') cpw_vc_valid_intervals = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(0, 96))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcValidIntervals.setStatus('current') cpw_vc_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 31), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcRowStatus.setStatus('current') cpw_vc_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 2, 1, 32), storage_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpwVcStorageType.setStatus('current') cpw_vc_perf_current_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3)) if mibBuilder.loadTexts: cpwVcPerfCurrentTable.setStatus('current') cpw_vc_perf_current_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcIndex')) if mibBuilder.loadTexts: cpwVcPerfCurrentEntry.setStatus('current') cpw_vc_perf_current_in_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 1), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfCurrentInHCPackets.setStatus('current') cpw_vc_perf_current_in_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfCurrentInHCBytes.setStatus('current') cpw_vc_perf_current_out_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfCurrentOutHCPackets.setStatus('current') cpw_vc_perf_current_out_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 3, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfCurrentOutHCBytes.setStatus('current') cpw_vc_perf_interval_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4)) if mibBuilder.loadTexts: cpwVcPerfIntervalTable.setStatus('current') cpw_vc_perf_interval_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcIndex'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalNumber')) if mibBuilder.loadTexts: cpwVcPerfIntervalEntry.setStatus('current') cpw_vc_perf_interval_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 96))) if mibBuilder.loadTexts: cpwVcPerfIntervalNumber.setStatus('current') cpw_vc_perf_interval_valid_data = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 2), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalValidData.setStatus('current') cpw_vc_perf_interval_time_elapsed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalTimeElapsed.setStatus('current') cpw_vc_perf_interval_in_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalInHCPackets.setStatus('current') cpw_vc_perf_interval_in_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalInHCBytes.setStatus('current') cpw_vc_perf_interval_out_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalOutHCPackets.setStatus('current') cpw_vc_perf_interval_out_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 4, 1, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfIntervalOutHCBytes.setStatus('current') cpw_vc_perf_total_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5)) if mibBuilder.loadTexts: cpwVcPerfTotalTable.setStatus('current') cpw_vc_perf_total_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcIndex')) if mibBuilder.loadTexts: cpwVcPerfTotalEntry.setStatus('current') cpw_vc_perf_total_in_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 1), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalInHCPackets.setStatus('current') cpw_vc_perf_total_in_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalInHCBytes.setStatus('current') cpw_vc_perf_total_out_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalOutHCPackets.setStatus('current') cpw_vc_perf_total_out_hc_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalOutHCBytes.setStatus('current') cpw_vc_perf_total_discontinuity_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 5, 1, 5), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalDiscontinuityTime.setStatus('current') cpw_vc_perf_total_error_packets = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPerfTotalErrorPackets.setStatus('current') cpw_vc_id_mapping_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7)) if mibBuilder.loadTexts: cpwVcIdMappingTable.setStatus('current') cpw_vc_id_mapping_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcIdMappingVcType'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcIdMappingVcID'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcIdMappingPeerAddrType'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcIdMappingPeerAddr'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcIdMappingVcIndex')) if mibBuilder.loadTexts: cpwVcIdMappingEntry.setStatus('current') cpw_vc_id_mapping_vc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 1), cpw_vc_type()) if mibBuilder.loadTexts: cpwVcIdMappingVcType.setStatus('current') cpw_vc_id_mapping_vc_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 2), cpw_vc_id_type()) if mibBuilder.loadTexts: cpwVcIdMappingVcID.setStatus('current') cpw_vc_id_mapping_peer_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 3), inet_address_type()) if mibBuilder.loadTexts: cpwVcIdMappingPeerAddrType.setStatus('current') cpw_vc_id_mapping_peer_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 4), inet_address()) if mibBuilder.loadTexts: cpwVcIdMappingPeerAddr.setStatus('current') cpw_vc_id_mapping_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 7, 1, 5), cpw_vc_index_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcIdMappingVcIndex.setStatus('current') cpw_vc_peer_mapping_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8)) if mibBuilder.loadTexts: cpwVcPeerMappingTable.setStatus('current') cpw_vc_peer_mapping_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1)).setIndexNames((0, 'CISCO-IETF-PW-MIB', 'cpwVcPeerMappingPeerAddrType'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcPeerMappingPeerAddr'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcPeerMappingVcType'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcPeerMappingVcID'), (0, 'CISCO-IETF-PW-MIB', 'cpwVcPeerMappingVcIndex')) if mibBuilder.loadTexts: cpwVcPeerMappingEntry.setStatus('current') cpw_vc_peer_mapping_peer_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 1), inet_address_type()) if mibBuilder.loadTexts: cpwVcPeerMappingPeerAddrType.setStatus('current') cpw_vc_peer_mapping_peer_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 2), inet_address()) if mibBuilder.loadTexts: cpwVcPeerMappingPeerAddr.setStatus('current') cpw_vc_peer_mapping_vc_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 3), cpw_vc_type()) if mibBuilder.loadTexts: cpwVcPeerMappingVcType.setStatus('current') cpw_vc_peer_mapping_vc_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 4), cpw_vc_id_type()) if mibBuilder.loadTexts: cpwVcPeerMappingVcID.setStatus('current') cpw_vc_peer_mapping_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 8, 1, 5), cpw_vc_index_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpwVcPeerMappingVcIndex.setStatus('current') cpw_vc_up_down_notif_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 9), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpwVcUpDownNotifEnable.setStatus('current') cpw_vc_notif_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 106, 1, 10), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpwVcNotifRate.setStatus('current') cpw_vc_down = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 106, 2, 1)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcOperStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcOperStatus')) if mibBuilder.loadTexts: cpwVcDown.setStatus('current') cpw_vc_up = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 106, 2, 2)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcOperStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcOperStatus')) if mibBuilder.loadTexts: cpwVcUp.setStatus('current') cpw_vc_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1)) cpw_vc_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 2)) cpw_module_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 2, 1)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcGroup'), ('CISCO-IETF-PW-MIB', 'cpwVcPeformanceGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpw_module_compliance = cpwModuleCompliance.setStatus('current') cpw_vc_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 1)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcIndexNext'), ('CISCO-IETF-PW-MIB', 'cpwVcType'), ('CISCO-IETF-PW-MIB', 'cpwVcOwner'), ('CISCO-IETF-PW-MIB', 'cpwVcPsnType'), ('CISCO-IETF-PW-MIB', 'cpwVcSetUpPriority'), ('CISCO-IETF-PW-MIB', 'cpwVcHoldingPriority'), ('CISCO-IETF-PW-MIB', 'cpwVcInboundMode'), ('CISCO-IETF-PW-MIB', 'cpwVcPeerAddrType'), ('CISCO-IETF-PW-MIB', 'cpwVcPeerAddr'), ('CISCO-IETF-PW-MIB', 'cpwVcID'), ('CISCO-IETF-PW-MIB', 'cpwVcLocalGroupID'), ('CISCO-IETF-PW-MIB', 'cpwVcControlWord'), ('CISCO-IETF-PW-MIB', 'cpwVcLocalIfMtu'), ('CISCO-IETF-PW-MIB', 'cpwVcLocalIfString'), ('CISCO-IETF-PW-MIB', 'cpwVcRemoteGroupID'), ('CISCO-IETF-PW-MIB', 'cpwVcRemoteControlWord'), ('CISCO-IETF-PW-MIB', 'cpwVcRemoteIfMtu'), ('CISCO-IETF-PW-MIB', 'cpwVcRemoteIfString'), ('CISCO-IETF-PW-MIB', 'cpwVcOutboundVcLabel'), ('CISCO-IETF-PW-MIB', 'cpwVcInboundVcLabel'), ('CISCO-IETF-PW-MIB', 'cpwVcName'), ('CISCO-IETF-PW-MIB', 'cpwVcDescr'), ('CISCO-IETF-PW-MIB', 'cpwVcCreateTime'), ('CISCO-IETF-PW-MIB', 'cpwVcUpTime'), ('CISCO-IETF-PW-MIB', 'cpwVcAdminStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcOperStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcOutboundOperStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcInboundOperStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcTimeElapsed'), ('CISCO-IETF-PW-MIB', 'cpwVcValidIntervals'), ('CISCO-IETF-PW-MIB', 'cpwVcRowStatus'), ('CISCO-IETF-PW-MIB', 'cpwVcStorageType'), ('CISCO-IETF-PW-MIB', 'cpwVcUpDownNotifEnable'), ('CISCO-IETF-PW-MIB', 'cpwVcNotifRate')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpw_vc_group = cpwVcGroup.setStatus('current') cpw_vc_peformance_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 2)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcPerfCurrentInHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfCurrentInHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfCurrentOutHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfCurrentOutHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalValidData'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalTimeElapsed'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalInHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalInHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalOutHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfIntervalOutHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalInHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalInHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalOutHCPackets'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalOutHCBytes'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalDiscontinuityTime'), ('CISCO-IETF-PW-MIB', 'cpwVcPerfTotalErrorPackets')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpw_vc_peformance_group = cpwVcPeformanceGroup.setStatus('current') cpw_vc_mapping_tables_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 3)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcIdMappingVcIndex'), ('CISCO-IETF-PW-MIB', 'cpwVcPeerMappingVcIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpw_vc_mapping_tables_group = cpwVcMappingTablesGroup.setStatus('current') cpw_vc_notifications_group = notification_group((1, 3, 6, 1, 4, 1, 9, 10, 106, 3, 1, 4)).setObjects(('CISCO-IETF-PW-MIB', 'cpwVcUp'), ('CISCO-IETF-PW-MIB', 'cpwVcDown')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cpw_vc_notifications_group = cpwVcNotificationsGroup.setStatus('current') mibBuilder.exportSymbols('CISCO-IETF-PW-MIB', cpwVcDown=cpwVcDown, cpwVcIdMappingVcType=cpwVcIdMappingVcType, cpwVcControlWord=cpwVcControlWord, cpwVcPerfIntervalValidData=cpwVcPerfIntervalValidData, cpwVcSetUpPriority=cpwVcSetUpPriority, cpwVcPsnType=cpwVcPsnType, cpwVcStorageType=cpwVcStorageType, cpwVcPeerMappingVcID=cpwVcPeerMappingVcID, cpwVcPeerMappingTable=cpwVcPeerMappingTable, cpwVcPerfTotalInHCBytes=cpwVcPerfTotalInHCBytes, PYSNMP_MODULE_ID=cpwVcMIB, cpwVcPerfIntervalTimeElapsed=cpwVcPerfIntervalTimeElapsed, cpwVcIdMappingPeerAddrType=cpwVcIdMappingPeerAddrType, cpwVcPeerAddrType=cpwVcPeerAddrType, cpwVcHoldingPriority=cpwVcHoldingPriority, cpwVcPerfTotalInHCPackets=cpwVcPerfTotalInHCPackets, cpwVcIndexNext=cpwVcIndexNext, cpwVcIdMappingTable=cpwVcIdMappingTable, cpwVcMappingTablesGroup=cpwVcMappingTablesGroup, cpwVcPeformanceGroup=cpwVcPeformanceGroup, cpwVcEntry=cpwVcEntry, cpwVcPeerAddr=cpwVcPeerAddr, cpwVcInboundVcLabel=cpwVcInboundVcLabel, cpwVcPerfTotalOutHCBytes=cpwVcPerfTotalOutHCBytes, cpwVcMIB=cpwVcMIB, cpwVcValidIntervals=cpwVcValidIntervals, cpwVcOwner=cpwVcOwner, cpwVcRemoteGroupID=cpwVcRemoteGroupID, cpwVcPerfIntervalTable=cpwVcPerfIntervalTable, cpwVcPeerMappingPeerAddr=cpwVcPeerMappingPeerAddr, cpwVcConformance=cpwVcConformance, cpwVcPerfIntervalOutHCPackets=cpwVcPerfIntervalOutHCPackets, cpwVcInboundOperStatus=cpwVcInboundOperStatus, cpwVcPerfCurrentTable=cpwVcPerfCurrentTable, cpwVcPerfTotalDiscontinuityTime=cpwVcPerfTotalDiscontinuityTime, cpwVcOutboundVcLabel=cpwVcOutboundVcLabel, cpwVcUp=cpwVcUp, cpwVcIdMappingVcID=cpwVcIdMappingVcID, cpwVcLocalIfString=cpwVcLocalIfString, cpwVcUpTime=cpwVcUpTime, cpwVcPeerMappingPeerAddrType=cpwVcPeerMappingPeerAddrType, cpwVcType=cpwVcType, cpwVcPeerMappingVcType=cpwVcPeerMappingVcType, cpwVcPerfIntervalEntry=cpwVcPerfIntervalEntry, cpwVcPerfIntervalNumber=cpwVcPerfIntervalNumber, cpwVcName=cpwVcName, cpwVcPerfIntervalOutHCBytes=cpwVcPerfIntervalOutHCBytes, cpwVcRemoteIfMtu=cpwVcRemoteIfMtu, cpwVcIdMappingPeerAddr=cpwVcIdMappingPeerAddr, cpwVcID=cpwVcID, cpwVcPerfIntervalInHCPackets=cpwVcPerfIntervalInHCPackets, cpwVcPerfTotalEntry=cpwVcPerfTotalEntry, cpwVcNotificationsGroup=cpwVcNotificationsGroup, cpwVcCreateTime=cpwVcCreateTime, cpwVcNotifRate=cpwVcNotifRate, cpwVcPerfCurrentInHCBytes=cpwVcPerfCurrentInHCBytes, cpwVcRemoteControlWord=cpwVcRemoteControlWord, cpwVcLocalIfMtu=cpwVcLocalIfMtu, cpwVcNotifications=cpwVcNotifications, cpwVcInboundMode=cpwVcInboundMode, cpwVcRemoteIfString=cpwVcRemoteIfString, cpwVcGroup=cpwVcGroup, cpwVcPerfTotalTable=cpwVcPerfTotalTable, cpwVcPerfTotalOutHCPackets=cpwVcPerfTotalOutHCPackets, cpwVcPeerMappingEntry=cpwVcPeerMappingEntry, cpwVcTable=cpwVcTable, cpwVcGroups=cpwVcGroups, cpwVcPerfIntervalInHCBytes=cpwVcPerfIntervalInHCBytes, cpwModuleCompliance=cpwModuleCompliance, cpwVcPerfCurrentOutHCPackets=cpwVcPerfCurrentOutHCPackets, cpwVcObjects=cpwVcObjects, cpwVcPeerMappingVcIndex=cpwVcPeerMappingVcIndex, cpwVcCompliances=cpwVcCompliances, cpwVcLocalGroupID=cpwVcLocalGroupID, cpwVcTimeElapsed=cpwVcTimeElapsed, cpwVcIndex=cpwVcIndex, cpwVcRowStatus=cpwVcRowStatus, cpwVcPerfTotalErrorPackets=cpwVcPerfTotalErrorPackets, cpwVcIdMappingEntry=cpwVcIdMappingEntry, cpwVcDescr=cpwVcDescr, cpwVcPerfCurrentEntry=cpwVcPerfCurrentEntry, cpwVcPerfCurrentInHCPackets=cpwVcPerfCurrentInHCPackets, cpwVcIdMappingVcIndex=cpwVcIdMappingVcIndex, cpwVcOperStatus=cpwVcOperStatus, cpwVcOutboundOperStatus=cpwVcOutboundOperStatus, cpwVcAdminStatus=cpwVcAdminStatus, cpwVcUpDownNotifEnable=cpwVcUpDownNotifEnable, cpwVcPerfCurrentOutHCBytes=cpwVcPerfCurrentOutHCBytes)
_base_ = [ '../_base_/models/fpn_r50.py', '../_base_/datasets/onaho.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] model = dict(decode_head=dict(num_classes=2))
_base_ = ['../_base_/models/fpn_r50.py', '../_base_/datasets/onaho.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'] model = dict(decode_head=dict(num_classes=2))
def get_default_convnet_setting(): net_width, net_depth, net_act, net_norm, net_pooling = 128, 3, 'relu', 'instancenorm', 'avgpooling' return net_width, net_depth, net_act, net_norm, net_pooling def get_loops(ipc): # Get the two hyper-parameters of outer-loop and inner-loop. # The following values are empirically good. if ipc == 1: outer_loop, inner_loop = 1, 1 elif ipc == 10: outer_loop, inner_loop = 10, 50 elif ipc == 20: outer_loop, inner_loop = 20, 25 elif ipc == 30: outer_loop, inner_loop = 30, 20 elif ipc == 40: outer_loop, inner_loop = 40, 15 elif ipc == 50: outer_loop, inner_loop = 50, 10 else: outer_loop, inner_loop = 0, 0 exit('loop hyper-parameters are not defined for %d ipc'%ipc) return outer_loop, inner_loop def get_eval_pool(eval_mode, model, model_eval): if eval_mode == 'M': # multiple architectures model_eval_pool = ['MLP', 'ConvNet', 'LeNet', 'AlexNet', 'VGG11', 'ResNet18'] elif eval_mode == 'W': # ablation study on network width model_eval_pool = ['ConvNetW32', 'ConvNetW64', 'ConvNetW128', 'ConvNetW256'] elif eval_mode == 'D': # ablation study on network depth model_eval_pool = ['ConvNetD1', 'ConvNetD2', 'ConvNetD3', 'ConvNetD4'] elif eval_mode == 'A': # ablation study on network activation function model_eval_pool = ['ConvNetAS', 'ConvNetAR', 'ConvNetAL'] elif eval_mode == 'P': # ablation study on network pooling layer model_eval_pool = ['ConvNetNP', 'ConvNetMP', 'ConvNetAP'] elif eval_mode == 'N': # ablation study on network normalization layer model_eval_pool = ['ConvNetNN', 'ConvNetBN', 'ConvNetLN', 'ConvNetIN', 'ConvNetGN'] elif eval_mode == 'S': # itself model_eval_pool = [model[:model.index('BN')]] if 'BN' in model else [model] else: model_eval_pool = [model_eval] return model_eval_pool
def get_default_convnet_setting(): (net_width, net_depth, net_act, net_norm, net_pooling) = (128, 3, 'relu', 'instancenorm', 'avgpooling') return (net_width, net_depth, net_act, net_norm, net_pooling) def get_loops(ipc): if ipc == 1: (outer_loop, inner_loop) = (1, 1) elif ipc == 10: (outer_loop, inner_loop) = (10, 50) elif ipc == 20: (outer_loop, inner_loop) = (20, 25) elif ipc == 30: (outer_loop, inner_loop) = (30, 20) elif ipc == 40: (outer_loop, inner_loop) = (40, 15) elif ipc == 50: (outer_loop, inner_loop) = (50, 10) else: (outer_loop, inner_loop) = (0, 0) exit('loop hyper-parameters are not defined for %d ipc' % ipc) return (outer_loop, inner_loop) def get_eval_pool(eval_mode, model, model_eval): if eval_mode == 'M': model_eval_pool = ['MLP', 'ConvNet', 'LeNet', 'AlexNet', 'VGG11', 'ResNet18'] elif eval_mode == 'W': model_eval_pool = ['ConvNetW32', 'ConvNetW64', 'ConvNetW128', 'ConvNetW256'] elif eval_mode == 'D': model_eval_pool = ['ConvNetD1', 'ConvNetD2', 'ConvNetD3', 'ConvNetD4'] elif eval_mode == 'A': model_eval_pool = ['ConvNetAS', 'ConvNetAR', 'ConvNetAL'] elif eval_mode == 'P': model_eval_pool = ['ConvNetNP', 'ConvNetMP', 'ConvNetAP'] elif eval_mode == 'N': model_eval_pool = ['ConvNetNN', 'ConvNetBN', 'ConvNetLN', 'ConvNetIN', 'ConvNetGN'] elif eval_mode == 'S': model_eval_pool = [model[:model.index('BN')]] if 'BN' in model else [model] else: model_eval_pool = [model_eval] return model_eval_pool
""" Space : O(1) Time : O(n) """ class Solution: def maxProfit(self, prices: List[int]) -> int: start, dp = 10**10, 0 for i in prices: print(start) start = min(start, i) dp = max(dp, i-start) return dp
""" Space : O(1) Time : O(n) """ class Solution: def max_profit(self, prices: List[int]) -> int: (start, dp) = (10 ** 10, 0) for i in prices: print(start) start = min(start, i) dp = max(dp, i - start) return dp
# node to capture and communicate game status # written by Russell on 5/18 class Game_state(): node_weight = 1 # node_bias = 1 # not going to use this for now, but may need it later list_of_moves = [] def __init__(self, node_list): self.node_list = node_list def num_moves(self): moves = 0 for i in range(len(self.node_list)): if self.node_list[i].cell_contains() != "": moves += 1 return moves def moves_list(self): #if len(self.list_of_moves) < self.num_moves(): for i in range(len(self.node_list)): if self.node_list[i].move != "" and self.node_list[i].position not in self.list_of_moves: self.list_of_moves.append(self.node_list[i].position) ret_val = self.list_of_moves #print('list of moves: type =', type(self.list_of_moves)) return ret_val def next_up(self): if self.num_moves() % 2 == 0 or self.num_moves() == 0: return "X" else: return "O" def game_prop_remaining(self): moves = self.num_moves() return 1 - moves / 9
class Game_State: node_weight = 1 list_of_moves = [] def __init__(self, node_list): self.node_list = node_list def num_moves(self): moves = 0 for i in range(len(self.node_list)): if self.node_list[i].cell_contains() != '': moves += 1 return moves def moves_list(self): for i in range(len(self.node_list)): if self.node_list[i].move != '' and self.node_list[i].position not in self.list_of_moves: self.list_of_moves.append(self.node_list[i].position) ret_val = self.list_of_moves return ret_val def next_up(self): if self.num_moves() % 2 == 0 or self.num_moves() == 0: return 'X' else: return 'O' def game_prop_remaining(self): moves = self.num_moves() return 1 - moves / 9
# Definition for an interval. # class Interval: # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution: def merge(self, intervals): """ :type intervals: List[Interval] :rtype: List[Interval] """ if len(intervals) <= 1: return intervals intervals.sort(key=lambda x: x.start) newIntervals = [intervals[0]] for i in range(1, len(intervals)): cur = intervals[i] last = newIntervals[-1] if cur.start > last.end: newIntervals.append(cur) else: last.end = max(cur.end, last.end) return newIntervals
class Solution: def merge(self, intervals): """ :type intervals: List[Interval] :rtype: List[Interval] """ if len(intervals) <= 1: return intervals intervals.sort(key=lambda x: x.start) new_intervals = [intervals[0]] for i in range(1, len(intervals)): cur = intervals[i] last = newIntervals[-1] if cur.start > last.end: newIntervals.append(cur) else: last.end = max(cur.end, last.end) return newIntervals
class myIntSynthProvider(object): def __init__(self, valobj, dict): self.valobj = valobj self.val = self.valobj.GetChildMemberWithName("theValue") def num_children(self): return 0 def get_child_at_index(self, index): return None def get_child_index(self, name): return None def update(self): return False def has_children(self): return False def get_value(self): return self.val class myArraySynthProvider(object): def __init__(self, valobj, dict): self.valobj = valobj self.array = self.valobj.GetChildMemberWithName("array") def num_children(self, max_count): if 16 < max_count: return 16 return max_count def get_child_at_index(self, index): return None # Keep it simple when this is not tested here. def get_child_index(self, name): return None # Keep it simple when this is not tested here. def has_children(self): return True
class Myintsynthprovider(object): def __init__(self, valobj, dict): self.valobj = valobj self.val = self.valobj.GetChildMemberWithName('theValue') def num_children(self): return 0 def get_child_at_index(self, index): return None def get_child_index(self, name): return None def update(self): return False def has_children(self): return False def get_value(self): return self.val class Myarraysynthprovider(object): def __init__(self, valobj, dict): self.valobj = valobj self.array = self.valobj.GetChildMemberWithName('array') def num_children(self, max_count): if 16 < max_count: return 16 return max_count def get_child_at_index(self, index): return None def get_child_index(self, name): return None def has_children(self): return True
# -*- coding: utf-8 -*- """Module init code.""" __version__ = '0.0.0' __author__ = 'Your Name' __email__ = 'your.email@mail.com'
"""Module init code.""" __version__ = '0.0.0' __author__ = 'Your Name' __email__ = 'your.email@mail.com'
""" Hydropy ======= Provides functions to work with hydrological processes and equations """
""" Hydropy ======= Provides functions to work with hydrological processes and equations """
class Photo: def __init__(self, lid, tags_list, orientation): """ Constructor :param lid: Photo identifier :param tags_list: List of tags :param orientation: Orientation. "H" for horizontal or "V" for vertical """ self.id = lid self.tags_list = tags_list self.orientation = orientation
class Photo: def __init__(self, lid, tags_list, orientation): """ Constructor :param lid: Photo identifier :param tags_list: List of tags :param orientation: Orientation. "H" for horizontal or "V" for vertical """ self.id = lid self.tags_list = tags_list self.orientation = orientation
''' Test HTTP/2 with h2spec ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. Test.Summary = ''' Test HTTP/2 with httpspec ''' Test.SkipUnless( Condition.HasProgram("h2spec", "h2spec need to be installed on system for this test to work"), ) Test.ContinueOnFail = True # ---- # Setup httpbin Origin Server # ---- httpbin = Test.MakeHttpBinServer("httpbin") # ---- # Setup ATS. Disable the cache to simplify the test. # ---- ts = Test.MakeATSProcess("ts", enable_tls=True, enable_cache=False) # add ssl materials like key, certificates for the server ts.addDefaultSSLFiles() ts.Disk.remap_config.AddLine( 'map / http://127.0.0.1:{0}'.format(httpbin.Variables.Port) ) ts.Disk.ssl_multicert_config.AddLine( 'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key' ) ts.Disk.records_config.update({ 'proxy.config.http.insert_request_via_str': 1, 'proxy.config.http.insert_response_via_str': 1, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'http', }) # ---- # Test Cases # ---- # In case you need to disable some of the tests, you can specify sections like http2/6.4. h2spec_targets = "http2/1 http2/2 http2/3 http2/4 http2/5 http2/6 http2/7 http2/8 hpack" test_run = Test.AddTestRun() test_run.Processes.Default.Command = 'h2spec {0} -t -k --timeout 10 -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) test_run.Processes.Default.ReturnCode = 0 test_run.Processes.Default.StartBefore(httpbin, ready=When.PortOpen(httpbin.Variables.Port)) test_run.Processes.Default.StartBefore(Test.Processes.ts) test_run.Processes.Default.Streams.stdout = "gold/h2spec_stdout.gold" test_run.StillRunningAfter = httpbin # Over riding the built in ERROR check since we expect some error cases ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR: HTTP/2", "h2spec tests should have error log")
""" Test HTTP/2 with h2spec """ Test.Summary = '\nTest HTTP/2 with httpspec\n' Test.SkipUnless(Condition.HasProgram('h2spec', 'h2spec need to be installed on system for this test to work')) Test.ContinueOnFail = True httpbin = Test.MakeHttpBinServer('httpbin') ts = Test.MakeATSProcess('ts', enable_tls=True, enable_cache=False) ts.addDefaultSSLFiles() ts.Disk.remap_config.AddLine('map / http://127.0.0.1:{0}'.format(httpbin.Variables.Port)) ts.Disk.ssl_multicert_config.AddLine('dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key') ts.Disk.records_config.update({'proxy.config.http.insert_request_via_str': 1, 'proxy.config.http.insert_response_via_str': 1, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'http'}) h2spec_targets = 'http2/1 http2/2 http2/3 http2/4 http2/5 http2/6 http2/7 http2/8 hpack' test_run = Test.AddTestRun() test_run.Processes.Default.Command = 'h2spec {0} -t -k --timeout 10 -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) test_run.Processes.Default.ReturnCode = 0 test_run.Processes.Default.StartBefore(httpbin, ready=When.PortOpen(httpbin.Variables.Port)) test_run.Processes.Default.StartBefore(Test.Processes.ts) test_run.Processes.Default.Streams.stdout = 'gold/h2spec_stdout.gold' test_run.StillRunningAfter = httpbin ts.Disk.diags_log.Content = Testers.ContainsExpression('ERROR: HTTP/2', 'h2spec tests should have error log')
# Dependency injection: # Technique where one object (or static method) supplies the dependencies of another object. # The objective is to decouple objects to the extent that no client code has to be changed # simply because an object it depends on needs to be changed to a different one. # Dependency injection is one form of the broader technique of inversion of control. # Theoretically, the client is not allowed to call the injector code; it is the injecting code # that constructs the services and calls the client to inject them. This means the client code # does not need to know about the injecting code, just the interfaces. This separates the # responsibilities of use and construction. # In Python there are not many frameworks for dependency injection: https://stackoverflow.com/questions/2461702/why-is-ioc-di-not-common-in-python # # source code: http://stackoverflow.com/a/3076636/5620182 class Shape(object): def __new__(cls, *args, **kwargs): # required because Line's __new__ method is the same as Shape's if cls is Shape: description, args = args[0], args[1:] if description == "It's flat": new_cls = Line else: raise ValueError( "Invalid description: {}.".format(description)) else: new_cls = cls return super(Shape, cls).__new__(new_cls, *args, **kwargs) def number_of_edges(self): return "A shape can have many edges..." class Line(Shape): def number_of_edges(self): return 1 class SomeShape(Shape): pass if __name__ == "__main__": l1 = Shape("It's flat") print(l1.number_of_edges()) # 1 l2 = Line() print(l2.number_of_edges()) # 1 u = SomeShape() print(u.number_of_edges()) # A shape can have many edges... s = Shape("Hexagon") # ValueError: Invalid description: Hexagon.
class Shape(object): def __new__(cls, *args, **kwargs): if cls is Shape: (description, args) = (args[0], args[1:]) if description == "It's flat": new_cls = Line else: raise value_error('Invalid description: {}.'.format(description)) else: new_cls = cls return super(Shape, cls).__new__(new_cls, *args, **kwargs) def number_of_edges(self): return 'A shape can have many edges...' class Line(Shape): def number_of_edges(self): return 1 class Someshape(Shape): pass if __name__ == '__main__': l1 = shape("It's flat") print(l1.number_of_edges()) l2 = line() print(l2.number_of_edges()) u = some_shape() print(u.number_of_edges()) s = shape('Hexagon')
""" 235. Lowest Common Ancestor of a Binary Search Tree """ # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def lowestCommonAncestor(self, root, p, q): """ :type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode """ minn = min(p.val, q.val) maxx = max(p.val,q.val) while root.val < minn or root.val>maxx: if root.val < minn: root = root.right else: root = root.left return root class Solution(object): def lowestCommonAncestor(self, root, p, q): """ :type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode """ if (p.val-root.val)*(q.val-root.val) <= 0: return root elif p.val < root.val: return self.lowestCommonAncestor(root.left,p,q) else: return self.lowestCommonAncestor(root.right,p,q)
""" 235. Lowest Common Ancestor of a Binary Search Tree """ class Solution(object): def lowest_common_ancestor(self, root, p, q): """ :type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode """ minn = min(p.val, q.val) maxx = max(p.val, q.val) while root.val < minn or root.val > maxx: if root.val < minn: root = root.right else: root = root.left return root class Solution(object): def lowest_common_ancestor(self, root, p, q): """ :type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode """ if (p.val - root.val) * (q.val - root.val) <= 0: return root elif p.val < root.val: return self.lowestCommonAncestor(root.left, p, q) else: return self.lowestCommonAncestor(root.right, p, q)
def conv(s): if s[0] == 'a': v = '1' elif s[0] == 'b': v = '2' elif s[0] == 'c': v = '3' elif s[0] == 'd': v = '4' elif s[0] == 'e': v = '5' elif s[0] == 'f': v = '6' elif s[0] == 'g': v = '7' elif s[0] == 'h': v = '8' v += s[1] return v e = str(input()).split() a = conv(e[0]) b = conv(e[1]) ax = int(a[0]) ay = int(a[1]) bx = int(b[0]) by = int(b[1]) if (abs(ax - bx) == 1 and abs(ay - by) == 2) or (abs(ax - bx) == 2 and abs(ay - by) == 1): print('VALIDO') else: print('INVALIDO')
def conv(s): if s[0] == 'a': v = '1' elif s[0] == 'b': v = '2' elif s[0] == 'c': v = '3' elif s[0] == 'd': v = '4' elif s[0] == 'e': v = '5' elif s[0] == 'f': v = '6' elif s[0] == 'g': v = '7' elif s[0] == 'h': v = '8' v += s[1] return v e = str(input()).split() a = conv(e[0]) b = conv(e[1]) ax = int(a[0]) ay = int(a[1]) bx = int(b[0]) by = int(b[1]) if abs(ax - bx) == 1 and abs(ay - by) == 2 or (abs(ax - bx) == 2 and abs(ay - by) == 1): print('VALIDO') else: print('INVALIDO')
#!/usr/bin/env python domain_home = os.environ['DOMAIN_HOME'] node_manager_name = os.environ['NODE_MANAGER_NAME'] component_name = os.environ['COMPONENT_NAME'] component_admin_listen_address = os.environ['COMPONENT_ADMIN_LISTEN_ADDRESS'] component_admin_listen_port = os.environ['COMPONENT_ADMIN_LISTEN_PORT'] component_listen_address = os.environ['COMPONENT_LISTEN_ADDRESS'] component_listen_port = os.environ['COMPONENT_LISTEN_PORT'] component_ssl_listen_port = os.environ['COMPONENT_SSL_LISTEN_PORT'] ###################################################################### readDomain(domain_home) cd('/') create(component_name, 'SystemComponent') cd('/SystemComponent/' + component_name) cmo.setComponentType('OHS') set('Machine', node_manager_name) cd('/OHS/' + component_name) cmo.setAdminHost(component_admin_listen_address) cmo.setAdminPort(component_admin_listen_port) cmo.setListenAddress(component_listen_address) cmo.setListenPort(component_listen_port) cmo.setSSLListenPort(component_ssl_listen_port) updateDomain() closeDomain() exit()
domain_home = os.environ['DOMAIN_HOME'] node_manager_name = os.environ['NODE_MANAGER_NAME'] component_name = os.environ['COMPONENT_NAME'] component_admin_listen_address = os.environ['COMPONENT_ADMIN_LISTEN_ADDRESS'] component_admin_listen_port = os.environ['COMPONENT_ADMIN_LISTEN_PORT'] component_listen_address = os.environ['COMPONENT_LISTEN_ADDRESS'] component_listen_port = os.environ['COMPONENT_LISTEN_PORT'] component_ssl_listen_port = os.environ['COMPONENT_SSL_LISTEN_PORT'] read_domain(domain_home) cd('/') create(component_name, 'SystemComponent') cd('/SystemComponent/' + component_name) cmo.setComponentType('OHS') set('Machine', node_manager_name) cd('/OHS/' + component_name) cmo.setAdminHost(component_admin_listen_address) cmo.setAdminPort(component_admin_listen_port) cmo.setListenAddress(component_listen_address) cmo.setListenPort(component_listen_port) cmo.setSSLListenPort(component_ssl_listen_port) update_domain() close_domain() exit()
""" @generated cargo-raze generated Bazel file. DO NOT EDIT! Replaced on runs of cargo-raze """ load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") # buildifier: disable=load def rules_rust_util_import_fetch_remote_crates(): """This function defines a collection of repos and should be called in a WORKSPACE file""" maybe( http_archive, name = "rules_rust_util_import__aho_corasick__0_7_15", url = "https://crates.io/api/v1/crates/aho-corasick/0.7.15/download", type = "tar.gz", sha256 = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5", strip_prefix = "aho-corasick-0.7.15", build_file = Label("//util/import/raze/remote:BUILD.aho-corasick-0.7.15.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__cfg_if__1_0_0", url = "https://crates.io/api/v1/crates/cfg-if/1.0.0/download", type = "tar.gz", sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd", strip_prefix = "cfg-if-1.0.0", build_file = Label("//util/import/raze/remote:BUILD.cfg-if-1.0.0.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__env_logger__0_8_4", url = "https://crates.io/api/v1/crates/env_logger/0.8.4/download", type = "tar.gz", sha256 = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3", strip_prefix = "env_logger-0.8.4", build_file = Label("//util/import/raze/remote:BUILD.env_logger-0.8.4.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__getrandom__0_2_3", url = "https://crates.io/api/v1/crates/getrandom/0.2.3/download", type = "tar.gz", sha256 = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753", strip_prefix = "getrandom-0.2.3", build_file = Label("//util/import/raze/remote:BUILD.getrandom-0.2.3.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__lazy_static__1_4_0", url = "https://crates.io/api/v1/crates/lazy_static/1.4.0/download", type = "tar.gz", sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646", strip_prefix = "lazy_static-1.4.0", build_file = Label("//util/import/raze/remote:BUILD.lazy_static-1.4.0.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__libc__0_2_112", url = "https://crates.io/api/v1/crates/libc/0.2.112/download", type = "tar.gz", sha256 = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125", strip_prefix = "libc-0.2.112", build_file = Label("//util/import/raze/remote:BUILD.libc-0.2.112.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__log__0_4_14", url = "https://crates.io/api/v1/crates/log/0.4.14/download", type = "tar.gz", sha256 = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710", strip_prefix = "log-0.4.14", build_file = Label("//util/import/raze/remote:BUILD.log-0.4.14.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__memchr__2_4_1", url = "https://crates.io/api/v1/crates/memchr/2.4.1/download", type = "tar.gz", sha256 = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a", strip_prefix = "memchr-2.4.1", build_file = Label("//util/import/raze/remote:BUILD.memchr-2.4.1.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__proc_macro2__1_0_33", url = "https://crates.io/api/v1/crates/proc-macro2/1.0.33/download", type = "tar.gz", sha256 = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a", strip_prefix = "proc-macro2-1.0.33", build_file = Label("//util/import/raze/remote:BUILD.proc-macro2-1.0.33.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__quickcheck__1_0_3", url = "https://crates.io/api/v1/crates/quickcheck/1.0.3/download", type = "tar.gz", sha256 = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6", strip_prefix = "quickcheck-1.0.3", build_file = Label("//util/import/raze/remote:BUILD.quickcheck-1.0.3.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__quote__1_0_10", url = "https://crates.io/api/v1/crates/quote/1.0.10/download", type = "tar.gz", sha256 = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05", strip_prefix = "quote-1.0.10", build_file = Label("//util/import/raze/remote:BUILD.quote-1.0.10.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__rand__0_8_4", url = "https://crates.io/api/v1/crates/rand/0.8.4/download", type = "tar.gz", sha256 = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8", strip_prefix = "rand-0.8.4", build_file = Label("//util/import/raze/remote:BUILD.rand-0.8.4.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__rand_core__0_6_3", url = "https://crates.io/api/v1/crates/rand_core/0.6.3/download", type = "tar.gz", sha256 = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7", strip_prefix = "rand_core-0.6.3", build_file = Label("//util/import/raze/remote:BUILD.rand_core-0.6.3.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__regex__1_4_6", url = "https://crates.io/api/v1/crates/regex/1.4.6/download", type = "tar.gz", sha256 = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759", strip_prefix = "regex-1.4.6", build_file = Label("//util/import/raze/remote:BUILD.regex-1.4.6.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__regex_syntax__0_6_25", url = "https://crates.io/api/v1/crates/regex-syntax/0.6.25/download", type = "tar.gz", sha256 = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b", strip_prefix = "regex-syntax-0.6.25", build_file = Label("//util/import/raze/remote:BUILD.regex-syntax-0.6.25.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__syn__1_0_82", url = "https://crates.io/api/v1/crates/syn/1.0.82/download", type = "tar.gz", sha256 = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59", strip_prefix = "syn-1.0.82", build_file = Label("//util/import/raze/remote:BUILD.syn-1.0.82.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__unicode_xid__0_2_2", url = "https://crates.io/api/v1/crates/unicode-xid/0.2.2/download", type = "tar.gz", sha256 = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3", strip_prefix = "unicode-xid-0.2.2", build_file = Label("//util/import/raze/remote:BUILD.unicode-xid-0.2.2.bazel"), ) maybe( http_archive, name = "rules_rust_util_import__wasi__0_10_2_wasi_snapshot_preview1", url = "https://crates.io/api/v1/crates/wasi/0.10.2+wasi-snapshot-preview1/download", type = "tar.gz", sha256 = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6", strip_prefix = "wasi-0.10.2+wasi-snapshot-preview1", build_file = Label("//util/import/raze/remote:BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel"), )
""" @generated cargo-raze generated Bazel file. DO NOT EDIT! Replaced on runs of cargo-raze """ load('@bazel_tools//tools/build_defs/repo:git.bzl', 'new_git_repository') load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive') load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe') def rules_rust_util_import_fetch_remote_crates(): """This function defines a collection of repos and should be called in a WORKSPACE file""" maybe(http_archive, name='rules_rust_util_import__aho_corasick__0_7_15', url='https://crates.io/api/v1/crates/aho-corasick/0.7.15/download', type='tar.gz', sha256='7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5', strip_prefix='aho-corasick-0.7.15', build_file=label('//util/import/raze/remote:BUILD.aho-corasick-0.7.15.bazel')) maybe(http_archive, name='rules_rust_util_import__cfg_if__1_0_0', url='https://crates.io/api/v1/crates/cfg-if/1.0.0/download', type='tar.gz', sha256='baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd', strip_prefix='cfg-if-1.0.0', build_file=label('//util/import/raze/remote:BUILD.cfg-if-1.0.0.bazel')) maybe(http_archive, name='rules_rust_util_import__env_logger__0_8_4', url='https://crates.io/api/v1/crates/env_logger/0.8.4/download', type='tar.gz', sha256='a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3', strip_prefix='env_logger-0.8.4', build_file=label('//util/import/raze/remote:BUILD.env_logger-0.8.4.bazel')) maybe(http_archive, name='rules_rust_util_import__getrandom__0_2_3', url='https://crates.io/api/v1/crates/getrandom/0.2.3/download', type='tar.gz', sha256='7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753', strip_prefix='getrandom-0.2.3', build_file=label('//util/import/raze/remote:BUILD.getrandom-0.2.3.bazel')) maybe(http_archive, name='rules_rust_util_import__lazy_static__1_4_0', url='https://crates.io/api/v1/crates/lazy_static/1.4.0/download', type='tar.gz', sha256='e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646', strip_prefix='lazy_static-1.4.0', build_file=label('//util/import/raze/remote:BUILD.lazy_static-1.4.0.bazel')) maybe(http_archive, name='rules_rust_util_import__libc__0_2_112', url='https://crates.io/api/v1/crates/libc/0.2.112/download', type='tar.gz', sha256='1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125', strip_prefix='libc-0.2.112', build_file=label('//util/import/raze/remote:BUILD.libc-0.2.112.bazel')) maybe(http_archive, name='rules_rust_util_import__log__0_4_14', url='https://crates.io/api/v1/crates/log/0.4.14/download', type='tar.gz', sha256='51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710', strip_prefix='log-0.4.14', build_file=label('//util/import/raze/remote:BUILD.log-0.4.14.bazel')) maybe(http_archive, name='rules_rust_util_import__memchr__2_4_1', url='https://crates.io/api/v1/crates/memchr/2.4.1/download', type='tar.gz', sha256='308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a', strip_prefix='memchr-2.4.1', build_file=label('//util/import/raze/remote:BUILD.memchr-2.4.1.bazel')) maybe(http_archive, name='rules_rust_util_import__proc_macro2__1_0_33', url='https://crates.io/api/v1/crates/proc-macro2/1.0.33/download', type='tar.gz', sha256='fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a', strip_prefix='proc-macro2-1.0.33', build_file=label('//util/import/raze/remote:BUILD.proc-macro2-1.0.33.bazel')) maybe(http_archive, name='rules_rust_util_import__quickcheck__1_0_3', url='https://crates.io/api/v1/crates/quickcheck/1.0.3/download', type='tar.gz', sha256='588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6', strip_prefix='quickcheck-1.0.3', build_file=label('//util/import/raze/remote:BUILD.quickcheck-1.0.3.bazel')) maybe(http_archive, name='rules_rust_util_import__quote__1_0_10', url='https://crates.io/api/v1/crates/quote/1.0.10/download', type='tar.gz', sha256='38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05', strip_prefix='quote-1.0.10', build_file=label('//util/import/raze/remote:BUILD.quote-1.0.10.bazel')) maybe(http_archive, name='rules_rust_util_import__rand__0_8_4', url='https://crates.io/api/v1/crates/rand/0.8.4/download', type='tar.gz', sha256='2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8', strip_prefix='rand-0.8.4', build_file=label('//util/import/raze/remote:BUILD.rand-0.8.4.bazel')) maybe(http_archive, name='rules_rust_util_import__rand_core__0_6_3', url='https://crates.io/api/v1/crates/rand_core/0.6.3/download', type='tar.gz', sha256='d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7', strip_prefix='rand_core-0.6.3', build_file=label('//util/import/raze/remote:BUILD.rand_core-0.6.3.bazel')) maybe(http_archive, name='rules_rust_util_import__regex__1_4_6', url='https://crates.io/api/v1/crates/regex/1.4.6/download', type='tar.gz', sha256='2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759', strip_prefix='regex-1.4.6', build_file=label('//util/import/raze/remote:BUILD.regex-1.4.6.bazel')) maybe(http_archive, name='rules_rust_util_import__regex_syntax__0_6_25', url='https://crates.io/api/v1/crates/regex-syntax/0.6.25/download', type='tar.gz', sha256='f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b', strip_prefix='regex-syntax-0.6.25', build_file=label('//util/import/raze/remote:BUILD.regex-syntax-0.6.25.bazel')) maybe(http_archive, name='rules_rust_util_import__syn__1_0_82', url='https://crates.io/api/v1/crates/syn/1.0.82/download', type='tar.gz', sha256='8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59', strip_prefix='syn-1.0.82', build_file=label('//util/import/raze/remote:BUILD.syn-1.0.82.bazel')) maybe(http_archive, name='rules_rust_util_import__unicode_xid__0_2_2', url='https://crates.io/api/v1/crates/unicode-xid/0.2.2/download', type='tar.gz', sha256='8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3', strip_prefix='unicode-xid-0.2.2', build_file=label('//util/import/raze/remote:BUILD.unicode-xid-0.2.2.bazel')) maybe(http_archive, name='rules_rust_util_import__wasi__0_10_2_wasi_snapshot_preview1', url='https://crates.io/api/v1/crates/wasi/0.10.2+wasi-snapshot-preview1/download', type='tar.gz', sha256='fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6', strip_prefix='wasi-0.10.2+wasi-snapshot-preview1', build_file=label('//util/import/raze/remote:BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel'))
#Exercise: Try to make a function that accepts a function of only positional arguments and returns a function that takes the same number of positional arguments and, given they are all iterators, attempts every combination of one arguments from each iterator. #Skills: Partial application, Iteration papplycomboreverse = lambda fun, xiter : lambda *args : [fun(*args, x) for x in xiter] def combo(fun): def returnfun(*args): currfun = fun for arg in reversed(args): currfun = papplycomboreverse(currfun, arg) return currfun() return returnfun
papplycomboreverse = lambda fun, xiter: lambda *args: [fun(*args, x) for x in xiter] def combo(fun): def returnfun(*args): currfun = fun for arg in reversed(args): currfun = papplycomboreverse(currfun, arg) return currfun() return returnfun
class Node: """ This object is a generic node, the basic component of a Graph. Fields: data -- the data this node will contain. This data can be any format. """ def __init__(self, data): self.data = data
class Node: """ This object is a generic node, the basic component of a Graph. Fields: data -- the data this node will contain. This data can be any format. """ def __init__(self, data): self.data = data
""" Global tuple to avoid make a new one each time a method is called """ my_tuple = ("London", 123, 18.2) def city_tuple_declaration(): city = ("Rome", "London", "Tokyo") return city def tuple_get_element(index: int): try: element = my_tuple[index] print(element) except IndexError: print("index {} out of range".format(index)) def tuple_has_element(element: str) -> bool: answer = element in my_tuple return answer def tuple_has_not_element(element: str) -> bool: answer = element not in my_tuple return answer def bool_to_string_translator(answer: bool) -> str: if answer: return "Yes" else: return "No" if __name__ == '__main__': main_tuple = city_tuple_declaration() print(main_tuple) print(my_tuple) tuple_get_element(5) print(bool_to_string_translator(tuple_has_element("London"))) print(bool_to_string_translator(tuple_has_not_element("London")))
""" Global tuple to avoid make a new one each time a method is called """ my_tuple = ('London', 123, 18.2) def city_tuple_declaration(): city = ('Rome', 'London', 'Tokyo') return city def tuple_get_element(index: int): try: element = my_tuple[index] print(element) except IndexError: print('index {} out of range'.format(index)) def tuple_has_element(element: str) -> bool: answer = element in my_tuple return answer def tuple_has_not_element(element: str) -> bool: answer = element not in my_tuple return answer def bool_to_string_translator(answer: bool) -> str: if answer: return 'Yes' else: return 'No' if __name__ == '__main__': main_tuple = city_tuple_declaration() print(main_tuple) print(my_tuple) tuple_get_element(5) print(bool_to_string_translator(tuple_has_element('London'))) print(bool_to_string_translator(tuple_has_not_element('London')))
# https://leetcode.com/problems/mirror-reflection class Solution: def mirrorReflection(self, p, q): if q == 0: return 0 i = 0 val = 0 while True: val += q i += 1 if (i % 2 == 0) and (val % p == 0): return 2 elif (i % 2 == 1) and (val % (2 * p) == 0): return 0 elif (i % 2 == 1) and (val % p == 0): return 1 else: continue
class Solution: def mirror_reflection(self, p, q): if q == 0: return 0 i = 0 val = 0 while True: val += q i += 1 if i % 2 == 0 and val % p == 0: return 2 elif i % 2 == 1 and val % (2 * p) == 0: return 0 elif i % 2 == 1 and val % p == 0: return 1 else: continue
""" The `~certbot_dns_cfproxy.dns_cfproxy` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using the CFProxy API. Examples -------- .. code-block:: bash :caption: To acquire a certificate for ``example.com`` certbot certonly \\ -a certbot-dns-cfproxy:dns-cfproxy \\ -d example.com """
""" The `~certbot_dns_cfproxy.dns_cfproxy` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using the CFProxy API. Examples -------- .. code-block:: bash :caption: To acquire a certificate for ``example.com`` certbot certonly \\ -a certbot-dns-cfproxy:dns-cfproxy \\ -d example.com """
a, b = map(int, input().split()) if a+b >= 10: print("error") else: print(a+b)
(a, b) = map(int, input().split()) if a + b >= 10: print('error') else: print(a + b)
__version__ = [1, 0, 2] __versionstr__ = '.'.join([str(i) for i in __version__]) if __name__ == '__main__': print(__versionstr__)
__version__ = [1, 0, 2] __versionstr__ = '.'.join([str(i) for i in __version__]) if __name__ == '__main__': print(__versionstr__)
flat_x = x.flatten() flat_y = y.flatten() flat_z = z.flatten() size = flat_x.shape[0] filename = 'landscapeData.h' open(filename, 'w').close() f = open(filename, 'a') f.write('#include "LinearMath/btScalar.h"\n#define Landscape01VtxCount 4\n#define Landscape01IdxCount 4\nbtScalar Landscape01Vtx[] = {\n') for i in range(size): f.write(str(flat_x[i])+'f,'+str(flat_y[i])+'f,'+str(flat_z[i])+'f,\n') f.write('};\n') f.write('btScalar Landscape01Nml[] = {\n') for i in range(size): f.write('1.0f,1.0f,1.0f,\n') f.write('};\n') f.write('btScalar Landscape01Tex[] = {\n') for i in range(size): f.write('1.0f,1.0f,1.0f,\n') f.write('};\n') f.write('unsigned short Landscape01Idx[] = {\n') for i in range(size): f.write(str(i)+','+str(i+1)+','+str(i+2)+',\n') f.write('};\n') f.close()
flat_x = x.flatten() flat_y = y.flatten() flat_z = z.flatten() size = flat_x.shape[0] filename = 'landscapeData.h' open(filename, 'w').close() f = open(filename, 'a') f.write('#include "LinearMath/btScalar.h"\n#define Landscape01VtxCount 4\n#define Landscape01IdxCount 4\nbtScalar Landscape01Vtx[] = {\n') for i in range(size): f.write(str(flat_x[i]) + 'f,' + str(flat_y[i]) + 'f,' + str(flat_z[i]) + 'f,\n') f.write('};\n') f.write('btScalar Landscape01Nml[] = {\n') for i in range(size): f.write('1.0f,1.0f,1.0f,\n') f.write('};\n') f.write('btScalar Landscape01Tex[] = {\n') for i in range(size): f.write('1.0f,1.0f,1.0f,\n') f.write('};\n') f.write('unsigned short Landscape01Idx[] = {\n') for i in range(size): f.write(str(i) + ',' + str(i + 1) + ',' + str(i + 2) + ',\n') f.write('};\n') f.close()
# coding=utf-8 """Russian Peasant Multiplication algorithm Python implementation.""" def russ_peasant(a, b): res = 0 while b > 0: if b & 1: res += a a <<= 1 b >>= 1 return res if __name__ == '__main__': for x in range(10): for y in range(10): print(x, y, x * y, russ_peasant(x, y))
"""Russian Peasant Multiplication algorithm Python implementation.""" def russ_peasant(a, b): res = 0 while b > 0: if b & 1: res += a a <<= 1 b >>= 1 return res if __name__ == '__main__': for x in range(10): for y in range(10): print(x, y, x * y, russ_peasant(x, y))
""" QuickBot wiring config. Specifies which pins are used for motor control, IR sensors and wheel encoders. """ # Motor pins: (dir1_pin, dir2_pin, pwd_pin) RIGHT_MOTOR_PINS = 'P8_12', 'P8_10', 'P9_14' LEFT_MOTOR_PINS = 'P8_14', 'P8_16', 'P9_16' # IR sensors (clock-wise, starting with the rear left sensor): # rear-left, front-left, front, front-right, rear-right IR_PINS = ('P9_38', 'P9_40', 'P9_36', 'P9_35', 'P9_33') # Wheel encoder sensors: (left, right) ENC_PINS = ('P9_39', 'P9_37')
""" QuickBot wiring config. Specifies which pins are used for motor control, IR sensors and wheel encoders. """ right_motor_pins = ('P8_12', 'P8_10', 'P9_14') left_motor_pins = ('P8_14', 'P8_16', 'P9_16') ir_pins = ('P9_38', 'P9_40', 'P9_36', 'P9_35', 'P9_33') enc_pins = ('P9_39', 'P9_37')
# Illustrates combining exception / error handling # with file access print('Start') try: with open('myfile2.txt', 'r') as f: lines = f.readlines() for line in lines: print(line, end='') except FileNotFoundError as err: print('oops') print(err) print('Done')
print('Start') try: with open('myfile2.txt', 'r') as f: lines = f.readlines() for line in lines: print(line, end='') except FileNotFoundError as err: print('oops') print(err) print('Done')
disable_gtk_binaries = True def gtk_dependent_cc_library(**kwargs): if not disable_gtk_binaries: native.cc_library(**kwargs) def gtk_dependent_cc_binary(**kwargs): if not disable_gtk_binaries: native.cc_binary(**kwargs)
disable_gtk_binaries = True def gtk_dependent_cc_library(**kwargs): if not disable_gtk_binaries: native.cc_library(**kwargs) def gtk_dependent_cc_binary(**kwargs): if not disable_gtk_binaries: native.cc_binary(**kwargs)
# Define a procedure, median, that takes three # numbers as its inputs, and returns the median # of the three numbers. # Make sure your procedure has a return statement. def bigger(a,b): if a > b: return a else: return b def biggest(a,b,c): return bigger(a,bigger(b,c)) def median(a, b ,c): if (b >= a and a >= c) or (c >= a and a >= b): return a if (a >= b and b >= c) or (c >= b and b >= a): return b if (a >= c and c >= b) or (b >= c and c >= a): return c print(median(1,2,3)) #>>> 2 print(median(9,3,6)) #>>> 6 print(median(7,8,7)) #>>> 7
def bigger(a, b): if a > b: return a else: return b def biggest(a, b, c): return bigger(a, bigger(b, c)) def median(a, b, c): if b >= a and a >= c or (c >= a and a >= b): return a if a >= b and b >= c or (c >= b and b >= a): return b if a >= c and c >= b or (b >= c and c >= a): return c print(median(1, 2, 3)) print(median(9, 3, 6)) print(median(7, 8, 7))
#!/usr/local/bin/python3 def main(): # Test suite return if __name__ == '__main__': main()
def main(): return if __name__ == '__main__': main()
test = int(input()) while test > 0 : n,k = map(int,input().split()) p = list(map(int,input().split())) original = 0 later = 0 for i in p : if i > k : later += k original += i else : later += i original += i print(original-later) test -= 1
test = int(input()) while test > 0: (n, k) = map(int, input().split()) p = list(map(int, input().split())) original = 0 later = 0 for i in p: if i > k: later += k original += i else: later += i original += i print(original - later) test -= 1
def main(): # Arithmetic operators a = 7 b = 2 print(f'{a} + {b} = {a+b}') print(f'{a} - {b} = {a-b}') print(f'{a} * {b} = {a*b}') print(f'{a} / {b} = {a/b}') print(f'{a} // {b} = {a//b}') print(f'{a} % {b} = {a%b}') print(f'{a} ^ {b} = {a**b}') # Bitwise operators # &, |, ^, <<, >> print(f'{a} & {b} = {a&b}') print(f'{a} | {b} = {a|b}') print(f'{a} ^ {b} = {a^b}') print(f'{a} << {b} = {a<<b}') print(f'{a} >> {b} = {a>>b}') a = 0xff print(a) # 255 # fill with zeroes and second arg is the minimum number of bits that will be displayed print(f'hex(a)={a:03x}') # 0ff print(f'bin(a)={a:09b}') # Comparison operators # >,<,==,!=, >=, <= # Boolean operators # and, or, not, in, not in, is, is not if __name__ == '__main__': main()
def main(): a = 7 b = 2 print(f'{a} + {b} = {a + b}') print(f'{a} - {b} = {a - b}') print(f'{a} * {b} = {a * b}') print(f'{a} / {b} = {a / b}') print(f'{a} // {b} = {a // b}') print(f'{a} % {b} = {a % b}') print(f'{a} ^ {b} = {a ** b}') print(f'{a} & {b} = {a & b}') print(f'{a} | {b} = {a | b}') print(f'{a} ^ {b} = {a ^ b}') print(f'{a} << {b} = {a << b}') print(f'{a} >> {b} = {a >> b}') a = 255 print(a) print(f'hex(a)={a:03x}') print(f'bin(a)={a:09b}') if __name__ == '__main__': main()
class Employee: #Initializaing def __init__(self): print('Employee created ') #Deleting (Calling destructor) def __del__(self): print('Destructor called,Employee deleted') obj=Employee() del obj
class Employee: def __init__(self): print('Employee created ') def __del__(self): print('Destructor called,Employee deleted') obj = employee() del obj
""" Hvad-specific exceptions Part of hvad public API. """ __all__ = ('WrongManager', ) class WrongManager(Exception): """ Raised when attempting to introspect translated fields from shared models without going through hvad. The most likely cause for this being accessing translated fields from translation-unaware QuerySets. """ def __init__(self, meta, name): self.meta = meta self.name = name def __str__(self): return ( "Accessing translated fields like {model_name}.{field_name} from " "an regular model requires a translation-aware queryset, " "obtained with the .language() method. " "For regular, non-translatable models, you can get one using " "hvad.utils.get_translation_aware_manager" ).format( app_label=self.meta.app_label, model_name=self.meta.model_name, field_name=self.name, )
""" Hvad-specific exceptions Part of hvad public API. """ __all__ = ('WrongManager',) class Wrongmanager(Exception): """ Raised when attempting to introspect translated fields from shared models without going through hvad. The most likely cause for this being accessing translated fields from translation-unaware QuerySets. """ def __init__(self, meta, name): self.meta = meta self.name = name def __str__(self): return 'Accessing translated fields like {model_name}.{field_name} from an regular model requires a translation-aware queryset, obtained with the .language() method. For regular, non-translatable models, you can get one using hvad.utils.get_translation_aware_manager'.format(app_label=self.meta.app_label, model_name=self.meta.model_name, field_name=self.name)