content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
def get_int(prompt, int_range): i = 0 while True: try: i = int(input(prompt)) if i in int_range: break except ValueError: pass return i
def get_int(prompt, int_range): i = 0 while True: try: i = int(input(prompt)) if i in int_range: break except ValueError: pass return i
fights = int(input()) helmet_price = float(input()) sword_price = float(input()) shield_price = float(input()) armor_price = float(input()) shield_counter = 0 expenses = 0 for fight in range(1, fights + 1): if fight % 2 == 0: expenses += helmet_price if fight % 3 == 0: expenses += sword_price if fight % 3 == 0 and fight % 2 == 0: expenses += shield_price shield_counter += 1 if shield_counter % 2 == 0: expenses += armor_price print(f"Gladiator expenses: {expenses:.2f} aureus") # lose_battle = int(input()) # # helmet_price = float(input()) # sword_price = float(input()) # shield_price = float(input()) # armor_price = float(input()) # # brakes = {"helmet": 0, "sword": 0, "shield": 0, "armor": 0} # counter = 0 # for battle in range(1, lose_battle + 1): # if battle % 2 == 0: # brakes["helmet"] += 1 # if battle % 3 == 0: # brakes["sword"] += 1 # if battle % 2 == 0: # brakes["shield"] += 1 # counter += 1 # if counter % 2 == 0: # brakes["armor"] += 1 # counter = 0 # # total_price = brakes["helmet"] * helmet_price + brakes["shield"] * shield_price + brakes["sword"] * sword_price + brakes["armor"] * armor_price # # print(f"Gladiator expenses: {total_price:.2f} aureus")
fights = int(input()) helmet_price = float(input()) sword_price = float(input()) shield_price = float(input()) armor_price = float(input()) shield_counter = 0 expenses = 0 for fight in range(1, fights + 1): if fight % 2 == 0: expenses += helmet_price if fight % 3 == 0: expenses += sword_price if fight % 3 == 0 and fight % 2 == 0: expenses += shield_price shield_counter += 1 if shield_counter % 2 == 0: expenses += armor_price print(f'Gladiator expenses: {expenses:.2f} aureus')
output = ''' Using interface 'wlan0' bssid=14:d6:4d:ec:1e:88 ssid=AU Test Network id=1 mode=station pairwise_cipher=CCMP group_cipher=CCMP key_mgmt=WPA2-PSK wpa_state=COMPLETED ip_address=192.168.20.70 p2p_device_address=e0:cb:1d:3d:84:71 address=e0:cb:1d:3d:84:71 ''' mac = "e0:cb:1d:3d:84:71" ip = "192.168.20.70" ssid="AU Test Network"
output = "\nUsing interface 'wlan0'\nbssid=14:d6:4d:ec:1e:88\nssid=AU Test Network\nid=1\nmode=station\npairwise_cipher=CCMP\ngroup_cipher=CCMP\nkey_mgmt=WPA2-PSK\nwpa_state=COMPLETED\nip_address=192.168.20.70\np2p_device_address=e0:cb:1d:3d:84:71\naddress=e0:cb:1d:3d:84:71\n" mac = 'e0:cb:1d:3d:84:71' ip = '192.168.20.70' ssid = 'AU Test Network'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- MONGO_URL = 'localhost' MONGO_DB = 'huawei' MONGO_TABLE = 'huawei_product'
mongo_url = 'localhost' mongo_db = 'huawei' mongo_table = 'huawei_product'
class Solution: def minInsertions(self, s: str) -> int: # use stack stack = [] count = 0 i=0 while i < len(s): if s[i] == '(': stack.append(s[i]) i += 1 else: # when facing empty stack if not stack: if i+1 < len(s) and s[i+1] == ")": count += 1 # add one "(" i += 2 else: count += 2 # add one "(" and one ")" i += 1 else: # check two positions if i + 1 < len(s) and s[i+1] == ")": stack.pop() i += 2 else: count += 1 # add one ")" stack.pop() i += 1 rest = len(stack)*2 # still have "(" on the stack. one "(" pairs with two ")" return count + rest s = "(()))" res = Solution().minInsertions(s) print(res)
class Solution: def min_insertions(self, s: str) -> int: stack = [] count = 0 i = 0 while i < len(s): if s[i] == '(': stack.append(s[i]) i += 1 elif not stack: if i + 1 < len(s) and s[i + 1] == ')': count += 1 i += 2 else: count += 2 i += 1 elif i + 1 < len(s) and s[i + 1] == ')': stack.pop() i += 2 else: count += 1 stack.pop() i += 1 rest = len(stack) * 2 return count + rest s = '(()))' res = solution().minInsertions(s) print(res)
# =============================================================================== # Copyright 2011 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # =============================================================================== """ Color generator methods utility functions for creating a series of colors """ colors8i = dict( black=(0, 0, 0), red=(255, 0, 0), maroon=(127, 0, 0), yellow=(255, 255, 0), olive=(127, 127, 0), limegreen=(0, 255, 0), green=(0, 127, 0), gray=(127, 127, 127), aquamarine=(0, 255, 255), teal=(0, 127, 127), blue=(0, 0, 255), silver=(191, 191, 191), navy=(0, 0, 127), plum=(255, 0, 255), purple=(127, 0, 127), blueviolet=(159, 95, 159), brown=(165, 42, 42), firebrick=(142, 35, 35), greenyellow=(147, 219, 112), white=(255, 255, 255), darkgreen=(32, 117, 49), ) # colors1f = dict() # for color in colors8i: # c = colors8i[color] # colors1f[color] = c[0] / 255., c[1] / 255., c[2] / 255. colors1f = {k: (c[0] / 255.0, c[1] / 255.0, c[2] / 255.0) for k, c in colors8i.items()} colornames = [ "black", "limegreen", "blue", "violet", "maroon", "red", "gray", "green", "aquamarine", "silver", "navy", "plum", "purple", "blue violet", "brown", "firebrick", "greenyellow", "coral", "brown", "cyan", "azure", "darkgrey", "darkgreen", "aqua", "beige", ] allcolornames = [ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "clear", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "none", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "sys_window", "tan", "teal", "thistle", "tomato", "transparent", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen", ] colorname_pairs = [ (0xFFBF33, 0x2B46D6), (0x00FFFF, 0xFF5300), (0xFF00FF, 0xEBFF00), (0x00CC66, 0xFF2C00), (0x0021CC, 0xFFAF00), (0xFFE200, 0x4D00CC), (0xDFF400, 0xCC00C8), (0x5ADB00, 0xE40034), # (0xFF5300, 0x00ffff), # (0x0000cc, 0xffbd00), ] def compare_colors(cv, r, g, b): nc = int("{:02x}{:02x}{:02x}".format(r, g, b), 16) return cv == nc def gen(cnames): i = 0 while 1: if i == len(cnames): i = 0 yield cnames[i] i += 1 def paired_colorname_generator(): return gen(colorname_pairs) def colorname_generator(): """ """ return gen(colornames) def color8i_generator(): """ """ i = 0 while 1: if i > len(colornames): i = 0 yield colors8i[colornames[i]] i += 1 def color1f_generator(): """ """ i = 0 g = colors1f.items() while 1: yield next(g) # if i > len(colornames): # i = 0 # # print('aca', colornames[i], colors1f) # yield colors1f[colornames[i]] # i += 1
""" Color generator methods utility functions for creating a series of colors """ colors8i = dict(black=(0, 0, 0), red=(255, 0, 0), maroon=(127, 0, 0), yellow=(255, 255, 0), olive=(127, 127, 0), limegreen=(0, 255, 0), green=(0, 127, 0), gray=(127, 127, 127), aquamarine=(0, 255, 255), teal=(0, 127, 127), blue=(0, 0, 255), silver=(191, 191, 191), navy=(0, 0, 127), plum=(255, 0, 255), purple=(127, 0, 127), blueviolet=(159, 95, 159), brown=(165, 42, 42), firebrick=(142, 35, 35), greenyellow=(147, 219, 112), white=(255, 255, 255), darkgreen=(32, 117, 49)) colors1f = {k: (c[0] / 255.0, c[1] / 255.0, c[2] / 255.0) for (k, c) in colors8i.items()} colornames = ['black', 'limegreen', 'blue', 'violet', 'maroon', 'red', 'gray', 'green', 'aquamarine', 'silver', 'navy', 'plum', 'purple', 'blue violet', 'brown', 'firebrick', 'greenyellow', 'coral', 'brown', 'cyan', 'azure', 'darkgrey', 'darkgreen', 'aqua', 'beige'] allcolornames = ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'clear', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'none', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'sys_window', 'tan', 'teal', 'thistle', 'tomato', 'transparent', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'] colorname_pairs = [(16760627, 2836182), (65535, 16732928), (16711935, 15466240), (52326, 16722944), (8652, 16756480), (16769536, 5046476), (14676992, 13369544), (5954304, 14942260)] def compare_colors(cv, r, g, b): nc = int('{:02x}{:02x}{:02x}'.format(r, g, b), 16) return cv == nc def gen(cnames): i = 0 while 1: if i == len(cnames): i = 0 yield cnames[i] i += 1 def paired_colorname_generator(): return gen(colorname_pairs) def colorname_generator(): """ """ return gen(colornames) def color8i_generator(): """ """ i = 0 while 1: if i > len(colornames): i = 0 yield colors8i[colornames[i]] i += 1 def color1f_generator(): """ """ i = 0 g = colors1f.items() while 1: yield next(g)
""" :synopsis: Supported loss functions to use with NPU API for training. .. moduleauthor:: Naval Bhandari <[email protected]> """ # CrossEntropyLoss = "CrossEntropyLoss" #: SparseCrossEntropyLoss = "SparseCrossEntropyLoss" #: MSELoss = "MSELoss" #: # CTCLoss = "CTCLoss" #: L1Loss = "L1Loss" #: # NLLLoss = "NLLLoss" #: SmoothL1Loss = 'SmoothL1Loss' #: Huber Loss or smooth L1 loss SigmoidBCELoss = 'SigmoidBCELoss' #: Binary Cross Entropy Loss # KLDivLoss = 'KLDivLoss' #: Killback-Leibler divergence loss # CosineEmbeddingLoss = 'CosineEmbeddingLoss' #: Pytorch equivalent Cosine Embedding Loss SoftmaxCrossEntropyLoss = 'SoftmaxCrossEntropyLoss' #: Softmax + CE Loss together
""" :synopsis: Supported loss functions to use with NPU API for training. .. moduleauthor:: Naval Bhandari <[email protected]> """ sparse_cross_entropy_loss = 'SparseCrossEntropyLoss' mse_loss = 'MSELoss' l1_loss = 'L1Loss' smooth_l1_loss = 'SmoothL1Loss' sigmoid_bce_loss = 'SigmoidBCELoss' softmax_cross_entropy_loss = 'SoftmaxCrossEntropyLoss'
def test_loop(num): for a in num: print ("a : ", a) yield a num = [1, 2, 3] tl = test_loop(num) for aa in tl: print ("aa : ", aa)
def test_loop(num): for a in num: print('a : ', a) yield a num = [1, 2, 3] tl = test_loop(num) for aa in tl: print('aa : ', aa)
class SchedulerNoam(object): def __init__(self, warmup: int, model_size: int): super().__init__() self.warmup = warmup self.model_size = model_size def get_learning_rate(self, step: int): step = max(1, step) return self.model_size ** (-0.5) * min(step ** (-0.5), step * self.warmup ** (-1.5))
class Schedulernoam(object): def __init__(self, warmup: int, model_size: int): super().__init__() self.warmup = warmup self.model_size = model_size def get_learning_rate(self, step: int): step = max(1, step) return self.model_size ** (-0.5) * min(step ** (-0.5), step * self.warmup ** (-1.5))
names=['yash','manan','jahnavi','rahul','rutu','Harry'] print(names[0]) names[1]='Manan Sanghavi' print(names[1]) names[1]=3 print(names[1]) print(type(names))
names = ['yash', 'manan', 'jahnavi', 'rahul', 'rutu', 'Harry'] print(names[0]) names[1] = 'Manan Sanghavi' print(names[1]) names[1] = 3 print(names[1]) print(type(names))
class Solution: def numFactoredBinaryTrees(self, A: 'List[int]') -> 'int': ids = {x : i for i, x in enumerate(A)} g = {x : [] for x in A} A.sort() for i in range(len(A)): for j in range(len(A)): if A[j] % A[i] == 0 and (A[j] // A[i]) in ids: g[A[j]].append((A[i], A[j] // A[i])) mod = (10 ** 9) + 7 memo = {} def dp(x): if len(g[x]) == 0: return 1 if x in memo: return memo[x] memo[x] = 1 for childs in g[x]: memo[x] += dp(childs[0]) * dp(childs[1]) if memo[x] >= mod: memo[x] %= mod return memo[x] total = 0 for a in A: total += dp(a) if total >= mod: total %= mod return total
class Solution: def num_factored_binary_trees(self, A: 'List[int]') -> 'int': ids = {x: i for (i, x) in enumerate(A)} g = {x: [] for x in A} A.sort() for i in range(len(A)): for j in range(len(A)): if A[j] % A[i] == 0 and A[j] // A[i] in ids: g[A[j]].append((A[i], A[j] // A[i])) mod = 10 ** 9 + 7 memo = {} def dp(x): if len(g[x]) == 0: return 1 if x in memo: return memo[x] memo[x] = 1 for childs in g[x]: memo[x] += dp(childs[0]) * dp(childs[1]) if memo[x] >= mod: memo[x] %= mod return memo[x] total = 0 for a in A: total += dp(a) if total >= mod: total %= mod return total
# Python does not have built-in support for Arrays, # but Python Lists can be used instead. def showArrays(): cars = ["Ford", "Volvo", "BMW"] for car in cars: print("Car Type : ", car) # Add some new cars cars.append("Mercedes") cars.append("Maruti") print("All cars : ", cars) # Show all car along with index value for i in cars: carIndex = cars.index(i) print(i + "<=========>" + str(carIndex)) # Find the size of cars list print("Size of the list : ",len(cars)) #delete by index cars.pop(3) # Third index # Remove by Object cars.remove("Maruti") print("Now all cars : ",cars) if __name__ == "__main__": showArrays()
def show_arrays(): cars = ['Ford', 'Volvo', 'BMW'] for car in cars: print('Car Type : ', car) cars.append('Mercedes') cars.append('Maruti') print('All cars : ', cars) for i in cars: car_index = cars.index(i) print(i + '<=========>' + str(carIndex)) print('Size of the list : ', len(cars)) cars.pop(3) cars.remove('Maruti') print('Now all cars : ', cars) if __name__ == '__main__': show_arrays()
data = open("input.txt", "r").readlines() fold = [] points = [] for line in data: if len(line.strip()) == 0: continue elif line.startswith("fold"): [x_or_y, value] = line.replace("fold along ", "").split("=") fold.append((int(value) if x_or_y == "x" else 0, int(value) if x_or_y == "y" else 0)) else: [x, y] = line.split(",") points.append((int(x), int(y))) def fold_paper(points, fold_points=[]): result = set(points) for f in fold_points: next_p = set() idx = 1 if f[0] == 0 else 0 fp = f[idx] for p in result: if p[idx] < fp: next_p.add(p) if p[idx] > fp: next_p.add( (2*fp - p[0] if idx == 0 else p[0], 2*fp - p[1] if idx == 1 else p[1]) ) result = next_p return result r1 = fold_paper(points, fold[0:1]) print("The answer to part 1 is", len(r1)) def print_origami(result): for y in range(0, max([p[1] for p in result])+2): for x in range(0, max([p[0] for p in result])+2): if (x, y) in result: print("x", sep="", end="") else: print(".", sep="", end="") print("") print("The answer to part 2 is") result = fold_paper(points, fold) print_origami(result)
data = open('input.txt', 'r').readlines() fold = [] points = [] for line in data: if len(line.strip()) == 0: continue elif line.startswith('fold'): [x_or_y, value] = line.replace('fold along ', '').split('=') fold.append((int(value) if x_or_y == 'x' else 0, int(value) if x_or_y == 'y' else 0)) else: [x, y] = line.split(',') points.append((int(x), int(y))) def fold_paper(points, fold_points=[]): result = set(points) for f in fold_points: next_p = set() idx = 1 if f[0] == 0 else 0 fp = f[idx] for p in result: if p[idx] < fp: next_p.add(p) if p[idx] > fp: next_p.add((2 * fp - p[0] if idx == 0 else p[0], 2 * fp - p[1] if idx == 1 else p[1])) result = next_p return result r1 = fold_paper(points, fold[0:1]) print('The answer to part 1 is', len(r1)) def print_origami(result): for y in range(0, max([p[1] for p in result]) + 2): for x in range(0, max([p[0] for p in result]) + 2): if (x, y) in result: print('x', sep='', end='') else: print('.', sep='', end='') print('') print('The answer to part 2 is') result = fold_paper(points, fold) print_origami(result)
# #Q1 def eh_quadrada(mat): null=[] l=len(mat) if mat == null or l == len(mat[0]): return True for i in range(l): if mat[i] == null: return True else: return False #Q2 def conta_numero(n,mat): ls=[] l=len(mat) if mat == ls: return 0 for i in range(l): for j in range(len(mat[0])): if mat[i][j] == n: ls.append(n) return len(ls) #Q3 def media_matriz(mat): ls=[] l=len(mat) if mat == ls: return 0 for i in range(l): for j in range(len(mat[0])): ls.append(mat[i][j]) s=sum(ls)/(l * len(mat[0])) return round(s,2) #Q4 def melhor_volta(mat): cnls1=[] cnls2=[] for i in range(len(mat)): cnls1.append(min(mat[i])) cnls2.append(mat[i].index(min(mat[i]))) indtemp=cnls1.index(min(cnls1)) indvolt=cnls2[indtemp] mat1=list(range(0,6)) venc=mat1[indtemp] return (venc+1,min(cnls1),indvolt+1) #Q5 def busca(s,mat): ls=[] for i in range(len(mat)): for j in range(len(mat[i])): if s == mat[i][j]: ls.append(mat[i]) for k in range(len(ls)): if s in ls[k]: ls[k].remove(s) return ls
def eh_quadrada(mat): null = [] l = len(mat) if mat == null or l == len(mat[0]): return True for i in range(l): if mat[i] == null: return True else: return False def conta_numero(n, mat): ls = [] l = len(mat) if mat == ls: return 0 for i in range(l): for j in range(len(mat[0])): if mat[i][j] == n: ls.append(n) return len(ls) def media_matriz(mat): ls = [] l = len(mat) if mat == ls: return 0 for i in range(l): for j in range(len(mat[0])): ls.append(mat[i][j]) s = sum(ls) / (l * len(mat[0])) return round(s, 2) def melhor_volta(mat): cnls1 = [] cnls2 = [] for i in range(len(mat)): cnls1.append(min(mat[i])) cnls2.append(mat[i].index(min(mat[i]))) indtemp = cnls1.index(min(cnls1)) indvolt = cnls2[indtemp] mat1 = list(range(0, 6)) venc = mat1[indtemp] return (venc + 1, min(cnls1), indvolt + 1) def busca(s, mat): ls = [] for i in range(len(mat)): for j in range(len(mat[i])): if s == mat[i][j]: ls.append(mat[i]) for k in range(len(ls)): if s in ls[k]: ls[k].remove(s) return ls
class Solution: def insertIntoBST(self, root: TreeNode, val: int) -> TreeNode: if not root: return TreeNode(val) if val > root.val: root.right = self.insertIntoBST(root.right, val) else: root.left = self.insertIntoBST(root.left, val) return root
class Solution: def insert_into_bst(self, root: TreeNode, val: int) -> TreeNode: if not root: return tree_node(val) if val > root.val: root.right = self.insertIntoBST(root.right, val) else: root.left = self.insertIntoBST(root.left, val) return root
def MinerTransaction(): """ :return: """ return b'\x00' def IssueTransaction(): """ :return: """ return b'\x01' def ClaimTransaction(): """ :return: """ return b'\x02' def EnrollmentTransaction(): """ :return: """ return b'\x20' def VotingTransaction(): """ :return: """ return b'\x24' def RegisterTransaction(): """ :return: """ return b'\x40' def ContractTransaction(): """ :return: """ return b'\x80' def AgencyTransaction(): """ :return: """ return b'\xb0' def PublishTransaction(): """ :return: """ return b'\xd0' def InvocationTransaction(): """ :return: """ return b'\xd1'
def miner_transaction(): """ :return: """ return b'\x00' def issue_transaction(): """ :return: """ return b'\x01' def claim_transaction(): """ :return: """ return b'\x02' def enrollment_transaction(): """ :return: """ return b' ' def voting_transaction(): """ :return: """ return b'$' def register_transaction(): """ :return: """ return b'@' def contract_transaction(): """ :return: """ return b'\x80' def agency_transaction(): """ :return: """ return b'\xb0' def publish_transaction(): """ :return: """ return b'\xd0' def invocation_transaction(): """ :return: """ return b'\xd1'
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Difference of Volumes of Cuboids #Problem level: 8 kyu def find_difference(a, b): return abs((a[0]*a[1]*a[2])-(b[0]*b[1]*b[2]))
def find_difference(a, b): return abs(a[0] * a[1] * a[2] - b[0] * b[1] * b[2])
class AnalyticalRigidLinksOption(Enum,IComparable,IFormattable,IConvertible): """ Specifies how Rigid Links will be made for the Analytical Model. enum AnalyticalRigidLinksOption,values: Disabled (1),Enabled (0),FromColumn (2) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__(self,*args): pass def __reduce_ex__(self,*args): pass def __str__(self,*args): pass Disabled=None Enabled=None FromColumn=None value__=None
class Analyticalrigidlinksoption(Enum, IComparable, IFormattable, IConvertible): """ Specifies how Rigid Links will be made for the Analytical Model. enum AnalyticalRigidLinksOption,values: Disabled (1),Enabled (0),FromColumn (2) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __str__(self, *args): pass disabled = None enabled = None from_column = None value__ = None
class Solution: def checkIfCanBreak(self, s1: str, s2: str) -> bool: """String. Running time: O(nlogn) where n == len(s1). """ s1 = sorted(s1) s2 = sorted(s2) s1bs2, s2bs1 = True, True for i in range(len(s1)): if s1[i] < s2[i]: s1bs2 = False if s2[i] < s1[i]: s2bs1 = False return s1bs2 or s2bs1
class Solution: def check_if_can_break(self, s1: str, s2: str) -> bool: """String. Running time: O(nlogn) where n == len(s1). """ s1 = sorted(s1) s2 = sorted(s2) (s1bs2, s2bs1) = (True, True) for i in range(len(s1)): if s1[i] < s2[i]: s1bs2 = False if s2[i] < s1[i]: s2bs1 = False return s1bs2 or s2bs1
# constants # team_number = 0 # flags # # simulation sim_enable_flag = False sim_activate_flag = False # telemetry transmission cx_flag = False sp1x_flag = False sp2x_flag = False # mqtt mqtt_flag = False # payload deployment sp1_deployed_flag = False sp2_deployed_flag = False
team_number = 0 sim_enable_flag = False sim_activate_flag = False cx_flag = False sp1x_flag = False sp2x_flag = False mqtt_flag = False sp1_deployed_flag = False sp2_deployed_flag = False
class BasePermission(object): def __init__(self, queryset, lookup_field): self.queryset = queryset self.lookup_field = lookup_field def has_permission(self, user, action, pk): pass class AllowAny(BasePermission): def has_permission(self, user, action, pk): return True class IsAuthenticated(BasePermission): def has_permission(self, user, action, pk): return user.pk and user.is_authenticated
class Basepermission(object): def __init__(self, queryset, lookup_field): self.queryset = queryset self.lookup_field = lookup_field def has_permission(self, user, action, pk): pass class Allowany(BasePermission): def has_permission(self, user, action, pk): return True class Isauthenticated(BasePermission): def has_permission(self, user, action, pk): return user.pk and user.is_authenticated
class ModelObjectFactory(object): # no doc @staticmethod def GetCorrectInstance( model, identifier, modelObjectType=None, modelObjectSubType=None ): """ GetCorrectInstance(model: Model,identifier: Identifier,modelObjectType: ModelObjectEnum,modelObjectSubType: int) -> ModelObject GetCorrectInstance(model: Model,identifier: Identifier) -> ModelObject """ pass __all__ = [ "__reduce_ex__", "GetCorrectInstance", ]
class Modelobjectfactory(object): @staticmethod def get_correct_instance(model, identifier, modelObjectType=None, modelObjectSubType=None): """ GetCorrectInstance(model: Model,identifier: Identifier,modelObjectType: ModelObjectEnum,modelObjectSubType: int) -> ModelObject GetCorrectInstance(model: Model,identifier: Identifier) -> ModelObject """ pass __all__ = ['__reduce_ex__', 'GetCorrectInstance']
items = [] class ItemsModel(): def __init__(self): self.items = items def add_item(self, name, price, image, quantity): self.item_id = len(items)+1 item = { "item_id": self.item_id, "name": name, "price": price, "image": image, "quantity": quantity } self.items.append(item) return item def get_all(self): return self.items def get_by_id(self, item_id): if len(items) > 0: for item in items: id = item.get('item_id') if id == item_id: return item def get_by_name_and_price(self, name, price): if len(items) > 0: for item in items: item_name = item.get('name') item_price = item.get('price') if name == item_name and price == item_price: return item
items = [] class Itemsmodel: def __init__(self): self.items = items def add_item(self, name, price, image, quantity): self.item_id = len(items) + 1 item = {'item_id': self.item_id, 'name': name, 'price': price, 'image': image, 'quantity': quantity} self.items.append(item) return item def get_all(self): return self.items def get_by_id(self, item_id): if len(items) > 0: for item in items: id = item.get('item_id') if id == item_id: return item def get_by_name_and_price(self, name, price): if len(items) > 0: for item in items: item_name = item.get('name') item_price = item.get('price') if name == item_name and price == item_price: return item
def returnyield(x): """Using return in generator""" yield x # available only in python3!!! return "Hi there" if __name__ == '__main__': # create generator ry = returnyield(5) print(ry) # advance to next value print(next(ry)) # this call throws StopIteration error with return's value print(next(ry))
def returnyield(x): """Using return in generator""" yield x return 'Hi there' if __name__ == '__main__': ry = returnyield(5) print(ry) print(next(ry)) print(next(ry))
class Solution: def maxProfit(self, prices: List[int]) -> int: ret, mn = 0, float('inf') for price in prices: if price < mn: mn = price if price - mn > ret: ret = price-mn return ret
class Solution: def max_profit(self, prices: List[int]) -> int: (ret, mn) = (0, float('inf')) for price in prices: if price < mn: mn = price if price - mn > ret: ret = price - mn return ret
# Gerard Hanlon, 2018-13-02 # Factorial number is the number multiplied by all of the numbers smaller than it def sumall(upto): sumupto = 0 for i in range(1, upto + 1): sumupto = sumupto + i return sumupto print("The Factorial Number of the number 5 is: ", sumall(5)) print("The Factorial Number of the number 7 is: ", sumall(7)) print("The Factorial Number of the number 10 is: ", sumall(10))
def sumall(upto): sumupto = 0 for i in range(1, upto + 1): sumupto = sumupto + i return sumupto print('The Factorial Number of the number 5 is: ', sumall(5)) print('The Factorial Number of the number 7 is: ', sumall(7)) print('The Factorial Number of the number 10 is: ', sumall(10))
# # PySNMP MIB module A3COM-HUAWEI-EFM-COMMON-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-EFM-COMMON-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:49:58 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) # h3cEpon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "h3cEpon") ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint") CounterBasedGauge64, = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Counter32, mib_2, TimeTicks, Integer32, ModuleIdentity, Bits, ObjectIdentity, IpAddress, Counter64, Gauge32, NotificationType, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Counter32", "mib-2", "TimeTicks", "Integer32", "ModuleIdentity", "Bits", "ObjectIdentity", "IpAddress", "Counter64", "Gauge32", "NotificationType", "iso") TextualConvention, DateAndTime, DisplayString, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DateAndTime", "DisplayString", "MacAddress") h3cEfmOamMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3)) h3cEfmOamMIB.setRevisions(('2004-10-24 00:00',)) if mibBuilder.loadTexts: h3cEfmOamMIB.setLastUpdated('200410240000Z') if mibBuilder.loadTexts: h3cEfmOamMIB.setOrganization('IETF Ethernet Interfaces and Hub MIB Working Group') h3cDot3OamMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1)) h3cDot3OamConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2)) class Dot3Oui(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3) fixedLength = 3 h3cDot3OamTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1), ) if mibBuilder.loadTexts: h3cDot3OamTable.setStatus('current') h3cDot3OamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: h3cDot3OamEntry.setStatus('current') h3cDot3OamAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamAdminState.setStatus('current') h3cDot3OamOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("disabled", 1), ("linkfault", 2), ("passiveWait", 3), ("activeSendLocal", 4), ("sendLocalAndRemote", 5), ("sendLocalAndRemoteOk", 6), ("oamPeeringLocallyRejected", 7), ("oamPeeringRemotelyRejected", 8), ("operational", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamOperStatus.setStatus('current') h3cDot3OamMode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("passive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamMode.setStatus('current') h3cDot3OamMaxOamPduSize = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(64, 1522))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamMaxOamPduSize.setStatus('current') h3cDot3OamConfigRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamConfigRevision.setStatus('current') h3cDot3OamFunctionsSupported = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 6), Bits().clone(namedValues=NamedValues(("unidirectionalSupport", 0), ("loopbackSupport", 1), ("eventSupport", 2), ("variableSupport", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamFunctionsSupported.setStatus('current') h3cDot3OamPeerTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2), ) if mibBuilder.loadTexts: h3cDot3OamPeerTable.setStatus('current') h3cDot3OamPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: h3cDot3OamPeerEntry.setStatus('current') h3cDot3OamPeerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerStatus.setStatus('current') h3cDot3OamPeerMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 2), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerMacAddress.setStatus('current') h3cDot3OamPeerVendorOui = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 3), Dot3Oui()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerVendorOui.setStatus('current') h3cDot3OamPeerVendorInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerVendorInfo.setStatus('current') h3cDot3OamPeerMode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("active", 1), ("passive", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerMode.setStatus('current') h3cDot3OamPeerMaxOamPduSize = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(64, 1522))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerMaxOamPduSize.setStatus('current') h3cDot3OamPeerConfigRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerConfigRevision.setStatus('current') h3cDot3OamPeerFunctionsSupported = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 8), Bits().clone(namedValues=NamedValues(("unidirectionalSupport", 0), ("loopbackSupport", 1), ("eventSupport", 2), ("variableSupport", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamPeerFunctionsSupported.setStatus('current') h3cDot3OamLoopbackTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3), ) if mibBuilder.loadTexts: h3cDot3OamLoopbackTable.setStatus('current') h3cDot3OamLoopbackEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: h3cDot3OamLoopbackEntry.setStatus('current') h3cDot3OamLoopbackCommand = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noLoopback", 1), ("startRemoteLoopback", 2), ("stopRemoteLoopback", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamLoopbackCommand.setStatus('current') h3cDot3OamLoopbackStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noLoopback", 1), ("initiatingLoopback", 2), ("remoteLoopback", 3), ("terminatingLoopback", 4), ("localLoopback", 5), ("unknown", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamLoopbackStatus.setStatus('current') h3cDot3OamLoopbackIgnoreRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ignore", 1), ("process", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamLoopbackIgnoreRx.setStatus('current') h3cDot3OamStatsTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4), ) if mibBuilder.loadTexts: h3cDot3OamStatsTable.setStatus('current') h3cDot3OamStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: h3cDot3OamStatsEntry.setStatus('current') h3cDot3OamInformationTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamInformationTx.setStatus('current') h3cDot3OamInformationRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamInformationRx.setStatus('current') h3cDot3OamUniqueEventNotificationTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamUniqueEventNotificationTx.setStatus('current') h3cDot3OamUniqueEventNotificationRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamUniqueEventNotificationRx.setStatus('current') h3cDot3OamDuplicateEventNotificationTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamDuplicateEventNotificationTx.setStatus('current') h3cDot3OamDuplicateEventNotificationRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamDuplicateEventNotificationRx.setStatus('current') h3cDot3OamLoopbackControlTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamLoopbackControlTx.setStatus('current') h3cDot3OamLoopbackControlRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamLoopbackControlRx.setStatus('current') h3cDot3OamVariableRequestTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamVariableRequestTx.setStatus('current') h3cDot3OamVariableRequestRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamVariableRequestRx.setStatus('current') h3cDot3OamVariableResponseTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamVariableResponseTx.setStatus('current') h3cDot3OamVariableResponseRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamVariableResponseRx.setStatus('current') h3cDot3OamOrgSpecificTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamOrgSpecificTx.setStatus('current') h3cDot3OamOrgSpecificRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamOrgSpecificRx.setStatus('current') h3cDot3OamUnsupportedCodesTx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamUnsupportedCodesTx.setStatus('current') h3cDot3OamUnsupportedCodesRx = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamUnsupportedCodesRx.setStatus('current') h3cDot3OamFramesLostDueToOam = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamFramesLostDueToOam.setStatus('current') h3cDot3OamEventConfigTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5), ) if mibBuilder.loadTexts: h3cDot3OamEventConfigTable.setStatus('current') h3cDot3OamEventConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: h3cDot3OamEventConfigEntry.setStatus('current') h3cDot3OamErrSymPeriodWindowHi = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 1), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodWindowHi.setStatus('current') h3cDot3OamErrSymPeriodWindowLo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 2), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodWindowLo.setStatus('current') h3cDot3OamErrSymPeriodThresholdHi = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 3), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodThresholdHi.setStatus('current') h3cDot3OamErrSymPeriodThresholdLo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 4), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodThresholdLo.setStatus('current') h3cDot3OamErrSymPeriodEvNotifEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodEvNotifEnable.setStatus('current') h3cDot3OamErrFramePeriodWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 6), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodWindow.setStatus('current') h3cDot3OamErrFramePeriodThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 7), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodThreshold.setStatus('current') h3cDot3OamErrFramePeriodEvNotifEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodEvNotifEnable.setStatus('current') h3cDot3OamErrFrameWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 9), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameWindow.setStatus('current') h3cDot3OamErrFrameThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 10), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameThreshold.setStatus('current') h3cDot3OamErrFrameEvNotifEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameEvNotifEnable.setStatus('current') h3cDot3OamErrFrameSecsSummaryWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 9000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsSummaryWindow.setStatus('current') h3cDot3OamErrFrameSecsSummaryThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 900))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsSummaryThreshold.setStatus('current') h3cDot3OamErrFrameSecsEvNotifEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsEvNotifEnable.setStatus('current') h3cDot3OamEventLogTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6), ) if mibBuilder.loadTexts: h3cDot3OamEventLogTable.setStatus('current') h3cDot3OamEventLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogIndex")) if mibBuilder.loadTexts: h3cDot3OamEventLogEntry.setStatus('current') h3cDot3OamEventLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 1), Unsigned32()) if mibBuilder.loadTexts: h3cDot3OamEventLogIndex.setStatus('current') h3cDot3OamEventLogTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 2), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogTimestamp.setStatus('current') h3cDot3OamEventLogOui = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 3), Dot3Oui()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogOui.setStatus('current') h3cDot3OamEventLogType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogType.setStatus('current') h3cDot3OamEventLogLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogLocation.setStatus('current') h3cDot3OamEventLogWindowHi = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogWindowHi.setStatus('current') h3cDot3OamEventLogWindowLo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogWindowLo.setStatus('current') h3cDot3OamEventLogThresholdHi = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogThresholdHi.setStatus('current') h3cDot3OamEventLogThresholdLo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogThresholdLo.setStatus('current') h3cDot3OamEventLogValue = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 10), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogValue.setStatus('current') h3cDot3OamEventLogRunningTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 11), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogRunningTotal.setStatus('current') h3cDot3OamEventLogEventTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cDot3OamEventLogEventTotal.setStatus('current') h3cDot3OamTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7)) h3cDot3OamTrapsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0)) h3cDot3OamThresholdEvent = NotificationType((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogTimestamp"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogOui"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogType"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogLocation"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogWindowHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogWindowLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogThresholdHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogThresholdLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogValue"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogRunningTotal"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogEventTotal")) if mibBuilder.loadTexts: h3cDot3OamThresholdEvent.setStatus('current') h3cDot3OamNonThresholdEvent = NotificationType((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0, 2)).setObjects(("IF-MIB", "ifIndex"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogTimestamp"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogOui"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogType"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogLocation"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogEventTotal")) if mibBuilder.loadTexts: h3cDot3OamNonThresholdEvent.setStatus('current') h3cDot3OamGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1)) h3cDot3OamCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 2)) h3cDot3OamCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 2, 1)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamControlGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamStatsBaseGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymbolPeriodEventGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFramePeriodEventGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameEventGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameSecsSummaryEventGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogGroup"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamCompliance = h3cDot3OamCompliance.setStatus('current') h3cDot3OamControlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 1)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamAdminState"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamOperStatus"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamMode"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamMaxOamPduSize"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamConfigRevision"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamFunctionsSupported")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamControlGroup = h3cDot3OamControlGroup.setStatus('current') h3cDot3OamPeerGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 2)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerStatus"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerMacAddress"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerVendorOui"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerVendorInfo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerMode"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerFunctionsSupported"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerMaxOamPduSize"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamPeerConfigRevision")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamPeerGroup = h3cDot3OamPeerGroup.setStatus('current') h3cDot3OamStatsBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 3)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamInformationTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamInformationRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamUniqueEventNotificationTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamUniqueEventNotificationRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamDuplicateEventNotificationTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamDuplicateEventNotificationRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackControlTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackControlRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamVariableRequestTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamVariableRequestRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamVariableResponseTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamVariableResponseRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamOrgSpecificTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamOrgSpecificRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamUnsupportedCodesTx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamUnsupportedCodesRx"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamFramesLostDueToOam")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamStatsBaseGroup = h3cDot3OamStatsBaseGroup.setStatus('current') h3cDot3OamLoopbackGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 4)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackCommand"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackStatus"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamLoopbackIgnoreRx")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamLoopbackGroup = h3cDot3OamLoopbackGroup.setStatus('current') h3cDot3OamErrSymbolPeriodEventGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 5)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymPeriodWindowHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymPeriodWindowLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymPeriodThresholdHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymPeriodThresholdLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrSymPeriodEvNotifEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamErrSymbolPeriodEventGroup = h3cDot3OamErrSymbolPeriodEventGroup.setStatus('current') h3cDot3OamErrFramePeriodEventGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 6)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFramePeriodWindow"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFramePeriodThreshold"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFramePeriodEvNotifEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamErrFramePeriodEventGroup = h3cDot3OamErrFramePeriodEventGroup.setStatus('current') h3cDot3OamErrFrameEventGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 7)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameWindow"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameThreshold"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameEvNotifEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamErrFrameEventGroup = h3cDot3OamErrFrameEventGroup.setStatus('current') h3cDot3OamErrFrameSecsSummaryEventGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 8)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameSecsSummaryWindow"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameSecsSummaryThreshold"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamErrFrameSecsEvNotifEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamErrFrameSecsSummaryEventGroup = h3cDot3OamErrFrameSecsSummaryEventGroup.setStatus('current') h3cDot3OamEventLogGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 9)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogTimestamp"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogOui"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogType"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogLocation"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogWindowHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogWindowLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogThresholdHi"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogThresholdLo"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogValue"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogRunningTotal"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamEventLogEventTotal")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamEventLogGroup = h3cDot3OamEventLogGroup.setStatus('current') h3cDot3OamNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 10)).setObjects(("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamThresholdEvent"), ("A3COM-HUAWEI-EFM-COMMON-MIB", "h3cDot3OamNonThresholdEvent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cDot3OamNotificationGroup = h3cDot3OamNotificationGroup.setStatus('current') mibBuilder.exportSymbols("A3COM-HUAWEI-EFM-COMMON-MIB", h3cDot3OamEventLogIndex=h3cDot3OamEventLogIndex, h3cDot3OamOperStatus=h3cDot3OamOperStatus, h3cDot3OamEventConfigTable=h3cDot3OamEventConfigTable, h3cDot3OamEventLogLocation=h3cDot3OamEventLogLocation, h3cDot3OamConformance=h3cDot3OamConformance, h3cDot3OamFunctionsSupported=h3cDot3OamFunctionsSupported, h3cDot3OamNotificationGroup=h3cDot3OamNotificationGroup, h3cDot3OamLoopbackIgnoreRx=h3cDot3OamLoopbackIgnoreRx, h3cDot3OamTrapsPrefix=h3cDot3OamTrapsPrefix, h3cDot3OamErrFrameSecsSummaryEventGroup=h3cDot3OamErrFrameSecsSummaryEventGroup, h3cDot3OamErrFrameSecsEvNotifEnable=h3cDot3OamErrFrameSecsEvNotifEnable, h3cDot3OamDuplicateEventNotificationRx=h3cDot3OamDuplicateEventNotificationRx, h3cDot3OamErrFrameSecsSummaryThreshold=h3cDot3OamErrFrameSecsSummaryThreshold, h3cDot3OamErrFramePeriodEventGroup=h3cDot3OamErrFramePeriodEventGroup, h3cDot3OamLoopbackControlRx=h3cDot3OamLoopbackControlRx, h3cDot3OamErrFrameWindow=h3cDot3OamErrFrameWindow, h3cDot3OamErrFrameSecsSummaryWindow=h3cDot3OamErrFrameSecsSummaryWindow, h3cDot3OamPeerMacAddress=h3cDot3OamPeerMacAddress, h3cDot3OamAdminState=h3cDot3OamAdminState, h3cDot3OamFramesLostDueToOam=h3cDot3OamFramesLostDueToOam, h3cDot3OamThresholdEvent=h3cDot3OamThresholdEvent, h3cDot3OamNonThresholdEvent=h3cDot3OamNonThresholdEvent, h3cDot3OamCompliance=h3cDot3OamCompliance, h3cDot3OamOrgSpecificRx=h3cDot3OamOrgSpecificRx, h3cDot3OamErrFrameThreshold=h3cDot3OamErrFrameThreshold, PYSNMP_MODULE_ID=h3cEfmOamMIB, h3cDot3OamVariableResponseRx=h3cDot3OamVariableResponseRx, h3cDot3OamUnsupportedCodesRx=h3cDot3OamUnsupportedCodesRx, h3cDot3OamControlGroup=h3cDot3OamControlGroup, h3cDot3OamLoopbackStatus=h3cDot3OamLoopbackStatus, h3cDot3OamPeerEntry=h3cDot3OamPeerEntry, h3cDot3OamVariableResponseTx=h3cDot3OamVariableResponseTx, h3cDot3OamMaxOamPduSize=h3cDot3OamMaxOamPduSize, h3cDot3OamPeerFunctionsSupported=h3cDot3OamPeerFunctionsSupported, h3cDot3OamEventLogTimestamp=h3cDot3OamEventLogTimestamp, h3cDot3OamEventConfigEntry=h3cDot3OamEventConfigEntry, h3cDot3OamEventLogTable=h3cDot3OamEventLogTable, h3cDot3OamEventLogThresholdHi=h3cDot3OamEventLogThresholdHi, h3cDot3OamEventLogEntry=h3cDot3OamEventLogEntry, h3cDot3OamEventLogWindowLo=h3cDot3OamEventLogWindowLo, h3cDot3OamStatsTable=h3cDot3OamStatsTable, h3cDot3OamErrFramePeriodWindow=h3cDot3OamErrFramePeriodWindow, h3cDot3OamEventLogThresholdLo=h3cDot3OamEventLogThresholdLo, h3cDot3OamVariableRequestTx=h3cDot3OamVariableRequestTx, h3cDot3OamErrFrameEvNotifEnable=h3cDot3OamErrFrameEvNotifEnable, h3cDot3OamErrSymPeriodWindowHi=h3cDot3OamErrSymPeriodWindowHi, h3cDot3OamMIB=h3cDot3OamMIB, h3cDot3OamEventLogValue=h3cDot3OamEventLogValue, h3cEfmOamMIB=h3cEfmOamMIB, h3cDot3OamErrSymPeriodThresholdLo=h3cDot3OamErrSymPeriodThresholdLo, h3cDot3OamPeerMaxOamPduSize=h3cDot3OamPeerMaxOamPduSize, h3cDot3OamUnsupportedCodesTx=h3cDot3OamUnsupportedCodesTx, h3cDot3OamErrSymPeriodWindowLo=h3cDot3OamErrSymPeriodWindowLo, h3cDot3OamTable=h3cDot3OamTable, h3cDot3OamErrFramePeriodThreshold=h3cDot3OamErrFramePeriodThreshold, h3cDot3OamStatsBaseGroup=h3cDot3OamStatsBaseGroup, h3cDot3OamPeerStatus=h3cDot3OamPeerStatus, h3cDot3OamInformationRx=h3cDot3OamInformationRx, h3cDot3OamUniqueEventNotificationRx=h3cDot3OamUniqueEventNotificationRx, h3cDot3OamDuplicateEventNotificationTx=h3cDot3OamDuplicateEventNotificationTx, h3cDot3OamErrFrameEventGroup=h3cDot3OamErrFrameEventGroup, h3cDot3OamPeerMode=h3cDot3OamPeerMode, h3cDot3OamLoopbackEntry=h3cDot3OamLoopbackEntry, h3cDot3OamConfigRevision=h3cDot3OamConfigRevision, h3cDot3OamEventLogEventTotal=h3cDot3OamEventLogEventTotal, h3cDot3OamPeerGroup=h3cDot3OamPeerGroup, h3cDot3OamLoopbackTable=h3cDot3OamLoopbackTable, h3cDot3OamTraps=h3cDot3OamTraps, h3cDot3OamVariableRequestRx=h3cDot3OamVariableRequestRx, h3cDot3OamEventLogWindowHi=h3cDot3OamEventLogWindowHi, h3cDot3OamEventLogOui=h3cDot3OamEventLogOui, h3cDot3OamInformationTx=h3cDot3OamInformationTx, h3cDot3OamGroups=h3cDot3OamGroups, h3cDot3OamEventLogType=h3cDot3OamEventLogType, h3cDot3OamErrFramePeriodEvNotifEnable=h3cDot3OamErrFramePeriodEvNotifEnable, h3cDot3OamLoopbackGroup=h3cDot3OamLoopbackGroup, h3cDot3OamMode=h3cDot3OamMode, h3cDot3OamPeerVendorOui=h3cDot3OamPeerVendorOui, h3cDot3OamEventLogRunningTotal=h3cDot3OamEventLogRunningTotal, h3cDot3OamLoopbackCommand=h3cDot3OamLoopbackCommand, h3cDot3OamPeerConfigRevision=h3cDot3OamPeerConfigRevision, h3cDot3OamCompliances=h3cDot3OamCompliances, h3cDot3OamLoopbackControlTx=h3cDot3OamLoopbackControlTx, h3cDot3OamOrgSpecificTx=h3cDot3OamOrgSpecificTx, h3cDot3OamPeerTable=h3cDot3OamPeerTable, h3cDot3OamEntry=h3cDot3OamEntry, Dot3Oui=Dot3Oui, h3cDot3OamErrSymPeriodEvNotifEnable=h3cDot3OamErrSymPeriodEvNotifEnable, h3cDot3OamErrSymPeriodThresholdHi=h3cDot3OamErrSymPeriodThresholdHi, h3cDot3OamPeerVendorInfo=h3cDot3OamPeerVendorInfo, h3cDot3OamEventLogGroup=h3cDot3OamEventLogGroup, h3cDot3OamErrSymbolPeriodEventGroup=h3cDot3OamErrSymbolPeriodEventGroup, h3cDot3OamUniqueEventNotificationTx=h3cDot3OamUniqueEventNotificationTx, h3cDot3OamStatsEntry=h3cDot3OamStatsEntry)
(h3c_epon,) = mibBuilder.importSymbols('A3COM-HUAWEI-OID-MIB', 'h3cEpon') (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, constraints_union, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint') (counter_based_gauge64,) = mibBuilder.importSymbols('HCNUM-TC', 'CounterBasedGauge64') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, counter32, mib_2, time_ticks, integer32, module_identity, bits, object_identity, ip_address, counter64, gauge32, notification_type, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Counter32', 'mib-2', 'TimeTicks', 'Integer32', 'ModuleIdentity', 'Bits', 'ObjectIdentity', 'IpAddress', 'Counter64', 'Gauge32', 'NotificationType', 'iso') (textual_convention, date_and_time, display_string, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DateAndTime', 'DisplayString', 'MacAddress') h3c_efm_oam_mib = module_identity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3)) h3cEfmOamMIB.setRevisions(('2004-10-24 00:00',)) if mibBuilder.loadTexts: h3cEfmOamMIB.setLastUpdated('200410240000Z') if mibBuilder.loadTexts: h3cEfmOamMIB.setOrganization('IETF Ethernet Interfaces and Hub MIB Working Group') h3c_dot3_oam_mib = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1)) h3c_dot3_oam_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2)) class Dot3Oui(TextualConvention, OctetString): status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3) fixed_length = 3 h3c_dot3_oam_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1)) if mibBuilder.loadTexts: h3cDot3OamTable.setStatus('current') h3c_dot3_oam_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: h3cDot3OamEntry.setStatus('current') h3c_dot3_oam_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamAdminState.setStatus('current') h3c_dot3_oam_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('disabled', 1), ('linkfault', 2), ('passiveWait', 3), ('activeSendLocal', 4), ('sendLocalAndRemote', 5), ('sendLocalAndRemoteOk', 6), ('oamPeeringLocallyRejected', 7), ('oamPeeringRemotelyRejected', 8), ('operational', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamOperStatus.setStatus('current') h3c_dot3_oam_mode = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('passive', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamMode.setStatus('current') h3c_dot3_oam_max_oam_pdu_size = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(64, 1522))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamMaxOamPduSize.setStatus('current') h3c_dot3_oam_config_revision = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamConfigRevision.setStatus('current') h3c_dot3_oam_functions_supported = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 1, 1, 6), bits().clone(namedValues=named_values(('unidirectionalSupport', 0), ('loopbackSupport', 1), ('eventSupport', 2), ('variableSupport', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamFunctionsSupported.setStatus('current') h3c_dot3_oam_peer_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2)) if mibBuilder.loadTexts: h3cDot3OamPeerTable.setStatus('current') h3c_dot3_oam_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: h3cDot3OamPeerEntry.setStatus('current') h3c_dot3_oam_peer_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('inactive', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerStatus.setStatus('current') h3c_dot3_oam_peer_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 2), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerMacAddress.setStatus('current') h3c_dot3_oam_peer_vendor_oui = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 3), dot3_oui()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerVendorOui.setStatus('current') h3c_dot3_oam_peer_vendor_info = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerVendorInfo.setStatus('current') h3c_dot3_oam_peer_mode = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('active', 1), ('passive', 2), ('unknown', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerMode.setStatus('current') h3c_dot3_oam_peer_max_oam_pdu_size = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(64, 1522))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerMaxOamPduSize.setStatus('current') h3c_dot3_oam_peer_config_revision = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerConfigRevision.setStatus('current') h3c_dot3_oam_peer_functions_supported = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 2, 1, 8), bits().clone(namedValues=named_values(('unidirectionalSupport', 0), ('loopbackSupport', 1), ('eventSupport', 2), ('variableSupport', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamPeerFunctionsSupported.setStatus('current') h3c_dot3_oam_loopback_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3)) if mibBuilder.loadTexts: h3cDot3OamLoopbackTable.setStatus('current') h3c_dot3_oam_loopback_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: h3cDot3OamLoopbackEntry.setStatus('current') h3c_dot3_oam_loopback_command = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noLoopback', 1), ('startRemoteLoopback', 2), ('stopRemoteLoopback', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamLoopbackCommand.setStatus('current') h3c_dot3_oam_loopback_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('noLoopback', 1), ('initiatingLoopback', 2), ('remoteLoopback', 3), ('terminatingLoopback', 4), ('localLoopback', 5), ('unknown', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamLoopbackStatus.setStatus('current') h3c_dot3_oam_loopback_ignore_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ignore', 1), ('process', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamLoopbackIgnoreRx.setStatus('current') h3c_dot3_oam_stats_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4)) if mibBuilder.loadTexts: h3cDot3OamStatsTable.setStatus('current') h3c_dot3_oam_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: h3cDot3OamStatsEntry.setStatus('current') h3c_dot3_oam_information_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamInformationTx.setStatus('current') h3c_dot3_oam_information_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamInformationRx.setStatus('current') h3c_dot3_oam_unique_event_notification_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamUniqueEventNotificationTx.setStatus('current') h3c_dot3_oam_unique_event_notification_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamUniqueEventNotificationRx.setStatus('current') h3c_dot3_oam_duplicate_event_notification_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamDuplicateEventNotificationTx.setStatus('current') h3c_dot3_oam_duplicate_event_notification_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamDuplicateEventNotificationRx.setStatus('current') h3c_dot3_oam_loopback_control_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamLoopbackControlTx.setStatus('current') h3c_dot3_oam_loopback_control_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamLoopbackControlRx.setStatus('current') h3c_dot3_oam_variable_request_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamVariableRequestTx.setStatus('current') h3c_dot3_oam_variable_request_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamVariableRequestRx.setStatus('current') h3c_dot3_oam_variable_response_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamVariableResponseTx.setStatus('current') h3c_dot3_oam_variable_response_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamVariableResponseRx.setStatus('current') h3c_dot3_oam_org_specific_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamOrgSpecificTx.setStatus('current') h3c_dot3_oam_org_specific_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamOrgSpecificRx.setStatus('current') h3c_dot3_oam_unsupported_codes_tx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamUnsupportedCodesTx.setStatus('current') h3c_dot3_oam_unsupported_codes_rx = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamUnsupportedCodesRx.setStatus('current') h3c_dot3_oam_frames_lost_due_to_oam = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 4, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamFramesLostDueToOam.setStatus('current') h3c_dot3_oam_event_config_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5)) if mibBuilder.loadTexts: h3cDot3OamEventConfigTable.setStatus('current') h3c_dot3_oam_event_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: h3cDot3OamEventConfigEntry.setStatus('current') h3c_dot3_oam_err_sym_period_window_hi = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 1), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodWindowHi.setStatus('current') h3c_dot3_oam_err_sym_period_window_lo = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 2), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodWindowLo.setStatus('current') h3c_dot3_oam_err_sym_period_threshold_hi = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 3), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodThresholdHi.setStatus('current') h3c_dot3_oam_err_sym_period_threshold_lo = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 4), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodThresholdLo.setStatus('current') h3c_dot3_oam_err_sym_period_ev_notif_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrSymPeriodEvNotifEnable.setStatus('current') h3c_dot3_oam_err_frame_period_window = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 6), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodWindow.setStatus('current') h3c_dot3_oam_err_frame_period_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 7), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodThreshold.setStatus('current') h3c_dot3_oam_err_frame_period_ev_notif_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFramePeriodEvNotifEnable.setStatus('current') h3c_dot3_oam_err_frame_window = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 9), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameWindow.setStatus('current') h3c_dot3_oam_err_frame_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 10), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameThreshold.setStatus('current') h3c_dot3_oam_err_frame_ev_notif_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameEvNotifEnable.setStatus('current') h3c_dot3_oam_err_frame_secs_summary_window = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(100, 9000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsSummaryWindow.setStatus('current') h3c_dot3_oam_err_frame_secs_summary_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 900))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsSummaryThreshold.setStatus('current') h3c_dot3_oam_err_frame_secs_ev_notif_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 5, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cDot3OamErrFrameSecsEvNotifEnable.setStatus('current') h3c_dot3_oam_event_log_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6)) if mibBuilder.loadTexts: h3cDot3OamEventLogTable.setStatus('current') h3c_dot3_oam_event_log_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogIndex')) if mibBuilder.loadTexts: h3cDot3OamEventLogEntry.setStatus('current') h3c_dot3_oam_event_log_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 1), unsigned32()) if mibBuilder.loadTexts: h3cDot3OamEventLogIndex.setStatus('current') h3c_dot3_oam_event_log_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 2), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogTimestamp.setStatus('current') h3c_dot3_oam_event_log_oui = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 3), dot3_oui()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogOui.setStatus('current') h3c_dot3_oam_event_log_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogType.setStatus('current') h3c_dot3_oam_event_log_location = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogLocation.setStatus('current') h3c_dot3_oam_event_log_window_hi = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogWindowHi.setStatus('current') h3c_dot3_oam_event_log_window_lo = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogWindowLo.setStatus('current') h3c_dot3_oam_event_log_threshold_hi = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogThresholdHi.setStatus('current') h3c_dot3_oam_event_log_threshold_lo = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogThresholdLo.setStatus('current') h3c_dot3_oam_event_log_value = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 10), counter_based_gauge64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogValue.setStatus('current') h3c_dot3_oam_event_log_running_total = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 11), counter_based_gauge64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogRunningTotal.setStatus('current') h3c_dot3_oam_event_log_event_total = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 6, 1, 12), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cDot3OamEventLogEventTotal.setStatus('current') h3c_dot3_oam_traps = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7)) h3c_dot3_oam_traps_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0)) h3c_dot3_oam_threshold_event = notification_type((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0, 1)).setObjects(('IF-MIB', 'ifIndex'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogTimestamp'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogOui'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogType'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogLocation'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogWindowHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogWindowLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogThresholdHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogThresholdLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogValue'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogRunningTotal'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogEventTotal')) if mibBuilder.loadTexts: h3cDot3OamThresholdEvent.setStatus('current') h3c_dot3_oam_non_threshold_event = notification_type((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 1, 7, 0, 2)).setObjects(('IF-MIB', 'ifIndex'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogTimestamp'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogOui'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogType'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogLocation'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogEventTotal')) if mibBuilder.loadTexts: h3cDot3OamNonThresholdEvent.setStatus('current') h3c_dot3_oam_groups = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1)) h3c_dot3_oam_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 2)) h3c_dot3_oam_compliance = module_compliance((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 2, 1)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamControlGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamStatsBaseGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymbolPeriodEventGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFramePeriodEventGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameEventGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameSecsSummaryEventGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogGroup'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_compliance = h3cDot3OamCompliance.setStatus('current') h3c_dot3_oam_control_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 1)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamAdminState'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamOperStatus'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamMode'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamMaxOamPduSize'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamConfigRevision'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamFunctionsSupported')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_control_group = h3cDot3OamControlGroup.setStatus('current') h3c_dot3_oam_peer_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 2)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerStatus'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerMacAddress'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerVendorOui'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerVendorInfo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerMode'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerFunctionsSupported'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerMaxOamPduSize'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamPeerConfigRevision')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_peer_group = h3cDot3OamPeerGroup.setStatus('current') h3c_dot3_oam_stats_base_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 3)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamInformationTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamInformationRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamUniqueEventNotificationTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamUniqueEventNotificationRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamDuplicateEventNotificationTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamDuplicateEventNotificationRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackControlTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackControlRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamVariableRequestTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamVariableRequestRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamVariableResponseTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamVariableResponseRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamOrgSpecificTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamOrgSpecificRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamUnsupportedCodesTx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamUnsupportedCodesRx'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamFramesLostDueToOam')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_stats_base_group = h3cDot3OamStatsBaseGroup.setStatus('current') h3c_dot3_oam_loopback_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 4)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackCommand'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackStatus'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamLoopbackIgnoreRx')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_loopback_group = h3cDot3OamLoopbackGroup.setStatus('current') h3c_dot3_oam_err_symbol_period_event_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 5)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymPeriodWindowHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymPeriodWindowLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymPeriodThresholdHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymPeriodThresholdLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrSymPeriodEvNotifEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_err_symbol_period_event_group = h3cDot3OamErrSymbolPeriodEventGroup.setStatus('current') h3c_dot3_oam_err_frame_period_event_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 6)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFramePeriodWindow'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFramePeriodThreshold'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFramePeriodEvNotifEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_err_frame_period_event_group = h3cDot3OamErrFramePeriodEventGroup.setStatus('current') h3c_dot3_oam_err_frame_event_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 7)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameWindow'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameThreshold'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameEvNotifEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_err_frame_event_group = h3cDot3OamErrFrameEventGroup.setStatus('current') h3c_dot3_oam_err_frame_secs_summary_event_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 8)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameSecsSummaryWindow'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameSecsSummaryThreshold'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamErrFrameSecsEvNotifEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_err_frame_secs_summary_event_group = h3cDot3OamErrFrameSecsSummaryEventGroup.setStatus('current') h3c_dot3_oam_event_log_group = object_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 9)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogTimestamp'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogOui'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogType'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogLocation'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogWindowHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogWindowLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogThresholdHi'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogThresholdLo'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogValue'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogRunningTotal'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamEventLogEventTotal')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_event_log_group = h3cDot3OamEventLogGroup.setStatus('current') h3c_dot3_oam_notification_group = notification_group((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 42, 3, 2, 1, 10)).setObjects(('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamThresholdEvent'), ('A3COM-HUAWEI-EFM-COMMON-MIB', 'h3cDot3OamNonThresholdEvent')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_dot3_oam_notification_group = h3cDot3OamNotificationGroup.setStatus('current') mibBuilder.exportSymbols('A3COM-HUAWEI-EFM-COMMON-MIB', h3cDot3OamEventLogIndex=h3cDot3OamEventLogIndex, h3cDot3OamOperStatus=h3cDot3OamOperStatus, h3cDot3OamEventConfigTable=h3cDot3OamEventConfigTable, h3cDot3OamEventLogLocation=h3cDot3OamEventLogLocation, h3cDot3OamConformance=h3cDot3OamConformance, h3cDot3OamFunctionsSupported=h3cDot3OamFunctionsSupported, h3cDot3OamNotificationGroup=h3cDot3OamNotificationGroup, h3cDot3OamLoopbackIgnoreRx=h3cDot3OamLoopbackIgnoreRx, h3cDot3OamTrapsPrefix=h3cDot3OamTrapsPrefix, h3cDot3OamErrFrameSecsSummaryEventGroup=h3cDot3OamErrFrameSecsSummaryEventGroup, h3cDot3OamErrFrameSecsEvNotifEnable=h3cDot3OamErrFrameSecsEvNotifEnable, h3cDot3OamDuplicateEventNotificationRx=h3cDot3OamDuplicateEventNotificationRx, h3cDot3OamErrFrameSecsSummaryThreshold=h3cDot3OamErrFrameSecsSummaryThreshold, h3cDot3OamErrFramePeriodEventGroup=h3cDot3OamErrFramePeriodEventGroup, h3cDot3OamLoopbackControlRx=h3cDot3OamLoopbackControlRx, h3cDot3OamErrFrameWindow=h3cDot3OamErrFrameWindow, h3cDot3OamErrFrameSecsSummaryWindow=h3cDot3OamErrFrameSecsSummaryWindow, h3cDot3OamPeerMacAddress=h3cDot3OamPeerMacAddress, h3cDot3OamAdminState=h3cDot3OamAdminState, h3cDot3OamFramesLostDueToOam=h3cDot3OamFramesLostDueToOam, h3cDot3OamThresholdEvent=h3cDot3OamThresholdEvent, h3cDot3OamNonThresholdEvent=h3cDot3OamNonThresholdEvent, h3cDot3OamCompliance=h3cDot3OamCompliance, h3cDot3OamOrgSpecificRx=h3cDot3OamOrgSpecificRx, h3cDot3OamErrFrameThreshold=h3cDot3OamErrFrameThreshold, PYSNMP_MODULE_ID=h3cEfmOamMIB, h3cDot3OamVariableResponseRx=h3cDot3OamVariableResponseRx, h3cDot3OamUnsupportedCodesRx=h3cDot3OamUnsupportedCodesRx, h3cDot3OamControlGroup=h3cDot3OamControlGroup, h3cDot3OamLoopbackStatus=h3cDot3OamLoopbackStatus, h3cDot3OamPeerEntry=h3cDot3OamPeerEntry, h3cDot3OamVariableResponseTx=h3cDot3OamVariableResponseTx, h3cDot3OamMaxOamPduSize=h3cDot3OamMaxOamPduSize, h3cDot3OamPeerFunctionsSupported=h3cDot3OamPeerFunctionsSupported, h3cDot3OamEventLogTimestamp=h3cDot3OamEventLogTimestamp, h3cDot3OamEventConfigEntry=h3cDot3OamEventConfigEntry, h3cDot3OamEventLogTable=h3cDot3OamEventLogTable, h3cDot3OamEventLogThresholdHi=h3cDot3OamEventLogThresholdHi, h3cDot3OamEventLogEntry=h3cDot3OamEventLogEntry, h3cDot3OamEventLogWindowLo=h3cDot3OamEventLogWindowLo, h3cDot3OamStatsTable=h3cDot3OamStatsTable, h3cDot3OamErrFramePeriodWindow=h3cDot3OamErrFramePeriodWindow, h3cDot3OamEventLogThresholdLo=h3cDot3OamEventLogThresholdLo, h3cDot3OamVariableRequestTx=h3cDot3OamVariableRequestTx, h3cDot3OamErrFrameEvNotifEnable=h3cDot3OamErrFrameEvNotifEnable, h3cDot3OamErrSymPeriodWindowHi=h3cDot3OamErrSymPeriodWindowHi, h3cDot3OamMIB=h3cDot3OamMIB, h3cDot3OamEventLogValue=h3cDot3OamEventLogValue, h3cEfmOamMIB=h3cEfmOamMIB, h3cDot3OamErrSymPeriodThresholdLo=h3cDot3OamErrSymPeriodThresholdLo, h3cDot3OamPeerMaxOamPduSize=h3cDot3OamPeerMaxOamPduSize, h3cDot3OamUnsupportedCodesTx=h3cDot3OamUnsupportedCodesTx, h3cDot3OamErrSymPeriodWindowLo=h3cDot3OamErrSymPeriodWindowLo, h3cDot3OamTable=h3cDot3OamTable, h3cDot3OamErrFramePeriodThreshold=h3cDot3OamErrFramePeriodThreshold, h3cDot3OamStatsBaseGroup=h3cDot3OamStatsBaseGroup, h3cDot3OamPeerStatus=h3cDot3OamPeerStatus, h3cDot3OamInformationRx=h3cDot3OamInformationRx, h3cDot3OamUniqueEventNotificationRx=h3cDot3OamUniqueEventNotificationRx, h3cDot3OamDuplicateEventNotificationTx=h3cDot3OamDuplicateEventNotificationTx, h3cDot3OamErrFrameEventGroup=h3cDot3OamErrFrameEventGroup, h3cDot3OamPeerMode=h3cDot3OamPeerMode, h3cDot3OamLoopbackEntry=h3cDot3OamLoopbackEntry, h3cDot3OamConfigRevision=h3cDot3OamConfigRevision, h3cDot3OamEventLogEventTotal=h3cDot3OamEventLogEventTotal, h3cDot3OamPeerGroup=h3cDot3OamPeerGroup, h3cDot3OamLoopbackTable=h3cDot3OamLoopbackTable, h3cDot3OamTraps=h3cDot3OamTraps, h3cDot3OamVariableRequestRx=h3cDot3OamVariableRequestRx, h3cDot3OamEventLogWindowHi=h3cDot3OamEventLogWindowHi, h3cDot3OamEventLogOui=h3cDot3OamEventLogOui, h3cDot3OamInformationTx=h3cDot3OamInformationTx, h3cDot3OamGroups=h3cDot3OamGroups, h3cDot3OamEventLogType=h3cDot3OamEventLogType, h3cDot3OamErrFramePeriodEvNotifEnable=h3cDot3OamErrFramePeriodEvNotifEnable, h3cDot3OamLoopbackGroup=h3cDot3OamLoopbackGroup, h3cDot3OamMode=h3cDot3OamMode, h3cDot3OamPeerVendorOui=h3cDot3OamPeerVendorOui, h3cDot3OamEventLogRunningTotal=h3cDot3OamEventLogRunningTotal, h3cDot3OamLoopbackCommand=h3cDot3OamLoopbackCommand, h3cDot3OamPeerConfigRevision=h3cDot3OamPeerConfigRevision, h3cDot3OamCompliances=h3cDot3OamCompliances, h3cDot3OamLoopbackControlTx=h3cDot3OamLoopbackControlTx, h3cDot3OamOrgSpecificTx=h3cDot3OamOrgSpecificTx, h3cDot3OamPeerTable=h3cDot3OamPeerTable, h3cDot3OamEntry=h3cDot3OamEntry, Dot3Oui=Dot3Oui, h3cDot3OamErrSymPeriodEvNotifEnable=h3cDot3OamErrSymPeriodEvNotifEnable, h3cDot3OamErrSymPeriodThresholdHi=h3cDot3OamErrSymPeriodThresholdHi, h3cDot3OamPeerVendorInfo=h3cDot3OamPeerVendorInfo, h3cDot3OamEventLogGroup=h3cDot3OamEventLogGroup, h3cDot3OamErrSymbolPeriodEventGroup=h3cDot3OamErrSymbolPeriodEventGroup, h3cDot3OamUniqueEventNotificationTx=h3cDot3OamUniqueEventNotificationTx, h3cDot3OamStatsEntry=h3cDot3OamStatsEntry)
# encoding=utf-8 # General Header Fields CACHE_CONTROL = b"Cache-Control".lower() CONNECTION = b"Connection".lower() DATE = b"Date".lower() PRAGMA = b"Pragma".lower() TRAILER = b"Trailer".lower() TRANSFER_ENCODING = b"Transfer-Encoding".lower() UPGRADE = b"Upgrade".lower() VIA = b"Via".lower() WARNING = b"Warning".lower() # Request Header Fields ACCEPT = b"Accept".lower() ACCEPT_CHARSET = b"Accept-Charset".lower() ACCEPT_ENCODING = b"Accept-Encoding".lower() ACCEPT_LANGUAGE = b"Accept-Language".lower() AUTHORIZATION = b"Authorization".lower() EXCEPT = b"Except".lower() FROM = b"From".lower() HOST = b"Host".lower() IF_MATCH = b"If-Match".lower() IF_MODIFIED_SINCE = b"If-Modified-Since".lower() IF_NONE_MATCH = b"If-None-Match".lower() IF_Range = b"If-Range".lower() IF_UNMODIFIED_SINCE = b"If-Unmodified-Since".lower() MAX_FORWARDS = b"Max-Forwards".lower() PROXY_AUTHORIZATION = b"Proxy-Authorization".lower() RANGE = b"Range".lower() REFERER = b"Referer".lower() TE = b"TE".lower() USER_AGENT = b"User-Agent".lower() HTTP2_SETTINGS = b"HTTP2-Settings".lower() # Response Header Fields ACCEPT_RANGES = b"Accept-Ranges".lower() AGE = b"Age".lower() ETAG = b"Etag".lower() LOCATION = b"Location".lower() PROXY_AUTHENTICATE = b"Proxy-Authenticate".lower() RETRY_AFTER = b"Retry-After".lower() SERVER = b"Server".lower() VARY = b"Vary".lower() WWW_AUTHENTICATE = b"WWW-Authenticate".lower() # Entity Header Fields ALLOW = b"Allow".lower() CONTENT_ENCODING = b"Content-Encoding".lower() CONTENT_LANGUAGE = b"Content-Language".lower() CONTENT_LENGTH = b"Content-Length".lower() CONTENT_MD5 = b"Content-MD5".lower() CONTENT_RANGE = b"Content-Range".lower() CONTENT_TYPE = b"Content-Type".lower() EXPIRES = b"Expires".lower() LAST_MODIFIED = b"Last-Modified".lower()
cache_control = b'Cache-Control'.lower() connection = b'Connection'.lower() date = b'Date'.lower() pragma = b'Pragma'.lower() trailer = b'Trailer'.lower() transfer_encoding = b'Transfer-Encoding'.lower() upgrade = b'Upgrade'.lower() via = b'Via'.lower() warning = b'Warning'.lower() accept = b'Accept'.lower() accept_charset = b'Accept-Charset'.lower() accept_encoding = b'Accept-Encoding'.lower() accept_language = b'Accept-Language'.lower() authorization = b'Authorization'.lower() except = b'Except'.lower() from = b'From'.lower() host = b'Host'.lower() if_match = b'If-Match'.lower() if_modified_since = b'If-Modified-Since'.lower() if_none_match = b'If-None-Match'.lower() if__range = b'If-Range'.lower() if_unmodified_since = b'If-Unmodified-Since'.lower() max_forwards = b'Max-Forwards'.lower() proxy_authorization = b'Proxy-Authorization'.lower() range = b'Range'.lower() referer = b'Referer'.lower() te = b'TE'.lower() user_agent = b'User-Agent'.lower() http2_settings = b'HTTP2-Settings'.lower() accept_ranges = b'Accept-Ranges'.lower() age = b'Age'.lower() etag = b'Etag'.lower() location = b'Location'.lower() proxy_authenticate = b'Proxy-Authenticate'.lower() retry_after = b'Retry-After'.lower() server = b'Server'.lower() vary = b'Vary'.lower() www_authenticate = b'WWW-Authenticate'.lower() allow = b'Allow'.lower() content_encoding = b'Content-Encoding'.lower() content_language = b'Content-Language'.lower() content_length = b'Content-Length'.lower() content_md5 = b'Content-MD5'.lower() content_range = b'Content-Range'.lower() content_type = b'Content-Type'.lower() expires = b'Expires'.lower() last_modified = b'Last-Modified'.lower()
""" Author WG 2019 ESP32 Micropython module for the Maxim MAX44009 sensor. https://datasheets.maximintegrated.com/en/ds/MAX44009.pdf The MIT License (MIT) Usage: import max44009 from machine import I2C, Pin i2c = I2C(scl=Pin(22), sda=Pin(21), freq=100000) max44009 = max44009.MAX44009(i2c) lux = max44009.read() """ class MAX44009: # MAX44009 default i2c address. MAX_I2CADDR = 0x4A MAX_CONFIG = 0x02 MAX_LUX_HIGH = 0x03 MAX_LUX_LOW = 0x04 def __init__(self, i2c = None): if i2c is None: raise ValueError("I2C object is required.") self.i2c = i2c # i2c address autodetection s = self.i2c.scan() if self.MAX_I2CADDR in s: self.i2caddr = self.MAX_I2CADDR elif self.MAX_I2CADDR + 1 in s: self.i2caddr = self.MAX_I2CADDR + 1 else: raise ValueError("MAX44009 Device not present") # configuration default auto mode with 100ms integration, self.i2c.writeto_mem(self.i2caddr, self.MAX_CONFIG, bytearray([0x03])) # last readings self.lux = None def read(self): # MAX44009 does not have autoincremet registers address so one have to read byte by byte self.i2c.writeto(self.MAX_I2CADDR, bytearray([self.MAX_LUX_HIGH]), False) msb = self.i2c.readfrom(self.MAX_I2CADDR, 1, True) self.i2c.writeto(self.MAX_I2CADDR, bytearray([self.MAX_LUX_LOW]), False) lsb = self.i2c.readfrom(self.MAX_I2CADDR, 1, True) msb = msb[0] lsb = lsb[0] exponent = msb >> 4 mantissa = ((msb & 0x0F) << 4) | (lsb & 0x0F) self.lux = int((1 << exponent) * mantissa * 0.045) return self.lux @property def luminosity(self): if self.lux is None: self.read() return self.lux @property def UV(self): return 0 @property def IR(self): return 0
""" Author WG 2019 ESP32 Micropython module for the Maxim MAX44009 sensor. https://datasheets.maximintegrated.com/en/ds/MAX44009.pdf The MIT License (MIT) Usage: import max44009 from machine import I2C, Pin i2c = I2C(scl=Pin(22), sda=Pin(21), freq=100000) max44009 = max44009.MAX44009(i2c) lux = max44009.read() """ class Max44009: max_i2_caddr = 74 max_config = 2 max_lux_high = 3 max_lux_low = 4 def __init__(self, i2c=None): if i2c is None: raise value_error('I2C object is required.') self.i2c = i2c s = self.i2c.scan() if self.MAX_I2CADDR in s: self.i2caddr = self.MAX_I2CADDR elif self.MAX_I2CADDR + 1 in s: self.i2caddr = self.MAX_I2CADDR + 1 else: raise value_error('MAX44009 Device not present') self.i2c.writeto_mem(self.i2caddr, self.MAX_CONFIG, bytearray([3])) self.lux = None def read(self): self.i2c.writeto(self.MAX_I2CADDR, bytearray([self.MAX_LUX_HIGH]), False) msb = self.i2c.readfrom(self.MAX_I2CADDR, 1, True) self.i2c.writeto(self.MAX_I2CADDR, bytearray([self.MAX_LUX_LOW]), False) lsb = self.i2c.readfrom(self.MAX_I2CADDR, 1, True) msb = msb[0] lsb = lsb[0] exponent = msb >> 4 mantissa = (msb & 15) << 4 | lsb & 15 self.lux = int((1 << exponent) * mantissa * 0.045) return self.lux @property def luminosity(self): if self.lux is None: self.read() return self.lux @property def uv(self): return 0 @property def ir(self): return 0
def anonymize_phone_number(phone_number: str) -> str: public_digits_num = 6 phone_number = phone_number.replace("-", "") public_digits = phone_number[:public_digits_num] number_of_private_digits = len(phone_number) - public_digits_num private_digits = "-" * number_of_private_digits return f"{public_digits}{private_digits}" def test_anonymize_phone_number_replace_digits_after_6_with_hyphens(): # Nie najlepsze dane testowe phone_number = "111111111" anonymized_phone_number = anonymize_phone_number(phone_number) assert anonymized_phone_number == "1111111---"
def anonymize_phone_number(phone_number: str) -> str: public_digits_num = 6 phone_number = phone_number.replace('-', '') public_digits = phone_number[:public_digits_num] number_of_private_digits = len(phone_number) - public_digits_num private_digits = '-' * number_of_private_digits return f'{public_digits}{private_digits}' def test_anonymize_phone_number_replace_digits_after_6_with_hyphens(): phone_number = '111111111' anonymized_phone_number = anonymize_phone_number(phone_number) assert anonymized_phone_number == '1111111---'
''' This place-holder module makes the extensions directory into a Python "package", so that external user-specific modules can act as umbrella modules, and, for example: import structural_dhcp_rst2pdf.extensions.vectorpdf_r2p to bring in the PDF extension. '''
""" This place-holder module makes the extensions directory into a Python "package", so that external user-specific modules can act as umbrella modules, and, for example: import structural_dhcp_rst2pdf.extensions.vectorpdf_r2p to bring in the PDF extension. """
for number in [0, 1, 2, 3, 4]: print(number) for number in range(5): print(number)
for number in [0, 1, 2, 3, 4]: print(number) for number in range(5): print(number)
# FILE MODES: # Example: # with open(name, 'w+') as f: # f.write(data) # "r" # Read from file - YES # Write to file - NO # Create file if not exists - NO # Truncate file to zero length - NO # Cursor position - BEGINNING # # "r+" # Read from file - YES # Write to file - YES # Create file if not exists - NO # Truncate file to zero length - NO # Cursor position - BEGINNING # # "w" # Read from file - NO # Write to file - YES # Create file if not exists - YES # Truncate file to zero length - YES # Cursor position - BEGINNING # # "w+" # Read from file - YES # Write to file - YES # Create file if not exists - YES # Truncate file to zero length - YES # Cursor position - BEGINNING # # "a" # Read from file - NO # Write to file - YES # Create file if not exists - YES # Truncate file to zero length - NO # Cursor position - END # # "a+" # Read from file - YES # Write to file - YES # Create file if not exists - YES # Truncate file to zero length - NO # Cursor position - END myfile = open("/media/cicek/D/DDownloads/example.txt","w+") # Sending "r" means open in read mode, which is the default. # Sending "w" means write mode, for rewriting the contents of a file. # Sending "a" means append mode, for adding new content to the end of the file. # # Adding "b" to a mode opens it in binary mode, # which is used for non-text files (such as image and sound files). print("---------------------------------------------------------------------") # write mode open("/media/cicek/D/DDownloads/example.txt" , "w") # read mode open("/media/cicek/D/DDownloads/example.txt" , "r") # binary write mode open("/media/cicek/D/DDownloads/example.txt" , "wb") # binary read mode open("/media/cicek/D/DDownloads/example.txt" , "rb") print("---------------------------------------------------------------------") # Once a file has been opened and used, you should close it. # This is done with the close method of the file object. file = open("/media/cicek/D/DDownloads/example.txt" , "w") # do stuff to the file file.close()
myfile = open('/media/cicek/D/DDownloads/example.txt', 'w+') print('---------------------------------------------------------------------') open('/media/cicek/D/DDownloads/example.txt', 'w') open('/media/cicek/D/DDownloads/example.txt', 'r') open('/media/cicek/D/DDownloads/example.txt', 'wb') open('/media/cicek/D/DDownloads/example.txt', 'rb') print('---------------------------------------------------------------------') file = open('/media/cicek/D/DDownloads/example.txt', 'w') file.close()
_base_ = [ "../_base_/models/cascade_rcnn_r50_fpn.py", "../_base_/datasets/coco_detection.py", "../_base_/schedules/schedule_1x.py", "../_base_/default_runtime.py", ] pretrained = "https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_small_patch4_window7_224.pth" model = dict( backbone=dict( _delete_=True, type="SwinTransformer", embed_dims=96, depths=[2, 2, 18, 2], num_heads=[3, 6, 12, 24], window_size=7, mlp_ratio=4, qkv_bias=True, qk_scale=None, drop_rate=0.0, attn_drop_rate=0.0, drop_path_rate=0.3, patch_norm=True, out_indices=(0, 1, 2, 3), with_cp=False, convert_weights=True, init_cfg=dict(type="Pretrained", checkpoint=pretrained), ), neck=dict(in_channels=[96, 192, 384, 768]), roi_head=dict( type="CascadeRoIHead", num_stages=3, stage_loss_weights=[1, 0.5, 0.25], bbox_roi_extractor=dict( type="SingleRoIExtractor", roi_layer=dict(type="RoIAlign", output_size=7, sampling_ratio=0), out_channels=256, featmap_strides=[4, 8, 16, 32], ), bbox_head=[ dict( type="Shared2FCBBoxHead", in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict( type="DeltaXYWHBBoxCoder", target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.1, 0.1, 0.2, 0.2], ), reg_class_agnostic=True, loss_cls=dict( type="CrossEntropyLoss", use_sigmoid=False, loss_weight=1.0 ), reg_decoded_bbox=True, loss_bbox=dict(type="GIoULoss", loss_weight=10.0), ), dict( type="Shared2FCBBoxHead", in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict( type="DeltaXYWHBBoxCoder", target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.05, 0.05, 0.1, 0.1], ), reg_class_agnostic=True, loss_cls=dict( type="CrossEntropyLoss", use_sigmoid=False, loss_weight=1.0 ), reg_decoded_bbox=True, loss_bbox=dict(type="GIoULoss", loss_weight=10.0), ), dict( type="Shared2FCBBoxHead", in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict( type="DeltaXYWHBBoxCoder", target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.033, 0.033, 0.067, 0.067], ), reg_class_agnostic=True, loss_cls=dict( type="CrossEntropyLoss", use_sigmoid=False, loss_weight=1.0 ), reg_decoded_bbox=True, loss_bbox=dict(type="GIoULoss", loss_weight=10.0), ), ], ), ) # dataset settings data_root = "/workspace" dataset_type = "CocoDataset" classes = ("cots",) img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True ) train_pipeline = [ dict(type="LoadImageFromFile", to_float32=True), dict(type="LoadAnnotations", with_bbox=True), dict( type="AutoAugment", policies=[ [ dict( type="Resize", img_scale=[ (480, 1333), (512, 1333), (544, 1333), (576, 1333), (608, 1333), (640, 1333), (672, 1333), (704, 1333), (736, 1333), (768, 1333), (800, 1333), ], multiscale_mode="value", keep_ratio=True, ) ], [ dict( type="Resize", img_scale=[(400, 1333), (500, 1333), (600, 1333)], multiscale_mode="value", keep_ratio=True, ), dict( type="RandomCrop", crop_type="absolute_range", crop_size=(384, 600), allow_negative_crop=True, ), dict( type="Resize", img_scale=[ (480, 1333), (512, 1333), (544, 1333), (576, 1333), (608, 1333), (640, 1333), (672, 1333), (704, 1333), (736, 1333), (768, 1333), (800, 1333), ], multiscale_mode="value", override=True, keep_ratio=True, ), dict( type="PhotoMetricDistortion", brightness_delta=32, contrast_range=(0.5, 1.5), saturation_range=(0.5, 1.5), hue_delta=18, ), dict( type="MinIoURandomCrop", min_ious=(0.4, 0.5, 0.6, 0.7, 0.8, 0.9), min_crop_size=0.3, ), dict( type="CutOut", n_holes=(5, 10), cutout_shape=[ (4, 4), (4, 8), (8, 4), (8, 8), (16, 32), (32, 16), (32, 32), (32, 48), (48, 32), (48, 48), ], ), ], ], ), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), dict(type="Pad", size_divisor=32), dict(type="DefaultFormatBundle"), dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), ] test_pipeline = [ dict(type="LoadImageFromFile"), dict( type="MultiScaleFlipAug", img_scale=(1333, 800), flip=False, transforms=[ dict(type="Resize", keep_ratio=True), dict(type="RandomFlip"), dict(type="Normalize", **img_norm_cfg), dict(type="Pad", size_divisor=32), dict(type="DefaultFormatBundle"), dict(type="Collect", keys=["img"]), ], ), ] train_dataset = dict( type=dataset_type, ann_file="/workspace/annotations_train.json", img_prefix="/workspace/images", classes=classes, pipeline=train_pipeline, filter_empty_gt=False, ) data = dict( samples_per_gpu=2, workers_per_gpu=2, persistent_workers=True, train=train_dataset, val=dict( type=dataset_type, ann_file="/workspace/20220115_having_annotations_valid.json", img_prefix="/workspace/images", classes=classes, pipeline=test_pipeline, ), test=dict( type=dataset_type, ann_file="/workspace/20220115_having_annotations_valid.json", img_prefix="/workspace/images", classes=classes, pipeline=test_pipeline, ), ) optimizer = dict( _delete_=True, type="AdamW", lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05, paramwise_cfg=dict( custom_keys={ "absolute_pos_embed": dict(decay_mult=0.0), "relative_position_bias_table": dict(decay_mult=0.0), "norm": dict(decay_mult=0.0), } ), ) lr_config = dict( _delete_=True, policy="CosineAnnealing", by_epoch=False, warmup="linear", warmup_iters=1000, warmup_ratio=1 / 10, min_lr=1e-07, ) evaluation = dict(interval=2) seed = 5757 fp16 = dict(loss_scale=dict(init_scale=512.0)) log_config = dict( interval=100, hooks=[dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook")], ) runner = dict(max_epochs=14)
_base_ = ['../_base_/models/cascade_rcnn_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'] pretrained = 'https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_small_patch4_window7_224.pth' model = dict(backbone=dict(_delete_=True, type='SwinTransformer', embed_dims=96, depths=[2, 2, 18, 2], num_heads=[3, 6, 12, 24], window_size=7, mlp_ratio=4, qkv_bias=True, qk_scale=None, drop_rate=0.0, attn_drop_rate=0.0, drop_path_rate=0.3, patch_norm=True, out_indices=(0, 1, 2, 3), with_cp=False, convert_weights=True, init_cfg=dict(type='Pretrained', checkpoint=pretrained)), neck=dict(in_channels=[96, 192, 384, 768]), roi_head=dict(type='CascadeRoIHead', num_stages=3, stage_loss_weights=[1, 0.5, 0.25], bbox_roi_extractor=dict(type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0), out_channels=256, featmap_strides=[4, 8, 16, 32]), bbox_head=[dict(type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict(type='DeltaXYWHBBoxCoder', target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.1, 0.1, 0.2, 0.2]), reg_class_agnostic=True, loss_cls=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), reg_decoded_bbox=True, loss_bbox=dict(type='GIoULoss', loss_weight=10.0)), dict(type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict(type='DeltaXYWHBBoxCoder', target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.05, 0.05, 0.1, 0.1]), reg_class_agnostic=True, loss_cls=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), reg_decoded_bbox=True, loss_bbox=dict(type='GIoULoss', loss_weight=10.0)), dict(type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=1, bbox_coder=dict(type='DeltaXYWHBBoxCoder', target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.033, 0.033, 0.067, 0.067]), reg_class_agnostic=True, loss_cls=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), reg_decoded_bbox=True, loss_bbox=dict(type='GIoULoss', loss_weight=10.0))])) data_root = '/workspace' dataset_type = 'CocoDataset' classes = ('cots',) img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [dict(type='LoadImageFromFile', to_float32=True), dict(type='LoadAnnotations', with_bbox=True), dict(type='AutoAugment', policies=[[dict(type='Resize', img_scale=[(480, 1333), (512, 1333), (544, 1333), (576, 1333), (608, 1333), (640, 1333), (672, 1333), (704, 1333), (736, 1333), (768, 1333), (800, 1333)], multiscale_mode='value', keep_ratio=True)], [dict(type='Resize', img_scale=[(400, 1333), (500, 1333), (600, 1333)], multiscale_mode='value', keep_ratio=True), dict(type='RandomCrop', crop_type='absolute_range', crop_size=(384, 600), allow_negative_crop=True), dict(type='Resize', img_scale=[(480, 1333), (512, 1333), (544, 1333), (576, 1333), (608, 1333), (640, 1333), (672, 1333), (704, 1333), (736, 1333), (768, 1333), (800, 1333)], multiscale_mode='value', override=True, keep_ratio=True), dict(type='PhotoMetricDistortion', brightness_delta=32, contrast_range=(0.5, 1.5), saturation_range=(0.5, 1.5), hue_delta=18), dict(type='MinIoURandomCrop', min_ious=(0.4, 0.5, 0.6, 0.7, 0.8, 0.9), min_crop_size=0.3), dict(type='CutOut', n_holes=(5, 10), cutout_shape=[(4, 4), (4, 8), (8, 4), (8, 8), (16, 32), (32, 16), (32, 32), (32, 48), (48, 32), (48, 48)])]]), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])] test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img'])])] train_dataset = dict(type=dataset_type, ann_file='/workspace/annotations_train.json', img_prefix='/workspace/images', classes=classes, pipeline=train_pipeline, filter_empty_gt=False) data = dict(samples_per_gpu=2, workers_per_gpu=2, persistent_workers=True, train=train_dataset, val=dict(type=dataset_type, ann_file='/workspace/20220115_having_annotations_valid.json', img_prefix='/workspace/images', classes=classes, pipeline=test_pipeline), test=dict(type=dataset_type, ann_file='/workspace/20220115_having_annotations_valid.json', img_prefix='/workspace/images', classes=classes, pipeline=test_pipeline)) optimizer = dict(_delete_=True, type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05, paramwise_cfg=dict(custom_keys={'absolute_pos_embed': dict(decay_mult=0.0), 'relative_position_bias_table': dict(decay_mult=0.0), 'norm': dict(decay_mult=0.0)})) lr_config = dict(_delete_=True, policy='CosineAnnealing', by_epoch=False, warmup='linear', warmup_iters=1000, warmup_ratio=1 / 10, min_lr=1e-07) evaluation = dict(interval=2) seed = 5757 fp16 = dict(loss_scale=dict(init_scale=512.0)) log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) runner = dict(max_epochs=14)
class Event: def __init__(self, name, **kwargs): self.name = name self.args = kwargs def __str__(self): return f"Event(name='{self.name}', args={self.args})"
class Event: def __init__(self, name, **kwargs): self.name = name self.args = kwargs def __str__(self): return f"Event(name='{self.name}', args={self.args})"
class Solution: def fourSum(self, nums: List[int], target: int) -> List[List[int]]: def kSum(nums: List[int], target: int, k: int) -> List[List[int]]: res = [] if len(nums) == 0 or nums[0] * k > target or target > nums[-1] * k: return res if k == 2: return twoSum(nums, target) for i in range(len(nums)): if i == 0 or nums[i - 1] != nums[i]: for subset in kSum(nums[i + 1:], target - nums[i], k - 1): res.append([nums[i]] + subset) return res def twoSum(nums: List[int], target: int) -> List[List[int]]: res = [] lo, hi = 0, len(nums) - 1 while (lo < hi): curr_sum = nums[lo] + nums[hi] if curr_sum < target or (lo > 0 and nums[lo] == nums[lo - 1]): lo += 1 elif curr_sum > target or (hi < len(nums) - 1 and nums[hi] == nums[hi + 1]): hi -= 1 else: res.append([nums[lo], nums[hi]]) lo += 1 hi -= 1 return res nums.sort() return kSum(nums, target, 4)
class Solution: def four_sum(self, nums: List[int], target: int) -> List[List[int]]: def k_sum(nums: List[int], target: int, k: int) -> List[List[int]]: res = [] if len(nums) == 0 or nums[0] * k > target or target > nums[-1] * k: return res if k == 2: return two_sum(nums, target) for i in range(len(nums)): if i == 0 or nums[i - 1] != nums[i]: for subset in k_sum(nums[i + 1:], target - nums[i], k - 1): res.append([nums[i]] + subset) return res def two_sum(nums: List[int], target: int) -> List[List[int]]: res = [] (lo, hi) = (0, len(nums) - 1) while lo < hi: curr_sum = nums[lo] + nums[hi] if curr_sum < target or (lo > 0 and nums[lo] == nums[lo - 1]): lo += 1 elif curr_sum > target or (hi < len(nums) - 1 and nums[hi] == nums[hi + 1]): hi -= 1 else: res.append([nums[lo], nums[hi]]) lo += 1 hi -= 1 return res nums.sort() return k_sum(nums, target, 4)
''' Exercise 2 for Day 5 of 100 Days of Python In this exercise, we are going to find out the highest score from a given list of scores of a certain number of students We are going to discuss 2 methods of finding the maximum ''' def find_maximum_score(scores): ''' METHOD 1 Using the inbuilt max() function, which takes an iterable as its parameter and returns the maximum value in the iterable x = max(scores) return x ''' '''METHOD 2 Declare a global max value. Compare with each and every value inside the list and update the max value accordingly Use a for loop for your comparisons ''' maxVal = scores[0] # declare the first value as the maxVal # Now using a for loop compare the maxVal with each and every item and then update if maxVal is less than one particular item for i in range(1, len(scores)): if maxVal < scores[i]: maxVal = scores[i] return maxVal if __name__ == "__main__": scores = [int(score) for score in input( "Enter the scores of the students in comma separated form: ").split(', ')] maximumScore = find_maximum_score(scores) print(f"The highest score is {maximumScore}")
""" Exercise 2 for Day 5 of 100 Days of Python In this exercise, we are going to find out the highest score from a given list of scores of a certain number of students We are going to discuss 2 methods of finding the maximum """ def find_maximum_score(scores): """ METHOD 1 Using the inbuilt max() function, which takes an iterable as its parameter and returns the maximum value in the iterable x = max(scores) return x """ 'METHOD 2\n Declare a global max value. Compare with each and every value inside the list and update the max value accordingly\n Use a for loop for your comparisons\n ' max_val = scores[0] for i in range(1, len(scores)): if maxVal < scores[i]: max_val = scores[i] return maxVal if __name__ == '__main__': scores = [int(score) for score in input('Enter the scores of the students in comma separated form: ').split(', ')] maximum_score = find_maximum_score(scores) print(f'The highest score is {maximumScore}')
class Registry(object): def __init__(self): self.models = [] def add(self, model): """Register a model as a valid comment target""" self.models.append(model) def __contains__(self, model): """Check if a model (or one of its parent classes) is registered""" return any(issubclass(model, valid_model) for valid_model in self.models)
class Registry(object): def __init__(self): self.models = [] def add(self, model): """Register a model as a valid comment target""" self.models.append(model) def __contains__(self, model): """Check if a model (or one of its parent classes) is registered""" return any((issubclass(model, valid_model) for valid_model in self.models))
def dfsUtil(G, visited, travel, s): if(visited[s]): return visited[s] = True for u in G[s]: if(not visited[u]): dfsUtil(G, visited, travel, u) travel.append(s) def dfs(G, s=1): visited = {k: False for k in G.nodes} travel = [] for u in G.nodes: if(not visited[u]): dfsUtil(G, visited, travel, u) return travel def kosarajus(G): travel = reversed(dfs(G)) H = G.reverse(copy=True) components = [] visited = {k: False for k in G.nodes} for u in travel: if(not visited[u]): component = [] dfsUtil(H, visited, component, u) components.append(component) return components
def dfs_util(G, visited, travel, s): if visited[s]: return visited[s] = True for u in G[s]: if not visited[u]: dfs_util(G, visited, travel, u) travel.append(s) def dfs(G, s=1): visited = {k: False for k in G.nodes} travel = [] for u in G.nodes: if not visited[u]: dfs_util(G, visited, travel, u) return travel def kosarajus(G): travel = reversed(dfs(G)) h = G.reverse(copy=True) components = [] visited = {k: False for k in G.nodes} for u in travel: if not visited[u]: component = [] dfs_util(H, visited, component, u) components.append(component) return components
# Given a non-empty string s and an abbreviation abbr, # return whether the string matches with the given abbreviation. # A string such as "word" contains only the following valid abbreviations: # ["word", "1ord", "w1rd", "wo1d", "wor1", "2rd", "w2d", "wo2", "1o1d", # "1or1", "w1r1", "1o2", "2r1", "3d", "w3", "4"] # Notice that only the above abbreviations are valid abbreviations of the string "word". # Any other string is not a valid abbreviation of "word". # Note: # Assume s contains only lowercase letters and abbr contains only lowercase letters and digits. # Example 1: # Given s = "internationalization", abbr = "i12iz4n": # Return true. # Example 2: # Given s = "apple", abbr = "a2e": # Return false. class Solution(object): def validWordAbbreviation(self, word, abbr): """ :type word: str :type abbr: str :rtype: bool """ i = j = 0 while i < len(word) and j < len(abbr): if word[i] == abbr[j]: i += 1 j += 1 elif abbr[j] <= '0' or abbr[j] > '9': return False elif abbr[j].isdigit(): k = j while k < len(abbr): if abbr[k].isdigit(): k += 1 else: break i += int(abbr[j:k]) j = k else: return False return True if len(word) == i and len(abbr) == j else False
class Solution(object): def valid_word_abbreviation(self, word, abbr): """ :type word: str :type abbr: str :rtype: bool """ i = j = 0 while i < len(word) and j < len(abbr): if word[i] == abbr[j]: i += 1 j += 1 elif abbr[j] <= '0' or abbr[j] > '9': return False elif abbr[j].isdigit(): k = j while k < len(abbr): if abbr[k].isdigit(): k += 1 else: break i += int(abbr[j:k]) j = k else: return False return True if len(word) == i and len(abbr) == j else False
class Solution(object): def addBinary(self, a, b): """ :type a: str :type b: str :rtype: str """ return str(bin(int(a, 2) + int(b, 2))[2:]) def test_add_binary(): s = Solution() assert "100" == s.addBinary("11", "1") assert "10101" == s.addBinary("1010", "1011")
class Solution(object): def add_binary(self, a, b): """ :type a: str :type b: str :rtype: str """ return str(bin(int(a, 2) + int(b, 2))[2:]) def test_add_binary(): s = solution() assert '100' == s.addBinary('11', '1') assert '10101' == s.addBinary('1010', '1011')
def double(x): return x*2 # Lambda Functions # In Python, you can declare a variable of type function, where implementations can be simply assigned # In some use cases, you may have to function pointer to a function for some processing logic # Best Scenario: Callback scenarios # A mechnism of defining a method implementation as an expression inline new_double = lambda x: x*2 print(double(10)) print(new_double(200)) def get_value(): return 10 result = get_value() print(new_double(result)) print((lambda x: x*x)(10)) # In Python programming, these instructions should be avoided ... formatter = lambda x, y, z='X': '{}, {}, {}'.format(x, y, z) print(formatter('R', 'J')) formatter2 = lambda x, y, *z : '{} {} {}'.format(x, y, max(z)) print(formatter2(10,20,30,40,50))
def double(x): return x * 2 new_double = lambda x: x * 2 print(double(10)) print(new_double(200)) def get_value(): return 10 result = get_value() print(new_double(result)) print((lambda x: x * x)(10)) formatter = lambda x, y, z='X': '{}, {}, {}'.format(x, y, z) print(formatter('R', 'J')) formatter2 = lambda x, y, *z: '{} {} {}'.format(x, y, max(z)) print(formatter2(10, 20, 30, 40, 50))
# # PySNMP MIB module DLSW-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLSW-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:07:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") sdlcLSAddress, = mibBuilder.importSymbols("SNA-SDLC-MIB", "sdlcLSAddress") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Gauge32, MibIdentifier, Counter64, IpAddress, ModuleIdentity, mib_2, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Bits, Unsigned32, ObjectIdentity, NotificationType, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "MibIdentifier", "Counter64", "IpAddress", "ModuleIdentity", "mib-2", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Bits", "Unsigned32", "ObjectIdentity", "NotificationType", "iso") TruthValue, TextualConvention, RowPointer, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "RowPointer", "RowStatus", "DisplayString") dlsw = ModuleIdentity((1, 3, 6, 1, 2, 1, 46)) if mibBuilder.loadTexts: dlsw.setLastUpdated('9606040900Z') if mibBuilder.loadTexts: dlsw.setOrganization('AIW DLSw MIB RIGLET and IETF DLSw MIB Working Group') if mibBuilder.loadTexts: dlsw.setContactInfo('David D. Chen IBM Corporation 800 Park, Highway 54 Research Triangle Park, NC 27709-9990 Tel: 1 919 254 6182 E-mail: [email protected]') if mibBuilder.loadTexts: dlsw.setDescription('This MIB module contains objects to manage Data Link Switches.') dlswMIB = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1)) dlswDomains = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 2)) class NBName(TextualConvention, OctetString): description = "Represents a single qualified NetBIOS name, which can include `don't care' and `wildcard' characters to represent a number of real NetBIOS names. If an individual character position in the qualified name contains a `?', the corresponding character position in a real NetBIOS name is a `don't care'. If the qualified name ends in `*', the remainder of a real NetBIOS name is a `don't care'. `*' is only considered a wildcard if it appears at the end of a name." status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 16) class MacAddressNC(TextualConvention, OctetString): description = 'Represents an 802 MAC address represented in non-canonical format. That is, the most significant bit will be transmitted first. If this information is not available, the value is a zero length string.' status = 'current' displayHint = '1x:' subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 6), ) class TAddress(TextualConvention, OctetString): description = 'Denotes a transport service address. For dlswTCPDomain, a TAddress is 4 octets long, containing the IP-address in network-byte order.' status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class EndStationLocation(TextualConvention, Integer32): description = 'Representing the location of an end station related to the managed DLSw node.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("other", 1), ("internal", 2), ("remote", 3), ("local", 4)) class DlcType(TextualConvention, Integer32): description = 'Representing the type of DLC of an end station, if applicable.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("na", 2), ("llc", 3), ("sdlc", 4), ("qllc", 5)) class LFSize(TextualConvention, Integer32): description = 'The largest size of the INFO field (including DLC header, not including any MAC-level or framing octets). 64 valid values as defined by the IEEE 802.1D Addendum are acceptable.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(516, 635, 754, 873, 993, 1112, 1231, 1350, 1470, 1542, 1615, 1688, 1761, 1833, 1906, 1979, 2052, 2345, 2638, 2932, 3225, 3518, 3812, 4105, 4399, 4865, 5331, 5798, 6264, 6730, 7197, 7663, 8130, 8539, 8949, 9358, 9768, 10178, 10587, 10997, 11407, 12199, 12992, 13785, 14578, 15370, 16163, 16956, 17749, 20730, 23711, 26693, 29674, 32655, 38618, 41600, 44591, 47583, 50575, 53567, 56559, 59551, 65535)) namedValues = NamedValues(("lfs516", 516), ("lfs635", 635), ("lfs754", 754), ("lfs873", 873), ("lfs993", 993), ("lfs1112", 1112), ("lfs1231", 1231), ("lfs1350", 1350), ("lfs1470", 1470), ("lfs1542", 1542), ("lfs1615", 1615), ("lfs1688", 1688), ("lfs1761", 1761), ("lfs1833", 1833), ("lfs1906", 1906), ("lfs1979", 1979), ("lfs2052", 2052), ("lfs2345", 2345), ("lfs2638", 2638), ("lfs2932", 2932), ("lfs3225", 3225), ("lfs3518", 3518), ("lfs3812", 3812), ("lfs4105", 4105), ("lfs4399", 4399), ("lfs4865", 4865), ("lfs5331", 5331), ("lfs5798", 5798), ("lfs6264", 6264), ("lfs6730", 6730), ("lfs7197", 7197), ("lfs7663", 7663), ("lfs8130", 8130), ("lfs8539", 8539), ("lfs8949", 8949), ("lfs9358", 9358), ("lfs9768", 9768), ("lfs10178", 10178), ("lfs10587", 10587), ("lfs10997", 10997), ("lfs11407", 11407), ("lfs12199", 12199), ("lfs12992", 12992), ("lfs13785", 13785), ("lfs14578", 14578), ("lfs15370", 15370), ("lfs16163", 16163), ("lfs16956", 16956), ("lfs17749", 17749), ("lfs20730", 20730), ("lfs23711", 23711), ("lfs26693", 26693), ("lfs29674", 29674), ("lfs32655", 32655), ("lfs38618", 38618), ("lfs41600", 41600), ("lfs44591", 44591), ("lfs47583", 47583), ("lfs50575", 50575), ("lfs53567", 53567), ("lfs56559", 56559), ("lfs59551", 59551), ("lfs65535", 65535)) null = MibIdentifier((0, 0)) dlswTCPDomain = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 2, 1)) class DlswTCPAddress(TextualConvention, OctetString): description = 'Represents the IP address of a DLSw which uses TCP as a transport protocol.' status = 'current' displayHint = '1d.1d.1d.1d' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4) fixedLength = 4 dlswNode = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 1)) dlswTConn = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 2)) dlswInterface = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 3)) dlswDirectory = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 4)) dlswCircuit = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 5)) dlswSdlc = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 6)) dlswNodeVersion = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswNodeVersion.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVersion.setStatus('current') if mibBuilder.loadTexts: dlswNodeVersion.setDescription('This value identifies the particular version of the DLSw standard supported by this DLSw. The first octet is a hexadecimal value representing the DLSw standard Version number of this DLSw, and the second is a hexadecimal value representing the DLSw standard Release number. This information is reported in DLSw Capabilities Exchange.') dlswNodeVendorID = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(3, 3)).setFixedLength(3)).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswNodeVendorID.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVendorID.setStatus('current') if mibBuilder.loadTexts: dlswNodeVendorID.setDescription("The value identifies the manufacturer's IEEE-assigned organizationally Unique Identifier (OUI) of this DLSw. This information is reported in DLSw Capabilities Exchange.") dlswNodeVersionString = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswNodeVersionString.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVersionString.setStatus('current') if mibBuilder.loadTexts: dlswNodeVersionString.setDescription('This string gives product-specific information about this DLSw (e.g., product name, code release and fix level). This flows in Capabilities Exchange messages.') dlswNodeStdPacingSupport = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("adaptiveRcvWindow", 2), ("fixedRcvWindow", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswNodeStdPacingSupport.setStatus('current') if mibBuilder.loadTexts: dlswNodeStdPacingSupport.setDescription('Circuit pacing, as defined in the DLSw Standard, allows each of the two DLSw nodes on a circuit to control the amount of data the other is permitted to send to them. This object reflects the level of support the DLSw node has for this protocol. (1) means the node has no support for the standard circuit pacing flows; it may use RFC 1434+ methods only, or a proprietary flow control scheme. (2) means the node supports the standard scheme and can vary the window sizes it grants as a data receiver. (3) means the node supports the standard scheme but never varies its receive window size.') dlswNodeStatus = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswNodeStatus.setStatus('current') if mibBuilder.loadTexts: dlswNodeStatus.setDescription('The status of the DLSw part of the system. Changing the value from active to inactive causes DLSw to take the following actions - (1) it disconnects all circuits through all DLSw partners, (2) it disconnects all transport connections to all DLSw partners, (3) it disconnects all local DLC connections, and (4) it stops processing all DLC connection set-up traffic. Since these are destructive actions, the user should query the circuit and transport connection tables in advance to understand the effect this action will have. Changing the value from inactive to active causes DLSw to come up in its initial state, i.e., transport connections established and ready to bring up circuits.') dlswNodeUpTime = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 6), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswNodeUpTime.setStatus('current') if mibBuilder.loadTexts: dlswNodeUpTime.setDescription('The amount of time (in hundredths of a second) since the DLSw portion of the system was last re-initialized. That is, if dlswState is in the active state, the time the dlswState entered the active state. It will remain zero if dlswState is in the inactive state.') dlswNodeVirtualSegmentLFSize = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 7), LFSize().clone('lfs65535')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswNodeVirtualSegmentLFSize.setStatus('current') if mibBuilder.loadTexts: dlswNodeVirtualSegmentLFSize.setDescription('The largest frame size (including DLC header and info field but not any MAC-level or framing octets) this DLSw can forward on any path through itself. This object can represent any box- level frame size forwarding restriction (e.g., from the use of fixed-size buffers). Some DLSw implementations will have no such restriction. This value will affect the LF size of circuits during circuit creation. The LF size of an existing circuit can be found in the RIF (Routing Information Field).') dlswNodeResourceNBExclusivity = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 8), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswNodeResourceNBExclusivity.setStatus('current') if mibBuilder.loadTexts: dlswNodeResourceNBExclusivity.setDescription('The value of true indicates that the NetBIOS Names configured in dlswDirNBTable are the only ones accessible via this DLSw. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. It is up to the implementation exactly when to start the run-time capabilities exchange.') dlswNodeResourceMacExclusivity = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 9), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswNodeResourceMacExclusivity.setStatus('current') if mibBuilder.loadTexts: dlswNodeResourceMacExclusivity.setDescription('The value of true indicates that the MAC addresses configured in the dlswDirMacTable are the only ones accessible via this DLSw. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. It is up to the implementation exactly when to start the run-time capabilities exchange.') dlswTConnStat = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 1)) dlswTConnStatActiveConnections = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnStatActiveConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatActiveConnections.setDescription("The number of transport connections that are not in `disconnected' state.") dlswTConnStatCloseIdles = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnStatCloseIdles.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatCloseIdles.setDescription('The number of times transport connections in this node exited the connected state with zero active circuits on the transport connection.') dlswTConnStatCloseBusys = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnStatCloseBusys.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatCloseBusys.setDescription('The number of times transport connections in this node exited the connected state with some non-zero number of active circuits on the transport connection. Normally this means the transport connection failed unexpectedly.') dlswTConnConfigTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 2, 2), ) if mibBuilder.loadTexts: dlswTConnConfigTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigTable.setDescription("This table defines the transport connections that will be initiated or accepted by this DLSw. Structure of masks allows wildcard definition for a collection of transport connections by a conceptual row. For a specific transport connection, there may be multiple of conceptual rows match the transport address. The `best' match will the one to determine the characteristics of the transport connection.") dlswTConnConfigEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1), ).setIndexNames((0, "DLSW-MIB", "dlswTConnConfigIndex")) if mibBuilder.loadTexts: dlswTConnConfigEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigEntry.setDescription('Each conceptual row defines a collection of transport connections.') dlswTConnConfigIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: dlswTConnConfigIndex.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigIndex.setDescription('The index to the conceptual row of the table. Negative numbers are not allowed. There are objects defined that point to conceptual rows of this table with this index value. Zero is used to denote that no corresponding row exists. Index values are assigned by the agent, and should not be reused but should continue to increase in value.') dlswTConnConfigTDomain = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 2), ObjectIdentifier()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigTDomain.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigTDomain.setDescription('The object identifier which indicates the transport domain of this conceptual row.') dlswTConnConfigLocalTAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 3), TAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigLocalTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigLocalTAddr.setDescription('The local transport address for this conceptual row of the transport connection definition.') dlswTConnConfigRemoteTAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 4), TAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigRemoteTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigRemoteTAddr.setDescription('The remote transport address. Together with dlswTConnConfigEntryType and dlswTConnConfigGroupDefinition, the object instance of this conceptual row identifies a collection of the transport connections that will be either initiated by this DLSw or initiated by a partner DLSw and accepted by this DLSw.') dlswTConnConfigLastModifyTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 5), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnConfigLastModifyTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigLastModifyTime.setDescription('The time (in hundredths of a second) since the value of any object in this conceptual row except for dlswTConnConfigOpens was last changed. This value may be compared to dlswTConnOperConnectTime to determine whether values in this row are completely valid for a transport connection created using this row definition.') dlswTConnConfigEntryType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("individual", 1), ("global", 2), ("group", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigEntryType.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigEntryType.setDescription("The object instance signifies the type of entry in the associated conceptual row. The value of `individual' means that the entry applies to a specific partner DLSw node as identified by dlswTConnConfigRemoteTAddr and dlswTConnConfigTDomain. The value of `global' means that the entry applies to all partner DLSw nodes of the TDomain. The value of 'group' means that the entry applies to a specific set of DLSw nodes in the TDomain. Any group definitions are enterprise-specific and are pointed to by dlswTConnConfigGroupDefinition. In the cases of `global' and `group', the value in dlswTConnConfigRemoteTAddr may not have any significance.") dlswTConnConfigGroupDefinition = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 7), RowPointer()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigGroupDefinition.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigGroupDefinition.setDescription("For conceptual rows of `individual' and `global' as specified in dlswTConnConfigEntryType, the instance of this object is `0.0'. For conceptual rows of `group', the instance points to the specific group definition.") dlswTConnConfigSetupType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("activePersistent", 2), ("activeOnDemand", 3), ("passive", 4), ("excluded", 5))).clone('passive')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigSetupType.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigSetupType.setDescription('This value of the instance of a conceptual row identifies the behavior of the collection of transport connections that this conceptual row defines. The value of activePersistent, activeOnDemand and passive means this DLSw will accept any transport connections, initiated by partner DLSw nodes, which are defined by this conceptual row. The value of activePersistent means this DLSw will also initiate the transport connections of this conceptual row and retry periodically if necessary. The value of activeOnDemand means this DLSw will initiate a transport connection of this conceptual row, if there is a directory cache hits. The value of other is implementation specific. The value of exclude means that the specified node is not allowed to be a partner to this DLSw node. To take a certain conceptual row definition out of service, a value of notInService for dlswTConnConfigRowStatus should be used.') dlswTConnConfigSapList = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16).clone(hexValue="AA000000000000000000000000000000")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigSapList.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigSapList.setDescription('The SAP list indicates which SAPs are advertised to the transport connection defined by this conceptual row. Only SAPs with even numbers are represented, in the form of the most significant bit of the first octet representing the SAP 0, the next most significant bit representing the SAP 2, to the least significant bit of the last octet representing the SAP 254. Data link switching is allowed for those SAPs which have one in its corresponding bit, not allowed otherwise. The whole SAP list has to be changed together. Changing the SAP list affects only new circuit establishments and has no effect on established circuits. This list can be used to restrict specific partners from knowing about all the SAPs used by DLSw on all its interfaces (these are represented in dlswIfSapList for each interface). For instance, one may want to run NetBIOS with some partners but not others. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. When to start the run-time capabilities exchange is implementation-specific. The DEFVAL below indicates support for SAPs 0, 4, 8, and C.') dlswTConnConfigAdvertiseMacNB = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 10), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigAdvertiseMacNB.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigAdvertiseMacNB.setDescription('The value of true indicates that any defined local MAC addresses and NetBIOS names will be advertised to a partner node via initial and (if supported) run-time capabilities exchange messages. The DLSw node should send the appropriate exclusivity control vector to accompany each list it sends, or to represent that the node is explicitly configured to have a null list. The value of false indicates that the DLSw node should not send a MAC address list or NetBIOS name list, and should also not send their corresponding exclusivity control vectors.') dlswTConnConfigInitCirRecvWndw = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(1)).setUnits('SSP messages').setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigInitCirRecvWndw.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigInitCirRecvWndw.setDescription('The initial circuit receive pacing window size, in the unit of SSP messages, to be used for future transport connections activated using this table row. The managed node sends this value as its initial receive pacing window in its initial capabilities exchange message. Changing this value does not affect the initial circuit receive pacing window size of currently active transport connections. If the standard window pacing scheme is not supported, the value is zero. A larger receive window value may be appropriate for partners that are reachable only via physical paths that have longer network delays.') dlswTConnConfigOpens = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnConfigOpens.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigOpens.setDescription('Number of times transport connections entered connected state according to the definition of this conceptual row.') dlswTConnConfigRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 13), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnConfigRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswTConnConfigTable following the RowStatus textual convention. The value of notInService will be used to take a conceptual row definition out of use.') dlswTConnOperTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 2, 3), ) if mibBuilder.loadTexts: dlswTConnOperTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperTable.setDescription('A list of transport connections. It is optional but desirable for the agent to keep an entry for some period of time after the transport connection is disconnected. This allows the manager to capture additional useful information about the connection, in particular, statistical information and the cause of the disconnection.') dlswTConnOperEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1), ).setIndexNames((0, "DLSW-MIB", "dlswTConnOperTDomain"), (0, "DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTConnOperEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperEntry.setDescription('') dlswTConnOperTDomain = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 1), ObjectIdentifier()) if mibBuilder.loadTexts: dlswTConnOperTDomain.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperTDomain.setDescription('The object identifier indicates the transport domain of this transport connection.') dlswTConnOperLocalTAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 2), TAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperLocalTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperLocalTAddr.setDescription('The local transport address for this transport connection. This value could be different from dlswTConnConfigLocalAddr, if the value of the latter were changed after this transport connection was established.') dlswTConnOperRemoteTAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 3), TAddress()) if mibBuilder.loadTexts: dlswTConnOperRemoteTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperRemoteTAddr.setDescription('The remote transport address of this transport connection.') dlswTConnOperEntryTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 4), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperEntryTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperEntryTime.setDescription('The amount of time (in hundredths of a second) since this transport connection conceptual row was created.') dlswTConnOperConnectTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 5), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperConnectTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperConnectTime.setDescription("The amount of time (in hundredths of a second) since this transport connection last entered the 'connected' state. A value of zero means this transport connection has never been established.") dlswTConnOperState = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("connecting", 1), ("initCapExchange", 2), ("connected", 3), ("quiescing", 4), ("disconnecting", 5), ("disconnected", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswTConnOperState.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperState.setDescription("The state of this transport connection. The transport connection enters `connecting' state when DLSw makes a connection request to the transport layer. Once initial Capabilities Exchange is sent, the transport connection enters enters `initCapExchange' state. When partner capabilities have been determined and the transport connection is ready for sending CanUReach (CUR) messages, it moves to the `connected' state. When DLSw is in the process of bringing down the connection, it is in the `disconnecting' state. When the transport layer indicates one of its connections is disconnected, the transport connection moves to the `disconnected' state. Whereas all of the values will be returned in response to a management protocol retrieval operation, only two values may be specified in a management protocol set operation: `quiescing' and `disconnecting'. Changing the value to `quiescing' prevents new circuits from being established, and will cause a transport disconnect when the last circuit on the connection goes away. Changing the value to `disconnecting' will force off all circuits immediately and bring the connection to `disconnected' state.") dlswTConnOperConfigIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperConfigIndex.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperConfigIndex.setDescription('The value of dlswTConnConfigIndex of the dlswTConnConfigEntry that governs the configuration information used by this dlswTConnOperEntry. The manager can therefore normally examine both configured and operational information for this transport connection. This value is zero if the corresponding dlswTConnConfigEntry was deleted after the creation of this dlswTConnOperEntry. If some fields in the former were changed but the conceptual row was not deleted, some configuration information may not be valid for this operational transport connection. The manager can compare dlswTConnOperConnectTime and dlswTConnConfigLastModifyTime to determine if this condition exists.') dlswTConnOperFlowCntlMode = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("undetermined", 1), ("pacing", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperFlowCntlMode.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperFlowCntlMode.setDescription('The flow control mechanism in use on this transport connection. This value is undetermined (1) before the mode of flow control can be established on a new transport connection (i.e., after CapEx is sent but before Capex or other SSP control messages have been received). Pacing (2) indicates that the standard RFC 1795 pacing mechanism is in use. Other (3) may be either the RFC 1434+ xBusy mechanism operating to a back-level DLSw, or a vendor-specific flow control method. Whether it is xBusy or not can be inferred from dlswTConnOperPartnerVersion.') dlswTConnOperPartnerVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 9), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(2, 2), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setDescription("This value identifies which version (first octet) and release (second octet) of the DLSw standard is supported by this partner DLSw. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. A conceptual row with a dlswTConnOperState of `connected' but a zero length partner version indicates that the partner is a non-standard DLSw partner. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerVendorID = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 10), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(3, 3), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerVendorID.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVendorID.setDescription("This value identifies the IEEE-assigned organizationally Unique Identifier (OUI) of the maker of this partner DLSw. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerVersionStr = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 253))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setDescription("This value identifies the particular product version (e.g., product name, code level, fix level) of this partner DLSw. The format of the actual version string is vendor-specific. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, if one is never received, or if one is received but it does not contain a version string. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerInitPacingWndw = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setDescription("The value of the partner initial receive pacing window. This is our initial send pacing window for all new circuits on this transport connection, as modified and granted by the first flow control indication the partner sends on each circuit. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A value of zero is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerSapList = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 13), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(16, 16), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerSapList.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerSapList.setDescription("The Supported SAP List received in the capabilities exchange message from the partner DLSw. This list has the same format described for dlswTConnConfigSapList. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerNBExcl = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 14), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerNBExcl.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerNBExcl.setDescription("The value of true signifies that the NetBIOS names received from this partner in the NetBIOS name list in its capabilities exchange message are the only NetBIOS names reachable by that partner. `False' indicates that other NetBIOS names may be reachable. `False' should be returned before a Capabilities Exchange message is received, if one is never received, or if one is received without a NB Name Exclusivity CV. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerMacExcl = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerMacExcl.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerMacExcl.setDescription("The value of true signifies that the MAC addresses received from this partner in the MAC address list in its capabilities exchange message are the only MAC addresses reachable by that partner. `False' indicates that other MAC addresses may be reachable. `False' should be returned before a Capabilities Exchange message is received, if one is never received, or if one is received without a MAC Address Exclusivity CV. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerNBInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("partial", 2), ("complete", 3), ("notApplicable", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerNBInfo.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerNBInfo.setDescription("It is up to this DSLw whether to keep either none, some, or all of the NetBIOS name list that was received in the capabilities exchange message sent by this partner DLSw. This object identifies how much information was kept by this DLSw. These names are stored as userConfigured remote entries in dlswDirNBTable. A value of (4), notApplicable, should be returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperPartnerMacInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("partial", 2), ("complete", 3), ("notApplicable", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperPartnerMacInfo.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerMacInfo.setDescription("It is up to this DLSw whether to keep either none, some, or all of the MAC address list that was received in the capabilities exchange message sent by this partner DLSw. This object identifies how much information was kept by this DLSw. These names are stored as userConfigured remote entries in dlswDirMACTable. A value of (4), notApplicable, should be returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlswTConnOperDiscTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 18), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperDiscTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscTime.setDescription("The amount of time (in hundredths of a second) since the dlswTConnOperState last entered `disconnected' state.") dlswTConnOperDiscReason = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("capExFailed", 2), ("transportLayerDisc", 3), ("operatorCommand", 4), ("lastCircuitDiscd", 5), ("protocolError", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperDiscReason.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscReason.setDescription('This object signifies the reason that either prevented the transport connection from entering the connected state, or caused the transport connection to enter the disconnected state.') dlswTConnOperDiscActiveCir = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperDiscActiveCir.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscActiveCir.setDescription('The number of circuits active (not in DISCONNECTED state) at the time the transport connection was last disconnected. This value is zero if the transport connection has never been connected.') dlswTConnOperInDataPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 21), Counter32()).setUnits('SSP messages').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperInDataPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInDataPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME received on this transport connection.') dlswTConnOperOutDataPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 22), Counter32()).setUnits('SSP messages').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperOutDataPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutDataPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME transmitted on this transport connection.') dlswTConnOperInDataOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 23), Counter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperInDataOctets.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInDataOctets.setDescription('The number octets in Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME received on this transport connection. Each message is counted starting with the first octet following the SSP message header.') dlswTConnOperOutDataOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 24), Counter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperOutDataOctets.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutDataOctets.setDescription('The number octets in Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME transmitted on this transport connection. Each message is counted starting with the first octet following the SSP message header.') dlswTConnOperInCntlPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 25), Counter32()).setUnits('SSP messages').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperInCntlPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInCntlPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages received on this transport connection which were not of type DGRMFRAME, DATAFRAME, or INFOFRAME.') dlswTConnOperOutCntlPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 26), Counter32()).setUnits('SSP messages').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperOutCntlPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutCntlPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of transmitted on this transport connection which were not of type DGRMFRAME, DATAFRAME, or INFOFRAME.') dlswTConnOperCURexSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperCURexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCURexSents.setDescription('The number of CanUReach_ex messages sent on this transport connection.') dlswTConnOperICRexRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperICRexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperICRexRcvds.setDescription('The number of ICanReach_ex messages received on this transport connection.') dlswTConnOperCURexRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperCURexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCURexRcvds.setDescription('The number of CanUReach_ex messages received on this transport connection.') dlswTConnOperICRexSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperICRexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperICRexSents.setDescription('The number of ICanReach_ex messages sent on this transport connection.') dlswTConnOperNQexSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperNQexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNQexSents.setDescription('The number of NetBIOS_NQ_ex (NetBIOS Name Query-explorer) messages sent on this transport connection.') dlswTConnOperNRexRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperNRexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNRexRcvds.setDescription('The number of NETBIOS_NR_ex (NetBIOS Name Recognized-explorer) messages received on this transport connection.') dlswTConnOperNQexRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperNQexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNQexRcvds.setDescription('The number of NETBIOS_NQ_ex messages received on this transport connection.') dlswTConnOperNRexSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperNRexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNRexSents.setDescription('The number of NETBIOS_NR_ex messages sent on this transport connection.') dlswTConnOperCirCreates = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperCirCreates.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCirCreates.setDescription("The number of times that circuits entered `circuit_established' state (not counting transitions from `circuit_restart').") dlswTConnOperCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 36), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnOperCircuits.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCircuits.setDescription("The number of currently active circuits on this transport connection, where `active' means not in `disconnected' state.") dlswTConnSpecific = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 4)) dlswTConnTcp = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1)) dlswTConnTcpConfigTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1), ) if mibBuilder.loadTexts: dlswTConnTcpConfigTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigTable.setDescription('This table defines the TCP transport connections that will be either initiated by or accepted by this DSLw. It augments the entries in dlswTConnConfigTable whose domain is dlswTCPDomain.') dlswTConnTcpConfigEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1), ).setIndexNames((0, "DLSW-MIB", "dlswTConnConfigIndex")) if mibBuilder.loadTexts: dlswTConnTcpConfigEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigEntry.setDescription('Each conceptual row defines parameters that are specific to dlswTCPDomain transport connections.') dlswTConnTcpConfigKeepAliveInt = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1800))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnTcpConfigKeepAliveInt.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigKeepAliveInt.setDescription('The time in seconds between TCP keepAlive messages when no traffic is flowing. Zero signifies no keepAlive protocol. Changes take effect only for new TCP connections.') dlswTConnTcpConfigTcpConnections = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16)).clone(2)).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnTcpConfigTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigTcpConnections.setDescription('This is our preferred number of TCP connections within a TCP transport connection. The actual number used is negotiated at capabilities exchange time. Changes take effect only for new transport connections.') dlswTConnTcpConfigMaxSegmentSize = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(4096)).setUnits('packets').setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswTConnTcpConfigMaxSegmentSize.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigMaxSegmentSize.setDescription('This is the number of bytes that this node is willing to receive over the read TCP connection(s). Changes take effect for new transport connections.') dlswTConnTcpOperTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2), ) if mibBuilder.loadTexts: dlswTConnTcpOperTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperTable.setDescription('A list of TCP transport connections. It is optional but desirable for the agent to keep an entry for some period of time after the transport connection is disconnected. This allows the manager to capture additional useful information about the connection, in particular, statistical information and the cause of the disconnection.') dlswTConnTcpOperEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1), ).setIndexNames((0, "DLSW-MIB", "dlswTConnOperTDomain"), (0, "DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTConnTcpOperEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperEntry.setDescription('') dlswTConnTcpOperKeepAliveInt = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1800))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnTcpOperKeepAliveInt.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperKeepAliveInt.setDescription('The time in seconds between TCP keepAlive messages when no traffic is flowing. Zero signifies no keepAlive protocol is operating.') dlswTConnTcpOperPrefTcpConnections = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnTcpOperPrefTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperPrefTcpConnections.setDescription('This is the number of TCP connections preferred by this DLSw partner, as received in its capabilities exchange message.') dlswTConnTcpOperTcpConnections = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswTConnTcpOperTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperTcpConnections.setDescription('This is the actual current number of TCP connections within this transport connection.') dlswIfTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 3, 1), ) if mibBuilder.loadTexts: dlswIfTable.setStatus('current') if mibBuilder.loadTexts: dlswIfTable.setDescription('The list of interfaces on which DLSw is active.') dlswIfEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: dlswIfEntry.setStatus('current') if mibBuilder.loadTexts: dlswIfEntry.setDescription('') dlswIfRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 1), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswIfRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswIfRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswIfTable following the RowStatus textual convention.') dlswIfVirtualSegment = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 4095), ValueRangeConstraint(65535, 65535), )).clone(65535)).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswIfVirtualSegment.setStatus('current') if mibBuilder.loadTexts: dlswIfVirtualSegment.setDescription('The segment number that uniquely identifies the virtual segment to which this DLSw interface is connected. Current source routing protocols limit this value to the range 0 - 4095. (The value 0 is used by some management applications for special test cases.) A value of 65535 signifies that no virtual segment is assigned to this interface. For instance, in a non-source routing environment, segment number assignment is not required.') dlswIfSapList = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16).clone(hexValue="AA000000000000000000000000000000")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswIfSapList.setStatus('current') if mibBuilder.loadTexts: dlswIfSapList.setDescription('The SAP list indicates which SAPs are allowed to be data link switched through this interface. This list has the same format described for dlswTConnConfigSapList. When changes to this object take effect is implementation- specific. Turning off a particular SAP can destroy active circuits that are using that SAP. An agent implementation may reject such changes until there are no active circuits if it so chooses. In this case, it is up to the manager to close the circuits first, using dlswCircuitState. The DEFVAL below indicates support for SAPs 0, 4, 8, and C.') dlswDirStat = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 1)) dlswDirMacEntries = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirMacEntries.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntries.setDescription('The current total number of entries in the dlswDirMacTable.') dlswDirMacCacheHits = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirMacCacheHits.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheHits.setDescription('The number of times a cache search for a particular MAC address resulted in success.') dlswDirMacCacheMisses = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirMacCacheMisses.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheMisses.setDescription('The number of times a cache search for a particular MAC address resulted in failure.') dlswDirMacCacheNextIndex = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirMacCacheNextIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheNextIndex.setDescription('The next value of dlswDirMacIndex to be assigned by the agent. A retrieval of this object atomically reserves the returned value for use by the manager to create a row in dlswDirMacTable. This makes it possible for the agent to control the index space of the MAC address cache, yet allows the manager to administratively create new rows.') dlswDirNBEntries = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirNBEntries.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntries.setDescription('The current total number of entries in the dlswDirNBTable.') dlswDirNBCacheHits = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirNBCacheHits.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheHits.setDescription('The number of times a cache search for a particular NetBIOS name resulted in success.') dlswDirNBCacheMisses = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirNBCacheMisses.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheMisses.setDescription('The number of times a cache search for a particular NetBIOS name resulted in failure.') dlswDirNBCacheNextIndex = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirNBCacheNextIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheNextIndex.setDescription('The next value of dlswDirNBIndex to be assigned by the agent. A retrieval of this object atomically reserves the returned value for use by the manager to create a row in dlswDirNBTable. This makes it possible for the agent to control the index space for the NetBIOS name cache, yet allows the manager to administratively create new rows.') dlswDirCache = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 2)) dlswDirMacTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1), ) if mibBuilder.loadTexts: dlswDirMacTable.setStatus('current') if mibBuilder.loadTexts: dlswDirMacTable.setDescription('This table contains locations of MAC addresses. They could be either verified or not verified, local or remote, and configured locally or learned from either Capabilities Exchange messages or directory searches.') dlswDirMacEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1), ).setIndexNames((0, "DLSW-MIB", "dlswDirMacIndex")) if mibBuilder.loadTexts: dlswDirMacEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntry.setDescription('Indexed by dlswDirMacIndex.') dlswDirMacIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: dlswDirMacIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirMacIndex.setDescription('Uniquely identifies a conceptual row of this table.') dlswDirMacMac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 2), MacAddressNC()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacMac.setStatus('current') if mibBuilder.loadTexts: dlswDirMacMac.setDescription('The MAC address, together with the dlswDirMacMask, specifies a set of MAC addresses that are defined or discovered through an interface or partner DLSw nodes.') dlswDirMacMask = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 3), MacAddressNC().clone(hexValue="FFFFFFFFFFFF")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacMask.setStatus('current') if mibBuilder.loadTexts: dlswDirMacMask.setDescription('The MAC address mask, together with the dlswDirMacMac, specifies a set of MAC addresses that are defined or discovered through an interface or partner DLSw nodes.') dlswDirMacEntryType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("userConfiguredPublic", 2), ("userConfiguredPrivate", 3), ("partnerCapExMsg", 4), ("dynamic", 5))).clone('userConfiguredPublic')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacEntryType.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntryType.setDescription('The cause of the creation of this conceptual row. It could be one of the three methods: (1) user configured, including via management protocol set operations, configuration file, command line or equivalent methods; (2) learned from the partner DLSw Capabilities Exchange messages; and (3) dynamic, e.g., learned from ICanReach messages, or LAN explorer frames. Since only individual MAC addresses can be dynamically learned, dynamic entries will all have a mask of all FFs. The public versus private distinction for user- configured resources applies only to local resources (UC remote resources are private), and indicates whether that resource should be advertised in capabilities exchange messages sent by this node.') dlswDirMacLocationType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("local", 2), ("remote", 3))).clone('local')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacLocationType.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLocationType.setDescription('The location of the resource (or a collection of resources using a mask) of this conceptual row is either (1) local - the resource is reachable via an interface, or (2) remote - the resource is reachable via a partner DLSw node (or a set of partner DLSw nodes).') dlswDirMacLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 6), RowPointer().clone((0, 0))).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLocation.setDescription('Points to either the ifEntry, dlswTConnConfigEntry, dlswTConnOperEntry, 0.0, or something that is implementation specific. It identifies the location of the MAC address (or the collection of MAC addresses.)') dlswDirMacStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("reachable", 2), ("notReachable", 3))).clone('unknown')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirMacStatus.setDescription("This object specifies whether DLSw currently believes the MAC address to be accessible at the specified location. The value `notReachable' allows a configured resource definition to be taken out of service when a search to that resource fails (avoiding a repeat of the search).") dlswDirMacLFSize = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 8), LFSize().clone('lfs65535')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacLFSize.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLFSize.setDescription('The largest size of the MAC INFO field (LLC header and data) that a circuit to the MAC address can carry through this path.') dlswDirMacRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirMacRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirMacRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswDirMacTable following the RowStatus textual convention.') dlswDirNBTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2), ) if mibBuilder.loadTexts: dlswDirNBTable.setStatus('current') if mibBuilder.loadTexts: dlswDirNBTable.setDescription('This table contains locations of NetBIOS names. They could be either verified or not verified, local or remote, and configured locally or learned from either Capabilities Exchange messages or directory searches.') dlswDirNBEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1), ).setIndexNames((0, "DLSW-MIB", "dlswDirNBIndex")) if mibBuilder.loadTexts: dlswDirNBEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntry.setDescription('Indexed by dlswDirNBIndex.') dlswDirNBIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: dlswDirNBIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirNBIndex.setDescription('Uniquely identifies a conceptual row of this table.') dlswDirNBName = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 2), NBName()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBName.setStatus('current') if mibBuilder.loadTexts: dlswDirNBName.setDescription("The NetBIOS name (including `any char' and `wildcard' characters) specifies a set of NetBIOS names that are defined or discovered through an interface or partner DLSw nodes.") dlswDirNBNameType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("individual", 2), ("group", 3))).clone('unknown')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBNameType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBNameType.setDescription('Whether dlswDirNBName represents an (or a set of) individual or group NetBIOS name(s).') dlswDirNBEntryType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("userConfiguredPublic", 2), ("userConfiguredPrivate", 3), ("partnerCapExMsg", 4), ("dynamic", 5))).clone('userConfiguredPublic')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBEntryType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntryType.setDescription('The cause of the creation of this conceptual row. It could be one of the three methods: (1) user configured, including via management protocol set operations, configuration file, command line, or equivalent methods; (2) learned from the partner DLSw Capabilities Exchange messages; and (3) dynamic, e.g., learned from ICanReach messages, or test frames. Since only actual NetBIOS names can be dynamically learned, dynamic entries will not contain any char or wildcard characters. The public versus private distinction for user- configured resources applies only to local resources (UC remote resources are private), and indicates whether that resource should be advertised in capabilities exchange messages sent by this node.') dlswDirNBLocationType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("local", 2), ("remote", 3))).clone('local')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBLocationType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLocationType.setDescription('The location of the resource (or a collection of resources using any char/wildcard characters) of this conceptual row is either (1) local - the resource is reachable via an interface, or (2) remote - the resource is reachable via a a partner DLSw node (or a set of partner DLSw nodes).') dlswDirNBLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 6), RowPointer().clone((0, 0))).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLocation.setDescription('Points to either the ifEntry, dlswTConnConfigEntry, dlswTConnOperEntry, 0.0, or something that is implementation specific. It identifies the location of the NetBIOS name or the set of NetBIOS names.') dlswDirNBStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("reachable", 2), ("notReachable", 3))).clone('unknown')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirNBStatus.setDescription("This object specifies whether DLSw currently believes the NetBIOS name to be accessible at the specified location. The value `notReachable' allows a configured resource definition to be taken out of service when a search to that resource fails (avoiding a repeat of the search).") dlswDirNBLFSize = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 8), LFSize().clone('lfs65535')).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBLFSize.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLFSize.setDescription('The largest size of the MAC INFO field (LLC header and data) that a circuit to the NB name can carry through this path.') dlswDirNBRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswDirNBRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirNBRowStatus.setDescription('This object is used by manager to create or delete the row entry in the dlswDirNBTable following the RowStatus textual convention.') dlswDirLocate = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 3)) dlswDirLocateMacTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1), ) if mibBuilder.loadTexts: dlswDirLocateMacTable.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacTable.setDescription('This table is used to retrieve all entries in the dlswDirMacTable that match a given MAC address, in the order of the best matched first, the second best matched second, and so on, till no more entries match the given MAC address.') dlswDirLocateMacEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1), ).setIndexNames((0, "DLSW-MIB", "dlswDirLocateMacMac"), (0, "DLSW-MIB", "dlswDirLocateMacMatch")) if mibBuilder.loadTexts: dlswDirLocateMacEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacEntry.setDescription('Indexed by dlswDirLocateMacMac and dlswDirLocateMacMatch. The first object is the MAC address of interest, and the second object is the order in the list of all entries that match the MAC address.') dlswDirLocateMacMac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 1), MacAddressNC()) if mibBuilder.loadTexts: dlswDirLocateMacMac.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacMac.setDescription('The MAC address to be located.') dlswDirLocateMacMatch = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))) if mibBuilder.loadTexts: dlswDirLocateMacMatch.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacMatch.setDescription('The order of the entries of dlswDirMacTable that match dlswDirLocateMacMac. A value of one represents the entry that best matches the MAC address. A value of two represents the second best matched entry, and so on.') dlswDirLocateMacLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 3), RowPointer()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirLocateMacLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacLocation.setDescription('Points to the dlswDirMacEntry.') dlswDirLocateNBTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2), ) if mibBuilder.loadTexts: dlswDirLocateNBTable.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBTable.setDescription('This table is used to retrieve all entries in the dlswDirNBTable that match a given NetBIOS name, in the order of the best matched first, the second best matched second, and so on, till no more entries match the given NetBIOS name.') dlswDirLocateNBEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1), ).setIndexNames((0, "DLSW-MIB", "dlswDirLocateNBName"), (0, "DLSW-MIB", "dlswDirLocateNBMatch")) if mibBuilder.loadTexts: dlswDirLocateNBEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBEntry.setDescription('Indexed by dlswDirLocateNBName and dlswDirLocateNBMatch. The first object is the NetBIOS name of interest, and the second object is the order in the list of all entries that match the NetBIOS name.') dlswDirLocateNBName = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 1), NBName()) if mibBuilder.loadTexts: dlswDirLocateNBName.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBName.setDescription('The NetBIOS name to be located (no any char or wildcards).') dlswDirLocateNBMatch = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))) if mibBuilder.loadTexts: dlswDirLocateNBMatch.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBMatch.setDescription('The order of the entries of dlswDirNBTable that match dlswDirLocateNBName. A value of one represents the entry that best matches the NetBIOS name. A value of two represents the second best matched entry, and so on.') dlswDirLocateNBLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 3), RowPointer()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswDirLocateNBLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBLocation.setDescription('Points to the dlswDirNBEntry.') dlswCircuitStat = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 5, 1)) dlswCircuitStatActives = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 5, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitStatActives.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatActives.setDescription('The current number of circuits in dlswCircuitTable that are not in the disconnected state.') dlswCircuitStatCreates = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 5, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitStatCreates.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatCreates.setDescription("The total number of entries ever added to dlswCircuitTable, or reactivated upon exiting `disconnected' state.") dlswCircuitTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 5, 2), ) if mibBuilder.loadTexts: dlswCircuitTable.setStatus('current') if mibBuilder.loadTexts: dlswCircuitTable.setDescription('This table is the circuit representation in the DLSw entity. Virtual data links are used to represent any internal end stations. There is a conceptual row associated with each data link. Thus, for circuits without an intervening transport connection, there are two conceptual rows for each circuit. The table consists of the circuits being established, established, and as an implementation option, circuits that have been disconnected. For circuits carried over transport connections, an entry is created after the CUR_cs was sent or received. For circuits between two locally attached devices, or internal virtual MAC addresses, an entry is created when the equivalent of CUR_cs sent/received status is reached. End station 1 (S1) and End station 2 (S2) are used to represent the two end stations of the circuit. S1 is always an end station which is locally attached. S2 may be locally attached or remote. If it is locally attached, the circuit will be represented by two rows indexed by (A, B) and (B, A) where A & B are the relevant MACs/SAPs. The table may be used to store the causes of disconnection of circuits. It is recommended that the oldest disconnected circuit entry be removed from this table when the memory space of disconnected circuits is needed.') dlswCircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1), ).setIndexNames((0, "DLSW-MIB", "dlswCircuitS1Mac"), (0, "DLSW-MIB", "dlswCircuitS1Sap"), (0, "DLSW-MIB", "dlswCircuitS2Mac"), (0, "DLSW-MIB", "dlswCircuitS2Sap")) if mibBuilder.loadTexts: dlswCircuitEntry.setStatus('current') if mibBuilder.loadTexts: dlswCircuitEntry.setDescription('') dlswCircuitS1Mac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 1), MacAddressNC()) if mibBuilder.loadTexts: dlswCircuitS1Mac.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Mac.setDescription('The MAC Address of End Station 1 (S1) used for this circuit.') dlswCircuitS1Sap = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)) if mibBuilder.loadTexts: dlswCircuitS1Sap.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Sap.setDescription('The SAP at End Station 1 (S1) used for this circuit.') dlswCircuitS1IfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS1IfIndex.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1IfIndex.setDescription('The ifEntry index of the local interface through which S1 can be reached.') dlswCircuitS1DlcType = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 4), DlcType()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS1DlcType.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1DlcType.setDescription('The DLC protocol in use between the DLSw node and S1.') dlswCircuitS1RouteInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS1RouteInfo.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1RouteInfo.setDescription('If source-route bridging is in use between the DLSw node and S1, this is the routing information field describing the path between the two devices. Otherwise the value will be an OCTET STRING of zero length.') dlswCircuitS1CircuitId = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 6), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS1CircuitId.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1CircuitId.setDescription('The Circuit ID assigned by this DLSw node to this circuit. The first four octets are the DLC port Id, and the second four octets are the Data Link Correlator. If the DLSw SSP was not used to establish this circuit, the value will be a string of zero length.') dlswCircuitS1Dlc = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 7), RowPointer()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS1Dlc.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Dlc.setDescription('Points to a conceptual row of the underlying DLC MIB, which could either be the standard MIBs (e.g., the SDLC), or an enterprise-specific DLC MIB.') dlswCircuitS2Mac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 8), MacAddressNC()) if mibBuilder.loadTexts: dlswCircuitS2Mac.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Mac.setDescription('The MAC Address of End Station 2 (S2) used for this circuit.') dlswCircuitS2Sap = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)) if mibBuilder.loadTexts: dlswCircuitS2Sap.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Sap.setDescription('The SAP at End Station 2 (S2) used for this circuit.') dlswCircuitS2Location = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 10), EndStationLocation()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS2Location.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Location.setDescription('The location of End Station 2 (S2). If the location of End Station 2 is local, the interface information will be available in the conceptual row whose S1 and S2 are the S2 and the S1 of this conceptual row, respectively.') dlswCircuitS2TDomain = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 11), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS2TDomain.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2TDomain.setDescription('If the location of End Station 2 is remote, this value is the transport domain of the transport protocol the circuit is running over. Otherwise, the value is 0.0.') dlswCircuitS2TAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 12), TAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS2TAddress.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2TAddress.setDescription('If the location of End Station 2 is remote, this object contains the address of the partner DLSw, else it will be an OCTET STRING of zero length.') dlswCircuitS2CircuitId = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 13), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitS2CircuitId.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2CircuitId.setDescription('The Circuit ID assigned to this circuit by the partner DLSw node. The first four octets are the DLC port Id, and the second four octets are the Data Link Correlator. If the DLSw SSP was not used to establish this circuit, the value will be a string of zero length.') dlswCircuitOrigin = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("s1", 1), ("s2", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitOrigin.setStatus('current') if mibBuilder.loadTexts: dlswCircuitOrigin.setDescription('This object specifies which of the two end stations initiated the establishment of this circuit.') dlswCircuitEntryTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 15), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitEntryTime.setStatus('current') if mibBuilder.loadTexts: dlswCircuitEntryTime.setDescription('The amount of time (in hundredths of a second) since this circuit table conceptual row was created.') dlswCircuitStateTime = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 16), TimeTicks()).setUnits('hundredths of a second').setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitStateTime.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStateTime.setDescription('The amount of time (in hundredths of a second) since this circuit entered the current state.') dlswCircuitState = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("disconnected", 1), ("circuitStart", 2), ("resolvePending", 3), ("circuitPending", 4), ("circuitEstablished", 5), ("connectPending", 6), ("contactPending", 7), ("connected", 8), ("disconnectPending", 9), ("haltPending", 10), ("haltPendingNoack", 11), ("circuitRestart", 12), ("restartPending", 13)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswCircuitState.setStatus('current') if mibBuilder.loadTexts: dlswCircuitState.setDescription("The current state of this circuit. The agent, implementation specific, may choose to keep entries for some period of time after circuit disconnect, so the manager can gather the time and cause of disconnection. While all of the specified values may be returned from a GET operation, the only SETable value is `disconnectPending'. When this value is set, DLSw should perform the appropriate action given its previous state (e.g., send HALT_DL if the state was `connected') to bring the circuit down to the `disconnected' state. Both the partner DLSw and local end station(s) should be notified as appropriate. This MIB provides no facility to re-establish a disconnected circuit, because in DLSw this should be an end station-driven function.") dlswCircuitPriority = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unsupported", 1), ("low", 2), ("medium", 3), ("high", 4), ("highest", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitPriority.setStatus('current') if mibBuilder.loadTexts: dlswCircuitPriority.setDescription("The transmission priority of this circuit as understood by this DLSw node. This value is determined by the two DLSw nodes at circuit startup time. If this DLSw node does not support DLSw circuit priority, the value `unsupported' should be returned.") dlswCircuitFCSendGrantedUnits = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCSendGrantedUnits.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCSendGrantedUnits.setDescription('The number of paced SSP messages that this DLSw is currently authorized to send on this circuit before it must stop and wait for an additional flow control indication from the partner DLSw. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCSendCurrentWndw = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCSendCurrentWndw.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCSendCurrentWndw.setDescription("The current window size that this DLSw is using in its role as a data sender. This is the value by which this DLSw would increase the number of messages it is authorized to send, if it were to receive a flow control indication with the bits specifying `repeat window'. The value zero should be returned if this circuit is not running the DLSw pacing protocol.") dlswCircuitFCRecvGrantedUnits = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCRecvGrantedUnits.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCRecvGrantedUnits.setDescription('The current number of paced SSP messages that this DLSw has authorized the partner DLSw to send on this circuit before the partner DLSw must stop and wait for an additional flow control indication from this DLSw. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCRecvCurrentWndw = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCRecvCurrentWndw.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCRecvCurrentWndw.setDescription("The current window size that this DLSw is using in its role as a data receiver. This is the number of additional paced SSP messages that this DLSw would be authorizing its DLSw partner to send, if this DLSw were to send a flow control indication with the bits specifying `repeat window'. The value zero should be returned if this circuit is not running the DLSw pacing protocol.") dlswCircuitFCLargestRecvGranted = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 23), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCLargestRecvGranted.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCLargestRecvGranted.setDescription('The largest receive window size granted by this DLSw during the current activation of this circuit. This is not the largest number of messages granted at any time, but the largest window size as represented by FCIND operator bits. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCLargestSendGranted = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 24), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCLargestSendGranted.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCLargestSendGranted.setDescription('The largest send (with respect to this DLSw) window size granted by the partner DLSw during the current activation of this circuit. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCHalveWndwSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCHalveWndwSents.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwSents.setDescription('The number of Halve Window operations this DLSw has sent on this circuit, in its role as a data receiver. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCResetOpSents = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCResetOpSents.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCResetOpSents.setDescription('The number of Reset Window operations this DLSw has sent on this circuit, in its role as a data receiver. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCHalveWndwRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCHalveWndwRcvds.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwRcvds.setDescription('The number of Halve Window operations this DLSw has received on this circuit, in its role as a data sender. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitFCResetOpRcvds = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitFCResetOpRcvds.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCResetOpRcvds.setDescription('The number of Reset Window operations this DLSw has received on this circuit, in its role as a data sender. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlswCircuitDiscReasonLocal = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("endStationDiscRcvd", 1), ("endStationDlcError", 2), ("protocolError", 3), ("operatorCommand", 4), ("haltDlRcvd", 5), ("haltDlNoAckRcvd", 6), ("transportConnClosed", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitDiscReasonLocal.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonLocal.setDescription('The reason why this circuit was last disconnected, as seen by this DLSw node. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.') dlswCircuitDiscReasonRemote = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("endStationDiscRcvd", 2), ("endStationDlcError", 3), ("protocolError", 4), ("operatorCommand", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitDiscReasonRemote.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemote.setDescription("The generic reason code why this circuit was last disconnected, as reported by the DLSw partner in a HALT_DL or HALT_DL_NOACK. If the partner does not send a reason code in these messages, or the DLSw implementation does not report receiving one, the value `unknown' is returned. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.") dlswCircuitDiscReasonRemoteData = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 31), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswCircuitDiscReasonRemoteData.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemoteData.setDescription('Implementation-specific data reported by the DLSw partner in a HALT_DL or HALT_DL_NOACK, to help specify how and why this circuit was last disconnected. If the partner does not send this data in these messages, or the DLSw implementation does not report receiving it, a string of zero length is returned. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.') dlswSdlcLsEntries = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 6, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlswSdlcLsEntries.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsEntries.setDescription('The number of entries in dlswSdlcLsTable.') dlswSdlcLsTable = MibTable((1, 3, 6, 1, 2, 1, 46, 1, 6, 2), ) if mibBuilder.loadTexts: dlswSdlcLsTable.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsTable.setDescription('The table defines the virtual MAC addresses for those SDLC link stations that participate in data link switching.') dlswSdlcLsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "SNA-SDLC-MIB", "sdlcLSAddress")) if mibBuilder.loadTexts: dlswSdlcLsEntry.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsEntry.setDescription('The index of this table is the ifIndex value for the SDLC port which owns this link station and the poll address of the particular SDLC link station.') dlswSdlcLsLocalMac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 1), MacAddressNC()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsLocalMac.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalMac.setDescription('The virtual MAC address used to represent the SDLC-attached link station to the rest of the DLSw network.') dlswSdlcLsLocalSap = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsLocalSap.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalSap.setDescription('The SAP used to represent this link station.') dlswSdlcLsLocalIdBlock = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 3), DisplayString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(3, 3), )).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsLocalIdBlock.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalIdBlock.setDescription('The block number is the first three digits of the node_id, if available. These 3 hexadecimal digits identify the product.') dlswSdlcLsLocalIdNum = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 4), DisplayString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(5, 5), )).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsLocalIdNum.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalIdNum.setDescription('The ID number is the last 5 digits of the node_id, if available. These 5 hexadecimal digits are administratively defined and combined with the 3 digit block number form the node_id. This node_id is used to identify the local node and is included in SNA XIDs.') dlswSdlcLsRemoteMac = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 5), MacAddressNC().clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsRemoteMac.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRemoteMac.setDescription('The MAC address to which DLSw should attempt to connect this link station. If this information is not available, a length of zero for this object should be returned.') dlswSdlcLsRemoteSap = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 6), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(1, 1), )).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsRemoteSap.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRemoteSap.setDescription('The SAP of the remote station to which this link station should be connected. If this information is not available, a length of zero for this object should be returned.') dlswSdlcLsRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dlswSdlcLsRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswSdlcLsTable following the RowStatus textual convention.') dlswTrapControl = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 1, 10)) dlswTrapCntlTConnPartnerReject = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("partial", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswTrapCntlTConnPartnerReject.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConnPartnerReject.setDescription("Indicates whether the DLSw is permitted to emit partner reject related traps. With the value of `enabled' the DLSw will emit all partner reject related traps. With the value of `disabled' the DLSw will not emit any partner reject related traps. With the value of `partial' the DLSw will only emits partner reject traps for CapEx reject. The changes take effect immediately.") dlswTrapCntlTConnProtViolation = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswTrapCntlTConnProtViolation.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConnProtViolation.setDescription('Indicates whether the DLSw is permitted to generate protocol-violation traps on the events such as window size violation. The changes take effect immediately.') dlswTrapCntlTConn = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("partial", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswTrapCntlTConn.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConn.setDescription("Indicates whether the DLSw is permitted to emit transport connection up and down traps. With the value of `enabled' the DLSw will emit traps when connections enter `connected' and `disconnected' states. With the value of `disabled' the DLSw will not emit traps when connections enter of `connected' and `disconnected' states. With the value of `partial' the DLSw will only emits transport connection down traps when the connection is closed with busy. The changes take effect immediately.") dlswTrapCntlCircuit = MibScalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("partial", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dlswTrapCntlCircuit.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlCircuit.setDescription("Indicates whether the DLSw is permitted to generate circuit up and down traps. With the value of `enabled' the DLSw will emit traps when circuits enter `connected' and `disconnected' states. With the value of `disabled' the DLSw will not emit traps when circuits enter of `connected' and `disconnected' states. With the value of `partial' the DLSw will emit traps only for those circuits that are initiated by this DLSw, e.g., originating the CUR_CS message. The changes take effect immediately.") dlswTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 1, 0)) dlswTrapTConnPartnerReject = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 1)).setObjects(("DLSW-MIB", "dlswTConnOperTDomain"), ("DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTrapTConnPartnerReject.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnPartnerReject.setDescription('This trap is sent each time a transport connection is rejected by a partner DLSw during Capabilities Exchanges. The emission of this trap is controlled by dlswTrapCntlTConnPartnerReject.') dlswTrapTConnProtViolation = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 2)).setObjects(("DLSW-MIB", "dlswTConnOperTDomain"), ("DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTrapTConnProtViolation.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnProtViolation.setDescription('This trap is sent each time a protocol violation is detected for a transport connection. The emission of this trap is controlled by dlswTrapCntlTConnProtViolation.') dlswTrapTConnUp = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 3)).setObjects(("DLSW-MIB", "dlswTConnOperTDomain"), ("DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTrapTConnUp.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnUp.setDescription("This trap is sent each time a transport connection enters `connected' state. The emission of this trap is controlled by dlswTrapCntlTConn.") dlswTrapTConnDown = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 4)).setObjects(("DLSW-MIB", "dlswTConnOperTDomain"), ("DLSW-MIB", "dlswTConnOperRemoteTAddr")) if mibBuilder.loadTexts: dlswTrapTConnDown.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnDown.setDescription("This trap is sent each time a transport connection enters `disconnected' state. The emission of this trap is controlled by dlswTrapCntlTConn.") dlswTrapCircuitUp = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 5)).setObjects(("DLSW-MIB", "dlswCircuitS1Mac"), ("DLSW-MIB", "dlswCircuitS1Sap"), ("DLSW-MIB", "dlswCircuitS2Mac"), ("DLSW-MIB", "dlswCircuitS2Sap")) if mibBuilder.loadTexts: dlswTrapCircuitUp.setStatus('current') if mibBuilder.loadTexts: dlswTrapCircuitUp.setDescription("This trap is sent each time a circuit enters `connected' state. The emission of this trap is controlled by dlswTrapCntlCircuit.") dlswTrapCircuitDown = NotificationType((1, 3, 6, 1, 2, 1, 46, 1, 0, 6)).setObjects(("DLSW-MIB", "dlswCircuitS1Mac"), ("DLSW-MIB", "dlswCircuitS1Sap"), ("DLSW-MIB", "dlswCircuitS2Mac"), ("DLSW-MIB", "dlswCircuitS2Sap")) if mibBuilder.loadTexts: dlswTrapCircuitDown.setStatus('current') if mibBuilder.loadTexts: dlswTrapCircuitDown.setDescription("This trap is sent each time a circuit enters `disconnected' state. The emission of this trap is controlled by dlswTrapCntlCircuit.") dlswConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 3)) dlswCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 3, 1)) dlswGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 46, 3, 2)) dlswCoreCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 1)).setObjects(("DLSW-MIB", "dlswNodeGroup"), ("DLSW-MIB", "dlswTConnStatGroup"), ("DLSW-MIB", "dlswTConnConfigGroup"), ("DLSW-MIB", "dlswTConnOperGroup"), ("DLSW-MIB", "dlswInterfaceGroup"), ("DLSW-MIB", "dlswCircuitGroup"), ("DLSW-MIB", "dlswCircuitStatGroup"), ("DLSW-MIB", "dlswNotificationGroup"), ("DLSW-MIB", "dlswNodeNBGroup"), ("DLSW-MIB", "dlswTConnNBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswCoreCompliance = dlswCoreCompliance.setStatus('current') if mibBuilder.loadTexts: dlswCoreCompliance.setDescription('The core compliance statement for all DLSw nodes.') dlswTConnTcpCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 2)).setObjects(("DLSW-MIB", "dlswTConnTcpConfigGroup"), ("DLSW-MIB", "dlswTConnTcpOperGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnTcpCompliance = dlswTConnTcpCompliance.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpCompliance.setDescription('Compliance for DLSw nodes that use TCP as a transport connection protocol.') dlswDirCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 3)).setObjects(("DLSW-MIB", "dlswDirGroup"), ("DLSW-MIB", "dlswDirNBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirCompliance = dlswDirCompliance.setStatus('current') if mibBuilder.loadTexts: dlswDirCompliance.setDescription('Compliance for DLSw nodes that provide a directory function.') dlswDirLocateCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 4)).setObjects(("DLSW-MIB", "dlswDirLocateGroup"), ("DLSW-MIB", "dlswDirLocateNBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirLocateCompliance = dlswDirLocateCompliance.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateCompliance.setDescription('Compliance for DLSw nodes that provide an ordered list of directory entries for a given resource.') dlswSdlcCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 5)).setObjects(("DLSW-MIB", "dlswSdlcGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswSdlcCompliance = dlswSdlcCompliance.setStatus('current') if mibBuilder.loadTexts: dlswSdlcCompliance.setDescription('Compliance for DLSw nodes that support SDLC.') dlswNodeGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 1)).setObjects(("DLSW-MIB", "dlswNodeVersion"), ("DLSW-MIB", "dlswNodeVendorID"), ("DLSW-MIB", "dlswNodeVersionString"), ("DLSW-MIB", "dlswNodeStdPacingSupport"), ("DLSW-MIB", "dlswNodeStatus"), ("DLSW-MIB", "dlswNodeUpTime"), ("DLSW-MIB", "dlswNodeVirtualSegmentLFSize"), ("DLSW-MIB", "dlswNodeResourceMacExclusivity"), ("DLSW-MIB", "dlswTrapCntlTConnPartnerReject"), ("DLSW-MIB", "dlswTrapCntlTConnProtViolation"), ("DLSW-MIB", "dlswTrapCntlTConn"), ("DLSW-MIB", "dlswTrapCntlCircuit")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswNodeGroup = dlswNodeGroup.setStatus('current') if mibBuilder.loadTexts: dlswNodeGroup.setDescription('Conformance group for DLSw node general information.') dlswNodeNBGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 2)).setObjects(("DLSW-MIB", "dlswNodeResourceNBExclusivity")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswNodeNBGroup = dlswNodeNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswNodeNBGroup.setDescription('Conformance group for DLSw node general information specifically for nodes that support NetBIOS.') dlswTConnStatGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 3)).setObjects(("DLSW-MIB", "dlswTConnStatActiveConnections"), ("DLSW-MIB", "dlswTConnStatCloseIdles"), ("DLSW-MIB", "dlswTConnStatCloseBusys")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnStatGroup = dlswTConnStatGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatGroup.setDescription('Conformance group for statistics for transport connections.') dlswTConnConfigGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 4)).setObjects(("DLSW-MIB", "dlswTConnConfigTDomain"), ("DLSW-MIB", "dlswTConnConfigLocalTAddr"), ("DLSW-MIB", "dlswTConnConfigRemoteTAddr"), ("DLSW-MIB", "dlswTConnConfigLastModifyTime"), ("DLSW-MIB", "dlswTConnConfigEntryType"), ("DLSW-MIB", "dlswTConnConfigGroupDefinition"), ("DLSW-MIB", "dlswTConnConfigSetupType"), ("DLSW-MIB", "dlswTConnConfigSapList"), ("DLSW-MIB", "dlswTConnConfigAdvertiseMacNB"), ("DLSW-MIB", "dlswTConnConfigInitCirRecvWndw"), ("DLSW-MIB", "dlswTConnConfigOpens"), ("DLSW-MIB", "dlswTConnConfigRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnConfigGroup = dlswTConnConfigGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigGroup.setDescription('Conformance group for the configuration of transport connections.') dlswTConnOperGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 5)).setObjects(("DLSW-MIB", "dlswTConnOperLocalTAddr"), ("DLSW-MIB", "dlswTConnOperEntryTime"), ("DLSW-MIB", "dlswTConnOperConnectTime"), ("DLSW-MIB", "dlswTConnOperState"), ("DLSW-MIB", "dlswTConnOperConfigIndex"), ("DLSW-MIB", "dlswTConnOperFlowCntlMode"), ("DLSW-MIB", "dlswTConnOperPartnerVersion"), ("DLSW-MIB", "dlswTConnOperPartnerVendorID"), ("DLSW-MIB", "dlswTConnOperPartnerVersionStr"), ("DLSW-MIB", "dlswTConnOperPartnerInitPacingWndw"), ("DLSW-MIB", "dlswTConnOperPartnerSapList"), ("DLSW-MIB", "dlswTConnOperPartnerMacExcl"), ("DLSW-MIB", "dlswTConnOperPartnerMacInfo"), ("DLSW-MIB", "dlswTConnOperDiscTime"), ("DLSW-MIB", "dlswTConnOperDiscReason"), ("DLSW-MIB", "dlswTConnOperDiscActiveCir"), ("DLSW-MIB", "dlswTConnOperInDataPkts"), ("DLSW-MIB", "dlswTConnOperOutDataPkts"), ("DLSW-MIB", "dlswTConnOperInDataOctets"), ("DLSW-MIB", "dlswTConnOperOutDataOctets"), ("DLSW-MIB", "dlswTConnOperInCntlPkts"), ("DLSW-MIB", "dlswTConnOperOutCntlPkts"), ("DLSW-MIB", "dlswTConnOperCURexSents"), ("DLSW-MIB", "dlswTConnOperICRexRcvds"), ("DLSW-MIB", "dlswTConnOperCURexRcvds"), ("DLSW-MIB", "dlswTConnOperICRexSents"), ("DLSW-MIB", "dlswTConnOperCirCreates"), ("DLSW-MIB", "dlswTConnOperCircuits")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnOperGroup = dlswTConnOperGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperGroup.setDescription('Conformance group for operation information for transport connections.') dlswTConnNBGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 6)).setObjects(("DLSW-MIB", "dlswTConnOperPartnerNBExcl"), ("DLSW-MIB", "dlswTConnOperPartnerNBInfo"), ("DLSW-MIB", "dlswTConnOperNQexSents"), ("DLSW-MIB", "dlswTConnOperNRexRcvds"), ("DLSW-MIB", "dlswTConnOperNQexRcvds"), ("DLSW-MIB", "dlswTConnOperNRexSents")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnNBGroup = dlswTConnNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnNBGroup.setDescription('Conformance group for operation information for transport connections, specifically for nodes that support NetBIOS.') dlswTConnTcpConfigGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 7)).setObjects(("DLSW-MIB", "dlswTConnTcpConfigKeepAliveInt"), ("DLSW-MIB", "dlswTConnTcpConfigTcpConnections"), ("DLSW-MIB", "dlswTConnTcpConfigMaxSegmentSize")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnTcpConfigGroup = dlswTConnTcpConfigGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigGroup.setDescription('Conformance group for configuration information for transport connections using TCP.') dlswTConnTcpOperGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 8)).setObjects(("DLSW-MIB", "dlswTConnTcpOperKeepAliveInt"), ("DLSW-MIB", "dlswTConnTcpOperPrefTcpConnections"), ("DLSW-MIB", "dlswTConnTcpOperTcpConnections")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswTConnTcpOperGroup = dlswTConnTcpOperGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperGroup.setDescription('Conformance group for operation information for transport connections using TCP.') dlswInterfaceGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 9)).setObjects(("DLSW-MIB", "dlswIfRowStatus"), ("DLSW-MIB", "dlswIfVirtualSegment"), ("DLSW-MIB", "dlswIfSapList")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswInterfaceGroup = dlswInterfaceGroup.setStatus('current') if mibBuilder.loadTexts: dlswInterfaceGroup.setDescription('Conformance group for DLSw interfaces.') dlswDirGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 10)).setObjects(("DLSW-MIB", "dlswDirMacEntries"), ("DLSW-MIB", "dlswDirMacCacheHits"), ("DLSW-MIB", "dlswDirMacCacheMisses"), ("DLSW-MIB", "dlswDirMacCacheNextIndex"), ("DLSW-MIB", "dlswDirMacMac"), ("DLSW-MIB", "dlswDirMacMask"), ("DLSW-MIB", "dlswDirMacEntryType"), ("DLSW-MIB", "dlswDirMacLocationType"), ("DLSW-MIB", "dlswDirMacLocation"), ("DLSW-MIB", "dlswDirMacStatus"), ("DLSW-MIB", "dlswDirMacLFSize"), ("DLSW-MIB", "dlswDirMacRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirGroup = dlswDirGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirGroup.setDescription('Conformance group for DLSw directory using MAC addresses.') dlswDirNBGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 11)).setObjects(("DLSW-MIB", "dlswDirNBEntries"), ("DLSW-MIB", "dlswDirNBCacheHits"), ("DLSW-MIB", "dlswDirNBCacheMisses"), ("DLSW-MIB", "dlswDirNBCacheNextIndex"), ("DLSW-MIB", "dlswDirNBName"), ("DLSW-MIB", "dlswDirNBNameType"), ("DLSW-MIB", "dlswDirNBEntryType"), ("DLSW-MIB", "dlswDirNBLocationType"), ("DLSW-MIB", "dlswDirNBLocation"), ("DLSW-MIB", "dlswDirNBStatus"), ("DLSW-MIB", "dlswDirNBLFSize"), ("DLSW-MIB", "dlswDirNBRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirNBGroup = dlswDirNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirNBGroup.setDescription('Conformance group for DLSw directory using NetBIOS names.') dlswDirLocateGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 12)).setObjects(("DLSW-MIB", "dlswDirLocateMacLocation")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirLocateGroup = dlswDirLocateGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateGroup.setDescription('Conformance group for a node that can return directory entry order for a given MAC address.') dlswDirLocateNBGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 13)).setObjects(("DLSW-MIB", "dlswDirLocateNBLocation")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswDirLocateNBGroup = dlswDirLocateNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBGroup.setDescription('Conformance group for a node that can return directory entry order for a given NetBIOS name.') dlswCircuitStatGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 14)).setObjects(("DLSW-MIB", "dlswCircuitStatActives"), ("DLSW-MIB", "dlswCircuitStatCreates")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswCircuitStatGroup = dlswCircuitStatGroup.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatGroup.setDescription('Conformance group for statistics about circuits.') dlswCircuitGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 15)).setObjects(("DLSW-MIB", "dlswCircuitS1IfIndex"), ("DLSW-MIB", "dlswCircuitS1DlcType"), ("DLSW-MIB", "dlswCircuitS1RouteInfo"), ("DLSW-MIB", "dlswCircuitS1CircuitId"), ("DLSW-MIB", "dlswCircuitS1Dlc"), ("DLSW-MIB", "dlswCircuitS2Location"), ("DLSW-MIB", "dlswCircuitS2TDomain"), ("DLSW-MIB", "dlswCircuitS2TAddress"), ("DLSW-MIB", "dlswCircuitS2CircuitId"), ("DLSW-MIB", "dlswCircuitOrigin"), ("DLSW-MIB", "dlswCircuitEntryTime"), ("DLSW-MIB", "dlswCircuitStateTime"), ("DLSW-MIB", "dlswCircuitState"), ("DLSW-MIB", "dlswCircuitPriority"), ("DLSW-MIB", "dlswCircuitFCSendGrantedUnits"), ("DLSW-MIB", "dlswCircuitFCSendCurrentWndw"), ("DLSW-MIB", "dlswCircuitFCRecvGrantedUnits"), ("DLSW-MIB", "dlswCircuitFCRecvCurrentWndw"), ("DLSW-MIB", "dlswCircuitFCLargestRecvGranted"), ("DLSW-MIB", "dlswCircuitFCLargestSendGranted"), ("DLSW-MIB", "dlswCircuitFCHalveWndwSents"), ("DLSW-MIB", "dlswCircuitFCResetOpSents"), ("DLSW-MIB", "dlswCircuitFCHalveWndwRcvds"), ("DLSW-MIB", "dlswCircuitFCResetOpRcvds"), ("DLSW-MIB", "dlswCircuitDiscReasonLocal"), ("DLSW-MIB", "dlswCircuitDiscReasonRemote"), ("DLSW-MIB", "dlswCircuitDiscReasonRemoteData")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswCircuitGroup = dlswCircuitGroup.setStatus('current') if mibBuilder.loadTexts: dlswCircuitGroup.setDescription('Conformance group for DLSw circuits.') dlswSdlcGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 16)).setObjects(("DLSW-MIB", "dlswSdlcLsEntries"), ("DLSW-MIB", "dlswSdlcLsLocalMac"), ("DLSW-MIB", "dlswSdlcLsLocalSap"), ("DLSW-MIB", "dlswSdlcLsLocalIdBlock"), ("DLSW-MIB", "dlswSdlcLsLocalIdNum"), ("DLSW-MIB", "dlswSdlcLsRemoteMac"), ("DLSW-MIB", "dlswSdlcLsRemoteSap"), ("DLSW-MIB", "dlswSdlcLsRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswSdlcGroup = dlswSdlcGroup.setStatus('current') if mibBuilder.loadTexts: dlswSdlcGroup.setDescription('Conformance group for DLSw SDLC support.') dlswNotificationGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 46, 3, 2, 17)).setObjects(("DLSW-MIB", "dlswTrapTConnPartnerReject"), ("DLSW-MIB", "dlswTrapTConnProtViolation"), ("DLSW-MIB", "dlswTrapTConnUp"), ("DLSW-MIB", "dlswTrapTConnDown"), ("DLSW-MIB", "dlswTrapCircuitUp"), ("DLSW-MIB", "dlswTrapCircuitDown")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlswNotificationGroup = dlswNotificationGroup.setStatus('current') if mibBuilder.loadTexts: dlswNotificationGroup.setDescription('Conformance group for DLSw notifications.') mibBuilder.exportSymbols("DLSW-MIB", dlswCircuitStatGroup=dlswCircuitStatGroup, dlswNodeVirtualSegmentLFSize=dlswNodeVirtualSegmentLFSize, dlswIfRowStatus=dlswIfRowStatus, dlswTrapTConnProtViolation=dlswTrapTConnProtViolation, dlswDirNBLFSize=dlswDirNBLFSize, dlswCircuitS2TDomain=dlswCircuitS2TDomain, dlswTConnStatCloseBusys=dlswTConnStatCloseBusys, dlswDirMacIndex=dlswDirMacIndex, dlswDirLocateNBGroup=dlswDirLocateNBGroup, dlswDirLocateNBLocation=dlswDirLocateNBLocation, dlswCircuitS2Location=dlswCircuitS2Location, dlswDirCache=dlswDirCache, dlswSdlcLsLocalSap=dlswSdlcLsLocalSap, dlswSdlcLsLocalIdBlock=dlswSdlcLsLocalIdBlock, dlswNotificationGroup=dlswNotificationGroup, dlswInterface=dlswInterface, dlswTrapTConnPartnerReject=dlswTrapTConnPartnerReject, dlswCircuitFCSendCurrentWndw=dlswCircuitFCSendCurrentWndw, dlswTrapCntlTConnProtViolation=dlswTrapCntlTConnProtViolation, EndStationLocation=EndStationLocation, dlswTConnOperDiscTime=dlswTConnOperDiscTime, dlswTConnOperPartnerInitPacingWndw=dlswTConnOperPartnerInitPacingWndw, dlswTConnOperEntryTime=dlswTConnOperEntryTime, dlswTConnOperPartnerMacInfo=dlswTConnOperPartnerMacInfo, dlswTConnOperCURexSents=dlswTConnOperCURexSents, dlswDirStat=dlswDirStat, dlswDirMacCacheHits=dlswDirMacCacheHits, dlswDirLocate=dlswDirLocate, dlswCircuitOrigin=dlswCircuitOrigin, dlswDirMacCacheMisses=dlswDirMacCacheMisses, dlswTConnTcpOperKeepAliveInt=dlswTConnTcpOperKeepAliveInt, dlswCircuitFCLargestRecvGranted=dlswCircuitFCLargestRecvGranted, dlswCircuitS2CircuitId=dlswCircuitS2CircuitId, PYSNMP_MODULE_ID=dlsw, dlswTConnConfigIndex=dlswTConnConfigIndex, dlswDirNBGroup=dlswDirNBGroup, dlswNodeGroup=dlswNodeGroup, dlswTConnConfigInitCirRecvWndw=dlswTConnConfigInitCirRecvWndw, dlswMIB=dlswMIB, dlswDirMacLFSize=dlswDirMacLFSize, dlswTConnOperPartnerMacExcl=dlswTConnOperPartnerMacExcl, dlswDirCompliance=dlswDirCompliance, dlswTConnTcpConfigEntry=dlswTConnTcpConfigEntry, dlswDirNBLocationType=dlswDirNBLocationType, dlswNode=dlswNode, dlswTConnConfigEntry=dlswTConnConfigEntry, dlswSdlcLsLocalIdNum=dlswSdlcLsLocalIdNum, dlsw=dlsw, dlswDirNBLocation=dlswDirNBLocation, dlswTConnStatCloseIdles=dlswTConnStatCloseIdles, dlswTConnOperEntry=dlswTConnOperEntry, dlswDirLocateNBEntry=dlswDirLocateNBEntry, dlswTraps=dlswTraps, dlswCircuitStatCreates=dlswCircuitStatCreates, dlswDirNBCacheHits=dlswDirNBCacheHits, dlswDirNBNameType=dlswDirNBNameType, dlswTConnOperCirCreates=dlswTConnOperCirCreates, dlswTConnConfigTDomain=dlswTConnConfigTDomain, dlswTConnOperInCntlPkts=dlswTConnOperInCntlPkts, dlswIfEntry=dlswIfEntry, dlswDirNBCacheNextIndex=dlswDirNBCacheNextIndex, null=null, dlswTConnStatActiveConnections=dlswTConnStatActiveConnections, DlcType=DlcType, dlswTConnOperInDataOctets=dlswTConnOperInDataOctets, dlswIfSapList=dlswIfSapList, dlswDirMacEntryType=dlswDirMacEntryType, dlswTConnOperTDomain=dlswTConnOperTDomain, dlswCircuitStatActives=dlswCircuitStatActives, TAddress=TAddress, dlswTConnOperNQexSents=dlswTConnOperNQexSents, dlswDirNBRowStatus=dlswDirNBRowStatus, dlswDirNBEntryType=dlswDirNBEntryType, dlswCircuitS1RouteInfo=dlswCircuitS1RouteInfo, dlswTConnConfigGroup=dlswTConnConfigGroup, dlswTConnConfigRowStatus=dlswTConnConfigRowStatus, dlswCircuitState=dlswCircuitState, dlswCircuitEntry=dlswCircuitEntry, dlswCircuitGroup=dlswCircuitGroup, dlswTConnOperOutDataPkts=dlswTConnOperOutDataPkts, dlswTConnTcpConfigTcpConnections=dlswTConnTcpConfigTcpConnections, dlswIfTable=dlswIfTable, dlswDirGroup=dlswDirGroup, dlswDirNBEntries=dlswDirNBEntries, dlswNodeStdPacingSupport=dlswNodeStdPacingSupport, dlswCircuitPriority=dlswCircuitPriority, dlswNodeStatus=dlswNodeStatus, dlswCircuitS2TAddress=dlswCircuitS2TAddress, dlswDirLocateCompliance=dlswDirLocateCompliance, dlswTConn=dlswTConn, dlswCircuitS1CircuitId=dlswCircuitS1CircuitId, dlswSdlcGroup=dlswSdlcGroup, NBName=NBName, dlswIfVirtualSegment=dlswIfVirtualSegment, dlswTConnOperPartnerNBExcl=dlswTConnOperPartnerNBExcl, dlswTConnOperNRexSents=dlswTConnOperNRexSents, dlswTConnTcpOperTable=dlswTConnTcpOperTable, dlswSdlcLsTable=dlswSdlcLsTable, dlswDirLocateMacTable=dlswDirLocateMacTable, dlswTConnOperNQexRcvds=dlswTConnOperNQexRcvds, dlswCircuitFCSendGrantedUnits=dlswCircuitFCSendGrantedUnits, dlswTConnOperTable=dlswTConnOperTable, dlswTConnConfigSapList=dlswTConnConfigSapList, dlswDirMacRowStatus=dlswDirMacRowStatus, DlswTCPAddress=DlswTCPAddress, dlswDirMacEntries=dlswDirMacEntries, dlswTConnConfigEntryType=dlswTConnConfigEntryType, dlswTConnOperInDataPkts=dlswTConnOperInDataPkts, dlswCircuitS2Mac=dlswCircuitS2Mac, dlswDirMacLocationType=dlswDirMacLocationType, dlswTConnOperFlowCntlMode=dlswTConnOperFlowCntlMode, dlswCircuitFCHalveWndwRcvds=dlswCircuitFCHalveWndwRcvds, dlswDirLocateMacEntry=dlswDirLocateMacEntry, dlswSdlc=dlswSdlc, dlswDirNBTable=dlswDirNBTable, dlswCircuitFCRecvGrantedUnits=dlswCircuitFCRecvGrantedUnits, dlswTConnStat=dlswTConnStat, dlswDirLocateNBTable=dlswDirLocateNBTable, dlswDirLocateNBMatch=dlswDirLocateNBMatch, dlswDirLocateGroup=dlswDirLocateGroup, dlswNodeVendorID=dlswNodeVendorID, dlswCircuitStateTime=dlswCircuitStateTime, dlswDirMacEntry=dlswDirMacEntry, dlswDirLocateMacMatch=dlswDirLocateMacMatch, dlswNodeUpTime=dlswNodeUpTime, dlswTConnTcpConfigGroup=dlswTConnTcpConfigGroup, dlswCircuitTable=dlswCircuitTable, dlswCircuitFCHalveWndwSents=dlswCircuitFCHalveWndwSents, dlswTConnConfigOpens=dlswTConnConfigOpens, dlswTConnTcpOperPrefTcpConnections=dlswTConnTcpOperPrefTcpConnections, dlswSdlcCompliance=dlswSdlcCompliance, dlswTConnConfigLocalTAddr=dlswTConnConfigLocalTAddr, dlswTConnOperConnectTime=dlswTConnOperConnectTime, dlswCircuitS2Sap=dlswCircuitS2Sap, dlswTConnNBGroup=dlswTConnNBGroup, dlswNodeResourceMacExclusivity=dlswNodeResourceMacExclusivity, dlswTrapTConnDown=dlswTrapTConnDown, dlswCircuitS1IfIndex=dlswCircuitS1IfIndex, dlswCircuitFCLargestSendGranted=dlswCircuitFCLargestSendGranted, dlswTrapCircuitUp=dlswTrapCircuitUp, dlswTrapCircuitDown=dlswTrapCircuitDown, dlswTrapCntlTConn=dlswTrapCntlTConn, dlswTConnOperRemoteTAddr=dlswTConnOperRemoteTAddr, dlswInterfaceGroup=dlswInterfaceGroup, dlswTConnOperState=dlswTConnOperState, dlswTrapCntlTConnPartnerReject=dlswTrapCntlTConnPartnerReject, dlswGroups=dlswGroups, dlswDirLocateMacLocation=dlswDirLocateMacLocation, dlswTConnTcpOperEntry=dlswTConnTcpOperEntry, dlswTConnConfigLastModifyTime=dlswTConnConfigLastModifyTime, dlswTConnOperConfigIndex=dlswTConnOperConfigIndex, dlswCircuitFCResetOpSents=dlswCircuitFCResetOpSents, dlswDirMacMac=dlswDirMacMac, dlswTConnTcpOperGroup=dlswTConnTcpOperGroup, dlswTConnOperDiscActiveCir=dlswTConnOperDiscActiveCir, dlswTConnConfigGroupDefinition=dlswTConnConfigGroupDefinition, dlswDirMacCacheNextIndex=dlswDirMacCacheNextIndex, dlswSdlcLsRemoteSap=dlswSdlcLsRemoteSap, dlswTConnTcpConfigMaxSegmentSize=dlswTConnTcpConfigMaxSegmentSize, dlswTConnStatGroup=dlswTConnStatGroup, dlswDirectory=dlswDirectory, dlswDirMacMask=dlswDirMacMask, dlswDirMacTable=dlswDirMacTable, dlswTConnTcpConfigKeepAliveInt=dlswTConnTcpConfigKeepAliveInt, dlswTConnOperICRexSents=dlswTConnOperICRexSents, dlswTrapControl=dlswTrapControl, dlswTConnConfigTable=dlswTConnConfigTable, MacAddressNC=MacAddressNC, dlswTConnOperICRexRcvds=dlswTConnOperICRexRcvds, dlswCircuitS1Sap=dlswCircuitS1Sap, dlswTConnOperOutCntlPkts=dlswTConnOperOutCntlPkts, dlswTConnOperOutDataOctets=dlswTConnOperOutDataOctets, dlswTConnOperNRexRcvds=dlswTConnOperNRexRcvds, dlswCircuitS1Mac=dlswCircuitS1Mac, dlswTConnConfigRemoteTAddr=dlswTConnConfigRemoteTAddr, dlswTConnOperPartnerVendorID=dlswTConnOperPartnerVendorID, dlswTConnOperCURexRcvds=dlswTConnOperCURexRcvds, dlswDirNBStatus=dlswDirNBStatus, dlswCircuitS1Dlc=dlswCircuitS1Dlc, dlswTrapCntlCircuit=dlswTrapCntlCircuit, dlswCircuitEntryTime=dlswCircuitEntryTime, dlswTConnConfigAdvertiseMacNB=dlswTConnConfigAdvertiseMacNB, dlswNodeResourceNBExclusivity=dlswNodeResourceNBExclusivity, dlswNodeNBGroup=dlswNodeNBGroup, dlswDirNBEntry=dlswDirNBEntry, dlswSdlcLsRowStatus=dlswSdlcLsRowStatus, LFSize=LFSize, dlswDomains=dlswDomains, dlswCircuitDiscReasonLocal=dlswCircuitDiscReasonLocal, dlswSdlcLsRemoteMac=dlswSdlcLsRemoteMac, dlswTConnConfigSetupType=dlswTConnConfigSetupType, dlswNodeVersionString=dlswNodeVersionString, dlswTConnOperPartnerVersion=dlswTConnOperPartnerVersion, dlswCircuitDiscReasonRemote=dlswCircuitDiscReasonRemote, dlswTConnOperGroup=dlswTConnOperGroup, dlswSdlcLsLocalMac=dlswSdlcLsLocalMac, dlswCircuitStat=dlswCircuitStat, dlswCircuitFCResetOpRcvds=dlswCircuitFCResetOpRcvds, dlswTConnTcpOperTcpConnections=dlswTConnTcpOperTcpConnections, dlswTConnTcp=dlswTConnTcp, dlswSdlcLsEntry=dlswSdlcLsEntry, dlswDirLocateNBName=dlswDirLocateNBName, dlswTConnOperPartnerSapList=dlswTConnOperPartnerSapList, dlswCircuitFCRecvCurrentWndw=dlswCircuitFCRecvCurrentWndw, dlswSdlcLsEntries=dlswSdlcLsEntries, dlswTConnOperDiscReason=dlswTConnOperDiscReason, dlswTConnOperPartnerNBInfo=dlswTConnOperPartnerNBInfo, dlswDirMacLocation=dlswDirMacLocation, dlswDirNBIndex=dlswDirNBIndex, dlswConformance=dlswConformance, dlswTConnTcpCompliance=dlswTConnTcpCompliance, dlswCircuit=dlswCircuit, dlswTConnTcpConfigTable=dlswTConnTcpConfigTable, dlswTConnOperCircuits=dlswTConnOperCircuits, dlswDirMacStatus=dlswDirMacStatus, dlswTConnOperLocalTAddr=dlswTConnOperLocalTAddr, dlswTConnOperPartnerVersionStr=dlswTConnOperPartnerVersionStr, dlswCircuitDiscReasonRemoteData=dlswCircuitDiscReasonRemoteData, dlswCircuitS1DlcType=dlswCircuitS1DlcType, dlswTConnSpecific=dlswTConnSpecific, dlswTCPDomain=dlswTCPDomain, dlswDirNBCacheMisses=dlswDirNBCacheMisses, dlswDirLocateMacMac=dlswDirLocateMacMac, dlswDirNBName=dlswDirNBName, dlswTrapTConnUp=dlswTrapTConnUp, dlswCoreCompliance=dlswCoreCompliance, dlswNodeVersion=dlswNodeVersion, dlswCompliances=dlswCompliances)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (sdlc_ls_address,) = mibBuilder.importSymbols('SNA-SDLC-MIB', 'sdlcLSAddress') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (gauge32, mib_identifier, counter64, ip_address, module_identity, mib_2, time_ticks, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, bits, unsigned32, object_identity, notification_type, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'MibIdentifier', 'Counter64', 'IpAddress', 'ModuleIdentity', 'mib-2', 'TimeTicks', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Bits', 'Unsigned32', 'ObjectIdentity', 'NotificationType', 'iso') (truth_value, textual_convention, row_pointer, row_status, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'RowPointer', 'RowStatus', 'DisplayString') dlsw = module_identity((1, 3, 6, 1, 2, 1, 46)) if mibBuilder.loadTexts: dlsw.setLastUpdated('9606040900Z') if mibBuilder.loadTexts: dlsw.setOrganization('AIW DLSw MIB RIGLET and IETF DLSw MIB Working Group') if mibBuilder.loadTexts: dlsw.setContactInfo('David D. Chen IBM Corporation 800 Park, Highway 54 Research Triangle Park, NC 27709-9990 Tel: 1 919 254 6182 E-mail: [email protected]') if mibBuilder.loadTexts: dlsw.setDescription('This MIB module contains objects to manage Data Link Switches.') dlsw_mib = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1)) dlsw_domains = mib_identifier((1, 3, 6, 1, 2, 1, 46, 2)) class Nbname(TextualConvention, OctetString): description = "Represents a single qualified NetBIOS name, which can include `don't care' and `wildcard' characters to represent a number of real NetBIOS names. If an individual character position in the qualified name contains a `?', the corresponding character position in a real NetBIOS name is a `don't care'. If the qualified name ends in `*', the remainder of a real NetBIOS name is a `don't care'. `*' is only considered a wildcard if it appears at the end of a name." status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 16) class Macaddressnc(TextualConvention, OctetString): description = 'Represents an 802 MAC address represented in non-canonical format. That is, the most significant bit will be transmitted first. If this information is not available, the value is a zero length string.' status = 'current' display_hint = '1x:' subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(6, 6)) class Taddress(TextualConvention, OctetString): description = 'Denotes a transport service address. For dlswTCPDomain, a TAddress is 4 octets long, containing the IP-address in network-byte order.' status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Endstationlocation(TextualConvention, Integer32): description = 'Representing the location of an end station related to the managed DLSw node.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('other', 1), ('internal', 2), ('remote', 3), ('local', 4)) class Dlctype(TextualConvention, Integer32): description = 'Representing the type of DLC of an end station, if applicable.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('other', 1), ('na', 2), ('llc', 3), ('sdlc', 4), ('qllc', 5)) class Lfsize(TextualConvention, Integer32): description = 'The largest size of the INFO field (including DLC header, not including any MAC-level or framing octets). 64 valid values as defined by the IEEE 802.1D Addendum are acceptable.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(516, 635, 754, 873, 993, 1112, 1231, 1350, 1470, 1542, 1615, 1688, 1761, 1833, 1906, 1979, 2052, 2345, 2638, 2932, 3225, 3518, 3812, 4105, 4399, 4865, 5331, 5798, 6264, 6730, 7197, 7663, 8130, 8539, 8949, 9358, 9768, 10178, 10587, 10997, 11407, 12199, 12992, 13785, 14578, 15370, 16163, 16956, 17749, 20730, 23711, 26693, 29674, 32655, 38618, 41600, 44591, 47583, 50575, 53567, 56559, 59551, 65535)) named_values = named_values(('lfs516', 516), ('lfs635', 635), ('lfs754', 754), ('lfs873', 873), ('lfs993', 993), ('lfs1112', 1112), ('lfs1231', 1231), ('lfs1350', 1350), ('lfs1470', 1470), ('lfs1542', 1542), ('lfs1615', 1615), ('lfs1688', 1688), ('lfs1761', 1761), ('lfs1833', 1833), ('lfs1906', 1906), ('lfs1979', 1979), ('lfs2052', 2052), ('lfs2345', 2345), ('lfs2638', 2638), ('lfs2932', 2932), ('lfs3225', 3225), ('lfs3518', 3518), ('lfs3812', 3812), ('lfs4105', 4105), ('lfs4399', 4399), ('lfs4865', 4865), ('lfs5331', 5331), ('lfs5798', 5798), ('lfs6264', 6264), ('lfs6730', 6730), ('lfs7197', 7197), ('lfs7663', 7663), ('lfs8130', 8130), ('lfs8539', 8539), ('lfs8949', 8949), ('lfs9358', 9358), ('lfs9768', 9768), ('lfs10178', 10178), ('lfs10587', 10587), ('lfs10997', 10997), ('lfs11407', 11407), ('lfs12199', 12199), ('lfs12992', 12992), ('lfs13785', 13785), ('lfs14578', 14578), ('lfs15370', 15370), ('lfs16163', 16163), ('lfs16956', 16956), ('lfs17749', 17749), ('lfs20730', 20730), ('lfs23711', 23711), ('lfs26693', 26693), ('lfs29674', 29674), ('lfs32655', 32655), ('lfs38618', 38618), ('lfs41600', 41600), ('lfs44591', 44591), ('lfs47583', 47583), ('lfs50575', 50575), ('lfs53567', 53567), ('lfs56559', 56559), ('lfs59551', 59551), ('lfs65535', 65535)) null = mib_identifier((0, 0)) dlsw_tcp_domain = mib_identifier((1, 3, 6, 1, 2, 1, 46, 2, 1)) class Dlswtcpaddress(TextualConvention, OctetString): description = 'Represents the IP address of a DLSw which uses TCP as a transport protocol.' status = 'current' display_hint = '1d.1d.1d.1d' subtype_spec = OctetString.subtypeSpec + value_size_constraint(4, 4) fixed_length = 4 dlsw_node = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 1)) dlsw_t_conn = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 2)) dlsw_interface = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 3)) dlsw_directory = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 4)) dlsw_circuit = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 5)) dlsw_sdlc = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 6)) dlsw_node_version = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswNodeVersion.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVersion.setStatus('current') if mibBuilder.loadTexts: dlswNodeVersion.setDescription('This value identifies the particular version of the DLSw standard supported by this DLSw. The first octet is a hexadecimal value representing the DLSw standard Version number of this DLSw, and the second is a hexadecimal value representing the DLSw standard Release number. This information is reported in DLSw Capabilities Exchange.') dlsw_node_vendor_id = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(3, 3)).setFixedLength(3)).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswNodeVendorID.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVendorID.setStatus('current') if mibBuilder.loadTexts: dlswNodeVendorID.setDescription("The value identifies the manufacturer's IEEE-assigned organizationally Unique Identifier (OUI) of this DLSw. This information is reported in DLSw Capabilities Exchange.") dlsw_node_version_string = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswNodeVersionString.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswNodeVersionString.setStatus('current') if mibBuilder.loadTexts: dlswNodeVersionString.setDescription('This string gives product-specific information about this DLSw (e.g., product name, code release and fix level). This flows in Capabilities Exchange messages.') dlsw_node_std_pacing_support = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('adaptiveRcvWindow', 2), ('fixedRcvWindow', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswNodeStdPacingSupport.setStatus('current') if mibBuilder.loadTexts: dlswNodeStdPacingSupport.setDescription('Circuit pacing, as defined in the DLSw Standard, allows each of the two DLSw nodes on a circuit to control the amount of data the other is permitted to send to them. This object reflects the level of support the DLSw node has for this protocol. (1) means the node has no support for the standard circuit pacing flows; it may use RFC 1434+ methods only, or a proprietary flow control scheme. (2) means the node supports the standard scheme and can vary the window sizes it grants as a data receiver. (3) means the node supports the standard scheme but never varies its receive window size.') dlsw_node_status = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('inactive', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswNodeStatus.setStatus('current') if mibBuilder.loadTexts: dlswNodeStatus.setDescription('The status of the DLSw part of the system. Changing the value from active to inactive causes DLSw to take the following actions - (1) it disconnects all circuits through all DLSw partners, (2) it disconnects all transport connections to all DLSw partners, (3) it disconnects all local DLC connections, and (4) it stops processing all DLC connection set-up traffic. Since these are destructive actions, the user should query the circuit and transport connection tables in advance to understand the effect this action will have. Changing the value from inactive to active causes DLSw to come up in its initial state, i.e., transport connections established and ready to bring up circuits.') dlsw_node_up_time = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 6), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswNodeUpTime.setStatus('current') if mibBuilder.loadTexts: dlswNodeUpTime.setDescription('The amount of time (in hundredths of a second) since the DLSw portion of the system was last re-initialized. That is, if dlswState is in the active state, the time the dlswState entered the active state. It will remain zero if dlswState is in the inactive state.') dlsw_node_virtual_segment_lf_size = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 7), lf_size().clone('lfs65535')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswNodeVirtualSegmentLFSize.setStatus('current') if mibBuilder.loadTexts: dlswNodeVirtualSegmentLFSize.setDescription('The largest frame size (including DLC header and info field but not any MAC-level or framing octets) this DLSw can forward on any path through itself. This object can represent any box- level frame size forwarding restriction (e.g., from the use of fixed-size buffers). Some DLSw implementations will have no such restriction. This value will affect the LF size of circuits during circuit creation. The LF size of an existing circuit can be found in the RIF (Routing Information Field).') dlsw_node_resource_nb_exclusivity = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 8), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswNodeResourceNBExclusivity.setStatus('current') if mibBuilder.loadTexts: dlswNodeResourceNBExclusivity.setDescription('The value of true indicates that the NetBIOS Names configured in dlswDirNBTable are the only ones accessible via this DLSw. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. It is up to the implementation exactly when to start the run-time capabilities exchange.') dlsw_node_resource_mac_exclusivity = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 9), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswNodeResourceMacExclusivity.setStatus('current') if mibBuilder.loadTexts: dlswNodeResourceMacExclusivity.setDescription('The value of true indicates that the MAC addresses configured in the dlswDirMacTable are the only ones accessible via this DLSw. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. It is up to the implementation exactly when to start the run-time capabilities exchange.') dlsw_t_conn_stat = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 1)) dlsw_t_conn_stat_active_connections = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnStatActiveConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatActiveConnections.setDescription("The number of transport connections that are not in `disconnected' state.") dlsw_t_conn_stat_close_idles = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnStatCloseIdles.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatCloseIdles.setDescription('The number of times transport connections in this node exited the connected state with zero active circuits on the transport connection.') dlsw_t_conn_stat_close_busys = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnStatCloseBusys.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatCloseBusys.setDescription('The number of times transport connections in this node exited the connected state with some non-zero number of active circuits on the transport connection. Normally this means the transport connection failed unexpectedly.') dlsw_t_conn_config_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 2, 2)) if mibBuilder.loadTexts: dlswTConnConfigTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigTable.setDescription("This table defines the transport connections that will be initiated or accepted by this DLSw. Structure of masks allows wildcard definition for a collection of transport connections by a conceptual row. For a specific transport connection, there may be multiple of conceptual rows match the transport address. The `best' match will the one to determine the characteristics of the transport connection.") dlsw_t_conn_config_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswTConnConfigIndex')) if mibBuilder.loadTexts: dlswTConnConfigEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigEntry.setDescription('Each conceptual row defines a collection of transport connections.') dlsw_t_conn_config_index = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: dlswTConnConfigIndex.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigIndex.setDescription('The index to the conceptual row of the table. Negative numbers are not allowed. There are objects defined that point to conceptual rows of this table with this index value. Zero is used to denote that no corresponding row exists. Index values are assigned by the agent, and should not be reused but should continue to increase in value.') dlsw_t_conn_config_t_domain = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 2), object_identifier()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigTDomain.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigTDomain.setDescription('The object identifier which indicates the transport domain of this conceptual row.') dlsw_t_conn_config_local_t_addr = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 3), t_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigLocalTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigLocalTAddr.setDescription('The local transport address for this conceptual row of the transport connection definition.') dlsw_t_conn_config_remote_t_addr = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 4), t_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigRemoteTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigRemoteTAddr.setDescription('The remote transport address. Together with dlswTConnConfigEntryType and dlswTConnConfigGroupDefinition, the object instance of this conceptual row identifies a collection of the transport connections that will be either initiated by this DLSw or initiated by a partner DLSw and accepted by this DLSw.') dlsw_t_conn_config_last_modify_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 5), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnConfigLastModifyTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigLastModifyTime.setDescription('The time (in hundredths of a second) since the value of any object in this conceptual row except for dlswTConnConfigOpens was last changed. This value may be compared to dlswTConnOperConnectTime to determine whether values in this row are completely valid for a transport connection created using this row definition.') dlsw_t_conn_config_entry_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('individual', 1), ('global', 2), ('group', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigEntryType.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigEntryType.setDescription("The object instance signifies the type of entry in the associated conceptual row. The value of `individual' means that the entry applies to a specific partner DLSw node as identified by dlswTConnConfigRemoteTAddr and dlswTConnConfigTDomain. The value of `global' means that the entry applies to all partner DLSw nodes of the TDomain. The value of 'group' means that the entry applies to a specific set of DLSw nodes in the TDomain. Any group definitions are enterprise-specific and are pointed to by dlswTConnConfigGroupDefinition. In the cases of `global' and `group', the value in dlswTConnConfigRemoteTAddr may not have any significance.") dlsw_t_conn_config_group_definition = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 7), row_pointer()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigGroupDefinition.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigGroupDefinition.setDescription("For conceptual rows of `individual' and `global' as specified in dlswTConnConfigEntryType, the instance of this object is `0.0'. For conceptual rows of `group', the instance points to the specific group definition.") dlsw_t_conn_config_setup_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('activePersistent', 2), ('activeOnDemand', 3), ('passive', 4), ('excluded', 5))).clone('passive')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigSetupType.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigSetupType.setDescription('This value of the instance of a conceptual row identifies the behavior of the collection of transport connections that this conceptual row defines. The value of activePersistent, activeOnDemand and passive means this DLSw will accept any transport connections, initiated by partner DLSw nodes, which are defined by this conceptual row. The value of activePersistent means this DLSw will also initiate the transport connections of this conceptual row and retry periodically if necessary. The value of activeOnDemand means this DLSw will initiate a transport connection of this conceptual row, if there is a directory cache hits. The value of other is implementation specific. The value of exclude means that the specified node is not allowed to be a partner to this DLSw node. To take a certain conceptual row definition out of service, a value of notInService for dlswTConnConfigRowStatus should be used.') dlsw_t_conn_config_sap_list = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16).clone(hexValue='AA000000000000000000000000000000')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigSapList.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigSapList.setDescription('The SAP list indicates which SAPs are advertised to the transport connection defined by this conceptual row. Only SAPs with even numbers are represented, in the form of the most significant bit of the first octet representing the SAP 0, the next most significant bit representing the SAP 2, to the least significant bit of the last octet representing the SAP 254. Data link switching is allowed for those SAPs which have one in its corresponding bit, not allowed otherwise. The whole SAP list has to be changed together. Changing the SAP list affects only new circuit establishments and has no effect on established circuits. This list can be used to restrict specific partners from knowing about all the SAPs used by DLSw on all its interfaces (these are represented in dlswIfSapList for each interface). For instance, one may want to run NetBIOS with some partners but not others. If a node supports sending run-time capabilities exchange messages, changes to this object should cause that action. When to start the run-time capabilities exchange is implementation-specific. The DEFVAL below indicates support for SAPs 0, 4, 8, and C.') dlsw_t_conn_config_advertise_mac_nb = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 10), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigAdvertiseMacNB.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigAdvertiseMacNB.setDescription('The value of true indicates that any defined local MAC addresses and NetBIOS names will be advertised to a partner node via initial and (if supported) run-time capabilities exchange messages. The DLSw node should send the appropriate exclusivity control vector to accompany each list it sends, or to represent that the node is explicitly configured to have a null list. The value of false indicates that the DLSw node should not send a MAC address list or NetBIOS name list, and should also not send their corresponding exclusivity control vectors.') dlsw_t_conn_config_init_cir_recv_wndw = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(1)).setUnits('SSP messages').setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigInitCirRecvWndw.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigInitCirRecvWndw.setDescription('The initial circuit receive pacing window size, in the unit of SSP messages, to be used for future transport connections activated using this table row. The managed node sends this value as its initial receive pacing window in its initial capabilities exchange message. Changing this value does not affect the initial circuit receive pacing window size of currently active transport connections. If the standard window pacing scheme is not supported, the value is zero. A larger receive window value may be appropriate for partners that are reachable only via physical paths that have longer network delays.') dlsw_t_conn_config_opens = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnConfigOpens.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigOpens.setDescription('Number of times transport connections entered connected state according to the definition of this conceptual row.') dlsw_t_conn_config_row_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 2, 1, 13), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnConfigRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswTConnConfigTable following the RowStatus textual convention. The value of notInService will be used to take a conceptual row definition out of use.') dlsw_t_conn_oper_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 2, 3)) if mibBuilder.loadTexts: dlswTConnOperTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperTable.setDescription('A list of transport connections. It is optional but desirable for the agent to keep an entry for some period of time after the transport connection is disconnected. This allows the manager to capture additional useful information about the connection, in particular, statistical information and the cause of the disconnection.') dlsw_t_conn_oper_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswTConnOperTDomain'), (0, 'DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTConnOperEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperEntry.setDescription('') dlsw_t_conn_oper_t_domain = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 1), object_identifier()) if mibBuilder.loadTexts: dlswTConnOperTDomain.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperTDomain.setDescription('The object identifier indicates the transport domain of this transport connection.') dlsw_t_conn_oper_local_t_addr = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 2), t_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperLocalTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperLocalTAddr.setDescription('The local transport address for this transport connection. This value could be different from dlswTConnConfigLocalAddr, if the value of the latter were changed after this transport connection was established.') dlsw_t_conn_oper_remote_t_addr = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 3), t_address()) if mibBuilder.loadTexts: dlswTConnOperRemoteTAddr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperRemoteTAddr.setDescription('The remote transport address of this transport connection.') dlsw_t_conn_oper_entry_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 4), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperEntryTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperEntryTime.setDescription('The amount of time (in hundredths of a second) since this transport connection conceptual row was created.') dlsw_t_conn_oper_connect_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 5), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperConnectTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperConnectTime.setDescription("The amount of time (in hundredths of a second) since this transport connection last entered the 'connected' state. A value of zero means this transport connection has never been established.") dlsw_t_conn_oper_state = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('connecting', 1), ('initCapExchange', 2), ('connected', 3), ('quiescing', 4), ('disconnecting', 5), ('disconnected', 6)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswTConnOperState.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperState.setDescription("The state of this transport connection. The transport connection enters `connecting' state when DLSw makes a connection request to the transport layer. Once initial Capabilities Exchange is sent, the transport connection enters enters `initCapExchange' state. When partner capabilities have been determined and the transport connection is ready for sending CanUReach (CUR) messages, it moves to the `connected' state. When DLSw is in the process of bringing down the connection, it is in the `disconnecting' state. When the transport layer indicates one of its connections is disconnected, the transport connection moves to the `disconnected' state. Whereas all of the values will be returned in response to a management protocol retrieval operation, only two values may be specified in a management protocol set operation: `quiescing' and `disconnecting'. Changing the value to `quiescing' prevents new circuits from being established, and will cause a transport disconnect when the last circuit on the connection goes away. Changing the value to `disconnecting' will force off all circuits immediately and bring the connection to `disconnected' state.") dlsw_t_conn_oper_config_index = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperConfigIndex.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperConfigIndex.setDescription('The value of dlswTConnConfigIndex of the dlswTConnConfigEntry that governs the configuration information used by this dlswTConnOperEntry. The manager can therefore normally examine both configured and operational information for this transport connection. This value is zero if the corresponding dlswTConnConfigEntry was deleted after the creation of this dlswTConnOperEntry. If some fields in the former were changed but the conceptual row was not deleted, some configuration information may not be valid for this operational transport connection. The manager can compare dlswTConnOperConnectTime and dlswTConnConfigLastModifyTime to determine if this condition exists.') dlsw_t_conn_oper_flow_cntl_mode = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('undetermined', 1), ('pacing', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperFlowCntlMode.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperFlowCntlMode.setDescription('The flow control mechanism in use on this transport connection. This value is undetermined (1) before the mode of flow control can be established on a new transport connection (i.e., after CapEx is sent but before Capex or other SSP control messages have been received). Pacing (2) indicates that the standard RFC 1795 pacing mechanism is in use. Other (3) may be either the RFC 1434+ xBusy mechanism operating to a back-level DLSw, or a vendor-specific flow control method. Whether it is xBusy or not can be inferred from dlswTConnOperPartnerVersion.') dlsw_t_conn_oper_partner_version = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 9), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(2, 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVersion.setDescription("This value identifies which version (first octet) and release (second octet) of the DLSw standard is supported by this partner DLSw. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. A conceptual row with a dlswTConnOperState of `connected' but a zero length partner version indicates that the partner is a non-standard DLSw partner. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_vendor_id = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 10), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(3, 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerVendorID.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVendorID.setDescription("This value identifies the IEEE-assigned organizationally Unique Identifier (OUI) of the maker of this partner DLSw. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_version_str = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 253))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerVersionStr.setDescription("This value identifies the particular product version (e.g., product name, code level, fix level) of this partner DLSw. The format of the actual version string is vendor-specific. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A string of zero length is returned before a Capabilities Exchange message is received, if one is never received, or if one is received but it does not contain a version string. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_init_pacing_wndw = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setReference('DLSW: Switch-to-Switch Protocol RFC 1795') if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerInitPacingWndw.setDescription("The value of the partner initial receive pacing window. This is our initial send pacing window for all new circuits on this transport connection, as modified and granted by the first flow control indication the partner sends on each circuit. This information is obtained from a DLSw capabilities exchange message received from the partner DLSw. A value of zero is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_sap_list = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 13), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(16, 16)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerSapList.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerSapList.setDescription("The Supported SAP List received in the capabilities exchange message from the partner DLSw. This list has the same format described for dlswTConnConfigSapList. A string of zero length is returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_nb_excl = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 14), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerNBExcl.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerNBExcl.setDescription("The value of true signifies that the NetBIOS names received from this partner in the NetBIOS name list in its capabilities exchange message are the only NetBIOS names reachable by that partner. `False' indicates that other NetBIOS names may be reachable. `False' should be returned before a Capabilities Exchange message is received, if one is never received, or if one is received without a NB Name Exclusivity CV. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_mac_excl = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerMacExcl.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerMacExcl.setDescription("The value of true signifies that the MAC addresses received from this partner in the MAC address list in its capabilities exchange message are the only MAC addresses reachable by that partner. `False' indicates that other MAC addresses may be reachable. `False' should be returned before a Capabilities Exchange message is received, if one is never received, or if one is received without a MAC Address Exclusivity CV. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_nb_info = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('partial', 2), ('complete', 3), ('notApplicable', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerNBInfo.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerNBInfo.setDescription("It is up to this DSLw whether to keep either none, some, or all of the NetBIOS name list that was received in the capabilities exchange message sent by this partner DLSw. This object identifies how much information was kept by this DLSw. These names are stored as userConfigured remote entries in dlswDirNBTable. A value of (4), notApplicable, should be returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_partner_mac_info = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('partial', 2), ('complete', 3), ('notApplicable', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperPartnerMacInfo.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperPartnerMacInfo.setDescription("It is up to this DLSw whether to keep either none, some, or all of the MAC address list that was received in the capabilities exchange message sent by this partner DLSw. This object identifies how much information was kept by this DLSw. These names are stored as userConfigured remote entries in dlswDirMACTable. A value of (4), notApplicable, should be returned before a Capabilities Exchange message is received, or if one is never received. If an implementation chooses to keep dlswTConnOperEntrys in the `disconnected' state, this value should remain unchanged.") dlsw_t_conn_oper_disc_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 18), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperDiscTime.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscTime.setDescription("The amount of time (in hundredths of a second) since the dlswTConnOperState last entered `disconnected' state.") dlsw_t_conn_oper_disc_reason = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('capExFailed', 2), ('transportLayerDisc', 3), ('operatorCommand', 4), ('lastCircuitDiscd', 5), ('protocolError', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperDiscReason.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscReason.setDescription('This object signifies the reason that either prevented the transport connection from entering the connected state, or caused the transport connection to enter the disconnected state.') dlsw_t_conn_oper_disc_active_cir = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperDiscActiveCir.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperDiscActiveCir.setDescription('The number of circuits active (not in DISCONNECTED state) at the time the transport connection was last disconnected. This value is zero if the transport connection has never been connected.') dlsw_t_conn_oper_in_data_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 21), counter32()).setUnits('SSP messages').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperInDataPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInDataPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME received on this transport connection.') dlsw_t_conn_oper_out_data_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 22), counter32()).setUnits('SSP messages').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperOutDataPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutDataPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME transmitted on this transport connection.') dlsw_t_conn_oper_in_data_octets = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 23), counter32()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperInDataOctets.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInDataOctets.setDescription('The number octets in Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME received on this transport connection. Each message is counted starting with the first octet following the SSP message header.') dlsw_t_conn_oper_out_data_octets = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 24), counter32()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperOutDataOctets.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutDataOctets.setDescription('The number octets in Switch-to-Switch Protocol (SSP) messages of type DGRMFRAME, DATAFRAME, or INFOFRAME transmitted on this transport connection. Each message is counted starting with the first octet following the SSP message header.') dlsw_t_conn_oper_in_cntl_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 25), counter32()).setUnits('SSP messages').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperInCntlPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperInCntlPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages received on this transport connection which were not of type DGRMFRAME, DATAFRAME, or INFOFRAME.') dlsw_t_conn_oper_out_cntl_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 26), counter32()).setUnits('SSP messages').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperOutCntlPkts.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperOutCntlPkts.setDescription('The number of Switch-to-Switch Protocol (SSP) messages of transmitted on this transport connection which were not of type DGRMFRAME, DATAFRAME, or INFOFRAME.') dlsw_t_conn_oper_cu_rex_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 27), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperCURexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCURexSents.setDescription('The number of CanUReach_ex messages sent on this transport connection.') dlsw_t_conn_oper_ic_rex_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperICRexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperICRexRcvds.setDescription('The number of ICanReach_ex messages received on this transport connection.') dlsw_t_conn_oper_cu_rex_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperCURexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCURexRcvds.setDescription('The number of CanUReach_ex messages received on this transport connection.') dlsw_t_conn_oper_ic_rex_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 30), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperICRexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperICRexSents.setDescription('The number of ICanReach_ex messages sent on this transport connection.') dlsw_t_conn_oper_n_qex_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 31), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperNQexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNQexSents.setDescription('The number of NetBIOS_NQ_ex (NetBIOS Name Query-explorer) messages sent on this transport connection.') dlsw_t_conn_oper_n_rex_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 32), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperNRexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNRexRcvds.setDescription('The number of NETBIOS_NR_ex (NetBIOS Name Recognized-explorer) messages received on this transport connection.') dlsw_t_conn_oper_n_qex_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 33), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperNQexRcvds.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNQexRcvds.setDescription('The number of NETBIOS_NQ_ex messages received on this transport connection.') dlsw_t_conn_oper_n_rex_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperNRexSents.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperNRexSents.setDescription('The number of NETBIOS_NR_ex messages sent on this transport connection.') dlsw_t_conn_oper_cir_creates = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperCirCreates.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCirCreates.setDescription("The number of times that circuits entered `circuit_established' state (not counting transitions from `circuit_restart').") dlsw_t_conn_oper_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 3, 1, 36), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnOperCircuits.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperCircuits.setDescription("The number of currently active circuits on this transport connection, where `active' means not in `disconnected' state.") dlsw_t_conn_specific = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 4)) dlsw_t_conn_tcp = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1)) dlsw_t_conn_tcp_config_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1)) if mibBuilder.loadTexts: dlswTConnTcpConfigTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigTable.setDescription('This table defines the TCP transport connections that will be either initiated by or accepted by this DSLw. It augments the entries in dlswTConnConfigTable whose domain is dlswTCPDomain.') dlsw_t_conn_tcp_config_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswTConnConfigIndex')) if mibBuilder.loadTexts: dlswTConnTcpConfigEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigEntry.setDescription('Each conceptual row defines parameters that are specific to dlswTCPDomain transport connections.') dlsw_t_conn_tcp_config_keep_alive_int = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 1800))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnTcpConfigKeepAliveInt.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigKeepAliveInt.setDescription('The time in seconds between TCP keepAlive messages when no traffic is flowing. Zero signifies no keepAlive protocol. Changes take effect only for new TCP connections.') dlsw_t_conn_tcp_config_tcp_connections = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16)).clone(2)).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnTcpConfigTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigTcpConnections.setDescription('This is our preferred number of TCP connections within a TCP transport connection. The actual number used is negotiated at capabilities exchange time. Changes take effect only for new transport connections.') dlsw_t_conn_tcp_config_max_segment_size = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(4096)).setUnits('packets').setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswTConnTcpConfigMaxSegmentSize.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigMaxSegmentSize.setDescription('This is the number of bytes that this node is willing to receive over the read TCP connection(s). Changes take effect for new transport connections.') dlsw_t_conn_tcp_oper_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2)) if mibBuilder.loadTexts: dlswTConnTcpOperTable.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperTable.setDescription('A list of TCP transport connections. It is optional but desirable for the agent to keep an entry for some period of time after the transport connection is disconnected. This allows the manager to capture additional useful information about the connection, in particular, statistical information and the cause of the disconnection.') dlsw_t_conn_tcp_oper_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswTConnOperTDomain'), (0, 'DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTConnTcpOperEntry.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperEntry.setDescription('') dlsw_t_conn_tcp_oper_keep_alive_int = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 1800))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnTcpOperKeepAliveInt.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperKeepAliveInt.setDescription('The time in seconds between TCP keepAlive messages when no traffic is flowing. Zero signifies no keepAlive protocol is operating.') dlsw_t_conn_tcp_oper_pref_tcp_connections = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnTcpOperPrefTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperPrefTcpConnections.setDescription('This is the number of TCP connections preferred by this DLSw partner, as received in its capabilities exchange message.') dlsw_t_conn_tcp_oper_tcp_connections = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 2, 4, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswTConnTcpOperTcpConnections.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperTcpConnections.setDescription('This is the actual current number of TCP connections within this transport connection.') dlsw_if_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 3, 1)) if mibBuilder.loadTexts: dlswIfTable.setStatus('current') if mibBuilder.loadTexts: dlswIfTable.setDescription('The list of interfaces on which DLSw is active.') dlsw_if_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: dlswIfEntry.setStatus('current') if mibBuilder.loadTexts: dlswIfEntry.setDescription('') dlsw_if_row_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 1), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswIfRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswIfRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswIfTable following the RowStatus textual convention.') dlsw_if_virtual_segment = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 4095), value_range_constraint(65535, 65535))).clone(65535)).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswIfVirtualSegment.setStatus('current') if mibBuilder.loadTexts: dlswIfVirtualSegment.setDescription('The segment number that uniquely identifies the virtual segment to which this DLSw interface is connected. Current source routing protocols limit this value to the range 0 - 4095. (The value 0 is used by some management applications for special test cases.) A value of 65535 signifies that no virtual segment is assigned to this interface. For instance, in a non-source routing environment, segment number assignment is not required.') dlsw_if_sap_list = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 3, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16).clone(hexValue='AA000000000000000000000000000000')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswIfSapList.setStatus('current') if mibBuilder.loadTexts: dlswIfSapList.setDescription('The SAP list indicates which SAPs are allowed to be data link switched through this interface. This list has the same format described for dlswTConnConfigSapList. When changes to this object take effect is implementation- specific. Turning off a particular SAP can destroy active circuits that are using that SAP. An agent implementation may reject such changes until there are no active circuits if it so chooses. In this case, it is up to the manager to close the circuits first, using dlswCircuitState. The DEFVAL below indicates support for SAPs 0, 4, 8, and C.') dlsw_dir_stat = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 1)) dlsw_dir_mac_entries = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirMacEntries.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntries.setDescription('The current total number of entries in the dlswDirMacTable.') dlsw_dir_mac_cache_hits = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirMacCacheHits.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheHits.setDescription('The number of times a cache search for a particular MAC address resulted in success.') dlsw_dir_mac_cache_misses = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirMacCacheMisses.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheMisses.setDescription('The number of times a cache search for a particular MAC address resulted in failure.') dlsw_dir_mac_cache_next_index = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirMacCacheNextIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirMacCacheNextIndex.setDescription('The next value of dlswDirMacIndex to be assigned by the agent. A retrieval of this object atomically reserves the returned value for use by the manager to create a row in dlswDirMacTable. This makes it possible for the agent to control the index space of the MAC address cache, yet allows the manager to administratively create new rows.') dlsw_dir_nb_entries = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirNBEntries.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntries.setDescription('The current total number of entries in the dlswDirNBTable.') dlsw_dir_nb_cache_hits = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirNBCacheHits.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheHits.setDescription('The number of times a cache search for a particular NetBIOS name resulted in success.') dlsw_dir_nb_cache_misses = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirNBCacheMisses.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheMisses.setDescription('The number of times a cache search for a particular NetBIOS name resulted in failure.') dlsw_dir_nb_cache_next_index = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 4, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirNBCacheNextIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirNBCacheNextIndex.setDescription('The next value of dlswDirNBIndex to be assigned by the agent. A retrieval of this object atomically reserves the returned value for use by the manager to create a row in dlswDirNBTable. This makes it possible for the agent to control the index space for the NetBIOS name cache, yet allows the manager to administratively create new rows.') dlsw_dir_cache = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 2)) dlsw_dir_mac_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1)) if mibBuilder.loadTexts: dlswDirMacTable.setStatus('current') if mibBuilder.loadTexts: dlswDirMacTable.setDescription('This table contains locations of MAC addresses. They could be either verified or not verified, local or remote, and configured locally or learned from either Capabilities Exchange messages or directory searches.') dlsw_dir_mac_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswDirMacIndex')) if mibBuilder.loadTexts: dlswDirMacEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntry.setDescription('Indexed by dlswDirMacIndex.') dlsw_dir_mac_index = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: dlswDirMacIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirMacIndex.setDescription('Uniquely identifies a conceptual row of this table.') dlsw_dir_mac_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 2), mac_address_nc()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacMac.setStatus('current') if mibBuilder.loadTexts: dlswDirMacMac.setDescription('The MAC address, together with the dlswDirMacMask, specifies a set of MAC addresses that are defined or discovered through an interface or partner DLSw nodes.') dlsw_dir_mac_mask = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 3), mac_address_nc().clone(hexValue='FFFFFFFFFFFF')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacMask.setStatus('current') if mibBuilder.loadTexts: dlswDirMacMask.setDescription('The MAC address mask, together with the dlswDirMacMac, specifies a set of MAC addresses that are defined or discovered through an interface or partner DLSw nodes.') dlsw_dir_mac_entry_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('userConfiguredPublic', 2), ('userConfiguredPrivate', 3), ('partnerCapExMsg', 4), ('dynamic', 5))).clone('userConfiguredPublic')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacEntryType.setStatus('current') if mibBuilder.loadTexts: dlswDirMacEntryType.setDescription('The cause of the creation of this conceptual row. It could be one of the three methods: (1) user configured, including via management protocol set operations, configuration file, command line or equivalent methods; (2) learned from the partner DLSw Capabilities Exchange messages; and (3) dynamic, e.g., learned from ICanReach messages, or LAN explorer frames. Since only individual MAC addresses can be dynamically learned, dynamic entries will all have a mask of all FFs. The public versus private distinction for user- configured resources applies only to local resources (UC remote resources are private), and indicates whether that resource should be advertised in capabilities exchange messages sent by this node.') dlsw_dir_mac_location_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('local', 2), ('remote', 3))).clone('local')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacLocationType.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLocationType.setDescription('The location of the resource (or a collection of resources using a mask) of this conceptual row is either (1) local - the resource is reachable via an interface, or (2) remote - the resource is reachable via a partner DLSw node (or a set of partner DLSw nodes).') dlsw_dir_mac_location = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 6), row_pointer().clone((0, 0))).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLocation.setDescription('Points to either the ifEntry, dlswTConnConfigEntry, dlswTConnOperEntry, 0.0, or something that is implementation specific. It identifies the location of the MAC address (or the collection of MAC addresses.)') dlsw_dir_mac_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('reachable', 2), ('notReachable', 3))).clone('unknown')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirMacStatus.setDescription("This object specifies whether DLSw currently believes the MAC address to be accessible at the specified location. The value `notReachable' allows a configured resource definition to be taken out of service when a search to that resource fails (avoiding a repeat of the search).") dlsw_dir_mac_lf_size = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 8), lf_size().clone('lfs65535')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacLFSize.setStatus('current') if mibBuilder.loadTexts: dlswDirMacLFSize.setDescription('The largest size of the MAC INFO field (LLC header and data) that a circuit to the MAC address can carry through this path.') dlsw_dir_mac_row_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 1, 1, 9), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirMacRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirMacRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswDirMacTable following the RowStatus textual convention.') dlsw_dir_nb_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2)) if mibBuilder.loadTexts: dlswDirNBTable.setStatus('current') if mibBuilder.loadTexts: dlswDirNBTable.setDescription('This table contains locations of NetBIOS names. They could be either verified or not verified, local or remote, and configured locally or learned from either Capabilities Exchange messages or directory searches.') dlsw_dir_nb_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswDirNBIndex')) if mibBuilder.loadTexts: dlswDirNBEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntry.setDescription('Indexed by dlswDirNBIndex.') dlsw_dir_nb_index = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: dlswDirNBIndex.setStatus('current') if mibBuilder.loadTexts: dlswDirNBIndex.setDescription('Uniquely identifies a conceptual row of this table.') dlsw_dir_nb_name = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 2), nb_name()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBName.setStatus('current') if mibBuilder.loadTexts: dlswDirNBName.setDescription("The NetBIOS name (including `any char' and `wildcard' characters) specifies a set of NetBIOS names that are defined or discovered through an interface or partner DLSw nodes.") dlsw_dir_nb_name_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('individual', 2), ('group', 3))).clone('unknown')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBNameType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBNameType.setDescription('Whether dlswDirNBName represents an (or a set of) individual or group NetBIOS name(s).') dlsw_dir_nb_entry_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('userConfiguredPublic', 2), ('userConfiguredPrivate', 3), ('partnerCapExMsg', 4), ('dynamic', 5))).clone('userConfiguredPublic')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBEntryType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBEntryType.setDescription('The cause of the creation of this conceptual row. It could be one of the three methods: (1) user configured, including via management protocol set operations, configuration file, command line, or equivalent methods; (2) learned from the partner DLSw Capabilities Exchange messages; and (3) dynamic, e.g., learned from ICanReach messages, or test frames. Since only actual NetBIOS names can be dynamically learned, dynamic entries will not contain any char or wildcard characters. The public versus private distinction for user- configured resources applies only to local resources (UC remote resources are private), and indicates whether that resource should be advertised in capabilities exchange messages sent by this node.') dlsw_dir_nb_location_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('local', 2), ('remote', 3))).clone('local')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBLocationType.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLocationType.setDescription('The location of the resource (or a collection of resources using any char/wildcard characters) of this conceptual row is either (1) local - the resource is reachable via an interface, or (2) remote - the resource is reachable via a a partner DLSw node (or a set of partner DLSw nodes).') dlsw_dir_nb_location = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 6), row_pointer().clone((0, 0))).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLocation.setDescription('Points to either the ifEntry, dlswTConnConfigEntry, dlswTConnOperEntry, 0.0, or something that is implementation specific. It identifies the location of the NetBIOS name or the set of NetBIOS names.') dlsw_dir_nb_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('reachable', 2), ('notReachable', 3))).clone('unknown')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirNBStatus.setDescription("This object specifies whether DLSw currently believes the NetBIOS name to be accessible at the specified location. The value `notReachable' allows a configured resource definition to be taken out of service when a search to that resource fails (avoiding a repeat of the search).") dlsw_dir_nblf_size = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 8), lf_size().clone('lfs65535')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBLFSize.setStatus('current') if mibBuilder.loadTexts: dlswDirNBLFSize.setDescription('The largest size of the MAC INFO field (LLC header and data) that a circuit to the NB name can carry through this path.') dlsw_dir_nb_row_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 2, 2, 1, 9), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswDirNBRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswDirNBRowStatus.setDescription('This object is used by manager to create or delete the row entry in the dlswDirNBTable following the RowStatus textual convention.') dlsw_dir_locate = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 4, 3)) dlsw_dir_locate_mac_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1)) if mibBuilder.loadTexts: dlswDirLocateMacTable.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacTable.setDescription('This table is used to retrieve all entries in the dlswDirMacTable that match a given MAC address, in the order of the best matched first, the second best matched second, and so on, till no more entries match the given MAC address.') dlsw_dir_locate_mac_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswDirLocateMacMac'), (0, 'DLSW-MIB', 'dlswDirLocateMacMatch')) if mibBuilder.loadTexts: dlswDirLocateMacEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacEntry.setDescription('Indexed by dlswDirLocateMacMac and dlswDirLocateMacMatch. The first object is the MAC address of interest, and the second object is the order in the list of all entries that match the MAC address.') dlsw_dir_locate_mac_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 1), mac_address_nc()) if mibBuilder.loadTexts: dlswDirLocateMacMac.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacMac.setDescription('The MAC address to be located.') dlsw_dir_locate_mac_match = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))) if mibBuilder.loadTexts: dlswDirLocateMacMatch.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacMatch.setDescription('The order of the entries of dlswDirMacTable that match dlswDirLocateMacMac. A value of one represents the entry that best matches the MAC address. A value of two represents the second best matched entry, and so on.') dlsw_dir_locate_mac_location = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 1, 1, 3), row_pointer()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirLocateMacLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateMacLocation.setDescription('Points to the dlswDirMacEntry.') dlsw_dir_locate_nb_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2)) if mibBuilder.loadTexts: dlswDirLocateNBTable.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBTable.setDescription('This table is used to retrieve all entries in the dlswDirNBTable that match a given NetBIOS name, in the order of the best matched first, the second best matched second, and so on, till no more entries match the given NetBIOS name.') dlsw_dir_locate_nb_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswDirLocateNBName'), (0, 'DLSW-MIB', 'dlswDirLocateNBMatch')) if mibBuilder.loadTexts: dlswDirLocateNBEntry.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBEntry.setDescription('Indexed by dlswDirLocateNBName and dlswDirLocateNBMatch. The first object is the NetBIOS name of interest, and the second object is the order in the list of all entries that match the NetBIOS name.') dlsw_dir_locate_nb_name = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 1), nb_name()) if mibBuilder.loadTexts: dlswDirLocateNBName.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBName.setDescription('The NetBIOS name to be located (no any char or wildcards).') dlsw_dir_locate_nb_match = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))) if mibBuilder.loadTexts: dlswDirLocateNBMatch.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBMatch.setDescription('The order of the entries of dlswDirNBTable that match dlswDirLocateNBName. A value of one represents the entry that best matches the NetBIOS name. A value of two represents the second best matched entry, and so on.') dlsw_dir_locate_nb_location = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 4, 3, 2, 1, 3), row_pointer()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswDirLocateNBLocation.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBLocation.setDescription('Points to the dlswDirNBEntry.') dlsw_circuit_stat = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 5, 1)) dlsw_circuit_stat_actives = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 5, 1, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitStatActives.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatActives.setDescription('The current number of circuits in dlswCircuitTable that are not in the disconnected state.') dlsw_circuit_stat_creates = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 5, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitStatCreates.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatCreates.setDescription("The total number of entries ever added to dlswCircuitTable, or reactivated upon exiting `disconnected' state.") dlsw_circuit_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 5, 2)) if mibBuilder.loadTexts: dlswCircuitTable.setStatus('current') if mibBuilder.loadTexts: dlswCircuitTable.setDescription('This table is the circuit representation in the DLSw entity. Virtual data links are used to represent any internal end stations. There is a conceptual row associated with each data link. Thus, for circuits without an intervening transport connection, there are two conceptual rows for each circuit. The table consists of the circuits being established, established, and as an implementation option, circuits that have been disconnected. For circuits carried over transport connections, an entry is created after the CUR_cs was sent or received. For circuits between two locally attached devices, or internal virtual MAC addresses, an entry is created when the equivalent of CUR_cs sent/received status is reached. End station 1 (S1) and End station 2 (S2) are used to represent the two end stations of the circuit. S1 is always an end station which is locally attached. S2 may be locally attached or remote. If it is locally attached, the circuit will be represented by two rows indexed by (A, B) and (B, A) where A & B are the relevant MACs/SAPs. The table may be used to store the causes of disconnection of circuits. It is recommended that the oldest disconnected circuit entry be removed from this table when the memory space of disconnected circuits is needed.') dlsw_circuit_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1)).setIndexNames((0, 'DLSW-MIB', 'dlswCircuitS1Mac'), (0, 'DLSW-MIB', 'dlswCircuitS1Sap'), (0, 'DLSW-MIB', 'dlswCircuitS2Mac'), (0, 'DLSW-MIB', 'dlswCircuitS2Sap')) if mibBuilder.loadTexts: dlswCircuitEntry.setStatus('current') if mibBuilder.loadTexts: dlswCircuitEntry.setDescription('') dlsw_circuit_s1_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 1), mac_address_nc()) if mibBuilder.loadTexts: dlswCircuitS1Mac.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Mac.setDescription('The MAC Address of End Station 1 (S1) used for this circuit.') dlsw_circuit_s1_sap = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)) if mibBuilder.loadTexts: dlswCircuitS1Sap.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Sap.setDescription('The SAP at End Station 1 (S1) used for this circuit.') dlsw_circuit_s1_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS1IfIndex.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1IfIndex.setDescription('The ifEntry index of the local interface through which S1 can be reached.') dlsw_circuit_s1_dlc_type = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 4), dlc_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS1DlcType.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1DlcType.setDescription('The DLC protocol in use between the DLSw node and S1.') dlsw_circuit_s1_route_info = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 30))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS1RouteInfo.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1RouteInfo.setDescription('If source-route bridging is in use between the DLSw node and S1, this is the routing information field describing the path between the two devices. Otherwise the value will be an OCTET STRING of zero length.') dlsw_circuit_s1_circuit_id = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 6), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS1CircuitId.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1CircuitId.setDescription('The Circuit ID assigned by this DLSw node to this circuit. The first four octets are the DLC port Id, and the second four octets are the Data Link Correlator. If the DLSw SSP was not used to establish this circuit, the value will be a string of zero length.') dlsw_circuit_s1_dlc = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 7), row_pointer()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS1Dlc.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS1Dlc.setDescription('Points to a conceptual row of the underlying DLC MIB, which could either be the standard MIBs (e.g., the SDLC), or an enterprise-specific DLC MIB.') dlsw_circuit_s2_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 8), mac_address_nc()) if mibBuilder.loadTexts: dlswCircuitS2Mac.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Mac.setDescription('The MAC Address of End Station 2 (S2) used for this circuit.') dlsw_circuit_s2_sap = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)) if mibBuilder.loadTexts: dlswCircuitS2Sap.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Sap.setDescription('The SAP at End Station 2 (S2) used for this circuit.') dlsw_circuit_s2_location = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 10), end_station_location()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS2Location.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2Location.setDescription('The location of End Station 2 (S2). If the location of End Station 2 is local, the interface information will be available in the conceptual row whose S1 and S2 are the S2 and the S1 of this conceptual row, respectively.') dlsw_circuit_s2_t_domain = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 11), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS2TDomain.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2TDomain.setDescription('If the location of End Station 2 is remote, this value is the transport domain of the transport protocol the circuit is running over. Otherwise, the value is 0.0.') dlsw_circuit_s2_t_address = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 12), t_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS2TAddress.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2TAddress.setDescription('If the location of End Station 2 is remote, this object contains the address of the partner DLSw, else it will be an OCTET STRING of zero length.') dlsw_circuit_s2_circuit_id = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 13), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitS2CircuitId.setStatus('current') if mibBuilder.loadTexts: dlswCircuitS2CircuitId.setDescription('The Circuit ID assigned to this circuit by the partner DLSw node. The first four octets are the DLC port Id, and the second four octets are the Data Link Correlator. If the DLSw SSP was not used to establish this circuit, the value will be a string of zero length.') dlsw_circuit_origin = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('s1', 1), ('s2', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitOrigin.setStatus('current') if mibBuilder.loadTexts: dlswCircuitOrigin.setDescription('This object specifies which of the two end stations initiated the establishment of this circuit.') dlsw_circuit_entry_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 15), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitEntryTime.setStatus('current') if mibBuilder.loadTexts: dlswCircuitEntryTime.setDescription('The amount of time (in hundredths of a second) since this circuit table conceptual row was created.') dlsw_circuit_state_time = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 16), time_ticks()).setUnits('hundredths of a second').setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitStateTime.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStateTime.setDescription('The amount of time (in hundredths of a second) since this circuit entered the current state.') dlsw_circuit_state = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('disconnected', 1), ('circuitStart', 2), ('resolvePending', 3), ('circuitPending', 4), ('circuitEstablished', 5), ('connectPending', 6), ('contactPending', 7), ('connected', 8), ('disconnectPending', 9), ('haltPending', 10), ('haltPendingNoack', 11), ('circuitRestart', 12), ('restartPending', 13)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswCircuitState.setStatus('current') if mibBuilder.loadTexts: dlswCircuitState.setDescription("The current state of this circuit. The agent, implementation specific, may choose to keep entries for some period of time after circuit disconnect, so the manager can gather the time and cause of disconnection. While all of the specified values may be returned from a GET operation, the only SETable value is `disconnectPending'. When this value is set, DLSw should perform the appropriate action given its previous state (e.g., send HALT_DL if the state was `connected') to bring the circuit down to the `disconnected' state. Both the partner DLSw and local end station(s) should be notified as appropriate. This MIB provides no facility to re-establish a disconnected circuit, because in DLSw this should be an end station-driven function.") dlsw_circuit_priority = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unsupported', 1), ('low', 2), ('medium', 3), ('high', 4), ('highest', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitPriority.setStatus('current') if mibBuilder.loadTexts: dlswCircuitPriority.setDescription("The transmission priority of this circuit as understood by this DLSw node. This value is determined by the two DLSw nodes at circuit startup time. If this DLSw node does not support DLSw circuit priority, the value `unsupported' should be returned.") dlsw_circuit_fc_send_granted_units = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCSendGrantedUnits.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCSendGrantedUnits.setDescription('The number of paced SSP messages that this DLSw is currently authorized to send on this circuit before it must stop and wait for an additional flow control indication from the partner DLSw. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_send_current_wndw = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCSendCurrentWndw.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCSendCurrentWndw.setDescription("The current window size that this DLSw is using in its role as a data sender. This is the value by which this DLSw would increase the number of messages it is authorized to send, if it were to receive a flow control indication with the bits specifying `repeat window'. The value zero should be returned if this circuit is not running the DLSw pacing protocol.") dlsw_circuit_fc_recv_granted_units = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCRecvGrantedUnits.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCRecvGrantedUnits.setDescription('The current number of paced SSP messages that this DLSw has authorized the partner DLSw to send on this circuit before the partner DLSw must stop and wait for an additional flow control indication from this DLSw. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_recv_current_wndw = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCRecvCurrentWndw.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCRecvCurrentWndw.setDescription("The current window size that this DLSw is using in its role as a data receiver. This is the number of additional paced SSP messages that this DLSw would be authorizing its DLSw partner to send, if this DLSw were to send a flow control indication with the bits specifying `repeat window'. The value zero should be returned if this circuit is not running the DLSw pacing protocol.") dlsw_circuit_fc_largest_recv_granted = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 23), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCLargestRecvGranted.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCLargestRecvGranted.setDescription('The largest receive window size granted by this DLSw during the current activation of this circuit. This is not the largest number of messages granted at any time, but the largest window size as represented by FCIND operator bits. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_largest_send_granted = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 24), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCLargestSendGranted.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCLargestSendGranted.setDescription('The largest send (with respect to this DLSw) window size granted by the partner DLSw during the current activation of this circuit. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_halve_wndw_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwSents.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwSents.setDescription('The number of Halve Window operations this DLSw has sent on this circuit, in its role as a data receiver. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_reset_op_sents = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCResetOpSents.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCResetOpSents.setDescription('The number of Reset Window operations this DLSw has sent on this circuit, in its role as a data receiver. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_halve_wndw_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 27), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwRcvds.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCHalveWndwRcvds.setDescription('The number of Halve Window operations this DLSw has received on this circuit, in its role as a data sender. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_fc_reset_op_rcvds = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitFCResetOpRcvds.setStatus('current') if mibBuilder.loadTexts: dlswCircuitFCResetOpRcvds.setDescription('The number of Reset Window operations this DLSw has received on this circuit, in its role as a data sender. The value zero should be returned if this circuit is not running the DLSw pacing protocol.') dlsw_circuit_disc_reason_local = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 29), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('endStationDiscRcvd', 1), ('endStationDlcError', 2), ('protocolError', 3), ('operatorCommand', 4), ('haltDlRcvd', 5), ('haltDlNoAckRcvd', 6), ('transportConnClosed', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitDiscReasonLocal.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonLocal.setDescription('The reason why this circuit was last disconnected, as seen by this DLSw node. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.') dlsw_circuit_disc_reason_remote = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 30), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('endStationDiscRcvd', 2), ('endStationDlcError', 3), ('protocolError', 4), ('operatorCommand', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemote.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemote.setDescription("The generic reason code why this circuit was last disconnected, as reported by the DLSw partner in a HALT_DL or HALT_DL_NOACK. If the partner does not send a reason code in these messages, or the DLSw implementation does not report receiving one, the value `unknown' is returned. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.") dlsw_circuit_disc_reason_remote_data = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 5, 2, 1, 31), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemoteData.setStatus('current') if mibBuilder.loadTexts: dlswCircuitDiscReasonRemoteData.setDescription('Implementation-specific data reported by the DLSw partner in a HALT_DL or HALT_DL_NOACK, to help specify how and why this circuit was last disconnected. If the partner does not send this data in these messages, or the DLSw implementation does not report receiving it, a string of zero length is returned. This object is present only if the agent keeps circuit table entries around for some period after circuit disconnect.') dlsw_sdlc_ls_entries = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 6, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlswSdlcLsEntries.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsEntries.setDescription('The number of entries in dlswSdlcLsTable.') dlsw_sdlc_ls_table = mib_table((1, 3, 6, 1, 2, 1, 46, 1, 6, 2)) if mibBuilder.loadTexts: dlswSdlcLsTable.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsTable.setDescription('The table defines the virtual MAC addresses for those SDLC link stations that participate in data link switching.') dlsw_sdlc_ls_entry = mib_table_row((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'SNA-SDLC-MIB', 'sdlcLSAddress')) if mibBuilder.loadTexts: dlswSdlcLsEntry.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsEntry.setDescription('The index of this table is the ifIndex value for the SDLC port which owns this link station and the poll address of the particular SDLC link station.') dlsw_sdlc_ls_local_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 1), mac_address_nc()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsLocalMac.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalMac.setDescription('The virtual MAC address used to represent the SDLC-attached link station to the rest of the DLSw network.') dlsw_sdlc_ls_local_sap = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsLocalSap.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalSap.setDescription('The SAP used to represent this link station.') dlsw_sdlc_ls_local_id_block = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 3), display_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(3, 3))).clone(hexValue='')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsLocalIdBlock.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalIdBlock.setDescription('The block number is the first three digits of the node_id, if available. These 3 hexadecimal digits identify the product.') dlsw_sdlc_ls_local_id_num = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 4), display_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(5, 5))).clone(hexValue='')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsLocalIdNum.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsLocalIdNum.setDescription('The ID number is the last 5 digits of the node_id, if available. These 5 hexadecimal digits are administratively defined and combined with the 3 digit block number form the node_id. This node_id is used to identify the local node and is included in SNA XIDs.') dlsw_sdlc_ls_remote_mac = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 5), mac_address_nc().clone(hexValue='')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsRemoteMac.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRemoteMac.setDescription('The MAC address to which DLSw should attempt to connect this link station. If this information is not available, a length of zero for this object should be returned.') dlsw_sdlc_ls_remote_sap = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 6), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(1, 1))).clone(hexValue='')).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsRemoteSap.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRemoteSap.setDescription('The SAP of the remote station to which this link station should be connected. If this information is not available, a length of zero for this object should be returned.') dlsw_sdlc_ls_row_status = mib_table_column((1, 3, 6, 1, 2, 1, 46, 1, 6, 2, 1, 7), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dlswSdlcLsRowStatus.setStatus('current') if mibBuilder.loadTexts: dlswSdlcLsRowStatus.setDescription('This object is used by the manager to create or delete the row entry in the dlswSdlcLsTable following the RowStatus textual convention.') dlsw_trap_control = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 1, 10)) dlsw_trap_cntl_t_conn_partner_reject = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('partial', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswTrapCntlTConnPartnerReject.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConnPartnerReject.setDescription("Indicates whether the DLSw is permitted to emit partner reject related traps. With the value of `enabled' the DLSw will emit all partner reject related traps. With the value of `disabled' the DLSw will not emit any partner reject related traps. With the value of `partial' the DLSw will only emits partner reject traps for CapEx reject. The changes take effect immediately.") dlsw_trap_cntl_t_conn_prot_violation = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 2), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswTrapCntlTConnProtViolation.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConnProtViolation.setDescription('Indicates whether the DLSw is permitted to generate protocol-violation traps on the events such as window size violation. The changes take effect immediately.') dlsw_trap_cntl_t_conn = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('partial', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswTrapCntlTConn.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlTConn.setDescription("Indicates whether the DLSw is permitted to emit transport connection up and down traps. With the value of `enabled' the DLSw will emit traps when connections enter `connected' and `disconnected' states. With the value of `disabled' the DLSw will not emit traps when connections enter of `connected' and `disconnected' states. With the value of `partial' the DLSw will only emits transport connection down traps when the connection is closed with busy. The changes take effect immediately.") dlsw_trap_cntl_circuit = mib_scalar((1, 3, 6, 1, 2, 1, 46, 1, 1, 10, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('partial', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dlswTrapCntlCircuit.setStatus('current') if mibBuilder.loadTexts: dlswTrapCntlCircuit.setDescription("Indicates whether the DLSw is permitted to generate circuit up and down traps. With the value of `enabled' the DLSw will emit traps when circuits enter `connected' and `disconnected' states. With the value of `disabled' the DLSw will not emit traps when circuits enter of `connected' and `disconnected' states. With the value of `partial' the DLSw will emit traps only for those circuits that are initiated by this DLSw, e.g., originating the CUR_CS message. The changes take effect immediately.") dlsw_traps = mib_identifier((1, 3, 6, 1, 2, 1, 46, 1, 0)) dlsw_trap_t_conn_partner_reject = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 1)).setObjects(('DLSW-MIB', 'dlswTConnOperTDomain'), ('DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTrapTConnPartnerReject.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnPartnerReject.setDescription('This trap is sent each time a transport connection is rejected by a partner DLSw during Capabilities Exchanges. The emission of this trap is controlled by dlswTrapCntlTConnPartnerReject.') dlsw_trap_t_conn_prot_violation = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 2)).setObjects(('DLSW-MIB', 'dlswTConnOperTDomain'), ('DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTrapTConnProtViolation.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnProtViolation.setDescription('This trap is sent each time a protocol violation is detected for a transport connection. The emission of this trap is controlled by dlswTrapCntlTConnProtViolation.') dlsw_trap_t_conn_up = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 3)).setObjects(('DLSW-MIB', 'dlswTConnOperTDomain'), ('DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTrapTConnUp.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnUp.setDescription("This trap is sent each time a transport connection enters `connected' state. The emission of this trap is controlled by dlswTrapCntlTConn.") dlsw_trap_t_conn_down = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 4)).setObjects(('DLSW-MIB', 'dlswTConnOperTDomain'), ('DLSW-MIB', 'dlswTConnOperRemoteTAddr')) if mibBuilder.loadTexts: dlswTrapTConnDown.setStatus('current') if mibBuilder.loadTexts: dlswTrapTConnDown.setDescription("This trap is sent each time a transport connection enters `disconnected' state. The emission of this trap is controlled by dlswTrapCntlTConn.") dlsw_trap_circuit_up = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 5)).setObjects(('DLSW-MIB', 'dlswCircuitS1Mac'), ('DLSW-MIB', 'dlswCircuitS1Sap'), ('DLSW-MIB', 'dlswCircuitS2Mac'), ('DLSW-MIB', 'dlswCircuitS2Sap')) if mibBuilder.loadTexts: dlswTrapCircuitUp.setStatus('current') if mibBuilder.loadTexts: dlswTrapCircuitUp.setDescription("This trap is sent each time a circuit enters `connected' state. The emission of this trap is controlled by dlswTrapCntlCircuit.") dlsw_trap_circuit_down = notification_type((1, 3, 6, 1, 2, 1, 46, 1, 0, 6)).setObjects(('DLSW-MIB', 'dlswCircuitS1Mac'), ('DLSW-MIB', 'dlswCircuitS1Sap'), ('DLSW-MIB', 'dlswCircuitS2Mac'), ('DLSW-MIB', 'dlswCircuitS2Sap')) if mibBuilder.loadTexts: dlswTrapCircuitDown.setStatus('current') if mibBuilder.loadTexts: dlswTrapCircuitDown.setDescription("This trap is sent each time a circuit enters `disconnected' state. The emission of this trap is controlled by dlswTrapCntlCircuit.") dlsw_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 46, 3)) dlsw_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 46, 3, 1)) dlsw_groups = mib_identifier((1, 3, 6, 1, 2, 1, 46, 3, 2)) dlsw_core_compliance = module_compliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 1)).setObjects(('DLSW-MIB', 'dlswNodeGroup'), ('DLSW-MIB', 'dlswTConnStatGroup'), ('DLSW-MIB', 'dlswTConnConfigGroup'), ('DLSW-MIB', 'dlswTConnOperGroup'), ('DLSW-MIB', 'dlswInterfaceGroup'), ('DLSW-MIB', 'dlswCircuitGroup'), ('DLSW-MIB', 'dlswCircuitStatGroup'), ('DLSW-MIB', 'dlswNotificationGroup'), ('DLSW-MIB', 'dlswNodeNBGroup'), ('DLSW-MIB', 'dlswTConnNBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_core_compliance = dlswCoreCompliance.setStatus('current') if mibBuilder.loadTexts: dlswCoreCompliance.setDescription('The core compliance statement for all DLSw nodes.') dlsw_t_conn_tcp_compliance = module_compliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 2)).setObjects(('DLSW-MIB', 'dlswTConnTcpConfigGroup'), ('DLSW-MIB', 'dlswTConnTcpOperGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_tcp_compliance = dlswTConnTcpCompliance.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpCompliance.setDescription('Compliance for DLSw nodes that use TCP as a transport connection protocol.') dlsw_dir_compliance = module_compliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 3)).setObjects(('DLSW-MIB', 'dlswDirGroup'), ('DLSW-MIB', 'dlswDirNBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_compliance = dlswDirCompliance.setStatus('current') if mibBuilder.loadTexts: dlswDirCompliance.setDescription('Compliance for DLSw nodes that provide a directory function.') dlsw_dir_locate_compliance = module_compliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 4)).setObjects(('DLSW-MIB', 'dlswDirLocateGroup'), ('DLSW-MIB', 'dlswDirLocateNBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_locate_compliance = dlswDirLocateCompliance.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateCompliance.setDescription('Compliance for DLSw nodes that provide an ordered list of directory entries for a given resource.') dlsw_sdlc_compliance = module_compliance((1, 3, 6, 1, 2, 1, 46, 3, 1, 5)).setObjects(('DLSW-MIB', 'dlswSdlcGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_sdlc_compliance = dlswSdlcCompliance.setStatus('current') if mibBuilder.loadTexts: dlswSdlcCompliance.setDescription('Compliance for DLSw nodes that support SDLC.') dlsw_node_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 1)).setObjects(('DLSW-MIB', 'dlswNodeVersion'), ('DLSW-MIB', 'dlswNodeVendorID'), ('DLSW-MIB', 'dlswNodeVersionString'), ('DLSW-MIB', 'dlswNodeStdPacingSupport'), ('DLSW-MIB', 'dlswNodeStatus'), ('DLSW-MIB', 'dlswNodeUpTime'), ('DLSW-MIB', 'dlswNodeVirtualSegmentLFSize'), ('DLSW-MIB', 'dlswNodeResourceMacExclusivity'), ('DLSW-MIB', 'dlswTrapCntlTConnPartnerReject'), ('DLSW-MIB', 'dlswTrapCntlTConnProtViolation'), ('DLSW-MIB', 'dlswTrapCntlTConn'), ('DLSW-MIB', 'dlswTrapCntlCircuit')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_node_group = dlswNodeGroup.setStatus('current') if mibBuilder.loadTexts: dlswNodeGroup.setDescription('Conformance group for DLSw node general information.') dlsw_node_nb_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 2)).setObjects(('DLSW-MIB', 'dlswNodeResourceNBExclusivity')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_node_nb_group = dlswNodeNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswNodeNBGroup.setDescription('Conformance group for DLSw node general information specifically for nodes that support NetBIOS.') dlsw_t_conn_stat_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 3)).setObjects(('DLSW-MIB', 'dlswTConnStatActiveConnections'), ('DLSW-MIB', 'dlswTConnStatCloseIdles'), ('DLSW-MIB', 'dlswTConnStatCloseBusys')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_stat_group = dlswTConnStatGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnStatGroup.setDescription('Conformance group for statistics for transport connections.') dlsw_t_conn_config_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 4)).setObjects(('DLSW-MIB', 'dlswTConnConfigTDomain'), ('DLSW-MIB', 'dlswTConnConfigLocalTAddr'), ('DLSW-MIB', 'dlswTConnConfigRemoteTAddr'), ('DLSW-MIB', 'dlswTConnConfigLastModifyTime'), ('DLSW-MIB', 'dlswTConnConfigEntryType'), ('DLSW-MIB', 'dlswTConnConfigGroupDefinition'), ('DLSW-MIB', 'dlswTConnConfigSetupType'), ('DLSW-MIB', 'dlswTConnConfigSapList'), ('DLSW-MIB', 'dlswTConnConfigAdvertiseMacNB'), ('DLSW-MIB', 'dlswTConnConfigInitCirRecvWndw'), ('DLSW-MIB', 'dlswTConnConfigOpens'), ('DLSW-MIB', 'dlswTConnConfigRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_config_group = dlswTConnConfigGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnConfigGroup.setDescription('Conformance group for the configuration of transport connections.') dlsw_t_conn_oper_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 5)).setObjects(('DLSW-MIB', 'dlswTConnOperLocalTAddr'), ('DLSW-MIB', 'dlswTConnOperEntryTime'), ('DLSW-MIB', 'dlswTConnOperConnectTime'), ('DLSW-MIB', 'dlswTConnOperState'), ('DLSW-MIB', 'dlswTConnOperConfigIndex'), ('DLSW-MIB', 'dlswTConnOperFlowCntlMode'), ('DLSW-MIB', 'dlswTConnOperPartnerVersion'), ('DLSW-MIB', 'dlswTConnOperPartnerVendorID'), ('DLSW-MIB', 'dlswTConnOperPartnerVersionStr'), ('DLSW-MIB', 'dlswTConnOperPartnerInitPacingWndw'), ('DLSW-MIB', 'dlswTConnOperPartnerSapList'), ('DLSW-MIB', 'dlswTConnOperPartnerMacExcl'), ('DLSW-MIB', 'dlswTConnOperPartnerMacInfo'), ('DLSW-MIB', 'dlswTConnOperDiscTime'), ('DLSW-MIB', 'dlswTConnOperDiscReason'), ('DLSW-MIB', 'dlswTConnOperDiscActiveCir'), ('DLSW-MIB', 'dlswTConnOperInDataPkts'), ('DLSW-MIB', 'dlswTConnOperOutDataPkts'), ('DLSW-MIB', 'dlswTConnOperInDataOctets'), ('DLSW-MIB', 'dlswTConnOperOutDataOctets'), ('DLSW-MIB', 'dlswTConnOperInCntlPkts'), ('DLSW-MIB', 'dlswTConnOperOutCntlPkts'), ('DLSW-MIB', 'dlswTConnOperCURexSents'), ('DLSW-MIB', 'dlswTConnOperICRexRcvds'), ('DLSW-MIB', 'dlswTConnOperCURexRcvds'), ('DLSW-MIB', 'dlswTConnOperICRexSents'), ('DLSW-MIB', 'dlswTConnOperCirCreates'), ('DLSW-MIB', 'dlswTConnOperCircuits')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_oper_group = dlswTConnOperGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnOperGroup.setDescription('Conformance group for operation information for transport connections.') dlsw_t_conn_nb_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 6)).setObjects(('DLSW-MIB', 'dlswTConnOperPartnerNBExcl'), ('DLSW-MIB', 'dlswTConnOperPartnerNBInfo'), ('DLSW-MIB', 'dlswTConnOperNQexSents'), ('DLSW-MIB', 'dlswTConnOperNRexRcvds'), ('DLSW-MIB', 'dlswTConnOperNQexRcvds'), ('DLSW-MIB', 'dlswTConnOperNRexSents')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_nb_group = dlswTConnNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnNBGroup.setDescription('Conformance group for operation information for transport connections, specifically for nodes that support NetBIOS.') dlsw_t_conn_tcp_config_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 7)).setObjects(('DLSW-MIB', 'dlswTConnTcpConfigKeepAliveInt'), ('DLSW-MIB', 'dlswTConnTcpConfigTcpConnections'), ('DLSW-MIB', 'dlswTConnTcpConfigMaxSegmentSize')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_tcp_config_group = dlswTConnTcpConfigGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpConfigGroup.setDescription('Conformance group for configuration information for transport connections using TCP.') dlsw_t_conn_tcp_oper_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 8)).setObjects(('DLSW-MIB', 'dlswTConnTcpOperKeepAliveInt'), ('DLSW-MIB', 'dlswTConnTcpOperPrefTcpConnections'), ('DLSW-MIB', 'dlswTConnTcpOperTcpConnections')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_t_conn_tcp_oper_group = dlswTConnTcpOperGroup.setStatus('current') if mibBuilder.loadTexts: dlswTConnTcpOperGroup.setDescription('Conformance group for operation information for transport connections using TCP.') dlsw_interface_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 9)).setObjects(('DLSW-MIB', 'dlswIfRowStatus'), ('DLSW-MIB', 'dlswIfVirtualSegment'), ('DLSW-MIB', 'dlswIfSapList')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_interface_group = dlswInterfaceGroup.setStatus('current') if mibBuilder.loadTexts: dlswInterfaceGroup.setDescription('Conformance group for DLSw interfaces.') dlsw_dir_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 10)).setObjects(('DLSW-MIB', 'dlswDirMacEntries'), ('DLSW-MIB', 'dlswDirMacCacheHits'), ('DLSW-MIB', 'dlswDirMacCacheMisses'), ('DLSW-MIB', 'dlswDirMacCacheNextIndex'), ('DLSW-MIB', 'dlswDirMacMac'), ('DLSW-MIB', 'dlswDirMacMask'), ('DLSW-MIB', 'dlswDirMacEntryType'), ('DLSW-MIB', 'dlswDirMacLocationType'), ('DLSW-MIB', 'dlswDirMacLocation'), ('DLSW-MIB', 'dlswDirMacStatus'), ('DLSW-MIB', 'dlswDirMacLFSize'), ('DLSW-MIB', 'dlswDirMacRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_group = dlswDirGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirGroup.setDescription('Conformance group for DLSw directory using MAC addresses.') dlsw_dir_nb_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 11)).setObjects(('DLSW-MIB', 'dlswDirNBEntries'), ('DLSW-MIB', 'dlswDirNBCacheHits'), ('DLSW-MIB', 'dlswDirNBCacheMisses'), ('DLSW-MIB', 'dlswDirNBCacheNextIndex'), ('DLSW-MIB', 'dlswDirNBName'), ('DLSW-MIB', 'dlswDirNBNameType'), ('DLSW-MIB', 'dlswDirNBEntryType'), ('DLSW-MIB', 'dlswDirNBLocationType'), ('DLSW-MIB', 'dlswDirNBLocation'), ('DLSW-MIB', 'dlswDirNBStatus'), ('DLSW-MIB', 'dlswDirNBLFSize'), ('DLSW-MIB', 'dlswDirNBRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_nb_group = dlswDirNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirNBGroup.setDescription('Conformance group for DLSw directory using NetBIOS names.') dlsw_dir_locate_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 12)).setObjects(('DLSW-MIB', 'dlswDirLocateMacLocation')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_locate_group = dlswDirLocateGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateGroup.setDescription('Conformance group for a node that can return directory entry order for a given MAC address.') dlsw_dir_locate_nb_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 13)).setObjects(('DLSW-MIB', 'dlswDirLocateNBLocation')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_dir_locate_nb_group = dlswDirLocateNBGroup.setStatus('current') if mibBuilder.loadTexts: dlswDirLocateNBGroup.setDescription('Conformance group for a node that can return directory entry order for a given NetBIOS name.') dlsw_circuit_stat_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 14)).setObjects(('DLSW-MIB', 'dlswCircuitStatActives'), ('DLSW-MIB', 'dlswCircuitStatCreates')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_circuit_stat_group = dlswCircuitStatGroup.setStatus('current') if mibBuilder.loadTexts: dlswCircuitStatGroup.setDescription('Conformance group for statistics about circuits.') dlsw_circuit_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 15)).setObjects(('DLSW-MIB', 'dlswCircuitS1IfIndex'), ('DLSW-MIB', 'dlswCircuitS1DlcType'), ('DLSW-MIB', 'dlswCircuitS1RouteInfo'), ('DLSW-MIB', 'dlswCircuitS1CircuitId'), ('DLSW-MIB', 'dlswCircuitS1Dlc'), ('DLSW-MIB', 'dlswCircuitS2Location'), ('DLSW-MIB', 'dlswCircuitS2TDomain'), ('DLSW-MIB', 'dlswCircuitS2TAddress'), ('DLSW-MIB', 'dlswCircuitS2CircuitId'), ('DLSW-MIB', 'dlswCircuitOrigin'), ('DLSW-MIB', 'dlswCircuitEntryTime'), ('DLSW-MIB', 'dlswCircuitStateTime'), ('DLSW-MIB', 'dlswCircuitState'), ('DLSW-MIB', 'dlswCircuitPriority'), ('DLSW-MIB', 'dlswCircuitFCSendGrantedUnits'), ('DLSW-MIB', 'dlswCircuitFCSendCurrentWndw'), ('DLSW-MIB', 'dlswCircuitFCRecvGrantedUnits'), ('DLSW-MIB', 'dlswCircuitFCRecvCurrentWndw'), ('DLSW-MIB', 'dlswCircuitFCLargestRecvGranted'), ('DLSW-MIB', 'dlswCircuitFCLargestSendGranted'), ('DLSW-MIB', 'dlswCircuitFCHalveWndwSents'), ('DLSW-MIB', 'dlswCircuitFCResetOpSents'), ('DLSW-MIB', 'dlswCircuitFCHalveWndwRcvds'), ('DLSW-MIB', 'dlswCircuitFCResetOpRcvds'), ('DLSW-MIB', 'dlswCircuitDiscReasonLocal'), ('DLSW-MIB', 'dlswCircuitDiscReasonRemote'), ('DLSW-MIB', 'dlswCircuitDiscReasonRemoteData')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_circuit_group = dlswCircuitGroup.setStatus('current') if mibBuilder.loadTexts: dlswCircuitGroup.setDescription('Conformance group for DLSw circuits.') dlsw_sdlc_group = object_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 16)).setObjects(('DLSW-MIB', 'dlswSdlcLsEntries'), ('DLSW-MIB', 'dlswSdlcLsLocalMac'), ('DLSW-MIB', 'dlswSdlcLsLocalSap'), ('DLSW-MIB', 'dlswSdlcLsLocalIdBlock'), ('DLSW-MIB', 'dlswSdlcLsLocalIdNum'), ('DLSW-MIB', 'dlswSdlcLsRemoteMac'), ('DLSW-MIB', 'dlswSdlcLsRemoteSap'), ('DLSW-MIB', 'dlswSdlcLsRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_sdlc_group = dlswSdlcGroup.setStatus('current') if mibBuilder.loadTexts: dlswSdlcGroup.setDescription('Conformance group for DLSw SDLC support.') dlsw_notification_group = notification_group((1, 3, 6, 1, 2, 1, 46, 3, 2, 17)).setObjects(('DLSW-MIB', 'dlswTrapTConnPartnerReject'), ('DLSW-MIB', 'dlswTrapTConnProtViolation'), ('DLSW-MIB', 'dlswTrapTConnUp'), ('DLSW-MIB', 'dlswTrapTConnDown'), ('DLSW-MIB', 'dlswTrapCircuitUp'), ('DLSW-MIB', 'dlswTrapCircuitDown')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlsw_notification_group = dlswNotificationGroup.setStatus('current') if mibBuilder.loadTexts: dlswNotificationGroup.setDescription('Conformance group for DLSw notifications.') mibBuilder.exportSymbols('DLSW-MIB', dlswCircuitStatGroup=dlswCircuitStatGroup, dlswNodeVirtualSegmentLFSize=dlswNodeVirtualSegmentLFSize, dlswIfRowStatus=dlswIfRowStatus, dlswTrapTConnProtViolation=dlswTrapTConnProtViolation, dlswDirNBLFSize=dlswDirNBLFSize, dlswCircuitS2TDomain=dlswCircuitS2TDomain, dlswTConnStatCloseBusys=dlswTConnStatCloseBusys, dlswDirMacIndex=dlswDirMacIndex, dlswDirLocateNBGroup=dlswDirLocateNBGroup, dlswDirLocateNBLocation=dlswDirLocateNBLocation, dlswCircuitS2Location=dlswCircuitS2Location, dlswDirCache=dlswDirCache, dlswSdlcLsLocalSap=dlswSdlcLsLocalSap, dlswSdlcLsLocalIdBlock=dlswSdlcLsLocalIdBlock, dlswNotificationGroup=dlswNotificationGroup, dlswInterface=dlswInterface, dlswTrapTConnPartnerReject=dlswTrapTConnPartnerReject, dlswCircuitFCSendCurrentWndw=dlswCircuitFCSendCurrentWndw, dlswTrapCntlTConnProtViolation=dlswTrapCntlTConnProtViolation, EndStationLocation=EndStationLocation, dlswTConnOperDiscTime=dlswTConnOperDiscTime, dlswTConnOperPartnerInitPacingWndw=dlswTConnOperPartnerInitPacingWndw, dlswTConnOperEntryTime=dlswTConnOperEntryTime, dlswTConnOperPartnerMacInfo=dlswTConnOperPartnerMacInfo, dlswTConnOperCURexSents=dlswTConnOperCURexSents, dlswDirStat=dlswDirStat, dlswDirMacCacheHits=dlswDirMacCacheHits, dlswDirLocate=dlswDirLocate, dlswCircuitOrigin=dlswCircuitOrigin, dlswDirMacCacheMisses=dlswDirMacCacheMisses, dlswTConnTcpOperKeepAliveInt=dlswTConnTcpOperKeepAliveInt, dlswCircuitFCLargestRecvGranted=dlswCircuitFCLargestRecvGranted, dlswCircuitS2CircuitId=dlswCircuitS2CircuitId, PYSNMP_MODULE_ID=dlsw, dlswTConnConfigIndex=dlswTConnConfigIndex, dlswDirNBGroup=dlswDirNBGroup, dlswNodeGroup=dlswNodeGroup, dlswTConnConfigInitCirRecvWndw=dlswTConnConfigInitCirRecvWndw, dlswMIB=dlswMIB, dlswDirMacLFSize=dlswDirMacLFSize, dlswTConnOperPartnerMacExcl=dlswTConnOperPartnerMacExcl, dlswDirCompliance=dlswDirCompliance, dlswTConnTcpConfigEntry=dlswTConnTcpConfigEntry, dlswDirNBLocationType=dlswDirNBLocationType, dlswNode=dlswNode, dlswTConnConfigEntry=dlswTConnConfigEntry, dlswSdlcLsLocalIdNum=dlswSdlcLsLocalIdNum, dlsw=dlsw, dlswDirNBLocation=dlswDirNBLocation, dlswTConnStatCloseIdles=dlswTConnStatCloseIdles, dlswTConnOperEntry=dlswTConnOperEntry, dlswDirLocateNBEntry=dlswDirLocateNBEntry, dlswTraps=dlswTraps, dlswCircuitStatCreates=dlswCircuitStatCreates, dlswDirNBCacheHits=dlswDirNBCacheHits, dlswDirNBNameType=dlswDirNBNameType, dlswTConnOperCirCreates=dlswTConnOperCirCreates, dlswTConnConfigTDomain=dlswTConnConfigTDomain, dlswTConnOperInCntlPkts=dlswTConnOperInCntlPkts, dlswIfEntry=dlswIfEntry, dlswDirNBCacheNextIndex=dlswDirNBCacheNextIndex, null=null, dlswTConnStatActiveConnections=dlswTConnStatActiveConnections, DlcType=DlcType, dlswTConnOperInDataOctets=dlswTConnOperInDataOctets, dlswIfSapList=dlswIfSapList, dlswDirMacEntryType=dlswDirMacEntryType, dlswTConnOperTDomain=dlswTConnOperTDomain, dlswCircuitStatActives=dlswCircuitStatActives, TAddress=TAddress, dlswTConnOperNQexSents=dlswTConnOperNQexSents, dlswDirNBRowStatus=dlswDirNBRowStatus, dlswDirNBEntryType=dlswDirNBEntryType, dlswCircuitS1RouteInfo=dlswCircuitS1RouteInfo, dlswTConnConfigGroup=dlswTConnConfigGroup, dlswTConnConfigRowStatus=dlswTConnConfigRowStatus, dlswCircuitState=dlswCircuitState, dlswCircuitEntry=dlswCircuitEntry, dlswCircuitGroup=dlswCircuitGroup, dlswTConnOperOutDataPkts=dlswTConnOperOutDataPkts, dlswTConnTcpConfigTcpConnections=dlswTConnTcpConfigTcpConnections, dlswIfTable=dlswIfTable, dlswDirGroup=dlswDirGroup, dlswDirNBEntries=dlswDirNBEntries, dlswNodeStdPacingSupport=dlswNodeStdPacingSupport, dlswCircuitPriority=dlswCircuitPriority, dlswNodeStatus=dlswNodeStatus, dlswCircuitS2TAddress=dlswCircuitS2TAddress, dlswDirLocateCompliance=dlswDirLocateCompliance, dlswTConn=dlswTConn, dlswCircuitS1CircuitId=dlswCircuitS1CircuitId, dlswSdlcGroup=dlswSdlcGroup, NBName=NBName, dlswIfVirtualSegment=dlswIfVirtualSegment, dlswTConnOperPartnerNBExcl=dlswTConnOperPartnerNBExcl, dlswTConnOperNRexSents=dlswTConnOperNRexSents, dlswTConnTcpOperTable=dlswTConnTcpOperTable, dlswSdlcLsTable=dlswSdlcLsTable, dlswDirLocateMacTable=dlswDirLocateMacTable, dlswTConnOperNQexRcvds=dlswTConnOperNQexRcvds, dlswCircuitFCSendGrantedUnits=dlswCircuitFCSendGrantedUnits, dlswTConnOperTable=dlswTConnOperTable, dlswTConnConfigSapList=dlswTConnConfigSapList, dlswDirMacRowStatus=dlswDirMacRowStatus, DlswTCPAddress=DlswTCPAddress, dlswDirMacEntries=dlswDirMacEntries, dlswTConnConfigEntryType=dlswTConnConfigEntryType, dlswTConnOperInDataPkts=dlswTConnOperInDataPkts, dlswCircuitS2Mac=dlswCircuitS2Mac, dlswDirMacLocationType=dlswDirMacLocationType, dlswTConnOperFlowCntlMode=dlswTConnOperFlowCntlMode, dlswCircuitFCHalveWndwRcvds=dlswCircuitFCHalveWndwRcvds, dlswDirLocateMacEntry=dlswDirLocateMacEntry, dlswSdlc=dlswSdlc, dlswDirNBTable=dlswDirNBTable, dlswCircuitFCRecvGrantedUnits=dlswCircuitFCRecvGrantedUnits, dlswTConnStat=dlswTConnStat, dlswDirLocateNBTable=dlswDirLocateNBTable, dlswDirLocateNBMatch=dlswDirLocateNBMatch, dlswDirLocateGroup=dlswDirLocateGroup, dlswNodeVendorID=dlswNodeVendorID, dlswCircuitStateTime=dlswCircuitStateTime, dlswDirMacEntry=dlswDirMacEntry, dlswDirLocateMacMatch=dlswDirLocateMacMatch, dlswNodeUpTime=dlswNodeUpTime, dlswTConnTcpConfigGroup=dlswTConnTcpConfigGroup, dlswCircuitTable=dlswCircuitTable, dlswCircuitFCHalveWndwSents=dlswCircuitFCHalveWndwSents, dlswTConnConfigOpens=dlswTConnConfigOpens, dlswTConnTcpOperPrefTcpConnections=dlswTConnTcpOperPrefTcpConnections, dlswSdlcCompliance=dlswSdlcCompliance, dlswTConnConfigLocalTAddr=dlswTConnConfigLocalTAddr, dlswTConnOperConnectTime=dlswTConnOperConnectTime, dlswCircuitS2Sap=dlswCircuitS2Sap, dlswTConnNBGroup=dlswTConnNBGroup, dlswNodeResourceMacExclusivity=dlswNodeResourceMacExclusivity, dlswTrapTConnDown=dlswTrapTConnDown, dlswCircuitS1IfIndex=dlswCircuitS1IfIndex, dlswCircuitFCLargestSendGranted=dlswCircuitFCLargestSendGranted, dlswTrapCircuitUp=dlswTrapCircuitUp, dlswTrapCircuitDown=dlswTrapCircuitDown, dlswTrapCntlTConn=dlswTrapCntlTConn, dlswTConnOperRemoteTAddr=dlswTConnOperRemoteTAddr, dlswInterfaceGroup=dlswInterfaceGroup, dlswTConnOperState=dlswTConnOperState, dlswTrapCntlTConnPartnerReject=dlswTrapCntlTConnPartnerReject, dlswGroups=dlswGroups, dlswDirLocateMacLocation=dlswDirLocateMacLocation, dlswTConnTcpOperEntry=dlswTConnTcpOperEntry, dlswTConnConfigLastModifyTime=dlswTConnConfigLastModifyTime, dlswTConnOperConfigIndex=dlswTConnOperConfigIndex, dlswCircuitFCResetOpSents=dlswCircuitFCResetOpSents, dlswDirMacMac=dlswDirMacMac, dlswTConnTcpOperGroup=dlswTConnTcpOperGroup, dlswTConnOperDiscActiveCir=dlswTConnOperDiscActiveCir, dlswTConnConfigGroupDefinition=dlswTConnConfigGroupDefinition, dlswDirMacCacheNextIndex=dlswDirMacCacheNextIndex, dlswSdlcLsRemoteSap=dlswSdlcLsRemoteSap, dlswTConnTcpConfigMaxSegmentSize=dlswTConnTcpConfigMaxSegmentSize, dlswTConnStatGroup=dlswTConnStatGroup, dlswDirectory=dlswDirectory, dlswDirMacMask=dlswDirMacMask, dlswDirMacTable=dlswDirMacTable, dlswTConnTcpConfigKeepAliveInt=dlswTConnTcpConfigKeepAliveInt, dlswTConnOperICRexSents=dlswTConnOperICRexSents, dlswTrapControl=dlswTrapControl, dlswTConnConfigTable=dlswTConnConfigTable, MacAddressNC=MacAddressNC, dlswTConnOperICRexRcvds=dlswTConnOperICRexRcvds, dlswCircuitS1Sap=dlswCircuitS1Sap, dlswTConnOperOutCntlPkts=dlswTConnOperOutCntlPkts, dlswTConnOperOutDataOctets=dlswTConnOperOutDataOctets, dlswTConnOperNRexRcvds=dlswTConnOperNRexRcvds, dlswCircuitS1Mac=dlswCircuitS1Mac, dlswTConnConfigRemoteTAddr=dlswTConnConfigRemoteTAddr, dlswTConnOperPartnerVendorID=dlswTConnOperPartnerVendorID, dlswTConnOperCURexRcvds=dlswTConnOperCURexRcvds, dlswDirNBStatus=dlswDirNBStatus, dlswCircuitS1Dlc=dlswCircuitS1Dlc, dlswTrapCntlCircuit=dlswTrapCntlCircuit, dlswCircuitEntryTime=dlswCircuitEntryTime, dlswTConnConfigAdvertiseMacNB=dlswTConnConfigAdvertiseMacNB, dlswNodeResourceNBExclusivity=dlswNodeResourceNBExclusivity, dlswNodeNBGroup=dlswNodeNBGroup, dlswDirNBEntry=dlswDirNBEntry, dlswSdlcLsRowStatus=dlswSdlcLsRowStatus, LFSize=LFSize, dlswDomains=dlswDomains, dlswCircuitDiscReasonLocal=dlswCircuitDiscReasonLocal, dlswSdlcLsRemoteMac=dlswSdlcLsRemoteMac, dlswTConnConfigSetupType=dlswTConnConfigSetupType, dlswNodeVersionString=dlswNodeVersionString, dlswTConnOperPartnerVersion=dlswTConnOperPartnerVersion, dlswCircuitDiscReasonRemote=dlswCircuitDiscReasonRemote, dlswTConnOperGroup=dlswTConnOperGroup, dlswSdlcLsLocalMac=dlswSdlcLsLocalMac, dlswCircuitStat=dlswCircuitStat, dlswCircuitFCResetOpRcvds=dlswCircuitFCResetOpRcvds, dlswTConnTcpOperTcpConnections=dlswTConnTcpOperTcpConnections, dlswTConnTcp=dlswTConnTcp, dlswSdlcLsEntry=dlswSdlcLsEntry, dlswDirLocateNBName=dlswDirLocateNBName, dlswTConnOperPartnerSapList=dlswTConnOperPartnerSapList, dlswCircuitFCRecvCurrentWndw=dlswCircuitFCRecvCurrentWndw, dlswSdlcLsEntries=dlswSdlcLsEntries, dlswTConnOperDiscReason=dlswTConnOperDiscReason, dlswTConnOperPartnerNBInfo=dlswTConnOperPartnerNBInfo, dlswDirMacLocation=dlswDirMacLocation, dlswDirNBIndex=dlswDirNBIndex, dlswConformance=dlswConformance, dlswTConnTcpCompliance=dlswTConnTcpCompliance, dlswCircuit=dlswCircuit, dlswTConnTcpConfigTable=dlswTConnTcpConfigTable, dlswTConnOperCircuits=dlswTConnOperCircuits, dlswDirMacStatus=dlswDirMacStatus, dlswTConnOperLocalTAddr=dlswTConnOperLocalTAddr, dlswTConnOperPartnerVersionStr=dlswTConnOperPartnerVersionStr, dlswCircuitDiscReasonRemoteData=dlswCircuitDiscReasonRemoteData, dlswCircuitS1DlcType=dlswCircuitS1DlcType, dlswTConnSpecific=dlswTConnSpecific, dlswTCPDomain=dlswTCPDomain, dlswDirNBCacheMisses=dlswDirNBCacheMisses, dlswDirLocateMacMac=dlswDirLocateMacMac, dlswDirNBName=dlswDirNBName, dlswTrapTConnUp=dlswTrapTConnUp, dlswCoreCompliance=dlswCoreCompliance, dlswNodeVersion=dlswNodeVersion, dlswCompliances=dlswCompliances)
''' Play with numbers You are given an array of n numbers and q queries. For each query you have to print the floor of the expected value(mean) of the subarray from L to R. First line contains two integers N and Q denoting number of array elements and number of queries. Next line contains N space seperated integers denoting array elements. Next Q lines contain two integers L and R(indices of the array). print a single integer denoting the answer. : 1<= N ,Q,L,R <= 10^6 1<= Array elements <= 10^9 NOTE Use Fast I/O ''' x = list(map(int,input().split())) a = list(map(int,input().split())) b = [a[0]] for i in range (1, len(a)): b.append(a[i]+b[-1]) for i in range (0,x[1]): c = list(map(int,input().split())) if c[0] == 1: print(b[c[1]-1]//(c[1])) else: print((b[c[1]-1] - b[c[0] - 2])//((c[1] - c[0])+1))
""" Play with numbers You are given an array of n numbers and q queries. For each query you have to print the floor of the expected value(mean) of the subarray from L to R. First line contains two integers N and Q denoting number of array elements and number of queries. Next line contains N space seperated integers denoting array elements. Next Q lines contain two integers L and R(indices of the array). print a single integer denoting the answer. : 1<= N ,Q,L,R <= 10^6 1<= Array elements <= 10^9 NOTE Use Fast I/O """ x = list(map(int, input().split())) a = list(map(int, input().split())) b = [a[0]] for i in range(1, len(a)): b.append(a[i] + b[-1]) for i in range(0, x[1]): c = list(map(int, input().split())) if c[0] == 1: print(b[c[1] - 1] // c[1]) else: print((b[c[1] - 1] - b[c[0] - 2]) // (c[1] - c[0] + 1))
def glyphs(): return 97 _font =\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a'\ b'\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x11\x4b\x59\x51\x4b\x4e'\ b'\x4c\x4c\x4e\x4b\x51\x4b\x53\x4c\x56\x4e\x58\x51\x59\x53\x59'\ b'\x56\x58\x58\x56\x59\x53\x59\x51\x58\x4e\x56\x4c\x53\x4b\x51'\ b'\x4b\x05\x4c\x58\x4c\x4c\x4c\x58\x58\x58\x58\x4c\x4c\x4c\x04'\ b'\x4b\x59\x52\x4a\x4b\x56\x59\x56\x52\x4a\x05\x4c\x58\x52\x48'\ b'\x4c\x52\x52\x5c\x58\x52\x52\x48\x0b\x4a\x5a\x52\x49\x50\x4f'\ b'\x4a\x4f\x4f\x53\x4d\x59\x52\x55\x57\x59\x55\x53\x5a\x4f\x54'\ b'\x4f\x52\x49\x0d\x4c\x58\x50\x4c\x50\x50\x4c\x50\x4c\x54\x50'\ b'\x54\x50\x58\x54\x58\x54\x54\x58\x54\x58\x50\x54\x50\x54\x4c'\ b'\x50\x4c\x05\x4b\x59\x52\x4b\x52\x59\x20\x52\x4b\x52\x59\x52'\ b'\x05\x4d\x57\x4d\x4d\x57\x57\x20\x52\x57\x4d\x4d\x57\x08\x4d'\ b'\x57\x52\x4c\x52\x58\x20\x52\x4d\x4f\x57\x55\x20\x52\x57\x4f'\ b'\x4d\x55\x22\x4e\x56\x51\x4e\x4f\x4f\x4e\x51\x4e\x53\x4f\x55'\ b'\x51\x56\x53\x56\x55\x55\x56\x53\x56\x51\x55\x4f\x53\x4e\x51'\ b'\x4e\x20\x52\x4f\x51\x4f\x53\x20\x52\x50\x50\x50\x54\x20\x52'\ b'\x51\x4f\x51\x55\x20\x52\x52\x4f\x52\x55\x20\x52\x53\x4f\x53'\ b'\x55\x20\x52\x54\x50\x54\x54\x20\x52\x55\x51\x55\x53\x1a\x4e'\ b'\x56\x4e\x4e\x4e\x56\x56\x56\x56\x4e\x4e\x4e\x20\x52\x4f\x4f'\ b'\x4f\x55\x20\x52\x50\x4f\x50\x55\x20\x52\x51\x4f\x51\x55\x20'\ b'\x52\x52\x4f\x52\x55\x20\x52\x53\x4f\x53\x55\x20\x52\x54\x4f'\ b'\x54\x55\x20\x52\x55\x4f\x55\x55\x10\x4d\x57\x52\x4c\x4d\x55'\ b'\x57\x55\x52\x4c\x20\x52\x52\x4f\x4f\x54\x20\x52\x52\x4f\x55'\ b'\x54\x20\x52\x52\x52\x51\x54\x20\x52\x52\x52\x53\x54\x10\x4c'\ b'\x55\x4c\x52\x55\x57\x55\x4d\x4c\x52\x20\x52\x4f\x52\x54\x55'\ b'\x20\x52\x4f\x52\x54\x4f\x20\x52\x52\x52\x54\x53\x20\x52\x52'\ b'\x52\x54\x51\x10\x4d\x57\x52\x58\x57\x4f\x4d\x4f\x52\x58\x20'\ b'\x52\x52\x55\x55\x50\x20\x52\x52\x55\x4f\x50\x20\x52\x52\x52'\ b'\x53\x50\x20\x52\x52\x52\x51\x50\x10\x4f\x58\x58\x52\x4f\x4d'\ b'\x4f\x57\x58\x52\x20\x52\x55\x52\x50\x4f\x20\x52\x55\x52\x50'\ b'\x55\x20\x52\x52\x52\x50\x51\x20\x52\x52\x52\x50\x53\x08\x44'\ b'\x60\x44\x52\x60\x52\x20\x52\x44\x52\x52\x62\x20\x52\x60\x52'\ b'\x52\x62\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00'\ b'\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00'\ b'\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00'\ b'\x4a\x5a\x00\x4a\x5a\x11\x4b\x59\x51\x4b\x4e\x4c\x4c\x4e\x4b'\ b'\x51\x4b\x53\x4c\x56\x4e\x58\x51\x59\x53\x59\x56\x58\x58\x56'\ b'\x59\x53\x59\x51\x58\x4e\x56\x4c\x53\x4b\x51\x4b\x05\x4c\x58'\ b'\x4c\x4c\x4c\x58\x58\x58\x58\x4c\x4c\x4c\x04\x4b\x59\x52\x4a'\ b'\x4b\x56\x59\x56\x52\x4a\x05\x4c\x58\x52\x48\x4c\x52\x52\x5c'\ b'\x58\x52\x52\x48\x0b\x4a\x5a\x52\x49\x50\x4f\x4a\x4f\x4f\x53'\ b'\x4d\x59\x52\x55\x57\x59\x55\x53\x5a\x4f\x54\x4f\x52\x49\x0d'\ b'\x4c\x58\x50\x4c\x50\x50\x4c\x50\x4c\x54\x50\x54\x50\x58\x54'\ b'\x58\x54\x54\x58\x54\x58\x50\x54\x50\x54\x4c\x50\x4c\x05\x4b'\ b'\x59\x52\x4b\x52\x59\x20\x52\x4b\x52\x59\x52\x05\x4d\x57\x4d'\ b'\x4d\x57\x57\x20\x52\x57\x4d\x4d\x57\x08\x4d\x57\x52\x4c\x52'\ b'\x58\x20\x52\x4d\x4f\x57\x55\x20\x52\x57\x4f\x4d\x55\x22\x4e'\ b'\x56\x51\x4e\x4f\x4f\x4e\x51\x4e\x53\x4f\x55\x51\x56\x53\x56'\ b'\x55\x55\x56\x53\x56\x51\x55\x4f\x53\x4e\x51\x4e\x20\x52\x4f'\ b'\x51\x4f\x53\x20\x52\x50\x50\x50\x54\x20\x52\x51\x4f\x51\x55'\ b'\x20\x52\x52\x4f\x52\x55\x20\x52\x53\x4f\x53\x55\x20\x52\x54'\ b'\x50\x54\x54\x20\x52\x55\x51\x55\x53\x1a\x4e\x56\x4e\x4e\x4e'\ b'\x56\x56\x56\x56\x4e\x4e\x4e\x20\x52\x4f\x4f\x4f\x55\x20\x52'\ b'\x50\x4f\x50\x55\x20\x52\x51\x4f\x51\x55\x20\x52\x52\x4f\x52'\ b'\x55\x20\x52\x53\x4f\x53\x55\x20\x52\x54\x4f\x54\x55\x20\x52'\ b'\x55\x4f\x55\x55\x10\x4d\x57\x52\x4c\x4d\x55\x57\x55\x52\x4c'\ b'\x20\x52\x52\x4f\x4f\x54\x20\x52\x52\x4f\x55\x54\x20\x52\x52'\ b'\x52\x51\x54\x20\x52\x52\x52\x53\x54\x10\x4c\x55\x4c\x52\x55'\ b'\x57\x55\x4d\x4c\x52\x20\x52\x4f\x52\x54\x55\x20\x52\x4f\x52'\ b'\x54\x4f\x20\x52\x52\x52\x54\x53\x20\x52\x52\x52\x54\x51\x10'\ b'\x4d\x57\x52\x58\x57\x4f\x4d\x4f\x52\x58\x20\x52\x52\x55\x55'\ b'\x50\x20\x52\x52\x55\x4f\x50\x20\x52\x52\x52\x53\x50\x20\x52'\ b'\x52\x52\x51\x50\x10\x4f\x58\x58\x52\x4f\x4d\x4f\x57\x58\x52'\ b'\x20\x52\x55\x52\x50\x4f\x20\x52\x55\x52\x50\x55\x20\x52\x52'\ b'\x52\x50\x51\x20\x52\x52\x52\x50\x53\x08\x44\x60\x44\x52\x60'\ b'\x52\x20\x52\x44\x52\x52\x62\x20\x52\x60\x52\x52\x62\x00\x4a'\ b'\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a'\ b'\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a'\ b'\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a\x5a\x00\x4a'\ b'\x5a' _index =\ b'\x00\x00\x03\x00\x06\x00\x09\x00\x0c\x00\x0f\x00\x12\x00\x15'\ b'\x00\x18\x00\x1b\x00\x1e\x00\x21\x00\x24\x00\x27\x00\x2a\x00'\ b'\x2d\x00\x30\x00\x33\x00\x36\x00\x39\x00\x3c\x00\x3f\x00\x42'\ b'\x00\x45\x00\x48\x00\x4b\x00\x4e\x00\x51\x00\x54\x00\x57\x00'\ b'\x5a\x00\x5d\x00\x60\x00\x63\x00\x88\x00\x95\x00\xa0\x00\xad'\ b'\x00\xc6\x00\xe3\x00\xf0\x00\xfd\x00\x10\x01\x57\x01\x8e\x01'\ b'\xb1\x01\xd4\x01\xf7\x01\x1a\x02\x2d\x02\x30\x02\x33\x02\x36'\ b'\x02\x39\x02\x3c\x02\x3f\x02\x42\x02\x45\x02\x48\x02\x4b\x02'\ b'\x4e\x02\x51\x02\x54\x02\x57\x02\x5a\x02\x5d\x02\x82\x02\x8f'\ b'\x02\x9a\x02\xa7\x02\xc0\x02\xdd\x02\xea\x02\xf7\x02\x0a\x03'\ b'\x51\x03\x88\x03\xab\x03\xce\x03\xf1\x03\x14\x04\x27\x04\x2a'\ b'\x04\x2d\x04\x30\x04\x33\x04\x36\x04\x39\x04\x3c\x04\x3f\x04'\ b'\x42\x04\x45\x04\x48\x04\x4b\x04\x4e\x04\x51\x04\x54\x04' _mvfont = memoryview(_font) def _chr_addr(ordch): offset = 2 * (ordch - 32) return int.from_bytes(_index[offset:offset + 2], 'little') def get_ch(ordch): offset = _chr_addr(ordch if 32 <= ordch <= 127 else ord('?')) count = _font[offset] return _mvfont[offset:offset+(count+2)*2-1]
def glyphs(): return 97 _font = b'\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x11KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK\x05LXLLLXXXXLLL\x04KYRJKVYVRJ\x05LXRHLRR\\XRRH\x0bJZRIPOJOOSMYRUWYUSZOTORI\rLXPLPPLPLTPTPXTXTTXTXPTPTLPL\x05KYRKRY RKRYR\x05MWMMWW RWMMW\x08MWRLRX RMOWU RWOMU"NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS\x1aNVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU\x10MWRLMUWURL RROOT RROUT RRRQT RRRST\x10LULRUWUMLR RORTU RORTO RRRTS RRRTQ\x10MWRXWOMORX RRUUP RRUOP RRRSP RRRQP\x10OXXROMOWXR RURPO RURPU RRRPQ RRRPS\x08D`DR`R RDRRb R`RRb\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x11KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK\x05LXLLLXXXXLLL\x04KYRJKVYVRJ\x05LXRHLRR\\XRRH\x0bJZRIPOJOOSMYRUWYUSZOTORI\rLXPLPPLPLTPTPXTXTTXTXPTPTLPL\x05KYRKRY RKRYR\x05MWMMWW RWMMW\x08MWRLRX RMOWU RWOMU"NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS\x1aNVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU\x10MWRLMUWURL RROOT RROUT RRRQT RRRST\x10LULRUWUMLR RORTU RORTO RRRTS RRRTQ\x10MWRXWOMORX RRUUP RRUOP RRRSP RRRQP\x10OXXROMOWXR RURPO RURPU RRRPQ RRRPS\x08D`DR`R RDRRb R`RRb\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ\x00JZ' _index = b"\x00\x00\x03\x00\x06\x00\t\x00\x0c\x00\x0f\x00\x12\x00\x15\x00\x18\x00\x1b\x00\x1e\x00!\x00$\x00'\x00*\x00-\x000\x003\x006\x009\x00<\x00?\x00B\x00E\x00H\x00K\x00N\x00Q\x00T\x00W\x00Z\x00]\x00`\x00c\x00\x88\x00\x95\x00\xa0\x00\xad\x00\xc6\x00\xe3\x00\xf0\x00\xfd\x00\x10\x01W\x01\x8e\x01\xb1\x01\xd4\x01\xf7\x01\x1a\x02-\x020\x023\x026\x029\x02<\x02?\x02B\x02E\x02H\x02K\x02N\x02Q\x02T\x02W\x02Z\x02]\x02\x82\x02\x8f\x02\x9a\x02\xa7\x02\xc0\x02\xdd\x02\xea\x02\xf7\x02\n\x03Q\x03\x88\x03\xab\x03\xce\x03\xf1\x03\x14\x04'\x04*\x04-\x040\x043\x046\x049\x04<\x04?\x04B\x04E\x04H\x04K\x04N\x04Q\x04T\x04" _mvfont = memoryview(_font) def _chr_addr(ordch): offset = 2 * (ordch - 32) return int.from_bytes(_index[offset:offset + 2], 'little') def get_ch(ordch): offset = _chr_addr(ordch if 32 <= ordch <= 127 else ord('?')) count = _font[offset] return _mvfont[offset:offset + (count + 2) * 2 - 1]
class Solution: def buddyStrings(self, A: str, B: str) -> bool: if len(A) != len(B): return False if A == B: seen = set() for char in A: if char in seen: return True seen.add(char) return False else: pairs = [] for a, b in zip(A, B): if a != b: pairs.append((a, b)) if len(pairs) > 2: return False return len(pairs) == 2 and pairs[0] == pairs[1][::-1]
class Solution: def buddy_strings(self, A: str, B: str) -> bool: if len(A) != len(B): return False if A == B: seen = set() for char in A: if char in seen: return True seen.add(char) return False else: pairs = [] for (a, b) in zip(A, B): if a != b: pairs.append((a, b)) if len(pairs) > 2: return False return len(pairs) == 2 and pairs[0] == pairs[1][::-1]
# ------------------------------ # 560. Subarray Sum Equals K # # Description: # Given an array of integers and an integer k, you need to find the total number of # continuous subarrays whose sum equals to k. # # Example 1: # Input:nums = [1,1,1], k = 2 # Output: 2 # # Note: # The length of the array is in range [1, 20,000]. # The range of numbers in the array is [-1000, 1000] and the range of the integer k # is [-1e7, 1e7]. # # Version: 1.0 # 10/29/19 by Jianfa # ------------------------------ class Solution: def subarraySum(self, nums: List[int], k: int) -> int: preSum = 0 count = 0 sumDict = {0: 1} # if there is a subarray whose sum is k, can get sumDict[0] = 1 for n in nums: preSum += n if preSum - k in sumDict: # if there exists a sum of subarray nums[:i] that is preSum - k # then sum of subarray between current number and nums[i] is k count += sumDict[preSum - k] sumDict[preSum] = sumDict.get(preSum, 0) + 1 return count # Used for testing if __name__ == "__main__": test = Solution() # ------------------------------ # Summary: # Idea from: https://leetcode.com/problems/subarray-sum-equals-k/discuss/102106/Java-Solution-PreSum-%2B-HashMap # I thought about the accumulated sum, but I didn't think about using the map to store # previous accumulated sum, so that it helps to check if the difference between current # sum and a certain sum is k.
class Solution: def subarray_sum(self, nums: List[int], k: int) -> int: pre_sum = 0 count = 0 sum_dict = {0: 1} for n in nums: pre_sum += n if preSum - k in sumDict: count += sumDict[preSum - k] sumDict[preSum] = sumDict.get(preSum, 0) + 1 return count if __name__ == '__main__': test = solution()
# testSIF = "123456789012" testSIF = open("input.txt", 'r').read() # testSIF = "0222112222120000" x_size = 25 y_size = 6 layer_count = len(testSIF) // (x_size * y_size) layers = [] index = 0 for z in range(layer_count): layer = [] for y in range(y_size): for x in range(x_size): layer += testSIF[index] index += 1 layers.append(layer) print(len(layers) * y_size * x_size) print(len(testSIF)) def decode_pixel(layers, index): color = "2" for l in layers: if color == "2": color = l[index] return color index = 0 for y in range(y_size): line = "" for x in range(x_size): line += ("0" if (decode_pixel(layers, index) == "1") else " ") + " " index += 1 print(line)
test_sif = open('input.txt', 'r').read() x_size = 25 y_size = 6 layer_count = len(testSIF) // (x_size * y_size) layers = [] index = 0 for z in range(layer_count): layer = [] for y in range(y_size): for x in range(x_size): layer += testSIF[index] index += 1 layers.append(layer) print(len(layers) * y_size * x_size) print(len(testSIF)) def decode_pixel(layers, index): color = '2' for l in layers: if color == '2': color = l[index] return color index = 0 for y in range(y_size): line = '' for x in range(x_size): line += ('0' if decode_pixel(layers, index) == '1' else ' ') + ' ' index += 1 print(line)
class Object: ## Lisp apply() to `that` object in context def apply(self, env, that): raise NotImplementedError(['apply', self, env, that])
class Object: def apply(self, env, that): raise not_implemented_error(['apply', self, env, that])
loop = 1 while (loop < 10): noun1 = input("Choose a noun: ") plur_noun = input("Choose a plural noun: ") noun2 = input("Choose a noun: ") place = input("Name a place: ") adjective = input("Choose an adjective (Describing word): ") noun3 = input("Choose a noun: ") print ("------------------------------------------") print ("Be kind to your ",noun1,"- footed", plur_noun) print ("For a duck may be somebody's", noun2,",") print ("Be kind to your",plur_noun,"in",place) print ("Where the weather is always",adjective,".") print () print ("You may think that is this the",noun3,",") print ("Well it is.") print ("------------------------------------------") loop = loop + 1
loop = 1 while loop < 10: noun1 = input('Choose a noun: ') plur_noun = input('Choose a plural noun: ') noun2 = input('Choose a noun: ') place = input('Name a place: ') adjective = input('Choose an adjective (Describing word): ') noun3 = input('Choose a noun: ') print('------------------------------------------') print('Be kind to your ', noun1, '- footed', plur_noun) print("For a duck may be somebody's", noun2, ',') print('Be kind to your', plur_noun, 'in', place) print('Where the weather is always', adjective, '.') print() print('You may think that is this the', noun3, ',') print('Well it is.') print('------------------------------------------') loop = loop + 1
def aumentar(n,p,formatar=False): v = n + (n * p / 100) if formatar: return moeda(v) else: return v def diminuir(n,p,formatar=False): v = n - (n * p / 100) if formatar: return moeda(v) else: return v def dobro(n,formatar=False): v = n*2 if formatar: return moeda(v) else: return v def metade(n,formatar=False): v = n/2 if formatar: return moeda(v) else: return v def moeda(n=0, moeda='R$'): return f'{moeda}{n:>2.2f}'.replace('.', ',')
def aumentar(n, p, formatar=False): v = n + n * p / 100 if formatar: return moeda(v) else: return v def diminuir(n, p, formatar=False): v = n - n * p / 100 if formatar: return moeda(v) else: return v def dobro(n, formatar=False): v = n * 2 if formatar: return moeda(v) else: return v def metade(n, formatar=False): v = n / 2 if formatar: return moeda(v) else: return v def moeda(n=0, moeda='R$'): return f'{moeda}{n:>2.2f}'.replace('.', ',')
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Product Availability', 'category': 'Website/Website', 'summary': 'Manage product inventory & availability', 'description': """ Manage the inventory of your products and display their availability status in your eCommerce store. In case of stockout, you can decide to block further sales or to keep selling. A default behavior can be selected in the Website settings. Then it can be made specific at the product level. """, 'depends': [ 'website_sale', 'sale_stock', ], 'data': [ 'views/product_template_views.xml', 'views/res_config_settings_views.xml', 'views/website_sale_stock_templates.xml', 'views/stock_picking_views.xml' ], 'demo': [ 'data/website_sale_stock_demo.xml', ], 'auto_install': True, 'license': 'LGPL-3', }
{'name': 'Product Availability', 'category': 'Website/Website', 'summary': 'Manage product inventory & availability', 'description': '\nManage the inventory of your products and display their availability status in your eCommerce store.\nIn case of stockout, you can decide to block further sales or to keep selling.\nA default behavior can be selected in the Website settings.\nThen it can be made specific at the product level.\n ', 'depends': ['website_sale', 'sale_stock'], 'data': ['views/product_template_views.xml', 'views/res_config_settings_views.xml', 'views/website_sale_stock_templates.xml', 'views/stock_picking_views.xml'], 'demo': ['data/website_sale_stock_demo.xml'], 'auto_install': True, 'license': 'LGPL-3'}
#!/usr/bin/env python3 """ Advent of Code! --- Day 2: Dive! --- Now doing advent of code day 2 in-between working on finals... I sure hope the puzzles don't ramp up too much the first few days! """ def process_input(input_name): with open(input_name) as input: return input.readlines() def calculate_pos(input, has_aim=False): aim, horizontal, depth = 0, 0, 0 for line in input: split_line = line.split() command = split_line[0] value = int(split_line[1]) if command == 'forward': horizontal += value depth += aim * value elif command == 'down': aim += value elif command == 'up': aim -= value if has_aim: return horizontal * depth else: return horizontal * aim input = process_input('input.txt') p1 = calculate_pos(input) p2 = calculate_pos(input, True) print('Part 1:', p1) print('Part 2:', p2)
""" Advent of Code! --- Day 2: Dive! --- Now doing advent of code day 2 in-between working on finals... I sure hope the puzzles don't ramp up too much the first few days! """ def process_input(input_name): with open(input_name) as input: return input.readlines() def calculate_pos(input, has_aim=False): (aim, horizontal, depth) = (0, 0, 0) for line in input: split_line = line.split() command = split_line[0] value = int(split_line[1]) if command == 'forward': horizontal += value depth += aim * value elif command == 'down': aim += value elif command == 'up': aim -= value if has_aim: return horizontal * depth else: return horizontal * aim input = process_input('input.txt') p1 = calculate_pos(input) p2 = calculate_pos(input, True) print('Part 1:', p1) print('Part 2:', p2)
""" Base class implementing class level locking capability. MIT License (C) Copyright [2020] Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.""" class LockHolder: """Wrapper for etcd3 locks to allow them to be acquired with a timeout on the acquisition for non-blocking lock checks. """ def __init__(self, etcd, name, ttl=60, timeout=None): """ Constructor """ self.my_lock = etcd.lock(name, ttl=ttl) self.timeout = timeout def acquire(self, ): """Manually acquire the lock for this instance, obtained by calling lock() above. The timeout and TTL set in the lock() call will be used for the acquisition. """ self.my_lock.acquire(self.timeout) return self def release(self): """Manually release the lock for this instance. """ return self.my_lock.release() def is_acquired(self): """Find out whether the lock for this instance is currently acquired (uesful when using non-blocking or timed acquisitions). """ return self.my_lock.is_acquired() def __enter__(self): """Acquire the lock as a context manager. """ return self.acquire() def __exit__(self, exception_type, exception_value, traceback): """ Release the lock at the end of a managed context. """ self.release() return False class Lockable: """Base class with a lock() method that produces distinct locks per object-id in ETCD for use with 'with'. Call the lock() method on an instance of the class to obtain the lock. Example: class Foo(Lockable): def __init__(self): assert self # keep lint happy my_instance = Foo() with my_instance.lock(): print("I am in the lock" print("No longer in the lock") """ def __init__(self, name, etcd): """Constructor The paramters are: name The unique name that identifies the resource to be locked by this partitcular lockable instance. etcd The ETCD client to be used for creating a lock in this particular lockable instance. """ self.name = name self.etcd = etcd def lock(self, ttl=60, timeout=None): """Method to use with the 'with' statement for locking the instance resource. This creates the lock that will be shared across all instances (through ETCD). The parameters are as follows: ttl The time-to-live (TTL) of a lock acquisition on this lock. This is expressed in seconds. If TTL expires while the lock is held, the lock is dropped allowing someone else to acquire it. To keep a lock locked for long processing stages, call the refresh() method periodically (within the TTL time limit) on the lock object returned by this method. timeout The length of time (in seconds) to wait for the lock before giving up. If this is 0, acquiring the lock is non-blocking, and the lock may not result in an acquired lock. If this is greater than 0, attempts to acquire will give up after that number of seconds and may not result in an acquired lock. If this is None attempts to acquire the lock will block indefinitely and are guaranteed to return an acquired lock. To test whether the lock is acquired, use the is_aquired() method on the lock object returned by this method. """ return LockHolder(self.etcd, self.name, ttl, timeout)
""" Base class implementing class level locking capability. MIT License (C) Copyright [2020] Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.""" class Lockholder: """Wrapper for etcd3 locks to allow them to be acquired with a timeout on the acquisition for non-blocking lock checks. """ def __init__(self, etcd, name, ttl=60, timeout=None): """ Constructor """ self.my_lock = etcd.lock(name, ttl=ttl) self.timeout = timeout def acquire(self): """Manually acquire the lock for this instance, obtained by calling lock() above. The timeout and TTL set in the lock() call will be used for the acquisition. """ self.my_lock.acquire(self.timeout) return self def release(self): """Manually release the lock for this instance. """ return self.my_lock.release() def is_acquired(self): """Find out whether the lock for this instance is currently acquired (uesful when using non-blocking or timed acquisitions). """ return self.my_lock.is_acquired() def __enter__(self): """Acquire the lock as a context manager. """ return self.acquire() def __exit__(self, exception_type, exception_value, traceback): """ Release the lock at the end of a managed context. """ self.release() return False class Lockable: """Base class with a lock() method that produces distinct locks per object-id in ETCD for use with 'with'. Call the lock() method on an instance of the class to obtain the lock. Example: class Foo(Lockable): def __init__(self): assert self # keep lint happy my_instance = Foo() with my_instance.lock(): print("I am in the lock" print("No longer in the lock") """ def __init__(self, name, etcd): """Constructor The paramters are: name The unique name that identifies the resource to be locked by this partitcular lockable instance. etcd The ETCD client to be used for creating a lock in this particular lockable instance. """ self.name = name self.etcd = etcd def lock(self, ttl=60, timeout=None): """Method to use with the 'with' statement for locking the instance resource. This creates the lock that will be shared across all instances (through ETCD). The parameters are as follows: ttl The time-to-live (TTL) of a lock acquisition on this lock. This is expressed in seconds. If TTL expires while the lock is held, the lock is dropped allowing someone else to acquire it. To keep a lock locked for long processing stages, call the refresh() method periodically (within the TTL time limit) on the lock object returned by this method. timeout The length of time (in seconds) to wait for the lock before giving up. If this is 0, acquiring the lock is non-blocking, and the lock may not result in an acquired lock. If this is greater than 0, attempts to acquire will give up after that number of seconds and may not result in an acquired lock. If this is None attempts to acquire the lock will block indefinitely and are guaranteed to return an acquired lock. To test whether the lock is acquired, use the is_aquired() method on the lock object returned by this method. """ return lock_holder(self.etcd, self.name, ttl, timeout)
""" Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same. Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the array nums. More formally, if there are k elements after removing the duplicates, then the first k elements of nums should hold the final result. It does not matter what you leave beyond the first k elements. Return k after placing the final result in the first k slots of nums. Do not allocate extra space for another array. You must do this by modifying the input array in-place with O(1) extra memory. Input: nums = [1,1,2] Output: 2, nums = [1,2,_] Explanation: Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively. It does not matter what you leave beyond the returned k (hence they are underscores). Input: nums = [0,0,1,1,1,2,2,3,3,4] Output: 5, nums = [0,1,2,3,4,_,_,_,_,_] Explanation: Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4 respectively. It does not matter what you leave beyond the returned k (hence they are underscores). Constraints: 0 <= nums.length <= 3 * 104 -100 <= nums[i] <= 100 nums is sorted in non-decreasing order. """ class Solution: def removeDuplicates(self, nums: List[int]) -> int: idx_cur = 0 for i in range(1, len(nums)): if nums[i] != nums[idx_cur]: idx_cur += 1 nums[idx_cur] = nums[i] return idx_cur + 1
""" Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same. Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the array nums. More formally, if there are k elements after removing the duplicates, then the first k elements of nums should hold the final result. It does not matter what you leave beyond the first k elements. Return k after placing the final result in the first k slots of nums. Do not allocate extra space for another array. You must do this by modifying the input array in-place with O(1) extra memory. Input: nums = [1,1,2] Output: 2, nums = [1,2,_] Explanation: Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively. It does not matter what you leave beyond the returned k (hence they are underscores). Input: nums = [0,0,1,1,1,2,2,3,3,4] Output: 5, nums = [0,1,2,3,4,_,_,_,_,_] Explanation: Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4 respectively. It does not matter what you leave beyond the returned k (hence they are underscores). Constraints: 0 <= nums.length <= 3 * 104 -100 <= nums[i] <= 100 nums is sorted in non-decreasing order. """ class Solution: def remove_duplicates(self, nums: List[int]) -> int: idx_cur = 0 for i in range(1, len(nums)): if nums[i] != nums[idx_cur]: idx_cur += 1 nums[idx_cur] = nums[i] return idx_cur + 1
# coding:utf-8 """ Simplized version of 0-1 knapSack method. Donghui Chen, Wangmeng Song May 15, 2017 Wangmeng Song August 16, 2017 """ def zeros(rows, cols): row = [] data = [] for i in range(cols): row.append(0) for i in range(rows): data.append(row[:]) return data def getItemsUsed(w, c): # item count i = len(c) - 1 # weight currentW = len(c[0]) - 1 # set everything to not marked marked = [] for i in range(i + 1): marked.append(0) while (i >= 0 and currentW >= 0): # if this weight is different than the same weight for the last item # then we used this item to get this profit # if the number is the same we could not add this item because it was too heavy if (i is 0 and c[i][currentW] > 0) or (c[i][currentW] is not c[i - 1][currentW] and i > 0): marked[i] = 1 currentW = currentW - w[i] i = i - 1 return marked # w = list of item weight or cost # W = max weight or max cost for the knapsack # v = size of lat def zeroOneKnapsack(w, v, W): # c is the cost matrix c = [] n = len(w) # set inital values to zero c = zeros(n, W + 1) # the rows of the matrix are weights and the columns are items # cell c[i,j] is the optimal profit for i items of cost j # for every item for i in range(0, n): # for ever possible weight for j in range(0, W + 1): # if this weight can be added to this cell then add it if it is better than what we aready have if (w[i] > j): # this item is to large or heavy to add so we just keep what we aready have c[i][j] = c[i - 1][j] else: # we can add this item if it gives us more value than skipping it # c[i-1][j-w[i]] is the max profit for the remaining weight after we add this item. # if we add the profit of this item to the max profit of the remaining weight and it is more than # adding nothing , then it't the new max profit if not just add nothing. c[i][j] = max(c[i - 1][j], v[i] + c[i - 1][j - w[i]]) mostvalueindex = getItemsUsed(w, c) personindex = [j for j, x in enumerate(mostvalueindex) if x is 1] mostvalueperson = sum([w[n] for n in personindex]) return [mostvalueperson, personindex] # if __name__ == '__main__': # w = [2, 3, 2, 3, 2] # v = [2, 1, 4, 3, 0] # MAX = 5 # print zeroOneKnapsack(w, v, MAX)
""" Simplized version of 0-1 knapSack method. Donghui Chen, Wangmeng Song May 15, 2017 Wangmeng Song August 16, 2017 """ def zeros(rows, cols): row = [] data = [] for i in range(cols): row.append(0) for i in range(rows): data.append(row[:]) return data def get_items_used(w, c): i = len(c) - 1 current_w = len(c[0]) - 1 marked = [] for i in range(i + 1): marked.append(0) while i >= 0 and currentW >= 0: if i is 0 and c[i][currentW] > 0 or (c[i][currentW] is not c[i - 1][currentW] and i > 0): marked[i] = 1 current_w = currentW - w[i] i = i - 1 return marked def zero_one_knapsack(w, v, W): c = [] n = len(w) c = zeros(n, W + 1) for i in range(0, n): for j in range(0, W + 1): if w[i] > j: c[i][j] = c[i - 1][j] else: c[i][j] = max(c[i - 1][j], v[i] + c[i - 1][j - w[i]]) mostvalueindex = get_items_used(w, c) personindex = [j for (j, x) in enumerate(mostvalueindex) if x is 1] mostvalueperson = sum([w[n] for n in personindex]) return [mostvalueperson, personindex]
""" Think of something you could store in a list. Write a program that creates a list containing these items """ start = True languages = [] while start: name = input('Hi, what\'s your name?: ') print(f'Welcome {name.title()}') fav_language = input('What is your favorite programming language?:\n') languages.append(fav_language) finish = input('would you like to continue (y/n): ') if finish == 'y': continue else: break print('People likes the following programming languages:') for language in languages: print(f'- {language.title()}')
""" Think of something you could store in a list. Write a program that creates a list containing these items """ start = True languages = [] while start: name = input("Hi, what's your name?: ") print(f'Welcome {name.title()}') fav_language = input('What is your favorite programming language?:\n') languages.append(fav_language) finish = input('would you like to continue (y/n): ') if finish == 'y': continue else: break print('People likes the following programming languages:') for language in languages: print(f'- {language.title()}')
numbers = [54, 23, 66, 12] sumEle = numbers[1] + numbers[2] print(sumEle)
numbers = [54, 23, 66, 12] sum_ele = numbers[1] + numbers[2] print(sumEle)
class Solution: def search(self, nums: List[int], target: int) -> int: #start pointers low = 0 high = len(nums) - 1 # iterate trought the array while low <= high: # define middle of array mid = low + (high - low) // 2 # if position == target return position if nums[mid] == target: return mid # if middle position lets say(5) in a array of 10 # if the number of the middle position 5 is bigger than target # high - 1 elif nums[mid] < target: low = mid + 1 # if the number of the middle position 5 is smaller than target # low + 1 else: high = mid - 1 return -1 #not found return -1
class Solution: def search(self, nums: List[int], target: int) -> int: low = 0 high = len(nums) - 1 while low <= high: mid = low + (high - low) // 2 if nums[mid] == target: return mid elif nums[mid] < target: low = mid + 1 else: high = mid - 1 return -1
#-*- coding: utf-8 -*- #!/usr/bin/env python ## dummy class to replace usbio class class I2C(object): def __init__(self,module,slave): pass def searchI2CDev(self,begin,end): pass def write_register(self, reg, data): pass # def I2C(self,module,slave,channel): # pass def autodetect(): pass def setup(): pass
class I2C(object): def __init__(self, module, slave): pass def search_i2_c_dev(self, begin, end): pass def write_register(self, reg, data): pass def autodetect(): pass def setup(): pass
# Variables representing the number of candies collected by alice, bob, and carol alice_candies = 121 bob_candies = 77 carol_candies = 109 # Your code goes here! Replace the right-hand side of this assignment with an expression # involving alice_candies, bob_candies, and carol_candies total = (alice_candies + bob_candies + carol_candies) print((total % 3))
alice_candies = 121 bob_candies = 77 carol_candies = 109 total = alice_candies + bob_candies + carol_candies print(total % 3)
class ProfileDoesNotExist(Exception): def __init__(self, message, info={}): self.message = message self.info = info class ScraperError(Exception): def __init__(self, message, info={}): self.message = message self.info = info
class Profiledoesnotexist(Exception): def __init__(self, message, info={}): self.message = message self.info = info class Scrapererror(Exception): def __init__(self, message, info={}): self.message = message self.info = info
field_size = 40 snakeTailX = [40,80,120] snakeTailY = [0,0,0 ] Xhead, Yhead, Xfood, Yfood = 120,0,-40,- 40 snakeDirection = 'R' foodkey = True snakeLeight = 2 deadKey = False score = 0 def setup(): global img smooth() size(1024,572) img = loadImage("gameover.jpg") size(1024,572) noStroke() frameRate(5) smooth(250) def draw(): global Xhead, Yhead, snakeDirection1, Xfood, Yfood, snakeLeight,snakeTailX,snakeTailY, deadKey, img println(snakeTailX) imageMode(CENTER) image( img, width/2, height/2) if deadKey == False: background(100) snakeDirection1() snakeGO() food() foodEat() snakeTail() for i in range(snakeLeight): if snakeTailX[i] == Xhead and snakeTailY[i] == Yhead: snakeDead() if Xhead + field_size/2 > width or Xhead < 0 or Yhead + field_size/2 > height or Yhead < 0: snakeDead() fill(0) textSize(25) text(score, width - 50,50) fill(250, 75, 50,) ellipse(Xhead, Yhead, field_size, field_size) def keyPressed(): global snakeDirection, foodkey, snakeLeight, deadKey, score, Xhead, Yhead,snakeTailX,snakeTailY if deadKey and keyCode == RIGHT: snakeDirection = 'R' foodkey = True snakeLeight = 2 deadKey = False score = 0 Xhead, Yhead = 120, 0 snakeTailX = [40,80,120] snakeTailY = [0,0,0 ] def snakeTail(): global foodkey if foodkey == False: for i in range(snakeLeight): snakeTailX[i] = snakeTailX[i+1] snakeTailY[i] = snakeTailY[i+1] snakeTailX[snakeLeight] = Xhead snakeTailY[snakeLeight] = Yhead fill(random(0,250),random(0,250),random(0,250)) for i in range(snakeLeight): ellipse(snakeTailX[i], snakeTailY[i],field_size,field_size) def foodEat(): global Xhead, Yhead, Xfood, Yfood, foodkey, snakeLeight, score if Xhead == Xfood and Yhead == Yfood: foodkey = True score += 1 snakeTailX.append(Xhead) snakeTailY.append(Yhead) snakeLeight += 1 def food(): global foodkey, Xfood, Yfood fill(255, 0, 0) ellipse(Xfood, Yfood, field_size, field_size) if foodkey: Xfood = int(random(0, width/field_size))*field_size Yfood = int(random(0, height/field_size))*field_size foodkey = False for i in range(snakeLeight): if snakeTailX[i] == Xfood and snakeTailY[i] == Yfood: foodkey = True food() def snakeGO(): global snakeDirection, Xhead, Yhead if snakeDirection == 'R': Xhead += field_size if snakeDirection == 'D': Yhead += field_size if snakeDirection == 'L': Xhead -= field_size if snakeDirection == 'U': Yhead -= field_size def snakeDirection1(): global snakeDirection if keyCode == RIGHT and snakeDirection != 'L': snakeDirection = 'R' if keyCode == LEFT and snakeDirection != 'R': snakeDirection = 'L' if keyCode == UP and snakeDirection != 'D': snakeDirection = 'U' if keyCode == DOWN and snakeDirection != 'U': snakeDirection = 'D' def snakeDead(): global deadKey deadKey = True
field_size = 40 snake_tail_x = [40, 80, 120] snake_tail_y = [0, 0, 0] (xhead, yhead, xfood, yfood) = (120, 0, -40, -40) snake_direction = 'R' foodkey = True snake_leight = 2 dead_key = False score = 0 def setup(): global img smooth() size(1024, 572) img = load_image('gameover.jpg') size(1024, 572) no_stroke() frame_rate(5) smooth(250) def draw(): global Xhead, Yhead, snakeDirection1, Xfood, Yfood, snakeLeight, snakeTailX, snakeTailY, deadKey, img println(snakeTailX) image_mode(CENTER) image(img, width / 2, height / 2) if deadKey == False: background(100) snake_direction1() snake_go() food() food_eat() snake_tail() for i in range(snakeLeight): if snakeTailX[i] == Xhead and snakeTailY[i] == Yhead: snake_dead() if Xhead + field_size / 2 > width or Xhead < 0 or Yhead + field_size / 2 > height or (Yhead < 0): snake_dead() fill(0) text_size(25) text(score, width - 50, 50) fill(250, 75, 50) ellipse(Xhead, Yhead, field_size, field_size) def key_pressed(): global snakeDirection, foodkey, snakeLeight, deadKey, score, Xhead, Yhead, snakeTailX, snakeTailY if deadKey and keyCode == RIGHT: snake_direction = 'R' foodkey = True snake_leight = 2 dead_key = False score = 0 (xhead, yhead) = (120, 0) snake_tail_x = [40, 80, 120] snake_tail_y = [0, 0, 0] def snake_tail(): global foodkey if foodkey == False: for i in range(snakeLeight): snakeTailX[i] = snakeTailX[i + 1] snakeTailY[i] = snakeTailY[i + 1] snakeTailX[snakeLeight] = Xhead snakeTailY[snakeLeight] = Yhead fill(random(0, 250), random(0, 250), random(0, 250)) for i in range(snakeLeight): ellipse(snakeTailX[i], snakeTailY[i], field_size, field_size) def food_eat(): global Xhead, Yhead, Xfood, Yfood, foodkey, snakeLeight, score if Xhead == Xfood and Yhead == Yfood: foodkey = True score += 1 snakeTailX.append(Xhead) snakeTailY.append(Yhead) snake_leight += 1 def food(): global foodkey, Xfood, Yfood fill(255, 0, 0) ellipse(Xfood, Yfood, field_size, field_size) if foodkey: xfood = int(random(0, width / field_size)) * field_size yfood = int(random(0, height / field_size)) * field_size foodkey = False for i in range(snakeLeight): if snakeTailX[i] == Xfood and snakeTailY[i] == Yfood: foodkey = True food() def snake_go(): global snakeDirection, Xhead, Yhead if snakeDirection == 'R': xhead += field_size if snakeDirection == 'D': yhead += field_size if snakeDirection == 'L': xhead -= field_size if snakeDirection == 'U': yhead -= field_size def snake_direction1(): global snakeDirection if keyCode == RIGHT and snakeDirection != 'L': snake_direction = 'R' if keyCode == LEFT and snakeDirection != 'R': snake_direction = 'L' if keyCode == UP and snakeDirection != 'D': snake_direction = 'U' if keyCode == DOWN and snakeDirection != 'U': snake_direction = 'D' def snake_dead(): global deadKey dead_key = True
#function with default parameter def describe_pet(pet_name,animal_type='dog'): """Displays information about a pet.""" print(f"I have a {animal_type}") print(f"My {animal_type}'s name is {pet_name.title()}") #a dog named willie describe_pet('willie') #a hamster named harry describe_pet('harry','hamster') #positional arguments describe_pet(animal_type='hamster',pet_name='harry') #key word arguments describe_pet(pet_name='harry',animal_type='hamster')
def describe_pet(pet_name, animal_type='dog'): """Displays information about a pet.""" print(f'I have a {animal_type}') print(f"My {animal_type}'s name is {pet_name.title()}") describe_pet('willie') describe_pet('harry', 'hamster') describe_pet(animal_type='hamster', pet_name='harry') describe_pet(pet_name='harry', animal_type='hamster')
""" Utility functions for handling price data """ def get_min_prices(assets: list) -> list: min_price = min([asset.get("price") for asset in assets]) return [asset for asset in assets if asset.get("price") == min_price] def get_average_price(assets: list) -> float: num_assets = len(assets) return sum_prices(assets)/num_assets if num_assets else 0 def sum_prices(assets: list) -> float: return sum([asset.get("price") for asset in assets])
""" Utility functions for handling price data """ def get_min_prices(assets: list) -> list: min_price = min([asset.get('price') for asset in assets]) return [asset for asset in assets if asset.get('price') == min_price] def get_average_price(assets: list) -> float: num_assets = len(assets) return sum_prices(assets) / num_assets if num_assets else 0 def sum_prices(assets: list) -> float: return sum([asset.get('price') for asset in assets])
class AncapBotError(Exception): pass class InsufficientFundsError(AncapBotError): pass class NonexistentUserError(AncapBotError): pass
class Ancapboterror(Exception): pass class Insufficientfundserror(AncapBotError): pass class Nonexistentusererror(AncapBotError): pass
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Build Tower #Problem level: 6 kyu def tower_builder(n_floors): return [' '*(n_floors-x)+'*'*(2*x-1)+' '*(n_floors-x) for x in range(1,n_floors+1)]
def tower_builder(n_floors): return [' ' * (n_floors - x) + '*' * (2 * x - 1) + ' ' * (n_floors - x) for x in range(1, n_floors + 1)]
class Solution: def hitBricks(self, grid: List[List[int]], hits: List[List[int]]) -> List[int]: def dfs(y, x): if y < 0 or y > m-1 or x < 0 or x > n-1 or grid[y][x]!=1: return 0 grid[y][x] =2 ret = 1 return ret + sum(dfs(y+shift_y, x+shift_x) for shift_y, shift_x in [[1, 0], [0, 1], [-1, 0], [0, -1]]) def is_connected(y, x): return y==0 or (0<=y<m and 0<=x<n and any([grid[y+shift_y][x+shift_x]== 2 for shift_y, shift_x in [[1, 0], [0, 1], [-1, 0], [0, -1]] if 0<=y+shift_y<m and 0<=x+shift_x<n])) if not grid: return [] m, n = len(grid), len(grid[0]) for (y, x) in hits: grid[y][x] -= 1 for i in range(n): dfs(0, i) res = [0] * len(hits) for idx, (y, x) in enumerate(hits[::-1]): grid[y][x] += 1 current_cnt = 0 if grid[y][x] and is_connected(y, x): current_cnt = dfs(y, x)-1 res[len(hits)-idx-1] = current_cnt return res
class Solution: def hit_bricks(self, grid: List[List[int]], hits: List[List[int]]) -> List[int]: def dfs(y, x): if y < 0 or y > m - 1 or x < 0 or (x > n - 1) or (grid[y][x] != 1): return 0 grid[y][x] = 2 ret = 1 return ret + sum((dfs(y + shift_y, x + shift_x) for (shift_y, shift_x) in [[1, 0], [0, 1], [-1, 0], [0, -1]])) def is_connected(y, x): return y == 0 or (0 <= y < m and 0 <= x < n and any([grid[y + shift_y][x + shift_x] == 2 for (shift_y, shift_x) in [[1, 0], [0, 1], [-1, 0], [0, -1]] if 0 <= y + shift_y < m and 0 <= x + shift_x < n])) if not grid: return [] (m, n) = (len(grid), len(grid[0])) for (y, x) in hits: grid[y][x] -= 1 for i in range(n): dfs(0, i) res = [0] * len(hits) for (idx, (y, x)) in enumerate(hits[::-1]): grid[y][x] += 1 current_cnt = 0 if grid[y][x] and is_connected(y, x): current_cnt = dfs(y, x) - 1 res[len(hits) - idx - 1] = current_cnt return res
class Handler: def __init__(self): self.trace = [] def handle(self, data): self.trace.append(f'HANDLE {data}') return data
class Handler: def __init__(self): self.trace = [] def handle(self, data): self.trace.append(f'HANDLE {data}') return data
description = 'Verify that the user cannot log in if username value is missing' pages = ['login'] def setup(data): pass def test(data): go_to('http://localhost:8000/') send_keys(login.password_input, 'admin') click(login.login_button) capture('Verify the correct error message is shown') verify_text_in_element(login.error_list, 'Username is required') def teardown(data): close()
description = 'Verify that the user cannot log in if username value is missing' pages = ['login'] def setup(data): pass def test(data): go_to('http://localhost:8000/') send_keys(login.password_input, 'admin') click(login.login_button) capture('Verify the correct error message is shown') verify_text_in_element(login.error_list, 'Username is required') def teardown(data): close()
__description__ = 'lamuda common useful tools' __license__ = 'MIT' __uri__ = 'https://github.com/hanadumal/lamud' __version__ = '21.6.28' __author__ = 'hanadumal' __email__ = '[email protected]'
__description__ = 'lamuda common useful tools' __license__ = 'MIT' __uri__ = 'https://github.com/hanadumal/lamud' __version__ = '21.6.28' __author__ = 'hanadumal' __email__ = '[email protected]'
# Just taken from terminal_service.py for Seeker # Will modify based on this as a template #from xmlrpc.client import Fault class TerminalService: """ A service that handles terminal operations. The responsibility of a TerminalService is to provide input and output operations for the terminal. def read_a_character(self, prompt): def _is_alphabetic_letter(self, letter, num = 1): def write_text(self, text): """ def read_a_character(self, prompt): """Gets a text input from the terminal. Directs the user with the given prompt. Args: self (TerminalService): An instance of TerminalService. prompt (string): The prompt to display on the terminal. # mode (default = a): selection for the kind of a imput character Returns: string: The user's input as a text character. """ # result after lowered and checked between a to z. # will add a loop to check # ''' accept only a-z or A to Z convert upper_case to lower_case ''' judge = False while judge != True: input_letter = input(prompt).lower() judge = self._is_alphabetic_letter(input_letter) return input_letter def _is_alphabetic_letter(self, letter, num = 1): """ Check the input - alphabetic or not. Args: letter: A letter to be checked. num (integer): number of input character (default = 1) Returns: True: When the letter is an alphabetic one. """ ''' accept only a-z or A to Z convert upper_case to lower_case ''' is_alphabetic = False if len(letter) == num: if letter.isalpha(): if letter.isascii(): is_alphabetic = True return(is_alphabetic) def write_text(self, text): """ Displays the given text on the terminal. Args: self (TerminalService): An instance of TerminalService. text (string): The text to display. """ print(text)
class Terminalservice: """ A service that handles terminal operations. The responsibility of a TerminalService is to provide input and output operations for the terminal. def read_a_character(self, prompt): def _is_alphabetic_letter(self, letter, num = 1): def write_text(self, text): """ def read_a_character(self, prompt): """Gets a text input from the terminal. Directs the user with the given prompt. Args: self (TerminalService): An instance of TerminalService. prompt (string): The prompt to display on the terminal. # mode (default = a): selection for the kind of a imput character Returns: string: The user's input as a text character. """ '\n accept only a-z or A to Z\n convert upper_case to lower_case\n ' judge = False while judge != True: input_letter = input(prompt).lower() judge = self._is_alphabetic_letter(input_letter) return input_letter def _is_alphabetic_letter(self, letter, num=1): """ Check the input - alphabetic or not. Args: letter: A letter to be checked. num (integer): number of input character (default = 1) Returns: True: When the letter is an alphabetic one. """ '\n accept only a-z or A to Z\n convert upper_case to lower_case\n ' is_alphabetic = False if len(letter) == num: if letter.isalpha(): if letter.isascii(): is_alphabetic = True return is_alphabetic def write_text(self, text): """ Displays the given text on the terminal. Args: self (TerminalService): An instance of TerminalService. text (string): The text to display. """ print(text)
{ "includes": [ "common.gypi", ], "targets": [ { "target_name": "colony", "product_name": "colony", "type": "executable", 'cflags': [ '-Wall', '-Wextra', '-Werror' ], "sources": [ '<(runtime_path)/colony/cli.c', ], 'xcode_settings': { 'OTHER_LDFLAGS': [ '-pagezero_size', '10000', '-image_base', '100000000' ], }, "include_dirs": [ '<(runtime_path)/', '<(runtime_path)/colony/', "<(colony_lua_path)/src", ], "dependencies": [ 'libcolony.gyp:libcolony', 'libtm.gyp:libtm', ], } ] }
{'includes': ['common.gypi'], 'targets': [{'target_name': 'colony', 'product_name': 'colony', 'type': 'executable', 'cflags': ['-Wall', '-Wextra', '-Werror'], 'sources': ['<(runtime_path)/colony/cli.c'], 'xcode_settings': {'OTHER_LDFLAGS': ['-pagezero_size', '10000', '-image_base', '100000000']}, 'include_dirs': ['<(runtime_path)/', '<(runtime_path)/colony/', '<(colony_lua_path)/src'], 'dependencies': ['libcolony.gyp:libcolony', 'libtm.gyp:libtm']}]}
def int_to_bytes(n, num_bytes): return n.to_bytes(num_bytes, 'big') def int_from_bytes(bites): return int.from_bytes(bites, 'big') class fountain_header: length = 6 def __init__(self, encode_id, total_size=None, chunk_id=None): if total_size is None: self.encode_id, self.total_size, self.chunk_id = self.from_encoded(encode_id) else: self.encode_id = encode_id self.total_size = total_size self.chunk_id = chunk_id def __bytes__(self): eid = self.encode_id + ((self.total_size & 0x1000000) >> 17) sz = self.total_size & 0xFFFFFF return int_to_bytes(eid, 1) + int_to_bytes(sz, 3) + int_to_bytes(self.chunk_id, 2) @classmethod def from_encoded(cls, encoded_bytes): encode_id = int_from_bytes(encoded_bytes[0:1]) total_size = int_from_bytes(encoded_bytes[1:4]) chunk_id = int_from_bytes(encoded_bytes[4:6]) total_size = total_size | ((encode_id & 0x80) << 17) encode_id = encode_id & 0x7F return encode_id, total_size, chunk_id
def int_to_bytes(n, num_bytes): return n.to_bytes(num_bytes, 'big') def int_from_bytes(bites): return int.from_bytes(bites, 'big') class Fountain_Header: length = 6 def __init__(self, encode_id, total_size=None, chunk_id=None): if total_size is None: (self.encode_id, self.total_size, self.chunk_id) = self.from_encoded(encode_id) else: self.encode_id = encode_id self.total_size = total_size self.chunk_id = chunk_id def __bytes__(self): eid = self.encode_id + ((self.total_size & 16777216) >> 17) sz = self.total_size & 16777215 return int_to_bytes(eid, 1) + int_to_bytes(sz, 3) + int_to_bytes(self.chunk_id, 2) @classmethod def from_encoded(cls, encoded_bytes): encode_id = int_from_bytes(encoded_bytes[0:1]) total_size = int_from_bytes(encoded_bytes[1:4]) chunk_id = int_from_bytes(encoded_bytes[4:6]) total_size = total_size | (encode_id & 128) << 17 encode_id = encode_id & 127 return (encode_id, total_size, chunk_id)
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ''' def can_paginate(operation_name=None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). """ pass def delete_lexicon(Name=None): """ Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Deletes a specified pronunciation lexicon stored in an AWS Region. Expected Output: :example: response = client.delete_lexicon( Name='string' ) :type Name: string :param Name: [REQUIRED]\nThe name of the lexicon to delete. Must be an existing lexicon in the region.\n :rtype: dict ReturnsResponse Syntax{} Response Structure (dict) -- Exceptions Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Examples Deletes a specified pronunciation lexicon stored in an AWS Region. response = client.delete_lexicon( Name='example', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } :return: {} :returns: Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException """ pass def describe_voices(Engine=None, LanguageCode=None, IncludeAdditionalLanguageCodes=None, NextToken=None): """ Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices . For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices operation you can provide the user with a list of available voices to select from. You can optionally specify a language code to filter the available voices. For example, if you specify en-US , the operation returns a list of all available US English voices. This operation requires permissions to perform the polly:DescribeVoices action. See also: AWS API Documentation Exceptions Examples Returns the list of voices that are available for use when requesting speech synthesis. Displayed languages are those within the specified language code. If no language code is specified, voices for all available languages are displayed. Expected Output: :example: response = client.describe_voices( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', IncludeAdditionalLanguageCodes=True|False, NextToken='string' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) used by Amazon Polly when processing input text for speech synthesis. :type LanguageCode: string :param LanguageCode: The language identification tag (ISO 639 code for the language name-ISO 3166 country code) for filtering the list of voices returned. If you don\'t specify this optional parameter, all available voices are returned. :type IncludeAdditionalLanguageCodes: boolean :param IncludeAdditionalLanguageCodes: Boolean value indicating whether to return any bilingual voices that use the specified language as an additional language. For instance, if you request all languages that use US English (es-US), and there is an Italian voice that speaks both Italian (it-IT) and US English, that voice will be included if you specify yes but not if you specify no . :type NextToken: string :param NextToken: An opaque pagination token returned from the previous DescribeVoices operation. If present, this indicates where to continue the listing. :rtype: dict ReturnsResponse Syntax { 'Voices': [ { 'Gender': 'Female'|'Male', 'Id': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LanguageName': 'string', 'Name': 'string', 'AdditionalLanguageCodes': [ 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', ], 'SupportedEngines': [ 'standard'|'neural', ] }, ], 'NextToken': 'string' } Response Structure (dict) -- Voices (list) -- A list of voices with their properties. (dict) -- Description of the voice. Gender (string) -- Gender of the voice. Id (string) -- Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech operation. LanguageCode (string) -- Language code of the voice. LanguageName (string) -- Human readable name of the language in English. Name (string) -- Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application. AdditionalLanguageCodes (list) -- Additional codes for languages available for the specified voice in addition to its default language. For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code hi-IN . (string) -- SupportedEngines (list) -- Specifies which engines (standard or neural ) that are supported by a given voice. (string) -- NextToken (string) -- The pagination token to use in the next request to continue the listing of voices. NextToken is returned only if the response is truncated. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException Examples Returns the list of voices that are available for use when requesting speech synthesis. Displayed languages are those within the specified language code. If no language code is specified, voices for all available languages are displayed. response = client.describe_voices( LanguageCode='en-GB', ) print(response) Expected Output: { 'Voices': [ { 'Gender': 'Female', 'Id': 'Emma', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Emma', }, { 'Gender': 'Male', 'Id': 'Brian', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Brian', }, { 'Gender': 'Female', 'Id': 'Amy', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Amy', }, ], 'ResponseMetadata': { '...': '...', }, } :return: { 'Voices': [ { 'Gender': 'Female'|'Male', 'Id': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LanguageName': 'string', 'Name': 'string', 'AdditionalLanguageCodes': [ 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', ], 'SupportedEngines': [ 'standard'|'neural', ] }, ], 'NextToken': 'string' } :returns: (string) -- """ pass def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to\nClientMethod. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. """ pass def get_lexicon(Name=None): """ Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Returns the content of the specified pronunciation lexicon stored in an AWS Region. Expected Output: :example: response = client.get_lexicon( Name='string' ) :type Name: string :param Name: [REQUIRED]\nName of the lexicon.\n :rtype: dict ReturnsResponse Syntax{ 'Lexicon': { 'Content': 'string', 'Name': 'string' }, 'LexiconAttributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } } Response Structure (dict) -- Lexicon (dict) --Lexicon object that provides name and the string content of the lexicon. Content (string) --Lexicon content in string format. The content of a lexicon must be in PLS format. Name (string) --Name of the lexicon. LexiconAttributes (dict) --Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes. Alphabet (string) --Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa . LanguageCode (string) --Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on. LastModified (datetime) --Date lexicon was last modified (a timestamp value). LexiconArn (string) --Amazon Resource Name (ARN) of the lexicon. LexemesCount (integer) --Number of lexemes in the lexicon. Size (integer) --Total size of the lexicon, in characters. Exceptions Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Examples Returns the content of the specified pronunciation lexicon stored in an AWS Region. response = client.get_lexicon( Name='', ) print(response) Expected Output: { 'Lexicon': { 'Content': '<?xml version="1.0" encoding="UTF-8"?>\\r\ <lexicon version="1.0" \\r\ xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"\\r\ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \\r\ xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon \\r\ http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"\\r\ alphabet="ipa" \\r\ xml:lang="en-US">\\r\ <lexeme>\\r\ <grapheme>W3C</grapheme>\\r\ <alias>World Wide Web Consortium</alias>\\r\ </lexeme>\\r\ </lexicon>', 'Name': 'example', }, 'LexiconAttributes': { 'Alphabet': 'ipa', 'LanguageCode': 'en-US', 'LastModified': 1478542980.117, 'LexemesCount': 1, 'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example', 'Size': 503, }, 'ResponseMetadata': { '...': '...', }, } :return: { 'Lexicon': { 'Content': 'string', 'Name': 'string' }, 'LexiconAttributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } } """ pass def get_paginator(operation_name=None): """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). :rtype: L{botocore.paginate.Paginator} ReturnsA paginator object. """ pass def get_speech_synthesis_task(TaskId=None): """ Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task. See also: AWS API Documentation Exceptions :example: response = client.get_speech_synthesis_task( TaskId='string' ) :type TaskId: string :param TaskId: [REQUIRED]\nThe Amazon Polly generated identifier for a speech synthesis task.\n :rtype: dict ReturnsResponse Syntax{ 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } Response Structure (dict) -- SynthesisTask (dict) --SynthesisTask object that provides information from the requested task, including output format, creation time, task status, and so on. Engine (string) --Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) --The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) --Current status of the individual speech synthesis task. TaskStatusReason (string) --Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) --Pathway for the output speech file. CreationTime (datetime) --Timestamp for the time the synthesis task was started. RequestCharacters (integer) --Number of billable characters synthesized. SnsTopicArn (string) --ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) --List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) --The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) --The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) --The type of speech marks returned for the input text. (string) -- TextType (string) --Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) --Voice ID to use for the synthesis. LanguageCode (string) --Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.InvalidTaskIdException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.SynthesisTaskNotFoundException :return: { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } :returns: (string) -- """ pass def get_waiter(waiter_name=None): """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. :rtype: botocore.waiter.Waiter """ pass def list_lexicons(NextToken=None): """ Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Returns a list of pronunciation lexicons stored in an AWS Region. Expected Output: :example: response = client.list_lexicons( NextToken='string' ) :type NextToken: string :param NextToken: An opaque pagination token returned from previous ListLexicons operation. If present, indicates where to continue the list of lexicons. :rtype: dict ReturnsResponse Syntax{ 'Lexicons': [ { 'Name': 'string', 'Attributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } }, ], 'NextToken': 'string' } Response Structure (dict) -- Lexicons (list) --A list of lexicon names and attributes. (dict) --Describes the content of the lexicon. Name (string) --Name of the lexicon. Attributes (dict) --Provides lexicon metadata. Alphabet (string) --Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa . LanguageCode (string) --Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on. LastModified (datetime) --Date lexicon was last modified (a timestamp value). LexiconArn (string) --Amazon Resource Name (ARN) of the lexicon. LexemesCount (integer) --Number of lexemes in the lexicon. Size (integer) --Total size of the lexicon, in characters. NextToken (string) --The pagination token to use in the next request to continue the listing of lexicons. NextToken is returned only if the response is truncated. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException Examples Returns a list of pronunciation lexicons stored in an AWS Region. response = client.list_lexicons( ) print(response) Expected Output: { 'Lexicons': [ { 'Attributes': { 'Alphabet': 'ipa', 'LanguageCode': 'en-US', 'LastModified': 1478542980.117, 'LexemesCount': 1, 'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example', 'Size': 503, }, 'Name': 'example', }, ], 'ResponseMetadata': { '...': '...', }, } :return: { 'Lexicons': [ { 'Name': 'string', 'Attributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } }, ], 'NextToken': 'string' } """ pass def list_speech_synthesis_tasks(MaxResults=None, NextToken=None, Status=None): """ Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed. See also: AWS API Documentation Exceptions :example: response = client.list_speech_synthesis_tasks( MaxResults=123, NextToken='string', Status='scheduled'|'inProgress'|'completed'|'failed' ) :type MaxResults: integer :param MaxResults: Maximum number of speech synthesis tasks returned in a List operation. :type NextToken: string :param NextToken: The pagination token to use in the next request to continue the listing of speech synthesis tasks. :type Status: string :param Status: Status of the speech synthesis tasks returned in a List operation :rtype: dict ReturnsResponse Syntax { 'NextToken': 'string', 'SynthesisTasks': [ { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' }, ] } Response Structure (dict) -- NextToken (string) -- An opaque pagination token returned from the previous List operation in this request. If present, this indicates where to continue the listing. SynthesisTasks (list) -- List of SynthesisTask objects that provides information from the specified task in the list request, including output format, creation time, task status, and so on. (dict) -- SynthesisTask object that provides information about a speech synthesis task. Engine (string) -- Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) -- The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) -- Current status of the individual speech synthesis task. TaskStatusReason (string) -- Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) -- Pathway for the output speech file. CreationTime (datetime) -- Timestamp for the time the synthesis task was started. RequestCharacters (integer) -- Number of billable characters synthesized. SnsTopicArn (string) -- ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) -- List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) -- The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) -- The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) -- The type of speech marks returned for the input text. (string) -- TextType (string) -- Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) -- Voice ID to use for the synthesis. LanguageCode (string) -- Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException :return: { 'NextToken': 'string', 'SynthesisTasks': [ { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' }, ] } :returns: (string) -- """ pass def put_lexicon(Name=None, Content=None): """ Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Stores a pronunciation lexicon in an AWS Region. Expected Output: :example: response = client.put_lexicon( Name='string', Content='string' ) :type Name: string :param Name: [REQUIRED]\nName of the lexicon. The name must follow the regular express format [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.\n :type Content: string :param Content: [REQUIRED]\nContent of the PLS lexicon as string data.\n :rtype: dict ReturnsResponse Syntax {} Response Structure (dict) -- Exceptions Polly.Client.exceptions.InvalidLexiconException Polly.Client.exceptions.UnsupportedPlsAlphabetException Polly.Client.exceptions.UnsupportedPlsLanguageException Polly.Client.exceptions.LexiconSizeExceededException Polly.Client.exceptions.MaxLexemeLengthExceededException Polly.Client.exceptions.MaxLexiconsNumberExceededException Polly.Client.exceptions.ServiceFailureException Examples Stores a pronunciation lexicon in an AWS Region. response = client.put_lexicon( Content='file://example.pls', Name='W3C', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } :return: {} :returns: (dict) -- """ pass def start_speech_synthesis_task(Engine=None, LanguageCode=None, LexiconNames=None, OutputFormat=None, OutputS3BucketName=None, OutputS3KeyPrefix=None, SampleRate=None, SnsTopicArn=None, SpeechMarkTypes=None, Text=None, TextType=None, VoiceId=None): """ Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask . This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status. See also: AWS API Documentation Exceptions :example: response = client.start_speech_synthesis_task( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', LexiconNames=[ 'string', ], OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm', OutputS3BucketName='string', OutputS3KeyPrefix='string', SampleRate='string', SnsTopicArn='string', SpeechMarkTypes=[ 'sentence'|'ssml'|'viseme'|'word', ], Text='string', TextType='ssml'|'text', VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. :type LanguageCode: string :param LanguageCode: Optional language code for the Speech Synthesis request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).\nIf a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.\n :type LexiconNames: list :param LexiconNames: List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.\n\n(string) --\n\n :type OutputFormat: string :param OutputFormat: [REQUIRED]\nThe format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.\n :type OutputS3BucketName: string :param OutputS3BucketName: [REQUIRED]\nAmazon S3 bucket name to which the output file will be saved.\n :type OutputS3KeyPrefix: string :param OutputS3KeyPrefix: The Amazon S3 key prefix for the output speech file. :type SampleRate: string :param SampleRate: The audio frequency specified in Hz.\nThe valid values for mp3 and ogg_vorbis are '8000', '16000', '22050', and '24000'. The default value for standard voices is '22050'. The default value for neural voices is '24000'.\nValid values for pcm are '8000' and '16000' The default value is '16000'.\n :type SnsTopicArn: string :param SnsTopicArn: ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. :type SpeechMarkTypes: list :param SpeechMarkTypes: The type of speech marks returned for the input text.\n\n(string) --\n\n :type Text: string :param Text: [REQUIRED]\nThe input text to synthesize. If you specify ssml as the TextType, follow the SSML format for the input text.\n :type TextType: string :param TextType: Specifies whether the input text is plain text or SSML. The default value is plain text. :type VoiceId: string :param VoiceId: [REQUIRED]\nVoice ID to use for the synthesis.\n :rtype: dict ReturnsResponse Syntax { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } Response Structure (dict) -- SynthesisTask (dict) -- SynthesisTask object that provides information and attributes about a newly submitted speech synthesis task. Engine (string) -- Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) -- The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) -- Current status of the individual speech synthesis task. TaskStatusReason (string) -- Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) -- Pathway for the output speech file. CreationTime (datetime) -- Timestamp for the time the synthesis task was started. RequestCharacters (integer) -- Number of billable characters synthesized. SnsTopicArn (string) -- ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) -- List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) -- The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) -- The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) -- The type of speech marks returned for the input text. (string) -- TextType (string) -- Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) -- Voice ID to use for the synthesis. LanguageCode (string) -- Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.TextLengthExceededException Polly.Client.exceptions.InvalidS3BucketException Polly.Client.exceptions.InvalidS3KeyException Polly.Client.exceptions.InvalidSampleRateException Polly.Client.exceptions.InvalidSnsTopicArnException Polly.Client.exceptions.InvalidSsmlException Polly.Client.exceptions.EngineNotSupportedException Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.MarksNotSupportedForFormatException Polly.Client.exceptions.SsmlMarksNotSupportedForTextTypeException Polly.Client.exceptions.LanguageNotSupportedException :return: { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } :returns: (string) -- """ pass def synthesize_speech(Engine=None, LanguageCode=None, LexiconNames=None, OutputFormat=None, SampleRate=None, SpeechMarkTypes=None, Text=None, TextType=None, VoiceId=None): """ Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works . See also: AWS API Documentation Exceptions Examples Synthesizes plain text or SSML into a file of human-like speech. Expected Output: :example: response = client.synthesize_speech( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', LexiconNames=[ 'string', ], OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm', SampleRate='string', SpeechMarkTypes=[ 'sentence'|'ssml'|'viseme'|'word', ], Text='string', TextType='ssml'|'text', VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. :type LanguageCode: string :param LanguageCode: Optional language code for the Synthesize Speech request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).\nIf a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.\n :type LexiconNames: list :param LexiconNames: List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. For information about storing lexicons, see PutLexicon .\n\n(string) --\n\n :type OutputFormat: string :param OutputFormat: [REQUIRED]\nThe format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.\nWhen pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.\n :type SampleRate: string :param SampleRate: The audio frequency specified in Hz.\nThe valid values for mp3 and ogg_vorbis are '8000', '16000', '22050', and '24000'. The default value for standard voices is '22050'. The default value for neural voices is '24000'.\nValid values for pcm are '8000' and '16000' The default value is '16000'.\n :type SpeechMarkTypes: list :param SpeechMarkTypes: The type of speech marks returned for the input text.\n\n(string) --\n\n :type Text: string :param Text: [REQUIRED]\nInput text to synthesize. If you specify ssml as the TextType , follow the SSML format for the input text.\n :type TextType: string :param TextType: Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see Using SSML . :type VoiceId: string :param VoiceId: [REQUIRED]\nVoice ID to use for the synthesis. You can get a list of available voice IDs by calling the DescribeVoices operation.\n :rtype: dict ReturnsResponse Syntax { 'AudioStream': StreamingBody(), 'ContentType': 'string', 'RequestCharacters': 123 } Response Structure (dict) -- AudioStream (StreamingBody) -- Stream containing the synthesized speech. ContentType (string) -- Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. If you request mp3 as the OutputFormat , the ContentType returned is audio/mpeg. If you request ogg_vorbis as the OutputFormat , the ContentType returned is audio/ogg. If you request pcm as the OutputFormat , the ContentType returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. If you request json as the OutputFormat , the ContentType returned is audio/json. RequestCharacters (integer) -- Number of characters synthesized. Exceptions Polly.Client.exceptions.TextLengthExceededException Polly.Client.exceptions.InvalidSampleRateException Polly.Client.exceptions.InvalidSsmlException Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.MarksNotSupportedForFormatException Polly.Client.exceptions.SsmlMarksNotSupportedForTextTypeException Polly.Client.exceptions.LanguageNotSupportedException Polly.Client.exceptions.EngineNotSupportedException Examples Synthesizes plain text or SSML into a file of human-like speech. response = client.synthesize_speech( LexiconNames=[ 'example', ], OutputFormat='mp3', SampleRate='8000', Text='All Gaul is divided into three parts', TextType='text', VoiceId='Joanna', ) print(response) Expected Output: { 'AudioStream': 'TEXT', 'ContentType': 'audio/mpeg', 'RequestCharacters': 37, 'ResponseMetadata': { '...': '...', }, } :return: { 'AudioStream': StreamingBody(), 'ContentType': 'string', 'RequestCharacters': 123 } :returns: If you request mp3 as the OutputFormat , the ContentType returned is audio/mpeg. If you request ogg_vorbis as the OutputFormat , the ContentType returned is audio/ogg. If you request pcm as the OutputFormat , the ContentType returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. If you request json as the OutputFormat , the ContentType returned is audio/json. """ pass
""" The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ def can_paginate(operation_name=None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator('create_foo'). """ pass def delete_lexicon(Name=None): """ Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Deletes a specified pronunciation lexicon stored in an AWS Region. Expected Output: :example: response = client.delete_lexicon( Name='string' ) :type Name: string :param Name: [REQUIRED] The name of the lexicon to delete. Must be an existing lexicon in the region. :rtype: dict ReturnsResponse Syntax{} Response Structure (dict) -- Exceptions Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Examples Deletes a specified pronunciation lexicon stored in an AWS Region. response = client.delete_lexicon( Name='example', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } :return: {} :returns: Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException """ pass def describe_voices(Engine=None, LanguageCode=None, IncludeAdditionalLanguageCodes=None, NextToken=None): """ Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices . For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices operation you can provide the user with a list of available voices to select from. You can optionally specify a language code to filter the available voices. For example, if you specify en-US , the operation returns a list of all available US English voices. This operation requires permissions to perform the polly:DescribeVoices action. See also: AWS API Documentation Exceptions Examples Returns the list of voices that are available for use when requesting speech synthesis. Displayed languages are those within the specified language code. If no language code is specified, voices for all available languages are displayed. Expected Output: :example: response = client.describe_voices( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', IncludeAdditionalLanguageCodes=True|False, NextToken='string' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) used by Amazon Polly when processing input text for speech synthesis. :type LanguageCode: string :param LanguageCode: The language identification tag (ISO 639 code for the language name-ISO 3166 country code) for filtering the list of voices returned. If you don't specify this optional parameter, all available voices are returned. :type IncludeAdditionalLanguageCodes: boolean :param IncludeAdditionalLanguageCodes: Boolean value indicating whether to return any bilingual voices that use the specified language as an additional language. For instance, if you request all languages that use US English (es-US), and there is an Italian voice that speaks both Italian (it-IT) and US English, that voice will be included if you specify yes but not if you specify no . :type NextToken: string :param NextToken: An opaque pagination token returned from the previous DescribeVoices operation. If present, this indicates where to continue the listing. :rtype: dict ReturnsResponse Syntax { 'Voices': [ { 'Gender': 'Female'|'Male', 'Id': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LanguageName': 'string', 'Name': 'string', 'AdditionalLanguageCodes': [ 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', ], 'SupportedEngines': [ 'standard'|'neural', ] }, ], 'NextToken': 'string' } Response Structure (dict) -- Voices (list) -- A list of voices with their properties. (dict) -- Description of the voice. Gender (string) -- Gender of the voice. Id (string) -- Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech operation. LanguageCode (string) -- Language code of the voice. LanguageName (string) -- Human readable name of the language in English. Name (string) -- Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application. AdditionalLanguageCodes (list) -- Additional codes for languages available for the specified voice in addition to its default language. For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code hi-IN . (string) -- SupportedEngines (list) -- Specifies which engines (standard or neural ) that are supported by a given voice. (string) -- NextToken (string) -- The pagination token to use in the next request to continue the listing of voices. NextToken is returned only if the response is truncated. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException Examples Returns the list of voices that are available for use when requesting speech synthesis. Displayed languages are those within the specified language code. If no language code is specified, voices for all available languages are displayed. response = client.describe_voices( LanguageCode='en-GB', ) print(response) Expected Output: { 'Voices': [ { 'Gender': 'Female', 'Id': 'Emma', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Emma', }, { 'Gender': 'Male', 'Id': 'Brian', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Brian', }, { 'Gender': 'Female', 'Id': 'Amy', 'LanguageCode': 'en-GB', 'LanguageName': 'British English', 'Name': 'Amy', }, ], 'ResponseMetadata': { '...': '...', }, } :return: { 'Voices': [ { 'Gender': 'Female'|'Male', 'Id': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LanguageName': 'string', 'Name': 'string', 'AdditionalLanguageCodes': [ 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', ], 'SupportedEngines': [ 'standard'|'neural', ] }, ], 'NextToken': 'string' } :returns: (string) -- """ pass def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to ClientMethod. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By default, the http method is whatever is used in the method's model. """ pass def get_lexicon(Name=None): """ Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Returns the content of the specified pronunciation lexicon stored in an AWS Region. Expected Output: :example: response = client.get_lexicon( Name='string' ) :type Name: string :param Name: [REQUIRED] Name of the lexicon. :rtype: dict ReturnsResponse Syntax{ 'Lexicon': { 'Content': 'string', 'Name': 'string' }, 'LexiconAttributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } } Response Structure (dict) -- Lexicon (dict) --Lexicon object that provides name and the string content of the lexicon. Content (string) --Lexicon content in string format. The content of a lexicon must be in PLS format. Name (string) --Name of the lexicon. LexiconAttributes (dict) --Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes. Alphabet (string) --Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa . LanguageCode (string) --Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on. LastModified (datetime) --Date lexicon was last modified (a timestamp value). LexiconArn (string) --Amazon Resource Name (ARN) of the lexicon. LexemesCount (integer) --Number of lexemes in the lexicon. Size (integer) --Total size of the lexicon, in characters. Exceptions Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Examples Returns the content of the specified pronunciation lexicon stored in an AWS Region. response = client.get_lexicon( Name='', ) print(response) Expected Output: { 'Lexicon': { 'Content': '<?xml version="1.0" encoding="UTF-8"?>\\r<lexicon version="1.0" \\r xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"\\r xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \\r xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon \\r http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"\\r alphabet="ipa" \\r xml:lang="en-US">\\r <lexeme>\\r <grapheme>W3C</grapheme>\\r <alias>World Wide Web Consortium</alias>\\r </lexeme>\\r</lexicon>', 'Name': 'example', }, 'LexiconAttributes': { 'Alphabet': 'ipa', 'LanguageCode': 'en-US', 'LastModified': 1478542980.117, 'LexemesCount': 1, 'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example', 'Size': 503, }, 'ResponseMetadata': { '...': '...', }, } :return: { 'Lexicon': { 'Content': 'string', 'Name': 'string' }, 'LexiconAttributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } } """ pass def get_paginator(operation_name=None): """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator('create_foo'). :rtype: L{botocore.paginate.Paginator} ReturnsA paginator object. """ pass def get_speech_synthesis_task(TaskId=None): """ Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task. See also: AWS API Documentation Exceptions :example: response = client.get_speech_synthesis_task( TaskId='string' ) :type TaskId: string :param TaskId: [REQUIRED] The Amazon Polly generated identifier for a speech synthesis task. :rtype: dict ReturnsResponse Syntax{ 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } Response Structure (dict) -- SynthesisTask (dict) --SynthesisTask object that provides information from the requested task, including output format, creation time, task status, and so on. Engine (string) --Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) --The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) --Current status of the individual speech synthesis task. TaskStatusReason (string) --Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) --Pathway for the output speech file. CreationTime (datetime) --Timestamp for the time the synthesis task was started. RequestCharacters (integer) --Number of billable characters synthesized. SnsTopicArn (string) --ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) --List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) --The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) --The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) --The type of speech marks returned for the input text. (string) -- TextType (string) --Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) --Voice ID to use for the synthesis. LanguageCode (string) --Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.InvalidTaskIdException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.SynthesisTaskNotFoundException :return: { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } :returns: (string) -- """ pass def get_waiter(waiter_name=None): """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. :rtype: botocore.waiter.Waiter """ pass def list_lexicons(NextToken=None): """ Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Returns a list of pronunciation lexicons stored in an AWS Region. Expected Output: :example: response = client.list_lexicons( NextToken='string' ) :type NextToken: string :param NextToken: An opaque pagination token returned from previous ListLexicons operation. If present, indicates where to continue the list of lexicons. :rtype: dict ReturnsResponse Syntax{ 'Lexicons': [ { 'Name': 'string', 'Attributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } }, ], 'NextToken': 'string' } Response Structure (dict) -- Lexicons (list) --A list of lexicon names and attributes. (dict) --Describes the content of the lexicon. Name (string) --Name of the lexicon. Attributes (dict) --Provides lexicon metadata. Alphabet (string) --Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa . LanguageCode (string) --Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on. LastModified (datetime) --Date lexicon was last modified (a timestamp value). LexiconArn (string) --Amazon Resource Name (ARN) of the lexicon. LexemesCount (integer) --Number of lexemes in the lexicon. Size (integer) --Total size of the lexicon, in characters. NextToken (string) --The pagination token to use in the next request to continue the listing of lexicons. NextToken is returned only if the response is truncated. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException Examples Returns a list of pronunciation lexicons stored in an AWS Region. response = client.list_lexicons( ) print(response) Expected Output: { 'Lexicons': [ { 'Attributes': { 'Alphabet': 'ipa', 'LanguageCode': 'en-US', 'LastModified': 1478542980.117, 'LexemesCount': 1, 'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example', 'Size': 503, }, 'Name': 'example', }, ], 'ResponseMetadata': { '...': '...', }, } :return: { 'Lexicons': [ { 'Name': 'string', 'Attributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } }, ], 'NextToken': 'string' } """ pass def list_speech_synthesis_tasks(MaxResults=None, NextToken=None, Status=None): """ Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed. See also: AWS API Documentation Exceptions :example: response = client.list_speech_synthesis_tasks( MaxResults=123, NextToken='string', Status='scheduled'|'inProgress'|'completed'|'failed' ) :type MaxResults: integer :param MaxResults: Maximum number of speech synthesis tasks returned in a List operation. :type NextToken: string :param NextToken: The pagination token to use in the next request to continue the listing of speech synthesis tasks. :type Status: string :param Status: Status of the speech synthesis tasks returned in a List operation :rtype: dict ReturnsResponse Syntax { 'NextToken': 'string', 'SynthesisTasks': [ { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' }, ] } Response Structure (dict) -- NextToken (string) -- An opaque pagination token returned from the previous List operation in this request. If present, this indicates where to continue the listing. SynthesisTasks (list) -- List of SynthesisTask objects that provides information from the specified task in the list request, including output format, creation time, task status, and so on. (dict) -- SynthesisTask object that provides information about a speech synthesis task. Engine (string) -- Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) -- The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) -- Current status of the individual speech synthesis task. TaskStatusReason (string) -- Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) -- Pathway for the output speech file. CreationTime (datetime) -- Timestamp for the time the synthesis task was started. RequestCharacters (integer) -- Number of billable characters synthesized. SnsTopicArn (string) -- ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) -- List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) -- The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) -- The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) -- The type of speech marks returned for the input text. (string) -- TextType (string) -- Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) -- Voice ID to use for the synthesis. LanguageCode (string) -- Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.InvalidNextTokenException Polly.Client.exceptions.ServiceFailureException :return: { 'NextToken': 'string', 'SynthesisTasks': [ { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' }, ] } :returns: (string) -- """ pass def put_lexicon(Name=None, Content=None): """ Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation. For more information, see Managing Lexicons . See also: AWS API Documentation Exceptions Examples Stores a pronunciation lexicon in an AWS Region. Expected Output: :example: response = client.put_lexicon( Name='string', Content='string' ) :type Name: string :param Name: [REQUIRED] Name of the lexicon. The name must follow the regular express format [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long. :type Content: string :param Content: [REQUIRED] Content of the PLS lexicon as string data. :rtype: dict ReturnsResponse Syntax {} Response Structure (dict) -- Exceptions Polly.Client.exceptions.InvalidLexiconException Polly.Client.exceptions.UnsupportedPlsAlphabetException Polly.Client.exceptions.UnsupportedPlsLanguageException Polly.Client.exceptions.LexiconSizeExceededException Polly.Client.exceptions.MaxLexemeLengthExceededException Polly.Client.exceptions.MaxLexiconsNumberExceededException Polly.Client.exceptions.ServiceFailureException Examples Stores a pronunciation lexicon in an AWS Region. response = client.put_lexicon( Content='file://example.pls', Name='W3C', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } :return: {} :returns: (dict) -- """ pass def start_speech_synthesis_task(Engine=None, LanguageCode=None, LexiconNames=None, OutputFormat=None, OutputS3BucketName=None, OutputS3KeyPrefix=None, SampleRate=None, SnsTopicArn=None, SpeechMarkTypes=None, Text=None, TextType=None, VoiceId=None): """ Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask . This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status. See also: AWS API Documentation Exceptions :example: response = client.start_speech_synthesis_task( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', LexiconNames=[ 'string', ], OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm', OutputS3BucketName='string', OutputS3KeyPrefix='string', SampleRate='string', SnsTopicArn='string', SpeechMarkTypes=[ 'sentence'|'ssml'|'viseme'|'word', ], Text='string', TextType='ssml'|'text', VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. :type LanguageCode: string :param LanguageCode: Optional language code for the Speech Synthesis request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. :type LexiconNames: list :param LexiconNames: List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- :type OutputFormat: string :param OutputFormat: [REQUIRED] The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. :type OutputS3BucketName: string :param OutputS3BucketName: [REQUIRED] Amazon S3 bucket name to which the output file will be saved. :type OutputS3KeyPrefix: string :param OutputS3KeyPrefix: The Amazon S3 key prefix for the output speech file. :type SampleRate: string :param SampleRate: The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are '8000', '16000', '22050', and '24000'. The default value for standard voices is '22050'. The default value for neural voices is '24000'. Valid values for pcm are '8000' and '16000' The default value is '16000'. :type SnsTopicArn: string :param SnsTopicArn: ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. :type SpeechMarkTypes: list :param SpeechMarkTypes: The type of speech marks returned for the input text. (string) -- :type Text: string :param Text: [REQUIRED] The input text to synthesize. If you specify ssml as the TextType, follow the SSML format for the input text. :type TextType: string :param TextType: Specifies whether the input text is plain text or SSML. The default value is plain text. :type VoiceId: string :param VoiceId: [REQUIRED] Voice ID to use for the synthesis. :rtype: dict ReturnsResponse Syntax { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } Response Structure (dict) -- SynthesisTask (dict) -- SynthesisTask object that provides information and attributes about a newly submitted speech synthesis task. Engine (string) -- Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. TaskId (string) -- The Amazon Polly generated identifier for a speech synthesis task. TaskStatus (string) -- Current status of the individual speech synthesis task. TaskStatusReason (string) -- Reason for the current status of a specific speech synthesis task, including errors if the task has failed. OutputUri (string) -- Pathway for the output speech file. CreationTime (datetime) -- Timestamp for the time the synthesis task was started. RequestCharacters (integer) -- Number of billable characters synthesized. SnsTopicArn (string) -- ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. LexiconNames (list) -- List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. (string) -- OutputFormat (string) -- The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. SampleRate (string) -- The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". Valid values for pcm are "8000" and "16000" The default value is "16000". SpeechMarkTypes (list) -- The type of speech marks returned for the input text. (string) -- TextType (string) -- Specifies whether the input text is plain text or SSML. The default value is plain text. VoiceId (string) -- Voice ID to use for the synthesis. LanguageCode (string) -- Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. Exceptions Polly.Client.exceptions.TextLengthExceededException Polly.Client.exceptions.InvalidS3BucketException Polly.Client.exceptions.InvalidS3KeyException Polly.Client.exceptions.InvalidSampleRateException Polly.Client.exceptions.InvalidSnsTopicArnException Polly.Client.exceptions.InvalidSsmlException Polly.Client.exceptions.EngineNotSupportedException Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.MarksNotSupportedForFormatException Polly.Client.exceptions.SsmlMarksNotSupportedForTextTypeException Polly.Client.exceptions.LanguageNotSupportedException :return: { 'SynthesisTask': { 'Engine': 'standard'|'neural', 'TaskId': 'string', 'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed', 'TaskStatusReason': 'string', 'OutputUri': 'string', 'CreationTime': datetime(2015, 1, 1), 'RequestCharacters': 123, 'SnsTopicArn': 'string', 'LexiconNames': [ 'string', ], 'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm', 'SampleRate': 'string', 'SpeechMarkTypes': [ 'sentence'|'ssml'|'viseme'|'word', ], 'TextType': 'ssml'|'text', 'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR' } } :returns: (string) -- """ pass def synthesize_speech(Engine=None, LanguageCode=None, LexiconNames=None, OutputFormat=None, SampleRate=None, SpeechMarkTypes=None, Text=None, TextType=None, VoiceId=None): """ Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works . See also: AWS API Documentation Exceptions Examples Synthesizes plain text or SSML into a file of human-like speech. Expected Output: :example: response = client.synthesize_speech( Engine='standard'|'neural', LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR', LexiconNames=[ 'string', ], OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm', SampleRate='string', SpeechMarkTypes=[ 'sentence'|'ssml'|'viseme'|'word', ], Text='string', TextType='ssml'|'text', VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu' ) :type Engine: string :param Engine: Specifies the engine (standard or neural ) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error. :type LanguageCode: string :param LanguageCode: Optional language code for the Synthesize Speech request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN). If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi. :type LexiconNames: list :param LexiconNames: List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. For information about storing lexicons, see PutLexicon . (string) -- :type OutputFormat: string :param OutputFormat: [REQUIRED] The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. :type SampleRate: string :param SampleRate: The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are '8000', '16000', '22050', and '24000'. The default value for standard voices is '22050'. The default value for neural voices is '24000'. Valid values for pcm are '8000' and '16000' The default value is '16000'. :type SpeechMarkTypes: list :param SpeechMarkTypes: The type of speech marks returned for the input text. (string) -- :type Text: string :param Text: [REQUIRED] Input text to synthesize. If you specify ssml as the TextType , follow the SSML format for the input text. :type TextType: string :param TextType: Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see Using SSML . :type VoiceId: string :param VoiceId: [REQUIRED] Voice ID to use for the synthesis. You can get a list of available voice IDs by calling the DescribeVoices operation. :rtype: dict ReturnsResponse Syntax { 'AudioStream': StreamingBody(), 'ContentType': 'string', 'RequestCharacters': 123 } Response Structure (dict) -- AudioStream (StreamingBody) -- Stream containing the synthesized speech. ContentType (string) -- Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. If you request mp3 as the OutputFormat , the ContentType returned is audio/mpeg. If you request ogg_vorbis as the OutputFormat , the ContentType returned is audio/ogg. If you request pcm as the OutputFormat , the ContentType returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. If you request json as the OutputFormat , the ContentType returned is audio/json. RequestCharacters (integer) -- Number of characters synthesized. Exceptions Polly.Client.exceptions.TextLengthExceededException Polly.Client.exceptions.InvalidSampleRateException Polly.Client.exceptions.InvalidSsmlException Polly.Client.exceptions.LexiconNotFoundException Polly.Client.exceptions.ServiceFailureException Polly.Client.exceptions.MarksNotSupportedForFormatException Polly.Client.exceptions.SsmlMarksNotSupportedForTextTypeException Polly.Client.exceptions.LanguageNotSupportedException Polly.Client.exceptions.EngineNotSupportedException Examples Synthesizes plain text or SSML into a file of human-like speech. response = client.synthesize_speech( LexiconNames=[ 'example', ], OutputFormat='mp3', SampleRate='8000', Text='All Gaul is divided into three parts', TextType='text', VoiceId='Joanna', ) print(response) Expected Output: { 'AudioStream': 'TEXT', 'ContentType': 'audio/mpeg', 'RequestCharacters': 37, 'ResponseMetadata': { '...': '...', }, } :return: { 'AudioStream': StreamingBody(), 'ContentType': 'string', 'RequestCharacters': 123 } :returns: If you request mp3 as the OutputFormat , the ContentType returned is audio/mpeg. If you request ogg_vorbis as the OutputFormat , the ContentType returned is audio/ogg. If you request pcm as the OutputFormat , the ContentType returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. If you request json as the OutputFormat , the ContentType returned is audio/json. """ pass
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") def _maybe(repo_rule, name, **kwargs): if name not in native.existing_rules(): repo_rule(name = name, **kwargs) def load_bark(): _maybe( native.local_repository, name = "bark_project", path="/home/chenyang/bark", ) #_maybe( #git_repository, #name = "bark_project", #branch= "master", #remote = "https://github.com/ChenyangTang/bark", #)
load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository') def _maybe(repo_rule, name, **kwargs): if name not in native.existing_rules(): repo_rule(name=name, **kwargs) def load_bark(): _maybe(native.local_repository, name='bark_project', path='/home/chenyang/bark')
#then look for the enumerated Intel Movidius NCS Device();quite program if none found. devices = mvnc.EnumerateDevice(); if len(devices) == 0: print("No any Devices found"); quit; #Now get a handle to the first enumerated device and open it. device = mvnc.Device(devices[0]); device.OpenDevice();
devices = mvnc.EnumerateDevice() if len(devices) == 0: print('No any Devices found') quit device = mvnc.Device(devices[0]) device.OpenDevice()
def mirror(text): words = text.split(" ") nwords = [] for w in words: nw = w[::-1] nwords.append(nw) return " ".join(nwords) print(mirror("s'tI suoregnad ot eb thgir nehw eht tnemnrevog si .gnorw"))
def mirror(text): words = text.split(' ') nwords = [] for w in words: nw = w[::-1] nwords.append(nw) return ' '.join(nwords) print(mirror("s'tI suoregnad ot eb thgir nehw eht tnemnrevog si .gnorw"))
UNK_TOKEN = '<unk>' PAD_TOKEN = '<pad>' BOS_TOKEN = '<s>' EOS_TOKEN = '<\s>' PAD, UNK, BOS, EOS = [0, 1, 2, 3] LANGUAGE_TOKENS = {lang: '<%s>' % lang for lang in sorted(['en', 'de', 'fr', 'he'])}
unk_token = '<unk>' pad_token = '<pad>' bos_token = '<s>' eos_token = '<\\s>' (pad, unk, bos, eos) = [0, 1, 2, 3] language_tokens = {lang: '<%s>' % lang for lang in sorted(['en', 'de', 'fr', 'he'])}
"""This is a test script.""" def hello_world(): """Function that prints Hello World.""" print("Hello World") if __name__ == "__main__": hello_world()
"""This is a test script.""" def hello_world(): """Function that prints Hello World.""" print('Hello World') if __name__ == '__main__': hello_world()
class Argument(object): def __init__(self, name=None, names=(), kind=bool, default=None): if name and names: msg = "Cannot give both 'name' and 'names' arguments! Pick one." raise TypeError(msg) if not (name or names): raise TypeError("An Argument must have at least one name.") self.names = names if names else (name,) self.kind = kind self.raw_value = self._value = None self.default = default def __str__(self): return "Arg: %r (%s)" % (self.names, self.kind) @property def takes_value(self): return self.kind is not bool @property def value(self): return self._value if self._value is not None else self.default @value.setter def value(self, arg): self.raw_value = arg self._value = self.kind(arg)
class Argument(object): def __init__(self, name=None, names=(), kind=bool, default=None): if name and names: msg = "Cannot give both 'name' and 'names' arguments! Pick one." raise type_error(msg) if not (name or names): raise type_error('An Argument must have at least one name.') self.names = names if names else (name,) self.kind = kind self.raw_value = self._value = None self.default = default def __str__(self): return 'Arg: %r (%s)' % (self.names, self.kind) @property def takes_value(self): return self.kind is not bool @property def value(self): return self._value if self._value is not None else self.default @value.setter def value(self, arg): self.raw_value = arg self._value = self.kind(arg)
# The Pipelines section. Pipelines group related components together by piping the output # of one component into the input of another. This is a good place to write your # package / unit tests as well as initialize your flags. Package tests check that the input # received by a component is of the right specification and unit tests check that expected # inputs into a component produce the expected output. flags.set('pf_settings', [100, "PF"]) flags.set('inv_pf_settings', [100, "InvPF"]) flags.set('rr_fifo_settings', [100, "RR_FIFO"]) flags.set('rr_random_settings', [100, "RR_random"]) flags.set('hybrid_inv_pf_fifo_settings', [100, "Hybrid_InvPF_FIFO"]) flags.set('broadcast_settings', [1000, 5]) flags.set('run_interval', [1800]) CreateProportionalFairNetwork = Pipeline([ ("create_network", "fetch_flag_inline('pf_settings')"), ]) CreateInverseProportionalFairNetwork = Pipeline([ ("create_network", "fetch_flag_inline('inv_pf_settings')"), ]) CreateRoundRobinFIFONetwork = Pipeline([ ("create_network", "fetch_flag_inline('rr_fifo_settings')"), ]) CreateRoundRobinRandomNetwork = Pipeline([ ("create_network", "fetch_flag_inline('rr_random_settings')"), ]) CreateInvPFCrossFIFONetwork = Pipeline([ ("create_network", "fetch_flag_inline('hybrid_inv_pf_fifo_settings')"), ]) GenerateNetworkTraffic = Pipeline([ ("broadcast", "fetch_flag_inline('broadcast_settings')"), ]) RunNetworkSimulation = Pipeline([ ("network_simulator", "fetch_flag_inline('run_interval')"), ]) Terminate = Pipeline([ ("Pass", []) ])
flags.set('pf_settings', [100, 'PF']) flags.set('inv_pf_settings', [100, 'InvPF']) flags.set('rr_fifo_settings', [100, 'RR_FIFO']) flags.set('rr_random_settings', [100, 'RR_random']) flags.set('hybrid_inv_pf_fifo_settings', [100, 'Hybrid_InvPF_FIFO']) flags.set('broadcast_settings', [1000, 5]) flags.set('run_interval', [1800]) create_proportional_fair_network = pipeline([('create_network', "fetch_flag_inline('pf_settings')")]) create_inverse_proportional_fair_network = pipeline([('create_network', "fetch_flag_inline('inv_pf_settings')")]) create_round_robin_fifo_network = pipeline([('create_network', "fetch_flag_inline('rr_fifo_settings')")]) create_round_robin_random_network = pipeline([('create_network', "fetch_flag_inline('rr_random_settings')")]) create_inv_pf_cross_fifo_network = pipeline([('create_network', "fetch_flag_inline('hybrid_inv_pf_fifo_settings')")]) generate_network_traffic = pipeline([('broadcast', "fetch_flag_inline('broadcast_settings')")]) run_network_simulation = pipeline([('network_simulator', "fetch_flag_inline('run_interval')")]) terminate = pipeline([('Pass', [])])
#List comprehension """ The concept of list comprehension takes in three parameters - expression - iteration - codition (This usually optional) syntax of list comprehension list_of_numbers_from_1_to_10 = [expression iteration condition] """ #example of list comprehension with without condition list_of_numbers_from_1_to_10 = [number for number in range(11)] #example of list comprehension with without condition list1 = [x/2 for x in range(110)] print(list1) #example of list comprehension with with condition names = ["Rogers", "Edgar", "Joan", "Bam", "Hellen", "Angei"] list_of_names_with_letter_o = [name for name in names if 'o' in name] print(list_of_names_with_letter_o) list_of_names_with_letter_e = [name for name in names if 'e' in name.lower()] print(list_of_names_with_letter_e) list_names_starting_with_letter_h = [name for name in names if name.lower().startswith('h')] print(list_names_starting_with_letter_h)
""" The concept of list comprehension takes in three parameters - expression - iteration - codition (This usually optional) syntax of list comprehension list_of_numbers_from_1_to_10 = [expression iteration condition] """ list_of_numbers_from_1_to_10 = [number for number in range(11)] list1 = [x / 2 for x in range(110)] print(list1) names = ['Rogers', 'Edgar', 'Joan', 'Bam', 'Hellen', 'Angei'] list_of_names_with_letter_o = [name for name in names if 'o' in name] print(list_of_names_with_letter_o) list_of_names_with_letter_e = [name for name in names if 'e' in name.lower()] print(list_of_names_with_letter_e) list_names_starting_with_letter_h = [name for name in names if name.lower().startswith('h')] print(list_names_starting_with_letter_h)
""" append and extend""" first_line = [1,2,3,4,5] first_line.append(6) print(first_line) # first_line.append(7,8,9) #doesn't work first_line.append([7,8,9]) print(first_line) correct_list = [1,2,3,4,5] correct_list.extend([6,7,8,9,10]) print(correct_list) """ insert """ print() correct_list.insert(0, 100) print(correct_list) """ remove """ print() first_line.remove(5) print(first_line) """ clear """ print() first_line.clear() print(first_line) """ pop """ print() print(correct_list) correct_list.pop() print(correct_list) correct_list.pop(2) print(correct_list) """ index """ print() lst = ["A", "B", "C", "D", "E", "B", "F"] print(lst) print(lst.index("E")) print(lst.index("B")) print(lst.index("B", 3, 7)) """ count """ print() print(lst.count("A")) print(lst.count("B")) """ reverse """ print() correct_list = [1,2,3,4,5] print(correct_list) correct_list.reverse() print(correct_list) """ sort """ print() another_list = [23, 11, 456, 2, 1, 52] print(another_list) another_list.sort() print(another_list) """ join """ lst = ["Coding", "is", "fun"] st = " ".join(lst) print(st) """ slicing """ lst = ["A", "B", "C", "D", "E"] print(lst) print(lst[1::2]) print(lst[::2]) print(lst[-2:]) print(lst[::-1]) print(lst[1::-1]) """ swapping values """ names = ["Harry", "Potter"] names[0], names[1] = names[1], names[0] print(names)
""" append and extend""" first_line = [1, 2, 3, 4, 5] first_line.append(6) print(first_line) first_line.append([7, 8, 9]) print(first_line) correct_list = [1, 2, 3, 4, 5] correct_list.extend([6, 7, 8, 9, 10]) print(correct_list) ' insert ' print() correct_list.insert(0, 100) print(correct_list) ' remove ' print() first_line.remove(5) print(first_line) ' clear ' print() first_line.clear() print(first_line) ' pop ' print() print(correct_list) correct_list.pop() print(correct_list) correct_list.pop(2) print(correct_list) ' index ' print() lst = ['A', 'B', 'C', 'D', 'E', 'B', 'F'] print(lst) print(lst.index('E')) print(lst.index('B')) print(lst.index('B', 3, 7)) ' count ' print() print(lst.count('A')) print(lst.count('B')) ' reverse ' print() correct_list = [1, 2, 3, 4, 5] print(correct_list) correct_list.reverse() print(correct_list) ' sort ' print() another_list = [23, 11, 456, 2, 1, 52] print(another_list) another_list.sort() print(another_list) ' join ' lst = ['Coding', 'is', 'fun'] st = ' '.join(lst) print(st) ' slicing ' lst = ['A', 'B', 'C', 'D', 'E'] print(lst) print(lst[1::2]) print(lst[::2]) print(lst[-2:]) print(lst[::-1]) print(lst[1::-1]) ' swapping values ' names = ['Harry', 'Potter'] (names[0], names[1]) = (names[1], names[0]) print(names)
pjesma = '''\ Programiranje je zabava Kada je posao gotov ako zelis da ti posao bude razbirbriga korisit Python! ''' f = open("pjesma.txt", "w") #otvara fajl sa w-pisanje f.write(pjesma) #upisuje tekst u fajl f.close() #zatvara fajl f = open("pjesma.txt") #ako nismo naveli podazumjevno je r-citanje fajla while True: linija = f.readline() if len(linija) == 0: #duzina od 0 znaci da smo dostigli EOF- kraj fajla break print(linija, end = " ") f.close() #zavra fajl
pjesma = 'Programiranje je zabava\nKada je posao gotov\nako zelis da ti posao bude razbirbriga\nkorisit Python!\n' f = open('pjesma.txt', 'w') f.write(pjesma) f.close() f = open('pjesma.txt') while True: linija = f.readline() if len(linija) == 0: break print(linija, end=' ') f.close()
# from __future__ import division class WarheadTypeEnum(object): UNDEFINED = 0 CONE_WARHEAD = 1 ARC_WARHEAD = 2 CARMEN_WARHEAD = 3 class SternTypeEnum(object): UNDEFINED = 0 CONE_STERN = 1 ARC_STERN = 2 class BaseMissile(object): def __init__(self): self.para_dict = {'type_warhead': WarheadTypeEnum.UNDEFINED, # missile body 'length_warhead': float(0), 'diameter_warhead': float(0), 'diameter_column': float(0), 'length_column': float(0), 'type_stern': SternTypeEnum.UNDEFINED, 'length_stern': float(0), 'diameter_tail': float(0), 'diameter_nozzle': float(0), 'num_group_wings': 0, # missile wing 'pos_wings': float(0), 'num_wings_per_group': float(0), 'layout_angle_wings': float(0), 'root_chord': float(0), 'tip_chord': float(0), 'distance_root_chord': float(0), 'distance_tip_chord': float(0), 'thickness_root_chord': float(0), 'thickness_tip_chord': float(0), 'angle_front_edge': float(0), 'angle_rear_edge': float(0), 'height_flight': float(0), # condition of flight 'mach_flight': float(0), 'angle_flight': float(0), 'barycenter_ref': float(0), # reference 'length_ref': float(0), 'area_ref': float(0)} # fsw if __name__ == "__main__": pass
class Warheadtypeenum(object): undefined = 0 cone_warhead = 1 arc_warhead = 2 carmen_warhead = 3 class Sterntypeenum(object): undefined = 0 cone_stern = 1 arc_stern = 2 class Basemissile(object): def __init__(self): self.para_dict = {'type_warhead': WarheadTypeEnum.UNDEFINED, 'length_warhead': float(0), 'diameter_warhead': float(0), 'diameter_column': float(0), 'length_column': float(0), 'type_stern': SternTypeEnum.UNDEFINED, 'length_stern': float(0), 'diameter_tail': float(0), 'diameter_nozzle': float(0), 'num_group_wings': 0, 'pos_wings': float(0), 'num_wings_per_group': float(0), 'layout_angle_wings': float(0), 'root_chord': float(0), 'tip_chord': float(0), 'distance_root_chord': float(0), 'distance_tip_chord': float(0), 'thickness_root_chord': float(0), 'thickness_tip_chord': float(0), 'angle_front_edge': float(0), 'angle_rear_edge': float(0), 'height_flight': float(0), 'mach_flight': float(0), 'angle_flight': float(0), 'barycenter_ref': float(0), 'length_ref': float(0), 'area_ref': float(0)} if __name__ == '__main__': pass
CREATED_AT_KEY = "created_at" TITLE_KEY = "title" DESCRIPTION_KEY = "description" PUBLISHED_AT = "published_at" LIMIT_KEY = "limit" OFFSET_KEY = "offset" # Data query limiters DEFAULT_OFFSET = 0 DEFAULT_PER_PAGE_LIMIT = 20 INDEX_KEY = "video_index" VIDEO_ID_KEY = "video_id" VIDEOS_SEARCH_QUERY_KEY = "video_search_query"
created_at_key = 'created_at' title_key = 'title' description_key = 'description' published_at = 'published_at' limit_key = 'limit' offset_key = 'offset' default_offset = 0 default_per_page_limit = 20 index_key = 'video_index' video_id_key = 'video_id' videos_search_query_key = 'video_search_query'
""" contest 12/21/2019 """ class Solution: def maxFreq(self, s: str, maxLetters: int, minSize: int, maxSize: int) -> int: freq = {} count_dict = {} def count_letters(word): if word in count_dict: return count_dict[word] unq = {} for item in word: if item in unq: continue else: unq[item] = True if len(unq) > maxLetters: count_dict[word] = False return False count_dict[word] = True return True size = minSize for i in range(0, len(s)-size+1): current = s[i:i+size] if count_letters(current): if current in freq: freq[current] += 1 else: freq[current] = 1 if len(freq) == 0: return 0 return freq[max(freq, key=freq.get)] "ffhrimojtdwnwrwsmwxxprahdofmwzzcziskfyxvlteunhyjvmexcbxlrxtcsozrxyaxppdztpzqfcnpiwzhcvyyvpnlwwkhjlctlsbboosvyabdglhzvwdtazcyrumynkhqywrmyljhkxbpnwmfkxnqpchyjckwwpiqjljynsidcccffguyqmvnubgznsjzgkublxwvdjequsguchpzcfncervajafyhyjvoqetaxkybvqgbglmcoxxapmymxmmsqpddpctymxkkztnpiqcgrsybfrqzepnteiuzkvfnnfwsjwrshjclvkvjiwfqbvprbknvxotekxskjofozxiisnomismymubikpagnvgrchynsyjmwadhqzbfssktjmdkbztodwidpwbihfguxzgrjsuksfjuxfqvmqqojoyjznvoktfbwykwhaxorlduchkefnbpgknyoodaizarigbozvsikhxhokfpedydzxlcbasrxnenxrqxgkyfncgnhmbtxnigznqaawmslxehbshmelgfxaayttbsbhvrpsehituihvleityqckpfpmcjffhhgxdprsylnjvrezjdwjrzgqbdwdctfnvibhgcpmudxnoedfgejnbctrcxcvresawrgpvmgptwnwudqfdpqiokqbujzkalfwddfpeptqhewwrlrwdabafodecuxtoxgcsbezhkoceyydjkniryftqdoveipatvfrfkhdztibywbajknxvkrcvfhgbnjxnoefgdwbekrvaalzuwypkhwhmxtnmoggsogczhemzysagznnmjiiwwyekibytqhgwfzmsqlntvakyhaaxiqvlxbhgknvdxjwecccsquqqqmrxsysfyidsbtqytgonmzyjcydyqqqmixrbrllbcbbnwvriqcrznobzippyssjypvjemvadgdcriydntlpyrmxejtdyzhzdljhbyifxewdyokbhcgkhpdjoeqexfxqwvxys" 18 2 22 "fehjblcdljlmckggcigkedfjcejklicihegfhkfbgegjiikcjgfacicaiheibcicmbilbkhhejfdifdehbjelcalcjellkaimhelkjhafcmjhikbgihjlmjclibceecelkaccklbdaifgdflidhidagiahlbjcfbijgeldjgedldbdchkblbdmcdjbjhccikelcmjjbfkhlfekdhbcakgbclgeijbdhmcmemebkgjeeeickifjglmjfjcmjidjgjmijceiikhmmaagebhifhkfhemfeigdlijffcjgmdehjgllkaallheikhghceekhcckfegghdcalalhkhlgikaamladheakecccgafkimibhiafkkkdbflklbhdagdefdgjfihbiakmjbdlhmlhalekjhmjagjahbjflkjiljjbgfhmekifjdejijehfgfjajbbabcgdbhmjmjabfackghfjflcejdcbdfdamcagjbgicbilhdmfclmaemdgkfdgegicikmifbkcckfkkblldhidlmfgckiiceghfcedjbaggmfkkfiacaffkfmliligeadeghklcbhdkgdcgkijklhkbgjicmfiffaaebimmeicaajfikmfbfkemmadgdaiiicjfcfeffmmhhejfgilkalglmfbgckgcdmcbhimfkmhmcccibjcalhfbgmhkckjfmdaamaffheimfihmaifalbamkfeibghkghfbmkghdimmjcmbdbafdfakaideemalgijieifiaakdfbcjggmelclmijhjgjigfhcabgmimcmkbdidhdagbbjeablcdleleijagkaijlgfgiehimklcaidcdeaekeddijlhaijlfclfcflblklgadbdabickelhdlkhefilhcecejkfacfbhcabcjjjhllhelljdmkjgihfebdhbiljijlhclmhgejaecihjfigbdmleebhcaehcgadidbfjjhkkcgddlieidgabhhcghaeehbhghhacgckmkhklchaeeieghjibkmebcifllamgflhikhfkhhmaeekecbcgfblbikgehhdjmedggfdghaafmeghiiiaahgilfibddilfbkdgbjiecibbdekhjbkdhigigffcgmbikhdmbgelgkfidfjkddhfifkdgmihkbdlhlmlkhkbjlhdhgaafkcebcjjaagmkecechalmbheieibihefcllgliamigjgbjcjkgdjeimffhehcjciabgjhgkgmcmemfchiemfldfjimmbeiiiaedkhlkeeijecedclbkhkkekjecfjlilidfigammdgjkgahibdbbkbgjgbabebjcglgfaldgiglilhgfbicchideehgffhfcheamklkkdgfmakhdgmdclejcfgfdlmmbgjamlgchaabelcllalccckajmmkfghaefbebaibdkeegicgmfdgbilhllkfhcgfdeddkfciiibgjhikhaagdkkdmjllalfifjcijhljfebiaflhjdkhmaeejgjkkaelgglefccejidmgkddekjjffcbfjmbmkihmemaibadaihhchdfgiejglmkclcfjgajlgbeillgfbhkgldmfekjbdegjmiddaeaebiaedkdbmciceggbalffddijfccadhhkfgebakkfcmdegdkdbglaeblabjahcjillgmihifbgmiejbefjjecgfkjibejeemcibmcmiifmaiggljgikhiebgijfjafchcjbdmiffjigkmcfhejjagmddjmeckcdhbbdgdcmgfhlcaggjlijjhghihlammgkdekgbkfellfdkcfkigjjecffmgeikafadbfdaadiembbmiadbkbljmkfedllghlhemeaimbamlfcehegbgccfbcjblahdlaakeafmlkjljlkiaglmeideifgdbadjehhmmkfhdkldebegbbiiblkmidlmeejlaemkhfajmidlfcjgiejmmihllbigelbekkfagdcjdbmifdmmchcllmihjlmhblkfcbcjiiaejhgldjmieejhjiadfkfmgamcdlcljbfclkaflhjbeajdkdkjecifikmleblijjedcaccikggjcgidmfjegkbhcacalmbcdgbfjkjajclgdbfcdkemajlajeklieibjhcdheglagfeeagjbacmjdhadgelhemeefikmejlkdcghahfdkhaacghieffcgfgllmdgbkhejkjdcdddhdfdcdidejaekjeclccmedjjmaellmcgfiacbhdfmcdcielcalchbgagelhjjmmkljfagkfjijmddafglimkekjagmhgfiidjefjfmaihhbhhhaafhiekmdkgidjmljfgmgcijbbjmbjiikailalbffjhedbfbbhcbbbicblagibbdamalkiblhblhacdckllbliccmjgedkjbeihhglhbcfaefaimlbjfhmjadlmgdikjjkkghidlfblkdgdbagkldghadhmmckfhkddedlgdfdifghagkdjiklmfbdajfemjcjlamfflgiekmabhcigclbdfefkfmdaffeccgcdflacahhademhjlchabeabbfjfeefhmmbaajmmlmgfhbclkfaihkehjljjhdbkkieikajbbgmfiilkehcliacgggmidlkgjmcjkhjklddijjmjdkejajgllcechmmbfbibdddfgakfmgebkfcbbkjehemckcaefimgfiamhddahklgdhcdgicdmmdfgemlhdcaglcdkeehjkccgcllcldbkggjihdafcfkhkifmkadgkmbgkbgkmilldfhjebdjdfkhmfdhldjmkbcebbbaiemgkihggeebkaibkhajkamfhcbcckgkjbfamlbghhdcehigmehmafalbjedgdgddgjfkfmmeicjlcaajemkjiligbfcbliagicggjclclgidkibkddfgfkclfgdblfebfkcjelghejlejckbgiibedgaebaffcleemmcdgfgjlhdagdmgagiambakabajcjmlifiikckjjfbmafiahmlbhcfegdaekjcgjdbhefkcfdcgkkmlibchbfjbalkbkmgjfbgjlbiffeeabbmgjgbillamjeefklbbibkddcifdakjdlekbkcemkmgdhabdeiccijlicgaecbefmcjeemccegaldfaeafdedbakmiaakjlcbddkkidmkdkdifdgaeflhbkbadgebhhhlaeeajfheamkfkakgmamhaialdmbllbddfidaibffmihfehddlhbemlgdkkikfhkigfkbfjijfiahkfhihkgmblfgidflleameaicgkmimdejkkddddfagfjceffmmkmcffkdfmfjbgjdkbgbelkgjcfhiijlijfeiimcblamiecbmaifejeklfeggfkeiamalhjgklhaellimjelhbgjcghjbfkdjhlmhgkafkkdkkfldbafljgchilbleabgiejfgjhhgcejjjbhkmblkiljbeafhlbdecimdejflhkbkccbkmljldjaihddjmajefjkkdmjkhghdhkhbhmkhjkldlfjjdhdklkheajceelahchhicmkjhekdejdefabaceemjbhimlfjihdmcbhlgihkhgdaibgfbfebadiadkmbjmhgifhefejjgkihkfcbdkjcecjmcifjidfegblklbbabjcfbighkaemgklbidlckebdlgmklifibghalbglmaihkggjcjljgibahghealfhhfiglljdhbffleccdjechchicddkfgimahhmgbjhdlheadfmahelbkhkkgmchljaaekcjhclhghdkebfkcadfajbihemfmjibaidhabdmblakajkddbajemkhebkdkafchalahkijkblmmfakkmdeikhbfhmekakhkmfgjkgljggacmamklbmkdkldmgggajmkaaeimjbffigdjffemcjdfklgbmclkjfhljhfldjkbdfihcjhiaeccafjajldibdlmbkigidecbecbgmlbfcljhieejegclgdeclcfblglgkbmfkhecjgkkkkleeledlmigcijbblhbkeeeifggbkihglgekbjedficgafflgdmhbgajjdajcjalggbciefmbimgabjcbehacagejjbcldalbgfgmiflicdcbabhkmddemieaheldmihcagiledmafagiajgffflfihfghhkkdhlijdgiimbdefehhdkeakddmhedcamjbimigmfajjemlgfdaalelecbifmkjccaefemaijddlmbkmlldhfbklljdedhahajhjmcmaglmbhjagjiifhkdbiehggajddkjchkbeddkahljjgefeffcbdlhkemmecdmbimdmamljhcicfiaambjehjmkjhfajadkeacgcadmcmfkbghbljbfiadkmaacabflejigcialheaibehjblkieaalbclbmhlfekgmggdakhicfaicceggahmidhemaibaiaabfhdjjifbdbkceicgdikhljdhimamghcgjljacdikilhcahedamkgfafhffmlifdeclkekmchmlbigjhijlmfejjjhcdfmjaggfllkdijhadlgfhiiikefglibjclhgedfdmeifeegeelmliefjfjldkdihciclagljcgajdmeijljfdhjkkajfckgaddeaakmjhhahkijhjhfjijamdeakeabfhfifdfkcejjfdgcjjlehkbmmbabiblgjkdhglgjgecfhicildemlaakikfbcdflejfgclmlclbldgldddclhjgdelfjdegbhglmhakdagmgkecdkeihdijijlkckjbammeiafkhmfjieflkcbhiggdjdeaiccaaaaildkmcffkhajefjakgjcglibjcejabfhlddimighmlcggbebbdlhbbjhikagificilmlcbidehkdfeimialijcbfmlgejldbleljgclfhiamhhgcgfjgcjgkmahkchbagfkkakcklefiimhekhckagcmcjadblhljjljdklcgidggmebmfifbfjcgcbhcgehkdikefecmhajjheaecjdiblhhcfcgfgdkjcfgjmhegahfeamclcmjemidkmkjfaecekchmkigdejeeiihlekgiggkcgmblaiblalacddicmehmjhlhmkfleaamamgbdaghdilgcjmfaklbcbldcmikakbmailkkjjlgjiaddfcbcfciladbeedhglebmefjgjfdhebjikbeldkmjldaekgjglbkiagkmlagblideedeehembjdliladifemkgchmlchlbjiaglmbikleclgeefhjlimalibckjgfjfgffhikllghbldhelgjmiifilgkkbdclkggijikbkieldgmggbjcgcfbjaedgclfahajlahllflihbkmakehbgdjbchdajigbdgiefaaadjkkjbjbekdfhaidjfgjgjablkggbagbbhmlkikdhblmfifldbmefjbljgkmdgbbcellefjgmbeladfjbibbjedccaebjakkadcmclihbgcfmjbdldmfcjifcaadibkfkdighjfhgjjaeifdebdkbjhbkibjimmmembkliildfbchbfablcmmjeigemdlkgbgbcfgibekbihkhklhkhkdacjlibkkdlbebbbdkkfdmlbijhammeeeejlfbheicdbcbgeeccfbabjlhadbhbhkmfgfichadjjiakjgagjadkkbggcjkbdciddjmflgedcihmgalkbehccmcagmmifcckcadgclbehhddbcaaiglachgdmhlammfhifahggigbkjblhlbedjldcjkfkglfjkjidciemkjkhkflfldkbhkjgcigdfdlblfkigalkijgmdmiabdiakbcfdldcmkkffihmemakiakfggadcjccckflemckgldjhiblgkhakfccbabfbjidhfmlbkjbedkfmhjjijijfbemffccmccckmhhaadcamfhmikmabkcmklbcikhkhfmdghhihllmekhefbdhgbdhldakljemeggdgabieebcklgkjmcgddhgfmkdbcafgkmhdjfkgdcfalkaadllcmglbkefkllhjghhdfdejbmfkcagaicfmigbdgaldjebejbhmggbkacickeidiimecglbdeeaceedgabballkmjjbjlkjgcjhiibbiflkggcgdemhimegghdjmlcbmhgmhblegehmecflcmmljakfidkmlbhjjdkhmccadkckalkgdiijmbgmceiejkmkabdbmikmlgabheidhbmdkdalhgfigafmccdhkggmbjabkdflckkflacecklaccmlailedldkkbddcjhbhldkimedlhblckbagdbcekmgicjaeemmjiljbiglfggfmgjmabcialkffdamjgfbgmjdfjgafjehdfcgideedgigalffjgcgdkbkfiijiaiglggdbmbflickgamjgghdllfjmhajmgleebdghejihmimlclfidcalfijmlbmejhijfgfjjhechfachlfekgacfmimhbalgcecaijajamchbfaghlljmaihfdajflhmhbgkmjdckdldfgmmcjijebafblikkklbheejfgfhfhmejgfmcakjdfdleejlmaahafgfikhjmlbjbbekbjlkkjflkagmhkfgabcildgfbdckelakmbckeigdddicbkacbfgdejjmegkcflhcajjmhlhkbccfgebhamhgfaggcdjgejcdfcjkcdmbijabjgfbfkgdbagmdflfhfjgaeimajljaamadglkmahjmfbbjhhkmdclcichackjdhmdmegfjdhghmhmkefhklgbjcdbmlblmjmkhcdbdmhhfkhicdlmidbgfcdiakgdmmlldfkafjeaegiifcbkgcbaghbcbcfdmkkalcibdahekgdhkflimafkdekmmdahmhedmakdahjidabhggegfcihkjieeffhefbfjfhemjfbmjfkjidgddimajdimjlljfjahiehafeijhmhilkekdcdiekimaicdfalkgemdjdijfdldajmhgdcmgkcdmmbaiceabkdmejfgdfdcgihibmahmkhmelihggeklgamcecifigekhimdbgkhddlhaeimmgleiikjcjkijfkblgemmefecdahbeckgjjfklmlekkgjlccjfgblkkibljfegbdifcjgdmecglilcmibbdcbficdbheclcejcbagfhgmihamehmligjbmaccimbmejdcabmacfabkkfkacffhhbdechlbgeifjmbkbhdikhahkebafjjkjcejcaciagahjghhjhkeefhjjcfmmahfdkhchhklegjlbbbcdlfcclflgfiibljmbbjhkdjdleegekccaejbhejikkchmmfjejjljiggieabmefajhkgkledgkkejibmbahhehmfdakcfbhemdmemjbgjfgbfgdlflbhkmfackkceeigejdaggfidmfcdaccmmhlmifdddgagmfmejhfbaicccdeijbhefabejkghlmckfdbkjddgdakldccfdgjdghcdhdhjdlkgccehhlbjbkkmeceihgcmiklblkabfmmilicjilgehfhbdihmikgckieggbbbbmmcakkadfbbcffeaijfjmalmlfbdbjdckkfmbefihjiefhfgldmgahmlbgkcdeachjfjccjlcicfleblfdekilcfkgjefflhjckakgkfkdeikhjflddgebmhiiidcdhifhefcdableckklcmiekdgmlcdhjfljlcdbcafekbecaeemgjfcdjhfgeimddmaafihgffmfjmledefikjhefakdiabbkfjkfahhljklagjfbjhjbbcgejbaalhcjdcgfdcbkkjaemmmfgmbdadfmdiaifdmfgfmecdcbkcmbfcgmachffflaicadkjkdekbcidbkcbfdikfdmjlailmgalabejgldcdmfalhakmlgfblikgcaicdmkaiacehchjhkfjflkmfkclibdcljhhgmiecekecdbcemfahfheejmmiljemkdfflfiaijlkilhaeejackljkccllahkfhebmcbimmmbiabaalmdhiebefchkbabgkfmiabdfiaglgbaemmggdebjgbdchakdgekgekflmkllabadegfmegjhkgflelilhghalmmhimelmfcjgiabkbckkkeedbldbdhhmiclfjekmhhhfcfglclgglmifjihfgfgjgalhhbgbahbdfbdmjdlglicjhahljkejkcafdlikahemllljhgkeeiblkhfkjalgflcdlidkdceiefgjlifllchkhdmekimflfakiahbliflilkcmiihhckilkgkhlekfaikkjklbjjfabdfjeiikkibflgaediekjdiaiabileafkehimhbhbmmhcbdgfhiigbdebimecfhllaggdhlmfhijiekaaaffhmimejjcahhckhjmiamgbblkbjdhmmcccidcifmkkjhejicfmegclemfidelicjambgmkjeabffahiemehkglhmfilcbfiglfhfdemebkbmmeeimkadekmelffemllaachaemkikkemehfjkhmdfdkakdgbimedmmckidamlgdfeibkgickhldagfhflmecdmcglifedaeabfckjlkigecfhejlaicfifbffjmejhfbikflickdjadjjfdcglbhljbabefcammkicdlfbiklbjbkjhdcdbfafjleibdhjdcabjlfcddikhjbbchdffjdmdbkmgdafcbjchihjgiiijcgjmjkaahbdhljhfcmljhcaakickjdjifljmhebgkdhlhaadjimhemgbbegcjbgiafbmleklgahdamiegbfkekjkgkejbmlflkkdgkieecgkjhafblgkhhbkdbbfgkggccbgdchflkkcbakhcdkdbiailcighigcdedjekhmhihblgiiciffikaahghababklkegihiflmdahhgjmgbdjgclmjdlgcgeghffmdcahkilbajkggdbdijccmjbbdkhjmefeehfcadgeemghibiiimabmimhhdfffdejjibekdlkjghkhhhaaeemheedhkigcljkfjjmikaaaegjdkiefibcabelijmkgkkchjkaadfhjhackmbjelieefmljfbhkimkifigicmcfiidfcebmeadcagdikcmjcgkcfihdgmkeeigibjidghjmcaeccihdhljcmbdbellbdhfakhmdkjgbcgdkcaefdfkmamfjgkhkdemlmijjfichfkdhejchmmbggedmhifklkckaiciicibcemfhbjbcleljbcdelmbkheafbmddbgdamafgkachfedgahkllkekifldahlmeljkgekljeecmbbidkfhkfkdbkjbljbgbbabmfcbagbebdjiccjgciefkghmclijjhgcjeailbbbbcmjgjcgglggeckdmdmdhhjlgdkijbdefadcklcbjkghahlhafelbbhaeehecbckcdmfkiiadkkcaghbafejclbmbjhddhfibafligideflgdjfleehllfdbacibdbhejbcjldiemhccimgidkmfmgmdihgeelbalfmgghkaecfeijfblghabbkejbmackmkjffbdimccakldblefljbbddbaedjbibhafdjmlflfbgefjcghlgmalbjjbgbgdmbhghajblalbaacdiibhcblijgjcbjbfmedmiahlibbbdidlcelelklflemiemklfdckillga" 6 5 26 sol = Solution() s = "fehjblcdljlmckggcigkedfjcejklicihegfhkfbgegjiikcjgfacicaiheibcicmbilbkhhejfdifdehbjelcalcjellkaimhelkjhafcmjhikbgihjlmjclibceecelkaccklbdaifgdflidhidagiahlbjcfbijgeldjgedldbdchkblbdmcdjbjhccikelcmjjbfkhlfekdhbcakgbclgeijbdhmcmemebkgjeeeickifjglmjfjcmjidjgjmijceiikhmmaagebhifhkfhemfeigdlijffcjgmdehjgllkaallheikhghceekhcckfegghdcalalhkhlgikaamladheakecccgafkimibhiafkkkdbflklbhdagdefdgjfihbiakmjbdlhmlhalekjhmjagjahbjflkjiljjbgfhmekifjdejijehfgfjajbbabcgdbhmjmjabfackghfjflcejdcbdfdamcagjbgicbilhdmfclmaemdgkfdgegicikmifbkcckfkkblldhidlmfgckiiceghfcedjbaggmfkkfiacaffkfmliligeadeghklcbhdkgdcgkijklhkbgjicmfiffaaebimmeicaajfikmfbfkemmadgdaiiicjfcfeffmmhhejfgilkalglmfbgckgcdmcbhimfkmhmcccibjcalhfbgmhkckjfmdaamaffheimfihmaifalbamkfeibghkghfbmkghdimmjcmbdbafdfakaideemalgijieifiaakdfbcjggmelclmijhjgjigfhcabgmimcmkbdidhdagbbjeablcdleleijagkaijlgfgiehimklcaidcdeaekeddijlhaijlfclfcflblklgadbdabickelhdlkhefilhcecejkfacfbhcabcjjjhllhelljdmkjgihfebdhbiljijlhclmhgejaecihjfigbdmleebhcaehcgadidbfjjhkkcgddlieidgabhhcghaeehbhghhacgckmkhklchaeeieghjibkmebcifllamgflhikhfkhhmaeekecbcgfblbikgehhdjmedggfdghaafmeghiiiaahgilfibddilfbkdgbjiecibbdekhjbkdhigigffcgmbikhdmbgelgkfidfjkddhfifkdgmihkbdlhlmlkhkbjlhdhgaafkcebcjjaagmkecechalmbheieibihefcllgliamigjgbjcjkgdjeimffhehcjciabgjhgkgmcmemfchiemfldfjimmbeiiiaedkhlkeeijecedclbkhkkekjecfjlilidfigammdgjkgahibdbbkbgjgbabebjcglgfaldgiglilhgfbicchideehgffhfcheamklkkdgfmakhdgmdclejcfgfdlmmbgjamlgchaabelcllalccckajmmkfghaefbebaibdkeegicgmfdgbilhllkfhcgfdeddkfciiibgjhikhaagdkkdmjllalfifjcijhljfebiaflhjdkhmaeejgjkkaelgglefccejidmgkddekjjffcbfjmbmkihmemaibadaihhchdfgiejglmkclcfjgajlgbeillgfbhkgldmfekjbdegjmiddaeaebiaedkdbmciceggbalffddijfccadhhkfgebakkfcmdegdkdbglaeblabjahcjillgmihifbgmiejbefjjecgfkjibejeemcibmcmiifmaiggljgikhiebgijfjafchcjbdmiffjigkmcfhejjagmddjmeckcdhbbdgdcmgfhlcaggjlijjhghihlammgkdekgbkfellfdkcfkigjjecffmgeikafadbfdaadiembbmiadbkbljmkfedllghlhemeaimbamlfcehegbgccfbcjblahdlaakeafmlkjljlkiaglmeideifgdbadjehhmmkfhdkldebegbbiiblkmidlmeejlaemkhfajmidlfcjgiejmmihllbigelbekkfagdcjdbmifdmmchcllmihjlmhblkfcbcjiiaejhgldjmieejhjiadfkfmgamcdlcljbfclkaflhjbeajdkdkjecifikmleblijjedcaccikggjcgidmfjegkbhcacalmbcdgbfjkjajclgdbfcdkemajlajeklieibjhcdheglagfeeagjbacmjdhadgelhemeefikmejlkdcghahfdkhaacghieffcgfgllmdgbkhejkjdcdddhdfdcdidejaekjeclccmedjjmaellmcgfiacbhdfmcdcielcalchbgagelhjjmmkljfagkfjijmddafglimkekjagmhgfiidjefjfmaihhbhhhaafhiekmdkgidjmljfgmgcijbbjmbjiikailalbffjhedbfbbhcbbbicblagibbdamalkiblhblhacdckllbliccmjgedkjbeihhglhbcfaefaimlbjfhmjadlmgdikjjkkghidlfblkdgdbagkldghadhmmckfhkddedlgdfdifghagkdjiklmfbdajfemjcjlamfflgiekmabhcigclbdfefkfmdaffeccgcdflacahhademhjlchabeabbfjfeefhmmbaajmmlmgfhbclkfaihkehjljjhdbkkieikajbbgmfiilkehcliacgggmidlkgjmcjkhjklddijjmjdkejajgllcechmmbfbibdddfgakfmgebkfcbbkjehemckcaefimgfiamhddahklgdhcdgicdmmdfgemlhdcaglcdkeehjkccgcllcldbkggjihdafcfkhkifmkadgkmbgkbgkmilldfhjebdjdfkhmfdhldjmkbcebbbaiemgkihggeebkaibkhajkamfhcbcckgkjbfamlbghhdcehigmehmafalbjedgdgddgjfkfmmeicjlcaajemkjiligbfcbliagicggjclclgidkibkddfgfkclfgdblfebfkcjelghejlejckbgiibedgaebaffcleemmcdgfgjlhdagdmgagiambakabajcjmlifiikckjjfbmafiahmlbhcfegdaekjcgjdbhefkcfdcgkkmlibchbfjbalkbkmgjfbgjlbiffeeabbmgjgbillamjeefklbbibkddcifdakjdlekbkcemkmgdhabdeiccijlicgaecbefmcjeemccegaldfaeafdedbakmiaakjlcbddkkidmkdkdifdgaeflhbkbadgebhhhlaeeajfheamkfkakgmamhaialdmbllbddfidaibffmihfehddlhbemlgdkkikfhkigfkbfjijfiahkfhihkgmblfgidflleameaicgkmimdejkkddddfagfjceffmmkmcffkdfmfjbgjdkbgbelkgjcfhiijlijfeiimcblamiecbmaifejeklfeggfkeiamalhjgklhaellimjelhbgjcghjbfkdjhlmhgkafkkdkkfldbafljgchilbleabgiejfgjhhgcejjjbhkmblkiljbeafhlbdecimdejflhkbkccbkmljldjaihddjmajefjkkdmjkhghdhkhbhmkhjkldlfjjdhdklkheajceelahchhicmkjhekdejdefabaceemjbhimlfjihdmcbhlgihkhgdaibgfbfebadiadkmbjmhgifhefejjgkihkfcbdkjcecjmcifjidfegblklbbabjcfbighkaemgklbidlckebdlgmklifibghalbglmaihkggjcjljgibahghealfhhfiglljdhbffleccdjechchicddkfgimahhmgbjhdlheadfmahelbkhkkgmchljaaekcjhclhghdkebfkcadfajbihemfmjibaidhabdmblakajkddbajemkhebkdkafchalahkijkblmmfakkmdeikhbfhmekakhkmfgjkgljggacmamklbmkdkldmgggajmkaaeimjbffigdjffemcjdfklgbmclkjfhljhfldjkbdfihcjhiaeccafjajldibdlmbkigidecbecbgmlbfcljhieejegclgdeclcfblglgkbmfkhecjgkkkkleeledlmigcijbblhbkeeeifggbkihglgekbjedficgafflgdmhbgajjdajcjalggbciefmbimgabjcbehacagejjbcldalbgfgmiflicdcbabhkmddemieaheldmihcagiledmafagiajgffflfihfghhkkdhlijdgiimbdefehhdkeakddmhedcamjbimigmfajjemlgfdaalelecbifmkjccaefemaijddlmbkmlldhfbklljdedhahajhjmcmaglmbhjagjiifhkdbiehggajddkjchkbeddkahljjgefeffcbdlhkemmecdmbimdmamljhcicfiaambjehjmkjhfajadkeacgcadmcmfkbghbljbfiadkmaacabflejigcialheaibehjblkieaalbclbmhlfekgmggdakhicfaicceggahmidhemaibaiaabfhdjjifbdbkceicgdikhljdhimamghcgjljacdikilhcahedamkgfafhffmlifdeclkekmchmlbigjhijlmfejjjhcdfmjaggfllkdijhadlgfhiiikefglibjclhgedfdmeifeegeelmliefjfjldkdihciclagljcgajdmeijljfdhjkkajfckgaddeaakmjhhahkijhjhfjijamdeakeabfhfifdfkcejjfdgcjjlehkbmmbabiblgjkdhglgjgecfhicildemlaakikfbcdflejfgclmlclbldgldddclhjgdelfjdegbhglmhakdagmgkecdkeihdijijlkckjbammeiafkhmfjieflkcbhiggdjdeaiccaaaaildkmcffkhajefjakgjcglibjcejabfhlddimighmlcggbebbdlhbbjhikagificilmlcbidehkdfeimialijcbfmlgejldbleljgclfhiamhhgcgfjgcjgkmahkchbagfkkakcklefiimhekhckagcmcjadblhljjljdklcgidggmebmfifbfjcgcbhcgehkdikefecmhajjheaecjdiblhhcfcgfgdkjcfgjmhegahfeamclcmjemidkmkjfaecekchmkigdejeeiihlekgiggkcgmblaiblalacddicmehmjhlhmkfleaamamgbdaghdilgcjmfaklbcbldcmikakbmailkkjjlgjiaddfcbcfciladbeedhglebmefjgjfdhebjikbeldkmjldaekgjglbkiagkmlagblideedeehembjdliladifemkgchmlchlbjiaglmbikleclgeefhjlimalibckjgfjfgffhikllghbldhelgjmiifilgkkbdclkggijikbkieldgmggbjcgcfbjaedgclfahajlahllflihbkmakehbgdjbchdajigbdgiefaaadjkkjbjbekdfhaidjfgjgjablkggbagbbhmlkikdhblmfifldbmefjbljgkmdgbbcellefjgmbeladfjbibbjedccaebjakkadcmclihbgcfmjbdldmfcjifcaadibkfkdighjfhgjjaeifdebdkbjhbkibjimmmembkliildfbchbfablcmmjeigemdlkgbgbcfgibekbihkhklhkhkdacjlibkkdlbebbbdkkfdmlbijhammeeeejlfbheicdbcbgeeccfbabjlhadbhbhkmfgfichadjjiakjgagjadkkbggcjkbdciddjmflgedcihmgalkbehccmcagmmifcckcadgclbehhddbcaaiglachgdmhlammfhifahggigbkjblhlbedjldcjkfkglfjkjidciemkjkhkflfldkbhkjgcigdfdlblfkigalkijgmdmiabdiakbcfdldcmkkffihmemakiakfggadcjccckflemckgldjhiblgkhakfccbabfbjidhfmlbkjbedkfmhjjijijfbemffccmccckmhhaadcamfhmikmabkcmklbcikhkhfmdghhihllmekhefbdhgbdhldakljemeggdgabieebcklgkjmcgddhgfmkdbcafgkmhdjfkgdcfalkaadllcmglbkefkllhjghhdfdejbmfkcagaicfmigbdgaldjebejbhmggbkacickeidiimecglbdeeaceedgabballkmjjbjlkjgcjhiibbiflkggcgdemhimegghdjmlcbmhgmhblegehmecflcmmljakfidkmlbhjjdkhmccadkckalkgdiijmbgmceiejkmkabdbmikmlgabheidhbmdkdalhgfigafmccdhkggmbjabkdflckkflacecklaccmlailedldkkbddcjhbhldkimedlhblckbagdbcekmgicjaeemmjiljbiglfggfmgjmabcialkffdamjgfbgmjdfjgafjehdfcgideedgigalffjgcgdkbkfiijiaiglggdbmbflickgamjgghdllfjmhajmgleebdghejihmimlclfidcalfijmlbmejhijfgfjjhechfachlfekgacfmimhbalgcecaijajamchbfaghlljmaihfdajflhmhbgkmjdckdldfgmmcjijebafblikkklbheejfgfhfhmejgfmcakjdfdleejlmaahafgfikhjmlbjbbekbjlkkjflkagmhkfgabcildgfbdckelakmbckeigdddicbkacbfgdejjmegkcflhcajjmhlhkbccfgebhamhgfaggcdjgejcdfcjkcdmbijabjgfbfkgdbagmdflfhfjgaeimajljaamadglkmahjmfbbjhhkmdclcichackjdhmdmegfjdhghmhmkefhklgbjcdbmlblmjmkhcdbdmhhfkhicdlmidbgfcdiakgdmmlldfkafjeaegiifcbkgcbaghbcbcfdmkkalcibdahekgdhkflimafkdekmmdahmhedmakdahjidabhggegfcihkjieeffhefbfjfhemjfbmjfkjidgddimajdimjlljfjahiehafeijhmhilkekdcdiekimaicdfalkgemdjdijfdldajmhgdcmgkcdmmbaiceabkdmejfgdfdcgihibmahmkhmelihggeklgamcecifigekhimdbgkhddlhaeimmgleiikjcjkijfkblgemmefecdahbeckgjjfklmlekkgjlccjfgblkkibljfegbdifcjgdmecglilcmibbdcbficdbheclcejcbagfhgmihamehmligjbmaccimbmejdcabmacfabkkfkacffhhbdechlbgeifjmbkbhdikhahkebafjjkjcejcaciagahjghhjhkeefhjjcfmmahfdkhchhklegjlbbbcdlfcclflgfiibljmbbjhkdjdleegekccaejbhejikkchmmfjejjljiggieabmefajhkgkledgkkejibmbahhehmfdakcfbhemdmemjbgjfgbfgdlflbhkmfackkceeigejdaggfidmfcdaccmmhlmifdddgagmfmejhfbaicccdeijbhefabejkghlmckfdbkjddgdakldccfdgjdghcdhdhjdlkgccehhlbjbkkmeceihgcmiklblkabfmmilicjilgehfhbdihmikgckieggbbbbmmcakkadfbbcffeaijfjmalmlfbdbjdckkfmbefihjiefhfgldmgahmlbgkcdeachjfjccjlcicfleblfdekilcfkgjefflhjckakgkfkdeikhjflddgebmhiiidcdhifhefcdableckklcmiekdgmlcdhjfljlcdbcafekbecaeemgjfcdjhfgeimddmaafihgffmfjmledefikjhefakdiabbkfjkfahhljklagjfbjhjbbcgejbaalhcjdcgfdcbkkjaemmmfgmbdadfmdiaifdmfgfmecdcbkcmbfcgmachffflaicadkjkdekbcidbkcbfdikfdmjlailmgalabejgldcdmfalhakmlgfblikgcaicdmkaiacehchjhkfjflkmfkclibdcljhhgmiecekecdbcemfahfheejmmiljemkdfflfiaijlkilhaeejackljkccllahkfhebmcbimmmbiabaalmdhiebefchkbabgkfmiabdfiaglgbaemmggdebjgbdchakdgekgekflmkllabadegfmegjhkgflelilhghalmmhimelmfcjgiabkbckkkeedbldbdhhmiclfjekmhhhfcfglclgglmifjihfgfgjgalhhbgbahbdfbdmjdlglicjhahljkejkcafdlikahemllljhgkeeiblkhfkjalgflcdlidkdceiefgjlifllchkhdmekimflfakiahbliflilkcmiihhckilkgkhlekfaikkjklbjjfabdfjeiikkibflgaediekjdiaiabileafkehimhbhbmmhcbdgfhiigbdebimecfhllaggdhlmfhijiekaaaffhmimejjcahhckhjmiamgbblkbjdhmmcccidcifmkkjhejicfmegclemfidelicjambgmkjeabffahiemehkglhmfilcbfiglfhfdemebkbmmeeimkadekmelffemllaachaemkikkemehfjkhmdfdkakdgbimedmmckidamlgdfeibkgickhldagfhflmecdmcglifedaeabfckjlkigecfhejlaicfifbffjmejhfbikflickdjadjjfdcglbhljbabefcammkicdlfbiklbjbkjhdcdbfafjleibdhjdcabjlfcddikhjbbchdffjdmdbkmgdafcbjchihjgiiijcgjmjkaahbdhljhfcmljhcaakickjdjifljmhebgkdhlhaadjimhemgbbegcjbgiafbmleklgahdamiegbfkekjkgkejbmlflkkdgkieecgkjhafblgkhhbkdbbfgkggccbgdchflkkcbakhcdkdbiailcighigcdedjekhmhihblgiiciffikaahghababklkegihiflmdahhgjmgbdjgclmjdlgcgeghffmdcahkilbajkggdbdijccmjbbdkhjmefeehfcadgeemghibiiimabmimhhdfffdejjibekdlkjghkhhhaaeemheedhkigcljkfjjmikaaaegjdkiefibcabelijmkgkkchjkaadfhjhackmbjelieefmljfbhkimkifigicmcfiidfcebmeadcagdikcmjcgkcfihdgmkeeigibjidghjmcaeccihdhljcmbdbellbdhfakhmdkjgbcgdkcaefdfkmamfjgkhkdemlmijjfichfkdhejchmmbggedmhifklkckaiciicibcemfhbjbcleljbcdelmbkheafbmddbgdamafgkachfedgahkllkekifldahlmeljkgekljeecmbbidkfhkfkdbkjbljbgbbabmfcbagbebdjiccjgciefkghmclijjhgcjeailbbbbcmjgjcgglggeckdmdmdhhjlgdkijbdefadcklcbjkghahlhafelbbhaeehecbckcdmfkiiadkkcaghbafejclbmbjhddhfibafligideflgdjfleehllfdbacibdbhejbcjldiemhccimgidkmfmgmdihgeelbalfmgghkaecfeijfblghabbkejbmackmkjffbdimccakldblefljbbddbaedjbibhafdjmlflfbgefjcghlgmalbjjbgbgdmbhghajblalbaacdiibhcblijgjcbjbfmedmiahlibbbdidlcelelklflemiemklfdckillga" maxLetters = 6 minSize = 5 maxSize = 26 print(len(s)) print(sol.maxFreq(s, maxLetters, minSize, maxSize))
""" contest 12/21/2019 """ class Solution: def max_freq(self, s: str, maxLetters: int, minSize: int, maxSize: int) -> int: freq = {} count_dict = {} def count_letters(word): if word in count_dict: return count_dict[word] unq = {} for item in word: if item in unq: continue else: unq[item] = True if len(unq) > maxLetters: count_dict[word] = False return False count_dict[word] = True return True size = minSize for i in range(0, len(s) - size + 1): current = s[i:i + size] if count_letters(current): if current in freq: freq[current] += 1 else: freq[current] = 1 if len(freq) == 0: return 0 return freq[max(freq, key=freq.get)] 'ffhrimojtdwnwrwsmwxxprahdofmwzzcziskfyxvlteunhyjvmexcbxlrxtcsozrxyaxppdztpzqfcnpiwzhcvyyvpnlwwkhjlctlsbboosvyabdglhzvwdtazcyrumynkhqywrmyljhkxbpnwmfkxnqpchyjckwwpiqjljynsidcccffguyqmvnubgznsjzgkublxwvdjequsguchpzcfncervajafyhyjvoqetaxkybvqgbglmcoxxapmymxmmsqpddpctymxkkztnpiqcgrsybfrqzepnteiuzkvfnnfwsjwrshjclvkvjiwfqbvprbknvxotekxskjofozxiisnomismymubikpagnvgrchynsyjmwadhqzbfssktjmdkbztodwidpwbihfguxzgrjsuksfjuxfqvmqqojoyjznvoktfbwykwhaxorlduchkefnbpgknyoodaizarigbozvsikhxhokfpedydzxlcbasrxnenxrqxgkyfncgnhmbtxnigznqaawmslxehbshmelgfxaayttbsbhvrpsehituihvleityqckpfpmcjffhhgxdprsylnjvrezjdwjrzgqbdwdctfnvibhgcpmudxnoedfgejnbctrcxcvresawrgpvmgptwnwudqfdpqiokqbujzkalfwddfpeptqhewwrlrwdabafodecuxtoxgcsbezhkoceyydjkniryftqdoveipatvfrfkhdztibywbajknxvkrcvfhgbnjxnoefgdwbekrvaalzuwypkhwhmxtnmoggsogczhemzysagznnmjiiwwyekibytqhgwfzmsqlntvakyhaaxiqvlxbhgknvdxjwecccsquqqqmrxsysfyidsbtqytgonmzyjcydyqqqmixrbrllbcbbnwvriqcrznobzippyssjypvjemvadgdcriydntlpyrmxejtdyzhzdljhbyifxewdyokbhcgkhpdjoeqexfxqwvxys' 18 2 22 'fehjblcdljlmckggcigkedfjcejklicihegfhkfbgegjiikcjgfacicaiheibcicmbilbkhhejfdifdehbjelcalcjellkaimhelkjhafcmjhikbgihjlmjclibceecelkaccklbdaifgdflidhidagiahlbjcfbijgeldjgedldbdchkblbdmcdjbjhccikelcmjjbfkhlfekdhbcakgbclgeijbdhmcmemebkgjeeeickifjglmjfjcmjidjgjmijceiikhmmaagebhifhkfhemfeigdlijffcjgmdehjgllkaallheikhghceekhcckfegghdcalalhkhlgikaamladheakecccgafkimibhiafkkkdbflklbhdagdefdgjfihbiakmjbdlhmlhalekjhmjagjahbjflkjiljjbgfhmekifjdejijehfgfjajbbabcgdbhmjmjabfackghfjflcejdcbdfdamcagjbgicbilhdmfclmaemdgkfdgegicikmifbkcckfkkblldhidlmfgckiiceghfcedjbaggmfkkfiacaffkfmliligeadeghklcbhdkgdcgkijklhkbgjicmfiffaaebimmeicaajfikmfbfkemmadgdaiiicjfcfeffmmhhejfgilkalglmfbgckgcdmcbhimfkmhmcccibjcalhfbgmhkckjfmdaamaffheimfihmaifalbamkfeibghkghfbmkghdimmjcmbdbafdfakaideemalgijieifiaakdfbcjggmelclmijhjgjigfhcabgmimcmkbdidhdagbbjeablcdleleijagkaijlgfgiehimklcaidcdeaekeddijlhaijlfclfcflblklgadbdabickelhdlkhefilhcecejkfacfbhcabcjjjhllhelljdmkjgihfebdhbiljijlhclmhgejaecihjfigbdmleebhcaehcgadidbfjjhkkcgddlieidgabhhcghaeehbhghhacgckmkhklchaeeieghjibkmebcifllamgflhikhfkhhmaeekecbcgfblbikgehhdjmedggfdghaafmeghiiiaahgilfibddilfbkdgbjiecibbdekhjbkdhigigffcgmbikhdmbgelgkfidfjkddhfifkdgmihkbdlhlmlkhkbjlhdhgaafkcebcjjaagmkecechalmbheieibihefcllgliamigjgbjcjkgdjeimffhehcjciabgjhgkgmcmemfchiemfldfjimmbeiiiaedkhlkeeijecedclbkhkkekjecfjlilidfigammdgjkgahibdbbkbgjgbabebjcglgfaldgiglilhgfbicchideehgffhfcheamklkkdgfmakhdgmdclejcfgfdlmmbgjamlgchaabelcllalccckajmmkfghaefbebaibdkeegicgmfdgbilhllkfhcgfdeddkfciiibgjhikhaagdkkdmjllalfifjcijhljfebiaflhjdkhmaeejgjkkaelgglefccejidmgkddekjjffcbfjmbmkihmemaibadaihhchdfgiejglmkclcfjgajlgbeillgfbhkgldmfekjbdegjmiddaeaebiaedkdbmciceggbalffddijfccadhhkfgebakkfcmdegdkdbglaeblabjahcjillgmihifbgmiejbefjjecgfkjibejeemcibmcmiifmaiggljgikhiebgijfjafchcjbdmiffjigkmcfhejjagmddjmeckcdhbbdgdcmgfhlcaggjlijjhghihlammgkdekgbkfellfdkcfkigjjecffmgeikafadbfdaadiembbmiadbkbljmkfedllghlhemeaimbamlfcehegbgccfbcjblahdlaakeafmlkjljlkiaglmeideifgdbadjehhmmkfhdkldebegbbiiblkmidlmeejlaemkhfajmidlfcjgiejmmihllbigelbekkfagdcjdbmifdmmchcllmihjlmhblkfcbcjiiaejhgldjmieejhjiadfkfmgamcdlcljbfclkaflhjbeajdkdkjecifikmleblijjedcaccikggjcgidmfjegkbhcacalmbcdgbfjkjajclgdbfcdkemajlajeklieibjhcdheglagfeeagjbacmjdhadgelhemeefikmejlkdcghahfdkhaacghieffcgfgllmdgbkhejkjdcdddhdfdcdidejaekjeclccmedjjmaellmcgfiacbhdfmcdcielcalchbgagelhjjmmkljfagkfjijmddafglimkekjagmhgfiidjefjfmaihhbhhhaafhiekmdkgidjmljfgmgcijbbjmbjiikailalbffjhedbfbbhcbbbicblagibbdamalkiblhblhacdckllbliccmjgedkjbeihhglhbcfaefaimlbjfhmjadlmgdikjjkkghidlfblkdgdbagkldghadhmmckfhkddedlgdfdifghagkdjiklmfbdajfemjcjlamfflgiekmabhcigclbdfefkfmdaffeccgcdflacahhademhjlchabeabbfjfeefhmmbaajmmlmgfhbclkfaihkehjljjhdbkkieikajbbgmfiilkehcliacgggmidlkgjmcjkhjklddijjmjdkejajgllcechmmbfbibdddfgakfmgebkfcbbkjehemckcaefimgfiamhddahklgdhcdgicdmmdfgemlhdcaglcdkeehjkccgcllcldbkggjihdafcfkhkifmkadgkmbgkbgkmilldfhjebdjdfkhmfdhldjmkbcebbbaiemgkihggeebkaibkhajkamfhcbcckgkjbfamlbghhdcehigmehmafalbjedgdgddgjfkfmmeicjlcaajemkjiligbfcbliagicggjclclgidkibkddfgfkclfgdblfebfkcjelghejlejckbgiibedgaebaffcleemmcdgfgjlhdagdmgagiambakabajcjmlifiikckjjfbmafiahmlbhcfegdaekjcgjdbhefkcfdcgkkmlibchbfjbalkbkmgjfbgjlbiffeeabbmgjgbillamjeefklbbibkddcifdakjdlekbkcemkmgdhabdeiccijlicgaecbefmcjeemccegaldfaeafdedbakmiaakjlcbddkkidmkdkdifdgaeflhbkbadgebhhhlaeeajfheamkfkakgmamhaialdmbllbddfidaibffmihfehddlhbemlgdkkikfhkigfkbfjijfiahkfhihkgmblfgidflleameaicgkmimdejkkddddfagfjceffmmkmcffkdfmfjbgjdkbgbelkgjcfhiijlijfeiimcblamiecbmaifejeklfeggfkeiamalhjgklhaellimjelhbgjcghjbfkdjhlmhgkafkkdkkfldbafljgchilbleabgiejfgjhhgcejjjbhkmblkiljbeafhlbdecimdejflhkbkccbkmljldjaihddjmajefjkkdmjkhghdhkhbhmkhjkldlfjjdhdklkheajceelahchhicmkjhekdejdefabaceemjbhimlfjihdmcbhlgihkhgdaibgfbfebadiadkmbjmhgifhefejjgkihkfcbdkjcecjmcifjidfegblklbbabjcfbighkaemgklbidlckebdlgmklifibghalbglmaihkggjcjljgibahghealfhhfiglljdhbffleccdjechchicddkfgimahhmgbjhdlheadfmahelbkhkkgmchljaaekcjhclhghdkebfkcadfajbihemfmjibaidhabdmblakajkddbajemkhebkdkafchalahkijkblmmfakkmdeikhbfhmekakhkmfgjkgljggacmamklbmkdkldmgggajmkaaeimjbffigdjffemcjdfklgbmclkjfhljhfldjkbdfihcjhiaeccafjajldibdlmbkigidecbecbgmlbfcljhieejegclgdeclcfblglgkbmfkhecjgkkkkleeledlmigcijbblhbkeeeifggbkihglgekbjedficgafflgdmhbgajjdajcjalggbciefmbimgabjcbehacagejjbcldalbgfgmiflicdcbabhkmddemieaheldmihcagiledmafagiajgffflfihfghhkkdhlijdgiimbdefehhdkeakddmhedcamjbimigmfajjemlgfdaalelecbifmkjccaefemaijddlmbkmlldhfbklljdedhahajhjmcmaglmbhjagjiifhkdbiehggajddkjchkbeddkahljjgefeffcbdlhkemmecdmbimdmamljhcicfiaambjehjmkjhfajadkeacgcadmcmfkbghbljbfiadkmaacabflejigcialheaibehjblkieaalbclbmhlfekgmggdakhicfaicceggahmidhemaibaiaabfhdjjifbdbkceicgdikhljdhimamghcgjljacdikilhcahedamkgfafhffmlifdeclkekmchmlbigjhijlmfejjjhcdfmjaggfllkdijhadlgfhiiikefglibjclhgedfdmeifeegeelmliefjfjldkdihciclagljcgajdmeijljfdhjkkajfckgaddeaakmjhhahkijhjhfjijamdeakeabfhfifdfkcejjfdgcjjlehkbmmbabiblgjkdhglgjgecfhicildemlaakikfbcdflejfgclmlclbldgldddclhjgdelfjdegbhglmhakdagmgkecdkeihdijijlkckjbammeiafkhmfjieflkcbhiggdjdeaiccaaaaildkmcffkhajefjakgjcglibjcejabfhlddimighmlcggbebbdlhbbjhikagificilmlcbidehkdfeimialijcbfmlgejldbleljgclfhiamhhgcgfjgcjgkmahkchbagfkkakcklefiimhekhckagcmcjadblhljjljdklcgidggmebmfifbfjcgcbhcgehkdikefecmhajjheaecjdiblhhcfcgfgdkjcfgjmhegahfeamclcmjemidkmkjfaecekchmkigdejeeiihlekgiggkcgmblaiblalacddicmehmjhlhmkfleaamamgbdaghdilgcjmfaklbcbldcmikakbmailkkjjlgjiaddfcbcfciladbeedhglebmefjgjfdhebjikbeldkmjldaekgjglbkiagkmlagblideedeehembjdliladifemkgchmlchlbjiaglmbikleclgeefhjlimalibckjgfjfgffhikllghbldhelgjmiifilgkkbdclkggijikbkieldgmggbjcgcfbjaedgclfahajlahllflihbkmakehbgdjbchdajigbdgiefaaadjkkjbjbekdfhaidjfgjgjablkggbagbbhmlkikdhblmfifldbmefjbljgkmdgbbcellefjgmbeladfjbibbjedccaebjakkadcmclihbgcfmjbdldmfcjifcaadibkfkdighjfhgjjaeifdebdkbjhbkibjimmmembkliildfbchbfablcmmjeigemdlkgbgbcfgibekbihkhklhkhkdacjlibkkdlbebbbdkkfdmlbijhammeeeejlfbheicdbcbgeeccfbabjlhadbhbhkmfgfichadjjiakjgagjadkkbggcjkbdciddjmflgedcihmgalkbehccmcagmmifcckcadgclbehhddbcaaiglachgdmhlammfhifahggigbkjblhlbedjldcjkfkglfjkjidciemkjkhkflfldkbhkjgcigdfdlblfkigalkijgmdmiabdiakbcfdldcmkkffihmemakiakfggadcjccckflemckgldjhiblgkhakfccbabfbjidhfmlbkjbedkfmhjjijijfbemffccmccckmhhaadcamfhmikmabkcmklbcikhkhfmdghhihllmekhefbdhgbdhldakljemeggdgabieebcklgkjmcgddhgfmkdbcafgkmhdjfkgdcfalkaadllcmglbkefkllhjghhdfdejbmfkcagaicfmigbdgaldjebejbhmggbkacickeidiimecglbdeeaceedgabballkmjjbjlkjgcjhiibbiflkggcgdemhimegghdjmlcbmhgmhblegehmecflcmmljakfidkmlbhjjdkhmccadkckalkgdiijmbgmceiejkmkabdbmikmlgabheidhbmdkdalhgfigafmccdhkggmbjabkdflckkflacecklaccmlailedldkkbddcjhbhldkimedlhblckbagdbcekmgicjaeemmjiljbiglfggfmgjmabcialkffdamjgfbgmjdfjgafjehdfcgideedgigalffjgcgdkbkfiijiaiglggdbmbflickgamjgghdllfjmhajmgleebdghejihmimlclfidcalfijmlbmejhijfgfjjhechfachlfekgacfmimhbalgcecaijajamchbfaghlljmaihfdajflhmhbgkmjdckdldfgmmcjijebafblikkklbheejfgfhfhmejgfmcakjdfdleejlmaahafgfikhjmlbjbbekbjlkkjflkagmhkfgabcildgfbdckelakmbckeigdddicbkacbfgdejjmegkcflhcajjmhlhkbccfgebhamhgfaggcdjgejcdfcjkcdmbijabjgfbfkgdbagmdflfhfjgaeimajljaamadglkmahjmfbbjhhkmdclcichackjdhmdmegfjdhghmhmkefhklgbjcdbmlblmjmkhcdbdmhhfkhicdlmidbgfcdiakgdmmlldfkafjeaegiifcbkgcbaghbcbcfdmkkalcibdahekgdhkflimafkdekmmdahmhedmakdahjidabhggegfcihkjieeffhefbfjfhemjfbmjfkjidgddimajdimjlljfjahiehafeijhmhilkekdcdiekimaicdfalkgemdjdijfdldajmhgdcmgkcdmmbaiceabkdmejfgdfdcgihibmahmkhmelihggeklgamcecifigekhimdbgkhddlhaeimmgleiikjcjkijfkblgemmefecdahbeckgjjfklmlekkgjlccjfgblkkibljfegbdifcjgdmecglilcmibbdcbficdbheclcejcbagfhgmihamehmligjbmaccimbmejdcabmacfabkkfkacffhhbdechlbgeifjmbkbhdikhahkebafjjkjcejcaciagahjghhjhkeefhjjcfmmahfdkhchhklegjlbbbcdlfcclflgfiibljmbbjhkdjdleegekccaejbhejikkchmmfjejjljiggieabmefajhkgkledgkkejibmbahhehmfdakcfbhemdmemjbgjfgbfgdlflbhkmfackkceeigejdaggfidmfcdaccmmhlmifdddgagmfmejhfbaicccdeijbhefabejkghlmckfdbkjddgdakldccfdgjdghcdhdhjdlkgccehhlbjbkkmeceihgcmiklblkabfmmilicjilgehfhbdihmikgckieggbbbbmmcakkadfbbcffeaijfjmalmlfbdbjdckkfmbefihjiefhfgldmgahmlbgkcdeachjfjccjlcicfleblfdekilcfkgjefflhjckakgkfkdeikhjflddgebmhiiidcdhifhefcdableckklcmiekdgmlcdhjfljlcdbcafekbecaeemgjfcdjhfgeimddmaafihgffmfjmledefikjhefakdiabbkfjkfahhljklagjfbjhjbbcgejbaalhcjdcgfdcbkkjaemmmfgmbdadfmdiaifdmfgfmecdcbkcmbfcgmachffflaicadkjkdekbcidbkcbfdikfdmjlailmgalabejgldcdmfalhakmlgfblikgcaicdmkaiacehchjhkfjflkmfkclibdcljhhgmiecekecdbcemfahfheejmmiljemkdfflfiaijlkilhaeejackljkccllahkfhebmcbimmmbiabaalmdhiebefchkbabgkfmiabdfiaglgbaemmggdebjgbdchakdgekgekflmkllabadegfmegjhkgflelilhghalmmhimelmfcjgiabkbckkkeedbldbdhhmiclfjekmhhhfcfglclgglmifjihfgfgjgalhhbgbahbdfbdmjdlglicjhahljkejkcafdlikahemllljhgkeeiblkhfkjalgflcdlidkdceiefgjlifllchkhdmekimflfakiahbliflilkcmiihhckilkgkhlekfaikkjklbjjfabdfjeiikkibflgaediekjdiaiabileafkehimhbhbmmhcbdgfhiigbdebimecfhllaggdhlmfhijiekaaaffhmimejjcahhckhjmiamgbblkbjdhmmcccidcifmkkjhejicfmegclemfidelicjambgmkjeabffahiemehkglhmfilcbfiglfhfdemebkbmmeeimkadekmelffemllaachaemkikkemehfjkhmdfdkakdgbimedmmckidamlgdfeibkgickhldagfhflmecdmcglifedaeabfckjlkigecfhejlaicfifbffjmejhfbikflickdjadjjfdcglbhljbabefcammkicdlfbiklbjbkjhdcdbfafjleibdhjdcabjlfcddikhjbbchdffjdmdbkmgdafcbjchihjgiiijcgjmjkaahbdhljhfcmljhcaakickjdjifljmhebgkdhlhaadjimhemgbbegcjbgiafbmleklgahdamiegbfkekjkgkejbmlflkkdgkieecgkjhafblgkhhbkdbbfgkggccbgdchflkkcbakhcdkdbiailcighigcdedjekhmhihblgiiciffikaahghababklkegihiflmdahhgjmgbdjgclmjdlgcgeghffmdcahkilbajkggdbdijccmjbbdkhjmefeehfcadgeemghibiiimabmimhhdfffdejjibekdlkjghkhhhaaeemheedhkigcljkfjjmikaaaegjdkiefibcabelijmkgkkchjkaadfhjhackmbjelieefmljfbhkimkifigicmcfiidfcebmeadcagdikcmjcgkcfihdgmkeeigibjidghjmcaeccihdhljcmbdbellbdhfakhmdkjgbcgdkcaefdfkmamfjgkhkdemlmijjfichfkdhejchmmbggedmhifklkckaiciicibcemfhbjbcleljbcdelmbkheafbmddbgdamafgkachfedgahkllkekifldahlmeljkgekljeecmbbidkfhkfkdbkjbljbgbbabmfcbagbebdjiccjgciefkghmclijjhgcjeailbbbbcmjgjcgglggeckdmdmdhhjlgdkijbdefadcklcbjkghahlhafelbbhaeehecbckcdmfkiiadkkcaghbafejclbmbjhddhfibafligideflgdjfleehllfdbacibdbhejbcjldiemhccimgidkmfmgmdihgeelbalfmgghkaecfeijfblghabbkejbmackmkjffbdimccakldblefljbbddbaedjbibhafdjmlflfbgefjcghlgmalbjjbgbgdmbhghajblalbaacdiibhcblijgjcbjbfmedmiahlibbbdidlcelelklflemiemklfdckillga' 6 5 26 sol = solution() s = 'fehjblcdljlmckggcigkedfjcejklicihegfhkfbgegjiikcjgfacicaiheibcicmbilbkhhejfdifdehbjelcalcjellkaimhelkjhafcmjhikbgihjlmjclibceecelkaccklbdaifgdflidhidagiahlbjcfbijgeldjgedldbdchkblbdmcdjbjhccikelcmjjbfkhlfekdhbcakgbclgeijbdhmcmemebkgjeeeickifjglmjfjcmjidjgjmijceiikhmmaagebhifhkfhemfeigdlijffcjgmdehjgllkaallheikhghceekhcckfegghdcalalhkhlgikaamladheakecccgafkimibhiafkkkdbflklbhdagdefdgjfihbiakmjbdlhmlhalekjhmjagjahbjflkjiljjbgfhmekifjdejijehfgfjajbbabcgdbhmjmjabfackghfjflcejdcbdfdamcagjbgicbilhdmfclmaemdgkfdgegicikmifbkcckfkkblldhidlmfgckiiceghfcedjbaggmfkkfiacaffkfmliligeadeghklcbhdkgdcgkijklhkbgjicmfiffaaebimmeicaajfikmfbfkemmadgdaiiicjfcfeffmmhhejfgilkalglmfbgckgcdmcbhimfkmhmcccibjcalhfbgmhkckjfmdaamaffheimfihmaifalbamkfeibghkghfbmkghdimmjcmbdbafdfakaideemalgijieifiaakdfbcjggmelclmijhjgjigfhcabgmimcmkbdidhdagbbjeablcdleleijagkaijlgfgiehimklcaidcdeaekeddijlhaijlfclfcflblklgadbdabickelhdlkhefilhcecejkfacfbhcabcjjjhllhelljdmkjgihfebdhbiljijlhclmhgejaecihjfigbdmleebhcaehcgadidbfjjhkkcgddlieidgabhhcghaeehbhghhacgckmkhklchaeeieghjibkmebcifllamgflhikhfkhhmaeekecbcgfblbikgehhdjmedggfdghaafmeghiiiaahgilfibddilfbkdgbjiecibbdekhjbkdhigigffcgmbikhdmbgelgkfidfjkddhfifkdgmihkbdlhlmlkhkbjlhdhgaafkcebcjjaagmkecechalmbheieibihefcllgliamigjgbjcjkgdjeimffhehcjciabgjhgkgmcmemfchiemfldfjimmbeiiiaedkhlkeeijecedclbkhkkekjecfjlilidfigammdgjkgahibdbbkbgjgbabebjcglgfaldgiglilhgfbicchideehgffhfcheamklkkdgfmakhdgmdclejcfgfdlmmbgjamlgchaabelcllalccckajmmkfghaefbebaibdkeegicgmfdgbilhllkfhcgfdeddkfciiibgjhikhaagdkkdmjllalfifjcijhljfebiaflhjdkhmaeejgjkkaelgglefccejidmgkddekjjffcbfjmbmkihmemaibadaihhchdfgiejglmkclcfjgajlgbeillgfbhkgldmfekjbdegjmiddaeaebiaedkdbmciceggbalffddijfccadhhkfgebakkfcmdegdkdbglaeblabjahcjillgmihifbgmiejbefjjecgfkjibejeemcibmcmiifmaiggljgikhiebgijfjafchcjbdmiffjigkmcfhejjagmddjmeckcdhbbdgdcmgfhlcaggjlijjhghihlammgkdekgbkfellfdkcfkigjjecffmgeikafadbfdaadiembbmiadbkbljmkfedllghlhemeaimbamlfcehegbgccfbcjblahdlaakeafmlkjljlkiaglmeideifgdbadjehhmmkfhdkldebegbbiiblkmidlmeejlaemkhfajmidlfcjgiejmmihllbigelbekkfagdcjdbmifdmmchcllmihjlmhblkfcbcjiiaejhgldjmieejhjiadfkfmgamcdlcljbfclkaflhjbeajdkdkjecifikmleblijjedcaccikggjcgidmfjegkbhcacalmbcdgbfjkjajclgdbfcdkemajlajeklieibjhcdheglagfeeagjbacmjdhadgelhemeefikmejlkdcghahfdkhaacghieffcgfgllmdgbkhejkjdcdddhdfdcdidejaekjeclccmedjjmaellmcgfiacbhdfmcdcielcalchbgagelhjjmmkljfagkfjijmddafglimkekjagmhgfiidjefjfmaihhbhhhaafhiekmdkgidjmljfgmgcijbbjmbjiikailalbffjhedbfbbhcbbbicblagibbdamalkiblhblhacdckllbliccmjgedkjbeihhglhbcfaefaimlbjfhmjadlmgdikjjkkghidlfblkdgdbagkldghadhmmckfhkddedlgdfdifghagkdjiklmfbdajfemjcjlamfflgiekmabhcigclbdfefkfmdaffeccgcdflacahhademhjlchabeabbfjfeefhmmbaajmmlmgfhbclkfaihkehjljjhdbkkieikajbbgmfiilkehcliacgggmidlkgjmcjkhjklddijjmjdkejajgllcechmmbfbibdddfgakfmgebkfcbbkjehemckcaefimgfiamhddahklgdhcdgicdmmdfgemlhdcaglcdkeehjkccgcllcldbkggjihdafcfkhkifmkadgkmbgkbgkmilldfhjebdjdfkhmfdhldjmkbcebbbaiemgkihggeebkaibkhajkamfhcbcckgkjbfamlbghhdcehigmehmafalbjedgdgddgjfkfmmeicjlcaajemkjiligbfcbliagicggjclclgidkibkddfgfkclfgdblfebfkcjelghejlejckbgiibedgaebaffcleemmcdgfgjlhdagdmgagiambakabajcjmlifiikckjjfbmafiahmlbhcfegdaekjcgjdbhefkcfdcgkkmlibchbfjbalkbkmgjfbgjlbiffeeabbmgjgbillamjeefklbbibkddcifdakjdlekbkcemkmgdhabdeiccijlicgaecbefmcjeemccegaldfaeafdedbakmiaakjlcbddkkidmkdkdifdgaeflhbkbadgebhhhlaeeajfheamkfkakgmamhaialdmbllbddfidaibffmihfehddlhbemlgdkkikfhkigfkbfjijfiahkfhihkgmblfgidflleameaicgkmimdejkkddddfagfjceffmmkmcffkdfmfjbgjdkbgbelkgjcfhiijlijfeiimcblamiecbmaifejeklfeggfkeiamalhjgklhaellimjelhbgjcghjbfkdjhlmhgkafkkdkkfldbafljgchilbleabgiejfgjhhgcejjjbhkmblkiljbeafhlbdecimdejflhkbkccbkmljldjaihddjmajefjkkdmjkhghdhkhbhmkhjkldlfjjdhdklkheajceelahchhicmkjhekdejdefabaceemjbhimlfjihdmcbhlgihkhgdaibgfbfebadiadkmbjmhgifhefejjgkihkfcbdkjcecjmcifjidfegblklbbabjcfbighkaemgklbidlckebdlgmklifibghalbglmaihkggjcjljgibahghealfhhfiglljdhbffleccdjechchicddkfgimahhmgbjhdlheadfmahelbkhkkgmchljaaekcjhclhghdkebfkcadfajbihemfmjibaidhabdmblakajkddbajemkhebkdkafchalahkijkblmmfakkmdeikhbfhmekakhkmfgjkgljggacmamklbmkdkldmgggajmkaaeimjbffigdjffemcjdfklgbmclkjfhljhfldjkbdfihcjhiaeccafjajldibdlmbkigidecbecbgmlbfcljhieejegclgdeclcfblglgkbmfkhecjgkkkkleeledlmigcijbblhbkeeeifggbkihglgekbjedficgafflgdmhbgajjdajcjalggbciefmbimgabjcbehacagejjbcldalbgfgmiflicdcbabhkmddemieaheldmihcagiledmafagiajgffflfihfghhkkdhlijdgiimbdefehhdkeakddmhedcamjbimigmfajjemlgfdaalelecbifmkjccaefemaijddlmbkmlldhfbklljdedhahajhjmcmaglmbhjagjiifhkdbiehggajddkjchkbeddkahljjgefeffcbdlhkemmecdmbimdmamljhcicfiaambjehjmkjhfajadkeacgcadmcmfkbghbljbfiadkmaacabflejigcialheaibehjblkieaalbclbmhlfekgmggdakhicfaicceggahmidhemaibaiaabfhdjjifbdbkceicgdikhljdhimamghcgjljacdikilhcahedamkgfafhffmlifdeclkekmchmlbigjhijlmfejjjhcdfmjaggfllkdijhadlgfhiiikefglibjclhgedfdmeifeegeelmliefjfjldkdihciclagljcgajdmeijljfdhjkkajfckgaddeaakmjhhahkijhjhfjijamdeakeabfhfifdfkcejjfdgcjjlehkbmmbabiblgjkdhglgjgecfhicildemlaakikfbcdflejfgclmlclbldgldddclhjgdelfjdegbhglmhakdagmgkecdkeihdijijlkckjbammeiafkhmfjieflkcbhiggdjdeaiccaaaaildkmcffkhajefjakgjcglibjcejabfhlddimighmlcggbebbdlhbbjhikagificilmlcbidehkdfeimialijcbfmlgejldbleljgclfhiamhhgcgfjgcjgkmahkchbagfkkakcklefiimhekhckagcmcjadblhljjljdklcgidggmebmfifbfjcgcbhcgehkdikefecmhajjheaecjdiblhhcfcgfgdkjcfgjmhegahfeamclcmjemidkmkjfaecekchmkigdejeeiihlekgiggkcgmblaiblalacddicmehmjhlhmkfleaamamgbdaghdilgcjmfaklbcbldcmikakbmailkkjjlgjiaddfcbcfciladbeedhglebmefjgjfdhebjikbeldkmjldaekgjglbkiagkmlagblideedeehembjdliladifemkgchmlchlbjiaglmbikleclgeefhjlimalibckjgfjfgffhikllghbldhelgjmiifilgkkbdclkggijikbkieldgmggbjcgcfbjaedgclfahajlahllflihbkmakehbgdjbchdajigbdgiefaaadjkkjbjbekdfhaidjfgjgjablkggbagbbhmlkikdhblmfifldbmefjbljgkmdgbbcellefjgmbeladfjbibbjedccaebjakkadcmclihbgcfmjbdldmfcjifcaadibkfkdighjfhgjjaeifdebdkbjhbkibjimmmembkliildfbchbfablcmmjeigemdlkgbgbcfgibekbihkhklhkhkdacjlibkkdlbebbbdkkfdmlbijhammeeeejlfbheicdbcbgeeccfbabjlhadbhbhkmfgfichadjjiakjgagjadkkbggcjkbdciddjmflgedcihmgalkbehccmcagmmifcckcadgclbehhddbcaaiglachgdmhlammfhifahggigbkjblhlbedjldcjkfkglfjkjidciemkjkhkflfldkbhkjgcigdfdlblfkigalkijgmdmiabdiakbcfdldcmkkffihmemakiakfggadcjccckflemckgldjhiblgkhakfccbabfbjidhfmlbkjbedkfmhjjijijfbemffccmccckmhhaadcamfhmikmabkcmklbcikhkhfmdghhihllmekhefbdhgbdhldakljemeggdgabieebcklgkjmcgddhgfmkdbcafgkmhdjfkgdcfalkaadllcmglbkefkllhjghhdfdejbmfkcagaicfmigbdgaldjebejbhmggbkacickeidiimecglbdeeaceedgabballkmjjbjlkjgcjhiibbiflkggcgdemhimegghdjmlcbmhgmhblegehmecflcmmljakfidkmlbhjjdkhmccadkckalkgdiijmbgmceiejkmkabdbmikmlgabheidhbmdkdalhgfigafmccdhkggmbjabkdflckkflacecklaccmlailedldkkbddcjhbhldkimedlhblckbagdbcekmgicjaeemmjiljbiglfggfmgjmabcialkffdamjgfbgmjdfjgafjehdfcgideedgigalffjgcgdkbkfiijiaiglggdbmbflickgamjgghdllfjmhajmgleebdghejihmimlclfidcalfijmlbmejhijfgfjjhechfachlfekgacfmimhbalgcecaijajamchbfaghlljmaihfdajflhmhbgkmjdckdldfgmmcjijebafblikkklbheejfgfhfhmejgfmcakjdfdleejlmaahafgfikhjmlbjbbekbjlkkjflkagmhkfgabcildgfbdckelakmbckeigdddicbkacbfgdejjmegkcflhcajjmhlhkbccfgebhamhgfaggcdjgejcdfcjkcdmbijabjgfbfkgdbagmdflfhfjgaeimajljaamadglkmahjmfbbjhhkmdclcichackjdhmdmegfjdhghmhmkefhklgbjcdbmlblmjmkhcdbdmhhfkhicdlmidbgfcdiakgdmmlldfkafjeaegiifcbkgcbaghbcbcfdmkkalcibdahekgdhkflimafkdekmmdahmhedmakdahjidabhggegfcihkjieeffhefbfjfhemjfbmjfkjidgddimajdimjlljfjahiehafeijhmhilkekdcdiekimaicdfalkgemdjdijfdldajmhgdcmgkcdmmbaiceabkdmejfgdfdcgihibmahmkhmelihggeklgamcecifigekhimdbgkhddlhaeimmgleiikjcjkijfkblgemmefecdahbeckgjjfklmlekkgjlccjfgblkkibljfegbdifcjgdmecglilcmibbdcbficdbheclcejcbagfhgmihamehmligjbmaccimbmejdcabmacfabkkfkacffhhbdechlbgeifjmbkbhdikhahkebafjjkjcejcaciagahjghhjhkeefhjjcfmmahfdkhchhklegjlbbbcdlfcclflgfiibljmbbjhkdjdleegekccaejbhejikkchmmfjejjljiggieabmefajhkgkledgkkejibmbahhehmfdakcfbhemdmemjbgjfgbfgdlflbhkmfackkceeigejdaggfidmfcdaccmmhlmifdddgagmfmejhfbaicccdeijbhefabejkghlmckfdbkjddgdakldccfdgjdghcdhdhjdlkgccehhlbjbkkmeceihgcmiklblkabfmmilicjilgehfhbdihmikgckieggbbbbmmcakkadfbbcffeaijfjmalmlfbdbjdckkfmbefihjiefhfgldmgahmlbgkcdeachjfjccjlcicfleblfdekilcfkgjefflhjckakgkfkdeikhjflddgebmhiiidcdhifhefcdableckklcmiekdgmlcdhjfljlcdbcafekbecaeemgjfcdjhfgeimddmaafihgffmfjmledefikjhefakdiabbkfjkfahhljklagjfbjhjbbcgejbaalhcjdcgfdcbkkjaemmmfgmbdadfmdiaifdmfgfmecdcbkcmbfcgmachffflaicadkjkdekbcidbkcbfdikfdmjlailmgalabejgldcdmfalhakmlgfblikgcaicdmkaiacehchjhkfjflkmfkclibdcljhhgmiecekecdbcemfahfheejmmiljemkdfflfiaijlkilhaeejackljkccllahkfhebmcbimmmbiabaalmdhiebefchkbabgkfmiabdfiaglgbaemmggdebjgbdchakdgekgekflmkllabadegfmegjhkgflelilhghalmmhimelmfcjgiabkbckkkeedbldbdhhmiclfjekmhhhfcfglclgglmifjihfgfgjgalhhbgbahbdfbdmjdlglicjhahljkejkcafdlikahemllljhgkeeiblkhfkjalgflcdlidkdceiefgjlifllchkhdmekimflfakiahbliflilkcmiihhckilkgkhlekfaikkjklbjjfabdfjeiikkibflgaediekjdiaiabileafkehimhbhbmmhcbdgfhiigbdebimecfhllaggdhlmfhijiekaaaffhmimejjcahhckhjmiamgbblkbjdhmmcccidcifmkkjhejicfmegclemfidelicjambgmkjeabffahiemehkglhmfilcbfiglfhfdemebkbmmeeimkadekmelffemllaachaemkikkemehfjkhmdfdkakdgbimedmmckidamlgdfeibkgickhldagfhflmecdmcglifedaeabfckjlkigecfhejlaicfifbffjmejhfbikflickdjadjjfdcglbhljbabefcammkicdlfbiklbjbkjhdcdbfafjleibdhjdcabjlfcddikhjbbchdffjdmdbkmgdafcbjchihjgiiijcgjmjkaahbdhljhfcmljhcaakickjdjifljmhebgkdhlhaadjimhemgbbegcjbgiafbmleklgahdamiegbfkekjkgkejbmlflkkdgkieecgkjhafblgkhhbkdbbfgkggccbgdchflkkcbakhcdkdbiailcighigcdedjekhmhihblgiiciffikaahghababklkegihiflmdahhgjmgbdjgclmjdlgcgeghffmdcahkilbajkggdbdijccmjbbdkhjmefeehfcadgeemghibiiimabmimhhdfffdejjibekdlkjghkhhhaaeemheedhkigcljkfjjmikaaaegjdkiefibcabelijmkgkkchjkaadfhjhackmbjelieefmljfbhkimkifigicmcfiidfcebmeadcagdikcmjcgkcfihdgmkeeigibjidghjmcaeccihdhljcmbdbellbdhfakhmdkjgbcgdkcaefdfkmamfjgkhkdemlmijjfichfkdhejchmmbggedmhifklkckaiciicibcemfhbjbcleljbcdelmbkheafbmddbgdamafgkachfedgahkllkekifldahlmeljkgekljeecmbbidkfhkfkdbkjbljbgbbabmfcbagbebdjiccjgciefkghmclijjhgcjeailbbbbcmjgjcgglggeckdmdmdhhjlgdkijbdefadcklcbjkghahlhafelbbhaeehecbckcdmfkiiadkkcaghbafejclbmbjhddhfibafligideflgdjfleehllfdbacibdbhejbcjldiemhccimgidkmfmgmdihgeelbalfmgghkaecfeijfblghabbkejbmackmkjffbdimccakldblefljbbddbaedjbibhafdjmlflfbgefjcghlgmalbjjbgbgdmbhghajblalbaacdiibhcblijgjcbjbfmedmiahlibbbdidlcelelklflemiemklfdckillga' max_letters = 6 min_size = 5 max_size = 26 print(len(s)) print(sol.maxFreq(s, maxLetters, minSize, maxSize))
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module contains project version information.""" __version__ = "v22.03.4"
"""This module contains project version information.""" __version__ = 'v22.03.4'
# Longest Name. # Create a program that takes an unknown amount of names and outputs the longest name. You will know that the inputs are done when the user has inputted a string of X user_input = '' # Empty string longest_name = '' length = 0 while user_input != 'X': user_input = input('Enter a name: ') if user_input != 'X': current_length = len(user_input) # determining how long the name is if current_length > length: length = current_length longest_name = user_input # end of while print(longest_name, 'was the longest name with', length, 'characters.')
user_input = '' longest_name = '' length = 0 while user_input != 'X': user_input = input('Enter a name: ') if user_input != 'X': current_length = len(user_input) if current_length > length: length = current_length longest_name = user_input print(longest_name, 'was the longest name with', length, 'characters.')
# This program is open source. For license terms, see the LICENSE file. class Movie(): """Creates a Movie object with the possibility to define information about its title, poster URL and YouTube trailer. Attributes: title: The title of the movie. poster_image_url: URL to the poster of the movie. trailer_youtube_url: URL to the trailer in YouTube. """ def __init__(self, title, poster_image_url, trailer_youtube_url): """Initiates class Movie, reserving memory space""" self.title = title self.poster_image_url = poster_image_url self.trailer_youtube_url = trailer_youtube_url
class Movie: """Creates a Movie object with the possibility to define information about its title, poster URL and YouTube trailer. Attributes: title: The title of the movie. poster_image_url: URL to the poster of the movie. trailer_youtube_url: URL to the trailer in YouTube. """ def __init__(self, title, poster_image_url, trailer_youtube_url): """Initiates class Movie, reserving memory space""" self.title = title self.poster_image_url = poster_image_url self.trailer_youtube_url = trailer_youtube_url
# -*- coding: utf-8 -*- { "name": "WeCom Portal", "author": "RStudio", "website": "https://gitee.com/rainbowstudio/wecom", "sequence": 608, "installable": True, "application": True, "auto_install": False, "category": "WeCom/WeCom", "version": "15.0.0.1", "summary": """ WeCom Portal """, "description": """ """, "depends": ["portal",], "external_dependencies": {"python": [],}, "data": [ # "data/portal_message_template_data.xml", "views/portal_templates.xml", ], "license": "LGPL-3", }
{'name': 'WeCom Portal', 'author': 'RStudio', 'website': 'https://gitee.com/rainbowstudio/wecom', 'sequence': 608, 'installable': True, 'application': True, 'auto_install': False, 'category': 'WeCom/WeCom', 'version': '15.0.0.1', 'summary': '\n WeCom Portal\n ', 'description': '\n\n\n ', 'depends': ['portal'], 'external_dependencies': {'python': []}, 'data': ['views/portal_templates.xml'], 'license': 'LGPL-3'}
class Solution(object): def getSum(self, a, b): """ :type a: int :type b: int :rtype: int """ MAX_INT = 0x7FFFFFFF MIN_INT = 0x80000000 MASK = 0x100000000 while b: a, b = (a ^ b) % MASK, ((a & b) << 1) % MASK return a if a <= MAX_INT else ~((a % MIN_INT) ^ MAX_INT)
class Solution(object): def get_sum(self, a, b): """ :type a: int :type b: int :rtype: int """ max_int = 2147483647 min_int = 2147483648 mask = 4294967296 while b: (a, b) = ((a ^ b) % MASK, ((a & b) << 1) % MASK) return a if a <= MAX_INT else ~(a % MIN_INT ^ MAX_INT)
# Container for information about the project class Project(object): def __init__(self, origin='', commit='', owner='', name=''): self.origin = origin self.commit = commit self.owner = owner self.name = name def _asdict(self): return self.__dict__ def __dir__(self): return ['origin', 'commit', 'owner', 'name'] # Container for information about the project class Tree(object): def __init__(self, name='', children=''): self.name = name self.children = children def _asdict(self): return self.__dict__ def __dir__(self): return ['name', 'children'] # Container for information about the project's nodes class Node(object): def __init__(self, name='', group='', id='', url='', visibility=1.0, complexity=1.0, quality=1.0, size=1.0, weight=1.0): self.id = id self.name = name self.group = group self.url = url self.visibility = visibility # measures self.complexity = complexity self.quality = quality self.size = size self.weight = weight # on-screen display - circle self.cx = 0.0 self.cy = 0.0 self.r = 0.0 self.style = "" self.index = 0 self.x = 0.0 self.y = 0.0 self.px = 0.0 self.py = 0.0 self.fixed = False def _asdict(self): return self.__dict__ def __dir__(self): return ['id', 'name', 'group', 'url', 'visibility', 'complexity', 'quality', 'size', 'weight'] # Container for information about the project's links (between nodes) class Link(object): def __init__(self, source='', target='', value='', visibility=1.0, complexity=1.0, quality=1.0): self.source = source self.target = target self.value = value self.visibility = visibility self.complexity = complexity self.quality = quality # on-screen display - line self.x1 = 0.0 self.y1 = 0.0 self.x2 = 0.0 self.y2 = 0.0 self.style = "" def _asdict(self): return self.__dict__ def __dir__(self): return ['source', 'target', 'value', 'visibility', 'complexity', 'quality'] # Container for information about graph of nodes and links class Graph(object): # Note: there were problems with nodes=[], links=[] # for some reason two consecutively created graphs # were allocated the same collections of nodes and links def __init__(self, nodes, links): self.nodes = nodes self.links = links def _asdict(self): return self.__dict__ # Container for information about project, tree (of files), graph (of many things) class Magnify(object): # Note: there were problems with nodes=[], links=[] # for some reason two consecutively created graphs # were allocated the same collections of nodes and links def __init__(self): self.project = None self.tree = None self.graph = None def _asdict(self): return self.__dict__ # Container for information about the project and its layers (subgraphs) class Archive(object): def __init__(self, project, commits, files, functions): self.project = project self.commits = commits self.files = files self.functions = functions def _asdict(self): return self.__dict__ # For json printing def default(self): return self._asdict()
class Project(object): def __init__(self, origin='', commit='', owner='', name=''): self.origin = origin self.commit = commit self.owner = owner self.name = name def _asdict(self): return self.__dict__ def __dir__(self): return ['origin', 'commit', 'owner', 'name'] class Tree(object): def __init__(self, name='', children=''): self.name = name self.children = children def _asdict(self): return self.__dict__ def __dir__(self): return ['name', 'children'] class Node(object): def __init__(self, name='', group='', id='', url='', visibility=1.0, complexity=1.0, quality=1.0, size=1.0, weight=1.0): self.id = id self.name = name self.group = group self.url = url self.visibility = visibility self.complexity = complexity self.quality = quality self.size = size self.weight = weight self.cx = 0.0 self.cy = 0.0 self.r = 0.0 self.style = '' self.index = 0 self.x = 0.0 self.y = 0.0 self.px = 0.0 self.py = 0.0 self.fixed = False def _asdict(self): return self.__dict__ def __dir__(self): return ['id', 'name', 'group', 'url', 'visibility', 'complexity', 'quality', 'size', 'weight'] class Link(object): def __init__(self, source='', target='', value='', visibility=1.0, complexity=1.0, quality=1.0): self.source = source self.target = target self.value = value self.visibility = visibility self.complexity = complexity self.quality = quality self.x1 = 0.0 self.y1 = 0.0 self.x2 = 0.0 self.y2 = 0.0 self.style = '' def _asdict(self): return self.__dict__ def __dir__(self): return ['source', 'target', 'value', 'visibility', 'complexity', 'quality'] class Graph(object): def __init__(self, nodes, links): self.nodes = nodes self.links = links def _asdict(self): return self.__dict__ class Magnify(object): def __init__(self): self.project = None self.tree = None self.graph = None def _asdict(self): return self.__dict__ class Archive(object): def __init__(self, project, commits, files, functions): self.project = project self.commits = commits self.files = files self.functions = functions def _asdict(self): return self.__dict__ def default(self): return self._asdict()
with open("my_files_ex1.txt") as f: file = f.read() print(file)
with open('my_files_ex1.txt') as f: file = f.read() print(file)
class NewsModel: title = None url = None def __init__(self, __title__, __url__): self.title = __title__ self.url = __url__ def __str__(self): return '''["%s", "%s"]''' % (self.title, self.url)
class Newsmodel: title = None url = None def __init__(self, __title__, __url__): self.title = __title__ self.url = __url__ def __str__(self): return '["%s", "%s"]' % (self.title, self.url)
class Operation: __slots__ = ['session', '_sql', '_table', '_stable', '_col_lst', '_tag_lst', '_operation_history'] def __init__(self, session): self.session = session self._sql = [] self._table = None self._stable = None self._col_lst = None self._tag_lst = None self._operation_history = dict() def _determine_cols(self, table): _col_lst = self._col_lst _all_cols = self.session.get_columns_cache(table) if not _col_lst: return _all_cols if not (set(_col_lst) <= set(_all_cols)): raise ValueError('Invalid column') return [o for o in _all_cols if o in _col_lst] def _determine_tags(self, table): _tag_lst = self._tag_lst _all_tags = self.session.get_tags_cache(table) if not _tag_lst: return _all_tags if not (set(_tag_lst) < set(_all_tags)): raise ValueError('Invalid tag') return [o for o in _all_tags if o in _tag_lst] def __repr__(self): return ' '.join(self._sql) @staticmethod def template(args): """ according to the order of the fields, return string template example: args: (col1, col2, ...) return: '({col1}, {col2}, ...)' """ args = [o.strip(' ') for o in args] return '(' + ', '.join(['{%s}' % o for o in args]) + ')'
class Operation: __slots__ = ['session', '_sql', '_table', '_stable', '_col_lst', '_tag_lst', '_operation_history'] def __init__(self, session): self.session = session self._sql = [] self._table = None self._stable = None self._col_lst = None self._tag_lst = None self._operation_history = dict() def _determine_cols(self, table): _col_lst = self._col_lst _all_cols = self.session.get_columns_cache(table) if not _col_lst: return _all_cols if not set(_col_lst) <= set(_all_cols): raise value_error('Invalid column') return [o for o in _all_cols if o in _col_lst] def _determine_tags(self, table): _tag_lst = self._tag_lst _all_tags = self.session.get_tags_cache(table) if not _tag_lst: return _all_tags if not set(_tag_lst) < set(_all_tags): raise value_error('Invalid tag') return [o for o in _all_tags if o in _tag_lst] def __repr__(self): return ' '.join(self._sql) @staticmethod def template(args): """ according to the order of the fields, return string template example: args: (col1, col2, ...) return: '({col1}, {col2}, ...)' """ args = [o.strip(' ') for o in args] return '(' + ', '.join(['{%s}' % o for o in args]) + ')'
""" The Data recording and processing program with the use of a derived class of `list` data structure. """ # Classes: class Athlete(list): def __init__(self, arg_name, arg_dob=None, arg_times=[]): """ :param arg_name: The name of the athlete :param arg_dob: The Date of birth of the athlete :param arg_times: The list of times for each athlete. """ list.__init__([]) self.name = arg_name self.dob = arg_dob self.extend(arg_times) def top3(self): return sorted(set([sanitize(t) for t in self]))[0:3] # Static Methods: def sanitize(time_string): """ :param time_string: Input time string, which may have mins and seconds separated by either ':', '-' or '.' :return: Uniformly formatted time string with mins and secs separated by '.' """ if "-" in time_string: splitter = "-" elif ":" in time_string: splitter = ":" else: return time_string (mins, secs) = time_string.split(splitter) return mins + "." + secs def data_grepper(file): try: with open(file) as data: line = data.readline().strip().split(',') athlete = Athlete(line.pop(0), line.pop(0), line) return athlete except IOError as err: print("File Error : " + str(err)) def printObj(ath): print(ath.name + ", born on " + ath.dob + ", has the top 3 times of : " + str(ath.top3())) james = data_grepper('athleteTraining/james2.txt') # Contains reference to an object holding all the related data. julie = data_grepper('athleteTraining/julie2.txt') mikey = data_grepper('athleteTraining/mikey2.txt') sarah = data_grepper('athleteTraining/sarah2.txt') printObj(james) printObj(julie) printObj(mikey) printObj(sarah) # Testing code for new functionality - we simply use the objects of the class as any other list! vera = Athlete('Vera Vi', '1991-01-02') vera.append('1.31') printObj(vera) vera.extend(['2.22', "1-21", '2:22']) printObj(vera)
""" The Data recording and processing program with the use of a derived class of `list` data structure. """ class Athlete(list): def __init__(self, arg_name, arg_dob=None, arg_times=[]): """ :param arg_name: The name of the athlete :param arg_dob: The Date of birth of the athlete :param arg_times: The list of times for each athlete. """ list.__init__([]) self.name = arg_name self.dob = arg_dob self.extend(arg_times) def top3(self): return sorted(set([sanitize(t) for t in self]))[0:3] def sanitize(time_string): """ :param time_string: Input time string, which may have mins and seconds separated by either ':', '-' or '.' :return: Uniformly formatted time string with mins and secs separated by '.' """ if '-' in time_string: splitter = '-' elif ':' in time_string: splitter = ':' else: return time_string (mins, secs) = time_string.split(splitter) return mins + '.' + secs def data_grepper(file): try: with open(file) as data: line = data.readline().strip().split(',') athlete = athlete(line.pop(0), line.pop(0), line) return athlete except IOError as err: print('File Error : ' + str(err)) def print_obj(ath): print(ath.name + ', born on ' + ath.dob + ', has the top 3 times of : ' + str(ath.top3())) james = data_grepper('athleteTraining/james2.txt') julie = data_grepper('athleteTraining/julie2.txt') mikey = data_grepper('athleteTraining/mikey2.txt') sarah = data_grepper('athleteTraining/sarah2.txt') print_obj(james) print_obj(julie) print_obj(mikey) print_obj(sarah) vera = athlete('Vera Vi', '1991-01-02') vera.append('1.31') print_obj(vera) vera.extend(['2.22', '1-21', '2:22']) print_obj(vera)
def main(): space = " " item = "o" buffer = "" for x in range(2): spacing = "" for y in range(50): spacing += space buffer = spacing + item print(buffer) for z in range(50): spacing -= space buffer = item + spacing print(buffer) main()
def main(): space = ' ' item = 'o' buffer = '' for x in range(2): spacing = '' for y in range(50): spacing += space buffer = spacing + item print(buffer) for z in range(50): spacing -= space buffer = item + spacing print(buffer) main()
__name__ = "ratter" __version__ = "0.1.0-a0" __author__ = "Fabian Meyer" __maintainer__ = "Fabian Meyer" __email__ = "[email protected]" __copyright__ = "Copyright 2020, Fraunhofer ISE" __license__ = "BSD 3-clause" __url__ = "https://github.com/fa-me/ratter" __summary__ = """calculate reflection, absorption and transmission of thin layer stacks"""
__name__ = 'ratter' __version__ = '0.1.0-a0' __author__ = 'Fabian Meyer' __maintainer__ = 'Fabian Meyer' __email__ = '[email protected]' __copyright__ = 'Copyright 2020, Fraunhofer ISE' __license__ = 'BSD 3-clause' __url__ = 'https://github.com/fa-me/ratter' __summary__ = 'calculate reflection, absorption and transmission of thin layer stacks'