content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
npratio = 4 MAX_SENTENCE = 30 MAX_ALL = 50 MAX_SENT_LENGTH=30 MAX_SENTS=50
npratio = 4 max_sentence = 30 max_all = 50 max_sent_length = 30 max_sents = 50
""" Module: 'upip_utarfile' on esp32 1.13.0-103 """ # MCU: (sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13-103-gb137d064e on 2020-10-09', machine='ESP32 module (spiram) with ESP32') # Stubber: 1.3.4 DIRTYPE = 'dir' class FileSection: '' def read(): pass def readinto(): pass def skip(): pass REGTYPE = 'file' TAR_HEADER = None class TarFile: '' def extractfile(): pass def next(): pass class TarInfo: '' def roundup(): pass uctypes = None
""" Module: 'upip_utarfile' on esp32 1.13.0-103 """ dirtype = 'dir' class Filesection: """""" def read(): pass def readinto(): pass def skip(): pass regtype = 'file' tar_header = None class Tarfile: """""" def extractfile(): pass def next(): pass class Tarinfo: """""" def roundup(): pass uctypes = None
class Solution: """ @param scores: two dimensional array @param K: a integer @return: return a integer """ def FindTheRank(self, scores, K): # write your code here tuple_scores = [] for idx, score in enumerate(scores): tuple_scores.append([score, idx]) sorted_scores = sorted(tuple_scores, key=lambda x: sum(x[0])) return sorted_scores[::-1][K - 1][1]
class Solution: """ @param scores: two dimensional array @param K: a integer @return: return a integer """ def find_the_rank(self, scores, K): tuple_scores = [] for (idx, score) in enumerate(scores): tuple_scores.append([score, idx]) sorted_scores = sorted(tuple_scores, key=lambda x: sum(x[0])) return sorted_scores[::-1][K - 1][1]
# -*- coding: utf-8 -*- """ Common use sicd_elements methods. """ def _get_center_frequency(RadarCollection, ImageFormation): """ Helper method. Parameters ---------- RadarCollection : sarpy.io.complex.sicd_elements.RadarCollection.RadarCollectionType ImageFormation : sarpy.io.complex.sicd_elements.ImageFormation.ImageFormationType Returns ------- None|float The center processed frequency, in the event that RadarCollection.RefFreqIndex is `None` or `0`. """ if RadarCollection is None or RadarCollection.RefFreqIndex is None or RadarCollection.RefFreqIndex == 0: return None if ImageFormation is None or ImageFormation.TxFrequencyProc is None or \ ImageFormation.TxFrequencyProc.MinProc is None or ImageFormation.TxFrequencyProc.MaxProc is None: return None return 0.5 * (ImageFormation.TxFrequencyProc.MinProc + ImageFormation.TxFrequencyProc.MaxProc)
""" Common use sicd_elements methods. """ def _get_center_frequency(RadarCollection, ImageFormation): """ Helper method. Parameters ---------- RadarCollection : sarpy.io.complex.sicd_elements.RadarCollection.RadarCollectionType ImageFormation : sarpy.io.complex.sicd_elements.ImageFormation.ImageFormationType Returns ------- None|float The center processed frequency, in the event that RadarCollection.RefFreqIndex is `None` or `0`. """ if RadarCollection is None or RadarCollection.RefFreqIndex is None or RadarCollection.RefFreqIndex == 0: return None if ImageFormation is None or ImageFormation.TxFrequencyProc is None or ImageFormation.TxFrequencyProc.MinProc is None or (ImageFormation.TxFrequencyProc.MaxProc is None): return None return 0.5 * (ImageFormation.TxFrequencyProc.MinProc + ImageFormation.TxFrequencyProc.MaxProc)
# Solution to day 1 of AOC 2015, Not Quite Lisp. # https://adventofcode.com/2015/day/1 f = open('input.txt') whole_text = f.read() f.close() floor = 0 steps = 0 basement_found = False for each_char in whole_text: if not basement_found: steps += 1 if each_char == '(': floor += 1 elif each_char == ')': floor -= 1 if floor == -1: basement_found = True print('Part 1:', floor) print('Part 2:', steps)
f = open('input.txt') whole_text = f.read() f.close() floor = 0 steps = 0 basement_found = False for each_char in whole_text: if not basement_found: steps += 1 if each_char == '(': floor += 1 elif each_char == ')': floor -= 1 if floor == -1: basement_found = True print('Part 1:', floor) print('Part 2:', steps)
# coding=utf-8 # Author: Jianghan LI # Question: 056.Merge_Intervals # Date: 2017-04-04 10:43 - 10:51 # Complexity: O(NLogN) # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): def merge(self, intervals): """ :type intervals: List[Interval] :rtype: List[Interval] """ res = [] for i in sorted(intervals, key=lambda i: i.start): if len(res) == 0 or res[-1].end < i.start: res.append(i) else: res[-1].end = max(res[-1].end, i.end) return res
class Solution(object): def merge(self, intervals): """ :type intervals: List[Interval] :rtype: List[Interval] """ res = [] for i in sorted(intervals, key=lambda i: i.start): if len(res) == 0 or res[-1].end < i.start: res.append(i) else: res[-1].end = max(res[-1].end, i.end) return res
String1="Hello World!" String2="AbCD123!" """ This shows the method startswith() and endswith() working. """ print(String1.endswith('World!')) print(String1.startswith('Hell')) print(String2.endswith('12')) print(String2.endswith('3')) print(String1.startswith('Hello ')) print(String2.startswith('A')) print(String1.endswith('!'))
string1 = 'Hello World!' string2 = 'AbCD123!' '\nThis shows the method startswith() and endswith() working.\n' print(String1.endswith('World!')) print(String1.startswith('Hell')) print(String2.endswith('12')) print(String2.endswith('3')) print(String1.startswith('Hello ')) print(String2.startswith('A')) print(String1.endswith('!'))
ask = "time is time versus time" count = 0 for t in ask: if t == "t": count += 1 print(count) number = list(range(5, 20, 2)) print(number)
ask = 'time is time versus time' count = 0 for t in ask: if t == 't': count += 1 print(count) number = list(range(5, 20, 2)) print(number)
class CSVEmployeeRepository: def __init__(self, csv_intepreter): self._anagraphic = csv_intepreter.employees() def birthdayFor(self, month, day): return self._anagraphic.bornOn(Birthday(month, day)) class Anagraphic: def __init__(self, employees): self._employees = employees def bornOn(self, birthday): return self._employees.get(birthday) class Birthday: def __init__(self, month, day): self._month = month self._day = day def __key(self): return (self._month, self._day) def __eq__(self, other): return self.__key() == other.__key() def __hash__(self): return hash(self.__key())
class Csvemployeerepository: def __init__(self, csv_intepreter): self._anagraphic = csv_intepreter.employees() def birthday_for(self, month, day): return self._anagraphic.bornOn(birthday(month, day)) class Anagraphic: def __init__(self, employees): self._employees = employees def born_on(self, birthday): return self._employees.get(birthday) class Birthday: def __init__(self, month, day): self._month = month self._day = day def __key(self): return (self._month, self._day) def __eq__(self, other): return self.__key() == other.__key() def __hash__(self): return hash(self.__key())
PACKAGE_NAME = 'cdeid' SPACY_PRETRAINED_MODEL_LG = 'en_core_web_lg' # SPACY_PRETRAINED_MODEL_SM = 'en_core_web_sm' PROGRESS_STATUS = { 1: 'prepare data sets', 2: 'train spacy on balanced sets', 3: 'train stanza on balanced sets', 4: 'train flair on balanced sets', 5: 'train spacy on imbalanced sets', 6: 'train stanza on imbalanced sets', 7: 'train flair on imbalanced sets', 8: 'ensemble models', 9: 'previous training process completed.' } TAG_BEGIN = 'TAGTAGBEGIN' TAG_END = 'TAGTAGEND' BIO_SCHEME_1 = 'BIO1' BIO_SCHEME_2 = 'BIO2' tag_1 = '<span class="selWords">' tag_2 = '<span class=' tag_3 = 'tag">' tag_4 = '</span></span>'
package_name = 'cdeid' spacy_pretrained_model_lg = 'en_core_web_lg' progress_status = {1: 'prepare data sets', 2: 'train spacy on balanced sets', 3: 'train stanza on balanced sets', 4: 'train flair on balanced sets', 5: 'train spacy on imbalanced sets', 6: 'train stanza on imbalanced sets', 7: 'train flair on imbalanced sets', 8: 'ensemble models', 9: 'previous training process completed.'} tag_begin = 'TAGTAGBEGIN' tag_end = 'TAGTAGEND' bio_scheme_1 = 'BIO1' bio_scheme_2 = 'BIO2' tag_1 = '<span class="selWords">' tag_2 = '<span class=' tag_3 = 'tag">' tag_4 = '</span></span>'
def handle(event, context): file = open("dynamicdns/scripts/dynamic-dns-client", "r") content = file.read() file.close() headers = { "Content-Type": "text/plain" } body = content response = { "statusCode": 200, "headers": headers, "body": body } return response
def handle(event, context): file = open('dynamicdns/scripts/dynamic-dns-client', 'r') content = file.read() file.close() headers = {'Content-Type': 'text/plain'} body = content response = {'statusCode': 200, 'headers': headers, 'body': body} return response
# Time: O(n) # Space: O(h) # Given a binary tree, you need to compute the length of the diameter of the tree. # The diameter of a binary tree is the length of the longest path between # any two nodes in a tree. This path may or may not pass through the root. # # Example: # Given a binary tree # 1 # / \ # 2 3 # / \ # 4 5 # Return 3, which is the length of the path [4,2,1,3] or [5,2,1,3]. # # Note: The length of path between two nodes is represented by the number of edges between them. # Definition for a binary tree node. class TreeNode(object): def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution(object): def diameterOfBinaryTree(self, root): # USE THIS """ :type root: TreeNode :rtype: int """ def dfs(root): if not root: return 0, 0 left_d, left = dfs(root.left) right_d, right = dfs(root.right) return max(left_d, right_d, left+right), 1+max(left, right) return dfs(root)[0] def diameterOfBinaryTree2(self, root): def depth(root, diameter): if not root: return 0, diameter left, diameter = depth(root.left, diameter) right, diameter = depth(root.right, diameter) return 1 + max(left, right), max(diameter, left + right) return depth(root, 0)[1] # leverage the classical way to calculate tree depth class Solution2(object): def diameterOfBinaryTree(self, root): self.ans = 1 def depth(node): if not node: return 0 L = depth(node.left) R = depth(node.right) self.ans = max(self.ans, L+R) return max(L, R) + 1 depth(root) return self.ans class Solution3(object): def diameterOfBinaryTree(self, root): def iter_dfs(node): result = 0 max_depth = [0] stk = [(1, [node, max_depth])] while stk: step, params = stk.pop() if step == 1: node, ret = params if not node: continue ret1, ret2 = [0], [0] stk.append((2, [node, ret1, ret2, ret])) stk.append((1, [node.right, ret2])) stk.append((1, [node.left, ret1])) elif step == 2: node, ret1, ret2, ret = params result = max(result, ret1[0]+ret2[0]) ret[0] = 1+max(ret1[0], ret2[0]) return result return iter_dfs(root)
class Treenode(object): def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution(object): def diameter_of_binary_tree(self, root): """ :type root: TreeNode :rtype: int """ def dfs(root): if not root: return (0, 0) (left_d, left) = dfs(root.left) (right_d, right) = dfs(root.right) return (max(left_d, right_d, left + right), 1 + max(left, right)) return dfs(root)[0] def diameter_of_binary_tree2(self, root): def depth(root, diameter): if not root: return (0, diameter) (left, diameter) = depth(root.left, diameter) (right, diameter) = depth(root.right, diameter) return (1 + max(left, right), max(diameter, left + right)) return depth(root, 0)[1] class Solution2(object): def diameter_of_binary_tree(self, root): self.ans = 1 def depth(node): if not node: return 0 l = depth(node.left) r = depth(node.right) self.ans = max(self.ans, L + R) return max(L, R) + 1 depth(root) return self.ans class Solution3(object): def diameter_of_binary_tree(self, root): def iter_dfs(node): result = 0 max_depth = [0] stk = [(1, [node, max_depth])] while stk: (step, params) = stk.pop() if step == 1: (node, ret) = params if not node: continue (ret1, ret2) = ([0], [0]) stk.append((2, [node, ret1, ret2, ret])) stk.append((1, [node.right, ret2])) stk.append((1, [node.left, ret1])) elif step == 2: (node, ret1, ret2, ret) = params result = max(result, ret1[0] + ret2[0]) ret[0] = 1 + max(ret1[0], ret2[0]) return result return iter_dfs(root)
class Bird(): def __init__(self) : self.wings = True self.fur = True self.fly = True def isFly(self) : return self.fly Parrot = Bird() if Parrot.isFly() == "fly" : print("Parrot must be can fly") else : print("Why Parrot can't fly ?") ###### Inheritance ##### class Penguin(Bird) : def __init__(self) : self.fly = False Penguin = Penguin() if Penguin.isFly() == True : print("No way, penguin can't fly") else : print("Penguin is swimming") ######################
class Bird: def __init__(self): self.wings = True self.fur = True self.fly = True def is_fly(self): return self.fly parrot = bird() if Parrot.isFly() == 'fly': print('Parrot must be can fly') else: print("Why Parrot can't fly ?") class Penguin(Bird): def __init__(self): self.fly = False penguin = penguin() if Penguin.isFly() == True: print("No way, penguin can't fly") else: print('Penguin is swimming')
class MapMatcher: def __init__(self, rn, routing_weight='length'): self.rn = rn self.routing_weight = routing_weight def match(self, traj): pass def match_to_path(self, traj): pass
class Mapmatcher: def __init__(self, rn, routing_weight='length'): self.rn = rn self.routing_weight = routing_weight def match(self, traj): pass def match_to_path(self, traj): pass
#-*- coding: utf-8 -*- # ------ wuage.com testing team --------- # __author__ : weijx.cpp@gmail.com def split(word): return [char for char in word] def test_crypt2(): letter :str = u"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z" let = letter.split("," ,maxsplit=26) # let = ["X", "Y"] # print(let.index('Y')) #print(let) cypterdata :str = "yriry gjb cnffjbeq ebggra" #cypterdata :str = "yriry" cypterwords = cypterdata.split(" ") for i in range(1,26): print("++++++++++++++++++++++") for word in cypterwords: #print(word) letters = split(word) plain_w = "" for alf in letters: cpyterindex = let.index(alf) p_index = (cpyterindex + i) % 26 plain_w = plain_w + let[p_index] print(plain_w) if __name__ == '__main__': letter :str = u"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z" let = letter.split("," ,maxsplit=26) print(let[2:]) # print(let.index('c')) # test_crypt2()
def split(word): return [char for char in word] def test_crypt2(): letter: str = u'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z' let = letter.split(',', maxsplit=26) cypterdata: str = 'yriry gjb cnffjbeq ebggra' cypterwords = cypterdata.split(' ') for i in range(1, 26): print('++++++++++++++++++++++') for word in cypterwords: letters = split(word) plain_w = '' for alf in letters: cpyterindex = let.index(alf) p_index = (cpyterindex + i) % 26 plain_w = plain_w + let[p_index] print(plain_w) if __name__ == '__main__': letter: str = u'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z' let = letter.split(',', maxsplit=26) print(let[2:])
def minion_game(string): # your code goes here #string = string.lower() vowel = ['A','E','I','O','U'] kev = 0 stu = 0 n = len(string) x = n for i in range(n) : if string[i] in vowel : kev += x else : stu += x x -= 1 if kev > stu : print("Kevin",str(kev)) elif kev < stu : print("Stuart",str(stu)) else : print("Draw") if __name__ == '__main__': s = input() minion_game(s)
def minion_game(string): vowel = ['A', 'E', 'I', 'O', 'U'] kev = 0 stu = 0 n = len(string) x = n for i in range(n): if string[i] in vowel: kev += x else: stu += x x -= 1 if kev > stu: print('Kevin', str(kev)) elif kev < stu: print('Stuart', str(stu)) else: print('Draw') if __name__ == '__main__': s = input() minion_game(s)
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- # pylint: disable=too-many-lines # pylint: disable=unused-argument def maintenance_public_configuration_list(client): return client.list() def maintenance_public_configuration_show(client, resource_name): return client.get(resource_name=resource_name) def maintenance_applyupdate_list(client): return client.list() def maintenance_applyupdate_show(client, resource_group_name, provider_name, resource_type, resource_name, apply_update_name): return client.get(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, apply_update_name=apply_update_name) def maintenance_applyupdate_create(client, resource_group_name, provider_name, resource_type, resource_name): return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_update(client, resource_group_name, provider_name, resource_type, resource_name): return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_create_or_update_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.create_or_update_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_show_parent(client, resource_group_name, resource_parent_type, resource_parent_name, provider_name, resource_type, resource_name, apply_update_name): return client.get_parent(resource_group_name=resource_group_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, apply_update_name=apply_update_name) def maintenance_assignment_list(client, resource_group_name, provider_name, resource_type, resource_name): return client.list(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_assignment_show(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name): return client.get(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_create(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): configuration_assignment = {} if location is not None: configuration_assignment['location'] = location if maintenance_configuration_id is not None: configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id if resource_id is not None: configuration_assignment['resource_id'] = resource_id return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name, configuration_assignment=configuration_assignment) def maintenance_assignment_update(instance, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): if location is not None: instance.location = location if maintenance_configuration_id is not None: instance.maintenance_configuration_id = maintenance_configuration_id if resource_id is not None: instance.resource_id = resource_id return instance def maintenance_assignment_delete(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name): return client.delete(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_create_or_update_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): configuration_assignment = {} if location is not None: configuration_assignment['location'] = location if maintenance_configuration_id is not None: configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id if resource_id is not None: configuration_assignment['resource_id'] = resource_id return client.create_or_update_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name, configuration_assignment=configuration_assignment) def maintenance_assignment_delete_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name): return client.delete_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_list_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.list_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name) def maintenance_assignment_show_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name): return client.get_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_configuration_list(client): return client.list() def maintenance_configuration_show(client, resource_group_name, resource_name): return client.get(resource_group_name=resource_group_name, resource_name=resource_name) def maintenance_configuration_create(client, resource_group_name, resource_name, location=None, tags=None, namespace=None, extension_properties=None, maintenance_scope=None, visibility=None, start_date_time=None, expiration_date_time=None, duration=None, time_zone=None, recur_every=None, reboot_setting=None, windows_parameters=None, linux_parameters=None, pre_tasks=None, post_tasks=None): configuration = {} if location is not None: configuration['location'] = location if tags is not None: configuration['tags'] = tags if namespace is not None: configuration['namespace'] = namespace if extension_properties is not None: configuration['extension_properties'] = extension_properties if maintenance_scope is not None: configuration['maintenance_scope'] = maintenance_scope if visibility is not None: configuration['visibility'] = visibility if start_date_time is not None: configuration['start_date_time'] = start_date_time if expiration_date_time is not None: configuration['expiration_date_time'] = expiration_date_time if duration is not None: configuration['duration'] = duration if time_zone is not None: configuration['time_zone'] = time_zone if recur_every is not None: configuration['recur_every'] = recur_every configuration['install_patches'] = {} if reboot_setting is not None: configuration['install_patches']['reboot_setting'] = reboot_setting else: configuration['install_patches']['reboot_setting'] = "IfRequired" if windows_parameters is not None: configuration['install_patches']['windows_parameters'] = windows_parameters if linux_parameters is not None: configuration['install_patches']['linux_parameters'] = linux_parameters if pre_tasks is not None: configuration['install_patches']['pre_tasks'] = pre_tasks if post_tasks is not None: configuration['install_patches']['post_tasks'] = post_tasks if len(configuration['install_patches']) == 0: del configuration['install_patches'] return client.create_or_update(resource_group_name=resource_group_name, resource_name=resource_name, configuration=configuration) def maintenance_configuration_update(client, resource_group_name, resource_name, location=None, tags=None, namespace=None, extension_properties=None, maintenance_scope=None, visibility=None, start_date_time=None, expiration_date_time=None, duration=None, time_zone=None, recur_every=None, reboot_setting=None, windows_parameters=None, linux_parameters=None, pre_tasks=None, post_tasks=None): configuration = {} if location is not None: configuration['location'] = location if tags is not None: configuration['tags'] = tags if namespace is not None: configuration['namespace'] = namespace if extension_properties is not None: configuration['extension_properties'] = extension_properties if maintenance_scope is not None: configuration['maintenance_scope'] = maintenance_scope if visibility is not None: configuration['visibility'] = visibility if start_date_time is not None: configuration['start_date_time'] = start_date_time if expiration_date_time is not None: configuration['expiration_date_time'] = expiration_date_time if duration is not None: configuration['duration'] = duration if time_zone is not None: configuration['time_zone'] = time_zone if recur_every is not None: configuration['recur_every'] = recur_every configuration['install_patches'] = {} if reboot_setting is not None: configuration['install_patches']['reboot_setting'] = reboot_setting else: configuration['install_patches']['reboot_setting'] = "IfRequired" if windows_parameters is not None: configuration['install_patches']['windows_parameters'] = windows_parameters if linux_parameters is not None: configuration['install_patches']['linux_parameters'] = linux_parameters if pre_tasks is not None: configuration['install_patches']['pre_tasks'] = pre_tasks if post_tasks is not None: configuration['install_patches']['post_tasks'] = post_tasks if len(configuration['install_patches']) == 0: del configuration['install_patches'] return client.update(resource_group_name=resource_group_name, resource_name=resource_name, configuration=configuration) def maintenance_configuration_delete(client, resource_group_name, resource_name): return client.delete(resource_group_name=resource_group_name, resource_name=resource_name) def maintenance_update_list(client, resource_group_name, provider_name, resource_type, resource_name): return client.list(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_update_list_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.list_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name)
def maintenance_public_configuration_list(client): return client.list() def maintenance_public_configuration_show(client, resource_name): return client.get(resource_name=resource_name) def maintenance_applyupdate_list(client): return client.list() def maintenance_applyupdate_show(client, resource_group_name, provider_name, resource_type, resource_name, apply_update_name): return client.get(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, apply_update_name=apply_update_name) def maintenance_applyupdate_create(client, resource_group_name, provider_name, resource_type, resource_name): return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_update(client, resource_group_name, provider_name, resource_type, resource_name): return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_create_or_update_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.create_or_update_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name) def maintenance_applyupdate_show_parent(client, resource_group_name, resource_parent_type, resource_parent_name, provider_name, resource_type, resource_name, apply_update_name): return client.get_parent(resource_group_name=resource_group_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, apply_update_name=apply_update_name) def maintenance_assignment_list(client, resource_group_name, provider_name, resource_type, resource_name): return client.list(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_assignment_show(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name): return client.get(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_create(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): configuration_assignment = {} if location is not None: configuration_assignment['location'] = location if maintenance_configuration_id is not None: configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id if resource_id is not None: configuration_assignment['resource_id'] = resource_id return client.create_or_update(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name, configuration_assignment=configuration_assignment) def maintenance_assignment_update(instance, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): if location is not None: instance.location = location if maintenance_configuration_id is not None: instance.maintenance_configuration_id = maintenance_configuration_id if resource_id is not None: instance.resource_id = resource_id return instance def maintenance_assignment_delete(client, resource_group_name, provider_name, resource_type, resource_name, configuration_assignment_name): return client.delete(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_create_or_update_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name, location=None, maintenance_configuration_id=None, resource_id=None): configuration_assignment = {} if location is not None: configuration_assignment['location'] = location if maintenance_configuration_id is not None: configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id if resource_id is not None: configuration_assignment['resource_id'] = resource_id return client.create_or_update_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name, configuration_assignment=configuration_assignment) def maintenance_assignment_delete_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name): return client.delete_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_assignment_list_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.list_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name) def maintenance_assignment_show_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name, configuration_assignment_name): return client.get_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name, configuration_assignment_name=configuration_assignment_name) def maintenance_configuration_list(client): return client.list() def maintenance_configuration_show(client, resource_group_name, resource_name): return client.get(resource_group_name=resource_group_name, resource_name=resource_name) def maintenance_configuration_create(client, resource_group_name, resource_name, location=None, tags=None, namespace=None, extension_properties=None, maintenance_scope=None, visibility=None, start_date_time=None, expiration_date_time=None, duration=None, time_zone=None, recur_every=None, reboot_setting=None, windows_parameters=None, linux_parameters=None, pre_tasks=None, post_tasks=None): configuration = {} if location is not None: configuration['location'] = location if tags is not None: configuration['tags'] = tags if namespace is not None: configuration['namespace'] = namespace if extension_properties is not None: configuration['extension_properties'] = extension_properties if maintenance_scope is not None: configuration['maintenance_scope'] = maintenance_scope if visibility is not None: configuration['visibility'] = visibility if start_date_time is not None: configuration['start_date_time'] = start_date_time if expiration_date_time is not None: configuration['expiration_date_time'] = expiration_date_time if duration is not None: configuration['duration'] = duration if time_zone is not None: configuration['time_zone'] = time_zone if recur_every is not None: configuration['recur_every'] = recur_every configuration['install_patches'] = {} if reboot_setting is not None: configuration['install_patches']['reboot_setting'] = reboot_setting else: configuration['install_patches']['reboot_setting'] = 'IfRequired' if windows_parameters is not None: configuration['install_patches']['windows_parameters'] = windows_parameters if linux_parameters is not None: configuration['install_patches']['linux_parameters'] = linux_parameters if pre_tasks is not None: configuration['install_patches']['pre_tasks'] = pre_tasks if post_tasks is not None: configuration['install_patches']['post_tasks'] = post_tasks if len(configuration['install_patches']) == 0: del configuration['install_patches'] return client.create_or_update(resource_group_name=resource_group_name, resource_name=resource_name, configuration=configuration) def maintenance_configuration_update(client, resource_group_name, resource_name, location=None, tags=None, namespace=None, extension_properties=None, maintenance_scope=None, visibility=None, start_date_time=None, expiration_date_time=None, duration=None, time_zone=None, recur_every=None, reboot_setting=None, windows_parameters=None, linux_parameters=None, pre_tasks=None, post_tasks=None): configuration = {} if location is not None: configuration['location'] = location if tags is not None: configuration['tags'] = tags if namespace is not None: configuration['namespace'] = namespace if extension_properties is not None: configuration['extension_properties'] = extension_properties if maintenance_scope is not None: configuration['maintenance_scope'] = maintenance_scope if visibility is not None: configuration['visibility'] = visibility if start_date_time is not None: configuration['start_date_time'] = start_date_time if expiration_date_time is not None: configuration['expiration_date_time'] = expiration_date_time if duration is not None: configuration['duration'] = duration if time_zone is not None: configuration['time_zone'] = time_zone if recur_every is not None: configuration['recur_every'] = recur_every configuration['install_patches'] = {} if reboot_setting is not None: configuration['install_patches']['reboot_setting'] = reboot_setting else: configuration['install_patches']['reboot_setting'] = 'IfRequired' if windows_parameters is not None: configuration['install_patches']['windows_parameters'] = windows_parameters if linux_parameters is not None: configuration['install_patches']['linux_parameters'] = linux_parameters if pre_tasks is not None: configuration['install_patches']['pre_tasks'] = pre_tasks if post_tasks is not None: configuration['install_patches']['post_tasks'] = post_tasks if len(configuration['install_patches']) == 0: del configuration['install_patches'] return client.update(resource_group_name=resource_group_name, resource_name=resource_name, configuration=configuration) def maintenance_configuration_delete(client, resource_group_name, resource_name): return client.delete(resource_group_name=resource_group_name, resource_name=resource_name) def maintenance_update_list(client, resource_group_name, provider_name, resource_type, resource_name): return client.list(resource_group_name=resource_group_name, provider_name=provider_name, resource_type=resource_type, resource_name=resource_name) def maintenance_update_list_parent(client, resource_group_name, provider_name, resource_parent_type, resource_parent_name, resource_type, resource_name): return client.list_parent(resource_group_name=resource_group_name, provider_name=provider_name, resource_parent_type=resource_parent_type, resource_parent_name=resource_parent_name, resource_type=resource_type, resource_name=resource_name)
def day5(fileName, part): niceCount = 0 with open(fileName) as infile: for line in infile: vowels = sum(line.count(vowel) for vowel in "aeiou") if vowels < 3: continue foundDouble = any(line[i] == line[i+1] for i in range(len(line) - 1)) if not foundDouble: continue foundBadString = any(badString in line for badString in ["ab", "cd", "pq", "xy"]) if foundBadString: continue niceCount += 1 print(niceCount) def day5b(fileName, part): niceCount = 0 with open(fileName) as infile: for line in infile: repeatLetter = any(line[i] == line[i+2] for i in range(len(line) - 2)) if not repeatLetter: continue repeatPair = any(line[i:i+2] in line[i+2:] for i in range(len(line) - 4)) if not repeatPair: continue niceCount += 1 print(niceCount) if __name__ == "__main__": day5("5test.txt", 1) day5("5.txt", 1) day5b("5btest.txt", 0) day5b("5.txt", 0)
def day5(fileName, part): nice_count = 0 with open(fileName) as infile: for line in infile: vowels = sum((line.count(vowel) for vowel in 'aeiou')) if vowels < 3: continue found_double = any((line[i] == line[i + 1] for i in range(len(line) - 1))) if not foundDouble: continue found_bad_string = any((badString in line for bad_string in ['ab', 'cd', 'pq', 'xy'])) if foundBadString: continue nice_count += 1 print(niceCount) def day5b(fileName, part): nice_count = 0 with open(fileName) as infile: for line in infile: repeat_letter = any((line[i] == line[i + 2] for i in range(len(line) - 2))) if not repeatLetter: continue repeat_pair = any((line[i:i + 2] in line[i + 2:] for i in range(len(line) - 4))) if not repeatPair: continue nice_count += 1 print(niceCount) if __name__ == '__main__': day5('5test.txt', 1) day5('5.txt', 1) day5b('5btest.txt', 0) day5b('5.txt', 0)
class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: nums.sort() res = [] self.bt(nums, 0, [], res) return res def bt(self, nums, idx, tempList, res): res.append(tempList) for i in range(idx, len(nums)): self.bt(nums, i+1, tempList+[nums[i]], res)
class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: nums.sort() res = [] self.bt(nums, 0, [], res) return res def bt(self, nums, idx, tempList, res): res.append(tempList) for i in range(idx, len(nums)): self.bt(nums, i + 1, tempList + [nums[i]], res)
''' Exception module ''' class CallGitServerException(Exception): ''' Base Exception for filtering Call Git Server Exceptions ''' STATUS_CODE = 127 class DuplicateRemote(CallGitServerException): ''' Exception throwed when there arent any match with the username ''' STATUS_CODE = 128 def __init__(self, name, branchRef, elementType): if 'Tag' in elementType: message = f'{elementType}: {name} on \"{branchRef}\" Already exist.' else: message = f'{elementType}: {name} Already exist.' super().__init__( self, message )
""" Exception module """ class Callgitserverexception(Exception): """ Base Exception for filtering Call Git Server Exceptions """ status_code = 127 class Duplicateremote(CallGitServerException): """ Exception throwed when there arent any match with the username """ status_code = 128 def __init__(self, name, branchRef, elementType): if 'Tag' in elementType: message = f'{elementType}: {name} on "{branchRef}" Already exist.' else: message = f'{elementType}: {name} Already exist.' super().__init__(self, message)
def test(tested_mod, Assert): test_cases = [ # (expected, input) ([4], [4]), ([9,6], [6,9]), ([4,3,2,1], [4,3,2,1]), ([4,3,2,1], [1,2,3,4]), ([9,5,2,1], [1,5,2,9]) ] return Assert.all(tested_mod.sortierte_zettel, test_cases)
def test(tested_mod, Assert): test_cases = [([4], [4]), ([9, 6], [6, 9]), ([4, 3, 2, 1], [4, 3, 2, 1]), ([4, 3, 2, 1], [1, 2, 3, 4]), ([9, 5, 2, 1], [1, 5, 2, 9])] return Assert.all(tested_mod.sortierte_zettel, test_cases)
P, Q = map(float, input().split()) p, q = P / 100, Q / 100 a = p * q b = (1 - p) * (1 - q) print(a / (a + b) * 100)
(p, q) = map(float, input().split()) (p, q) = (P / 100, Q / 100) a = p * q b = (1 - p) * (1 - q) print(a / (a + b) * 100)
# https://leetcode.com/problems/merge-sorted-array/ class Solution: # Input: # [1, 2, 2, 3, 5, 6], m = 3 # [2, 5, 6], n = 3 # [2, 0] # [1] # [1, 2, 0] # [4] def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ if not nums1 or not nums2: return # Note: m and n are `number of steps`, not indices, # that is why > is used instead of >= while n > 0 and m > 0: if nums1[m-1] <= nums2[n-1]: nums1[m+n-1] = nums2[n-1] n -= 1 else: nums1[m+n-1] = nums1[m-1] m -= 1 if n > 0: nums1[:n] = nums2[:n]
class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ if not nums1 or not nums2: return while n > 0 and m > 0: if nums1[m - 1] <= nums2[n - 1]: nums1[m + n - 1] = nums2[n - 1] n -= 1 else: nums1[m + n - 1] = nums1[m - 1] m -= 1 if n > 0: nums1[:n] = nums2[:n]
##Patterns: E0116 while True: try: pass finally: ##Err: E0116 continue while True: try: pass finally: break while True: try: pass except Exception: pass else: continue
while True: try: pass finally: continue while True: try: pass finally: break while True: try: pass except Exception: pass else: continue
class ESError(Exception): pass class ESRegistryError(ESError): pass
class Eserror(Exception): pass class Esregistryerror(ESError): pass
def mobilenet_conv_block(x, kernel_size, output_channels): """ Depthwise Conv -> Batch Norm -> ReLU -> Pointwise Conv -> Batch Norm -> ReLU """ # assumes BHWC format input_channel_dim = x.get_shape().as_list()[-1] W = tf.Variable(tf.truncated_normal((kernel_size, kernel_size, input_channel_dim, 1))) # depthwise conv x = tf.nn.depthwise_conv2d(x, W, (1, 2, 2, 1), padding='SAME') x = tf.layers.batch_normalization(x) x = tf.nn.relu(x) # pointwise conv x = tf.layers.conv2d(x, output_channels, (1, 1), padding='SAME') x = tf.layers.batch_normalization(x) return tf.nn.relu(x)
def mobilenet_conv_block(x, kernel_size, output_channels): """ Depthwise Conv -> Batch Norm -> ReLU -> Pointwise Conv -> Batch Norm -> ReLU """ input_channel_dim = x.get_shape().as_list()[-1] w = tf.Variable(tf.truncated_normal((kernel_size, kernel_size, input_channel_dim, 1))) x = tf.nn.depthwise_conv2d(x, W, (1, 2, 2, 1), padding='SAME') x = tf.layers.batch_normalization(x) x = tf.nn.relu(x) x = tf.layers.conv2d(x, output_channels, (1, 1), padding='SAME') x = tf.layers.batch_normalization(x) return tf.nn.relu(x)
class Solution: def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ maxprofit = 0 if (len(prices) == 0): return 0 left = 0 right = left + 1 while (right < len(prices)): diff = prices[right] - prices[left] if (diff <= 0): left = right right += 1 else: profit = diff if (profit > maxprofit): maxprofit = profit right += 1 return maxprofit print (Solution().maxProfit([7, 1, 2, 5, 3, 6, 4]))
class Solution: def max_profit(self, prices): """ :type prices: List[int] :rtype: int """ maxprofit = 0 if len(prices) == 0: return 0 left = 0 right = left + 1 while right < len(prices): diff = prices[right] - prices[left] if diff <= 0: left = right right += 1 else: profit = diff if profit > maxprofit: maxprofit = profit right += 1 return maxprofit print(solution().maxProfit([7, 1, 2, 5, 3, 6, 4]))
movies = ['The Matrix', 'Fast & Furious', 'Frozen', 'The life of Pi'] for movie in movies: print(movie) print('We\'re done here!')
movies = ['The Matrix', 'Fast & Furious', 'Frozen', 'The life of Pi'] for movie in movies: print(movie) print("We're done here!")
# this code is not correct class Node: def __init__(self, data, next=None): self.data=data self.next = next def printList(head): print(head.data) if head.next == None: return return printList(head.next) def reverseList(head): if head.next == None: return head nextnext = head.next.next head.next = nextnext head = head.next return reverseList(head) head = Node(3) n2 = Node(2) head.next = n2 n3 = Node(1) n2.next = n3 printList(head) printList(reverseList(head))
class Node: def __init__(self, data, next=None): self.data = data self.next = next def print_list(head): print(head.data) if head.next == None: return return print_list(head.next) def reverse_list(head): if head.next == None: return head nextnext = head.next.next head.next = nextnext head = head.next return reverse_list(head) head = node(3) n2 = node(2) head.next = n2 n3 = node(1) n2.next = n3 print_list(head) print_list(reverse_list(head))
def rule(event): return event.get("action") == "Blocked" def title(event): return "Access denied to domain " + event.get("domain", "<UNKNOWN_DOMAIN>")
def rule(event): return event.get('action') == 'Blocked' def title(event): return 'Access denied to domain ' + event.get('domain', '<UNKNOWN_DOMAIN>')
def static_vars(**kwargs): """ Decorates a function with the given attributes Parameters ---------- **kwargs a list of attributes and their initial value """ def decorate(func): for k in kwargs: setattr(func, k, kwargs[k]) return func return decorate
def static_vars(**kwargs): """ Decorates a function with the given attributes Parameters ---------- **kwargs a list of attributes and their initial value """ def decorate(func): for k in kwargs: setattr(func, k, kwargs[k]) return func return decorate
# Config for OpenMX_viewer # For Gui fontFamilies=["Segoe UI", "Yu Gothic UI"] # font sizes are in unit of pixel fontSize_normal=16 fontSize_large=24 ContentsMargins=[5,5,5,5] tickLength=-30 sigma_max=5 Eh=27.2114 # (eV) # Pen for vLine and hLine pen1=(0, 255, 0) pen2=(255, 0, 0) pen3=(255, 255, 0) gridAlpha=50 # 100 =max plot3D_minWidth=400 plot3D_minHeight=400
font_families = ['Segoe UI', 'Yu Gothic UI'] font_size_normal = 16 font_size_large = 24 contents_margins = [5, 5, 5, 5] tick_length = -30 sigma_max = 5 eh = 27.2114 pen1 = (0, 255, 0) pen2 = (255, 0, 0) pen3 = (255, 255, 0) grid_alpha = 50 plot3_d_min_width = 400 plot3_d_min_height = 400
# Also used on the Yamaha Reface CS? def compute_checksum(data): """Compute checksum from a list of byte values. This is appended to the data of the sysex message. """ return (128 - (sum(data) & 0x7F)) & 0x7F
def compute_checksum(data): """Compute checksum from a list of byte values. This is appended to the data of the sysex message. """ return 128 - (sum(data) & 127) & 127
#!/usr/bin/python3 """ Module Docstring """ __author__ = "Dinesh Tumu" __version__ = "0.1.0" __license__ = "MIT" # imports # init variables def main(): """ Main entry point of the app """ # Open a file for writing and create it if it doesn't exist f = open("textfile.txt","w+") # Open the file for appending text to the end # f = open("textfile.txt","a+") # write some lines of data to the file for i in range(10): f.write("This is line %d\r\n" % (i+1)) # close the file when done f.close() # Open the file back up and read the contents f = open("textfile.txt","r") if f.mode == 'r': # check to make sure that the file was opened # use the read() function to read the entire file # contents = f.read() # print (contents) fl = f.readlines() # readlines reads the individual lines into a list for x in fl: print (x) if __name__ == "__main__": """ This is executed when run from the command line """ main()
""" Module Docstring """ __author__ = 'Dinesh Tumu' __version__ = '0.1.0' __license__ = 'MIT' def main(): """ Main entry point of the app """ f = open('textfile.txt', 'w+') for i in range(10): f.write('This is line %d\r\n' % (i + 1)) f.close() f = open('textfile.txt', 'r') if f.mode == 'r': fl = f.readlines() for x in fl: print(x) if __name__ == '__main__': ' This is executed when run from the command line ' main()
destinations = input() while True: input_command = input() if input_command == "Travel": break arg = input_command.split(":") command = arg[0] if command == "Add Stop": index = int(arg[1]) string = arg[2] if 0 <= index < len(destinations): destinations = destinations[:index] + string + destinations[index:] print(destinations) elif command == "Remove Stop": start_index = int(arg[1]) end_index = int(arg[2]) if 0 <= start_index < len(destinations) and 0 < end_index < len(destinations): destinations = destinations[:start_index] + destinations[end_index + 1:] print(destinations) elif command == "Switch": old_string = arg[1] new_string = arg[2] destinations = destinations.replace(old_string, new_string) print(destinations) print(f"Ready for world tour! Planned stops: {destinations}")
destinations = input() while True: input_command = input() if input_command == 'Travel': break arg = input_command.split(':') command = arg[0] if command == 'Add Stop': index = int(arg[1]) string = arg[2] if 0 <= index < len(destinations): destinations = destinations[:index] + string + destinations[index:] print(destinations) elif command == 'Remove Stop': start_index = int(arg[1]) end_index = int(arg[2]) if 0 <= start_index < len(destinations) and 0 < end_index < len(destinations): destinations = destinations[:start_index] + destinations[end_index + 1:] print(destinations) elif command == 'Switch': old_string = arg[1] new_string = arg[2] destinations = destinations.replace(old_string, new_string) print(destinations) print(f'Ready for world tour! Planned stops: {destinations}')
def html_tag(): # write body of decorator pass @html_tag('p') def foobar(): return 'foobar' if __name__ == "__main__": assert foobar() == '<p>foobar</p>'
def html_tag(): pass @html_tag('p') def foobar(): return 'foobar' if __name__ == '__main__': assert foobar() == '<p>foobar</p>'
def max_power(s: str) -> int: max_ = 1 curr = 1 for i in range(1, len(s)): if s[i] == s[i - 1]: curr += 1 else: if curr > max_: max_ = curr curr = 1 return max(max_, curr) if __name__ == '__main__': max_power("ccbccbb")
def max_power(s: str) -> int: max_ = 1 curr = 1 for i in range(1, len(s)): if s[i] == s[i - 1]: curr += 1 else: if curr > max_: max_ = curr curr = 1 return max(max_, curr) if __name__ == '__main__': max_power('ccbccbb')
class TestThruster: def test_get(self, log_in, test_client): response = test_client.get('/thruster') data = response.get_json()[0] assert response.status_code == 200 assert 1 == data['id'] assert 'T10' == data['name'] assert 10 == data['thrust_power']
class Testthruster: def test_get(self, log_in, test_client): response = test_client.get('/thruster') data = response.get_json()[0] assert response.status_code == 200 assert 1 == data['id'] assert 'T10' == data['name'] assert 10 == data['thrust_power']
data = { "last-modified-date": { "value": 1523547463983 }, "name": { "created-date": { "value": 1523547463758 }, "last-modified-date": { "value": 1523547463983 }, "given-names": { "value": "Cecilia" }, "family-name": { "value": "Payne" }, "credit-name": None, "source": None, "visibility": "PUBLIC", "path": "0000-0001-8868-9743" }, "other-names": { "last-modified-date": None, "other-name": [], "path": "/0000-0001-8868-9743/other-names" }, "biography": None, "path": "/0000-0001-8868-9743/personal-details" }
data = {'last-modified-date': {'value': 1523547463983}, 'name': {'created-date': {'value': 1523547463758}, 'last-modified-date': {'value': 1523547463983}, 'given-names': {'value': 'Cecilia'}, 'family-name': {'value': 'Payne'}, 'credit-name': None, 'source': None, 'visibility': 'PUBLIC', 'path': '0000-0001-8868-9743'}, 'other-names': {'last-modified-date': None, 'other-name': [], 'path': '/0000-0001-8868-9743/other-names'}, 'biography': None, 'path': '/0000-0001-8868-9743/personal-details'}
a = int(input()) t = input() b = int(input()) if t == '*': print(a*b) elif t == '+': print(a+b)
a = int(input()) t = input() b = int(input()) if t == '*': print(a * b) elif t == '+': print(a + b)
meta_file = '/mnt/fs4/chengxuz/Dataset/yfcc/meta.txt' meta_file_dst = '/mnt/fs4/chengxuz/Dataset/yfcc/meta_short.txt' with open(meta_file, 'r') as fin: all_jpgs = fin.readlines() all_jpgs = [_jpg[len('/mnt/fs4/Dataset/YFCC/images/'):] for _jpg in all_jpgs] with open(meta_file_dst, 'w') as fout: fout.writelines(all_jpgs)
meta_file = '/mnt/fs4/chengxuz/Dataset/yfcc/meta.txt' meta_file_dst = '/mnt/fs4/chengxuz/Dataset/yfcc/meta_short.txt' with open(meta_file, 'r') as fin: all_jpgs = fin.readlines() all_jpgs = [_jpg[len('/mnt/fs4/Dataset/YFCC/images/'):] for _jpg in all_jpgs] with open(meta_file_dst, 'w') as fout: fout.writelines(all_jpgs)
def longToSizeString(longVal): if longVal >= 1073741824 : return str(round(longVal/1073741824,2))+"GB" elif longVal >= 1048576: return str(round(longVal/1048576,2)) + "MB" elif longVal >= 1024: return str(round(longVal/1024,2))+"KB" else: return str(longVal)+"B"
def long_to_size_string(longVal): if longVal >= 1073741824: return str(round(longVal / 1073741824, 2)) + 'GB' elif longVal >= 1048576: return str(round(longVal / 1048576, 2)) + 'MB' elif longVal >= 1024: return str(round(longVal / 1024, 2)) + 'KB' else: return str(longVal) + 'B'
""" More info is available here: https://forums.codemasters.com/topic/54423-f1%C2%AE-2020-udp-specification/ """ PACKET_MAPPER = { 'PacketCarTelemetryData_V1': 'telemetry', 'PacketLapData_V1': 'lap', 'PacketMotionData_V1': 'motion', 'PacketSessionData_V1': 'session', 'PacketCarStatusData_V1': 'status', 'PacketCarSetupData_V1': 'setup', 'PacketParticipantsData_V1': 'participants', } TYRE_COMPOUND = { 16: 'C5', # super soft 17: 'C4', 18: 'C3', 19: 'C2', 20: 'C1', # hard 7: 'intermediates', 8: 'wet', # F1 Classic 9: 'dry', 10: 'wet', # F2 11: 'super soft', 12: 'soft', 13: 'medium', 14: 'hard', 15: 'wet', } WEATHER = { 0: 'clear', 1: 'light_cloud', 2: 'overcast', 3: 'light_rain', 4: 'heavy_rain', 5: 'storm', } DRIVER_STATUS = { 0: 'in_garage', 1: 'flying_lap', 2: 'in_lap', 3: 'out_lap', 4: 'on_track', } SESSION_TYPE = { 0: 'unknown', 1: 'practice_1', 2: 'practice_2', 3: 'practice_3', 4: 'short_practice', 5: 'qualifying_1', 6: 'qualifying_2', 7: 'qualifying_3', 8: 'short_qualifying', 9: 'osq', 10: 'race', 11: 'race_2', 12: 'time_trial', }
""" More info is available here: https://forums.codemasters.com/topic/54423-f1%C2%AE-2020-udp-specification/ """ packet_mapper = {'PacketCarTelemetryData_V1': 'telemetry', 'PacketLapData_V1': 'lap', 'PacketMotionData_V1': 'motion', 'PacketSessionData_V1': 'session', 'PacketCarStatusData_V1': 'status', 'PacketCarSetupData_V1': 'setup', 'PacketParticipantsData_V1': 'participants'} tyre_compound = {16: 'C5', 17: 'C4', 18: 'C3', 19: 'C2', 20: 'C1', 7: 'intermediates', 8: 'wet', 9: 'dry', 10: 'wet', 11: 'super soft', 12: 'soft', 13: 'medium', 14: 'hard', 15: 'wet'} weather = {0: 'clear', 1: 'light_cloud', 2: 'overcast', 3: 'light_rain', 4: 'heavy_rain', 5: 'storm'} driver_status = {0: 'in_garage', 1: 'flying_lap', 2: 'in_lap', 3: 'out_lap', 4: 'on_track'} session_type = {0: 'unknown', 1: 'practice_1', 2: 'practice_2', 3: 'practice_3', 4: 'short_practice', 5: 'qualifying_1', 6: 'qualifying_2', 7: 'qualifying_3', 8: 'short_qualifying', 9: 'osq', 10: 'race', 11: 'race_2', 12: 'time_trial'}
input = '361527' input = int(input) def walk(): number = 1 sign = 1 while True: for _ in range(number): yield sign, 0 for _ in range(number): yield 0, sign number += 1 sign = -sign def calc_position(index): pos = (0, 0) for i, (dx, dy) in enumerate(walk()): pos = (pos[0] + dx, pos[1] + dy) if i + 2 == index: return pos pos = calc_position(input) distance = abs(pos[0]) + abs(pos[1]) print(distance) values = [1] indexes = {(0, 0): 0} pos = (0, 0) for i, (dx, dy) in enumerate(walk()): pos = (pos[0] + dx, pos[1] + dy) i = i + 1 indexes[pos] = i i1 = indexes.get((pos[0] - 1, pos[1] - 1)) i2 = indexes.get((pos[0] - 1, pos[1] + 1)) i3 = indexes.get((pos[0] - 1, pos[1])) i4 = indexes.get((pos[0] + 1, pos[1] - 1)) i5 = indexes.get((pos[0] + 1, pos[1] + 1)) i6 = indexes.get((pos[0] + 1, pos[1])) i7 = indexes.get((pos[0], pos[1] + 1)) i8 = indexes.get((pos[0], pos[1] - 1)) value = 0 value += values[i1] if i1 is not None else 0 value += values[i2] if i2 is not None else 0 value += values[i3] if i3 is not None else 0 value += values[i4] if i4 is not None else 0 value += values[i5] if i5 is not None else 0 value += values[i6] if i6 is not None else 0 value += values[i7] if i7 is not None else 0 value += values[i8] if i8 is not None else 0 if value > input: print(value) break values.append(value)
input = '361527' input = int(input) def walk(): number = 1 sign = 1 while True: for _ in range(number): yield (sign, 0) for _ in range(number): yield (0, sign) number += 1 sign = -sign def calc_position(index): pos = (0, 0) for (i, (dx, dy)) in enumerate(walk()): pos = (pos[0] + dx, pos[1] + dy) if i + 2 == index: return pos pos = calc_position(input) distance = abs(pos[0]) + abs(pos[1]) print(distance) values = [1] indexes = {(0, 0): 0} pos = (0, 0) for (i, (dx, dy)) in enumerate(walk()): pos = (pos[0] + dx, pos[1] + dy) i = i + 1 indexes[pos] = i i1 = indexes.get((pos[0] - 1, pos[1] - 1)) i2 = indexes.get((pos[0] - 1, pos[1] + 1)) i3 = indexes.get((pos[0] - 1, pos[1])) i4 = indexes.get((pos[0] + 1, pos[1] - 1)) i5 = indexes.get((pos[0] + 1, pos[1] + 1)) i6 = indexes.get((pos[0] + 1, pos[1])) i7 = indexes.get((pos[0], pos[1] + 1)) i8 = indexes.get((pos[0], pos[1] - 1)) value = 0 value += values[i1] if i1 is not None else 0 value += values[i2] if i2 is not None else 0 value += values[i3] if i3 is not None else 0 value += values[i4] if i4 is not None else 0 value += values[i5] if i5 is not None else 0 value += values[i6] if i6 is not None else 0 value += values[i7] if i7 is not None else 0 value += values[i8] if i8 is not None else 0 if value > input: print(value) break values.append(value)
class Solution: def __init__(self, radius: float, x_center: float, y_center: float): self.radius = radius self.x_center = x_center self.y_center = y_center def randPoint(self) -> List[float]: length = sqrt(random.uniform(0, 1)) * self.radius degree = random.uniform(0, 1) * 2 * math.pi x = self.x_center + length * math.cos(degree) y = self.y_center + length * math.sin(degree) return [x, y]
class Solution: def __init__(self, radius: float, x_center: float, y_center: float): self.radius = radius self.x_center = x_center self.y_center = y_center def rand_point(self) -> List[float]: length = sqrt(random.uniform(0, 1)) * self.radius degree = random.uniform(0, 1) * 2 * math.pi x = self.x_center + length * math.cos(degree) y = self.y_center + length * math.sin(degree) return [x, y]
# https://www.geeksforgeeks.org/minimum-of-two-numbers-in-python """ Given a list, write a Python code to find the Minimum of these two numbers. """ NUMBERS = ( 1, 2, 3, 4, 5, 6, 7, 8 ) if __name__ == "__main__": # The min() method print(min(NUMBERS))
""" Given a list, write a Python code to find the Minimum of these two numbers. """ numbers = (1, 2, 3, 4, 5, 6, 7, 8) if __name__ == '__main__': print(min(NUMBERS))
class MediaState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the states that can be applied to a System.Windows.Controls.MediaElement for the System.Windows.Controls.MediaElement.LoadedBehavior and System.Windows.Controls.MediaElement.UnloadedBehavior properties. enum MediaState,values: Close (2),Manual (0),Pause (3),Play (1),Stop (4) """ 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 Close = None Manual = None Pause = None Play = None Stop = None value__ = None
class Mediastate(Enum, IComparable, IFormattable, IConvertible): """ Specifies the states that can be applied to a System.Windows.Controls.MediaElement for the System.Windows.Controls.MediaElement.LoadedBehavior and System.Windows.Controls.MediaElement.UnloadedBehavior properties. enum MediaState,values: Close (2),Manual (0),Pause (3),Play (1),Stop (4) """ 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 close = None manual = None pause = None play = None stop = None value__ = None
# Copyright 2017 Janos Czentye # # 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. """ Contains classes relevant to element management. """ class AbstractElementManager(object): """ Abstract class for element management components (EM). .. warning:: Not implemented yet! """ def __init__ (self): """ Init. :return: None """ pass class ClickManager(AbstractElementManager): """ Manager class for specific VNF management based on Clicky. .. warning:: Not implemented yet! """ def __init__ (self): """ Init. :return: None """ super(ClickManager, self).__init__()
""" Contains classes relevant to element management. """ class Abstractelementmanager(object): """ Abstract class for element management components (EM). .. warning:: Not implemented yet! """ def __init__(self): """ Init. :return: None """ pass class Clickmanager(AbstractElementManager): """ Manager class for specific VNF management based on Clicky. .. warning:: Not implemented yet! """ def __init__(self): """ Init. :return: None """ super(ClickManager, self).__init__()
class BasisFunctionLike(object): @classmethod def derivatives_factory(cls, coef, *args, **kwargs): raise NotImplementedError @classmethod def functions_factory(cls, coef, *args, **kwargs): raise NotImplementedError
class Basisfunctionlike(object): @classmethod def derivatives_factory(cls, coef, *args, **kwargs): raise NotImplementedError @classmethod def functions_factory(cls, coef, *args, **kwargs): raise NotImplementedError
""" Exceptions Errors detected during execution are called exceptions. Examples: ZeroDivisionError This error is raised when the second argument of a division or modulo operation is zero. #>>> a = '1' #>>> b = '0' #>>> print int(a) / int(b) #>>> ZeroDivisionError: integer division or modulo by zero ValueError This error is raised when a built-in operation or function receives an argument that has the right type but an inappropriate value. #>>> a = '1' #>>> b = '#' #>>> print int(a) / int(b) #>>> ValueError: invalid literal for int() with base 10: '#' To learn more about different built-in exceptions click here. Handling Exceptions The statements try and except can be used to handle selected exceptions. A try statement may have more than one except clause to specify handlers for different exceptions. #Code try: print 1/0 except ZeroDivisionError as e: print "Error Code:",e Output Error Code: integer division or modulo by zero Task You are given two values and . Perform integer division and print . Input Format The first line contains , the number of test cases. The next lines each contain the space separated values of and . Constraints Output Format Print the value of . In the case of ZeroDivisionError or ValueError, print the error code. Sample Input 3 1 0 2 $ 3 1 Sample Output Error Code: integer division or modulo by zero Error Code: invalid literal for int() with base 10: '$' 3 Note: For integer division in Python 3 use //. """ for i in range(int(input())): try: a,b=map(int,input().split()) print(a//b) except Exception as e: print("Error Code:",e)
""" Exceptions Errors detected during execution are called exceptions. Examples: ZeroDivisionError This error is raised when the second argument of a division or modulo operation is zero. #>>> a = '1' #>>> b = '0' #>>> print int(a) / int(b) #>>> ZeroDivisionError: integer division or modulo by zero ValueError This error is raised when a built-in operation or function receives an argument that has the right type but an inappropriate value. #>>> a = '1' #>>> b = '#' #>>> print int(a) / int(b) #>>> ValueError: invalid literal for int() with base 10: '#' To learn more about different built-in exceptions click here. Handling Exceptions The statements try and except can be used to handle selected exceptions. A try statement may have more than one except clause to specify handlers for different exceptions. #Code try: print 1/0 except ZeroDivisionError as e: print "Error Code:",e Output Error Code: integer division or modulo by zero Task You are given two values and . Perform integer division and print . Input Format The first line contains , the number of test cases. The next lines each contain the space separated values of and . Constraints Output Format Print the value of . In the case of ZeroDivisionError or ValueError, print the error code. Sample Input 3 1 0 2 $ 3 1 Sample Output Error Code: integer division or modulo by zero Error Code: invalid literal for int() with base 10: '$' 3 Note: For integer division in Python 3 use //. """ for i in range(int(input())): try: (a, b) = map(int, input().split()) print(a // b) except Exception as e: print('Error Code:', e)
def crop(image, height, width): ''' Function to crop images Parameters: image, a 3d array of the image (can be obtained using plt.imread(image)) height, integer, the desired height of the cropped image width, integer, the desired width of the cropped image Returns: cropped_image, a 3d array with dimensions height x width x 3 Example: crop(image, 10, 15) returns an array with shape (10, 15, 3) ''' pass
def crop(image, height, width): """ Function to crop images Parameters: image, a 3d array of the image (can be obtained using plt.imread(image)) height, integer, the desired height of the cropped image width, integer, the desired width of the cropped image Returns: cropped_image, a 3d array with dimensions height x width x 3 Example: crop(image, 10, 15) returns an array with shape (10, 15, 3) """ pass
entries = [ { 'env-title': 'atari-alien', 'env-variant': 'Human start', 'score': 128.30, }, { 'env-title': 'atari-amidar', 'env-variant': 'Human start', 'score': 11.80, }, { 'env-title': 'atari-assault', 'env-variant': 'Human start', 'score': 166.90, }, { 'env-title': 'atari-asterix', 'env-variant': 'Human start', 'score': 164.50, }, { 'env-title': 'atari-asteroids', 'env-variant': 'Human start', 'score': 871.30, }, { 'env-title': 'atari-atlantis', 'env-variant': 'Human start', 'score': 13463.00, }, { 'env-title': 'atari-bank-heist', 'env-variant': 'Human start', 'score': 21.70, }, { 'env-title': 'atari-battle-zone', 'env-variant': 'Human start', 'score': 3560.00, }, { 'env-title': 'atari-beam-rider', 'env-variant': 'Human start', 'score': 254.60, }, { 'env-title': 'atari-bowling', 'env-variant': 'Human start', 'score': 35.20, }, { 'env-title': 'atari-boxing', 'env-variant': 'Human start', 'score': -1.50, }, { 'env-title': 'atari-breakout', 'env-variant': 'Human start', 'score': 1.60, }, { 'env-title': 'atari-centipede', 'env-variant': 'Human start', 'score': 1925.50, }, { 'env-title': 'atari-chopper-command', 'env-variant': 'Human start', 'score': 644.00, }, { 'env-title': 'atari-crazy-climber', 'env-variant': 'Human start', 'score': 9337.00, }, { 'env-title': 'atari-demon-attack', 'env-variant': 'Human start', 'score': 208.30, }, { 'env-title': 'atari-double-dunk', 'env-variant': 'Human start', 'score': -16.00, }, { 'env-title': 'atari-enduro', 'env-variant': 'Human start', 'score': -81.80, }, { 'env-title': 'atari-fishing-derby', 'env-variant': 'Human start', 'score': -77.10, }, { 'env-title': 'atari-freeway', 'env-variant': 'Human start', 'score': 0.10, }, { 'env-title': 'atari-frostbite', 'env-variant': 'Human start', 'score': 66.40, }, { 'env-title': 'atari-gopher', 'env-variant': 'Human start', 'score': 250.00, }, { 'env-title': 'atari-gravitar', 'env-variant': 'Human start', 'score': 245.50, }, { 'env-title': 'atari-hero', 'env-variant': 'Human start', 'score': 1580.30, }, { 'env-title': 'atari-ice-hockey', 'env-variant': 'Human start', 'score': -9.70, }, { 'env-title': 'atari-jamesbond', 'env-variant': 'Human start', 'score': 33.50, }, { 'env-title': 'atari-kangaroo', 'env-variant': 'Human start', 'score': 100.00, }, { 'env-title': 'atari-krull', 'env-variant': 'Human start', 'score': 1151.90, }, { 'env-title': 'atari-kung-fu-master', 'env-variant': 'Human start', 'score': 304.00, }, { 'env-title': 'atari-montezuma-revenge', 'env-variant': 'Human start', 'score': 25.00, }, { 'env-title': 'atari-ms-pacman', 'env-variant': 'Human start', 'score': 197.80, }, { 'env-title': 'atari-name-this-game', 'env-variant': 'Human start', 'score': 1747.80, }, { 'env-title': 'atari-pong', 'env-variant': 'Human start', 'score': -18.00, }, { 'env-title': 'atari-private-eye', 'env-variant': 'Human start', 'score': 662.80, }, { 'env-title': 'atari-qbert', 'env-variant': 'Human start', 'score': 183.00, }, { 'env-title': 'atari-riverraid', 'env-variant': 'Human start', 'score': 588.30, }, { 'env-title': 'atari-road-runner', 'env-variant': 'Human start', 'score': 200.00, }, { 'env-title': 'atari-robotank', 'env-variant': 'Human start', 'score': 2.40, }, { 'env-title': 'atari-seaquest', 'env-variant': 'Human start', 'score': 215.50, }, { 'env-title': 'atari-space-invaders', 'env-variant': 'Human start', 'score': 182.60, }, { 'env-title': 'atari-star-gunner', 'env-variant': 'Human start', 'score': 697.00, }, { 'env-title': 'atari-tennis', 'env-variant': 'Human start', 'score': -21.40, }, { 'env-title': 'atari-time-pilot', 'env-variant': 'Human start', 'score': 3273.00, }, { 'env-title': 'atari-tutankham', 'env-variant': 'Human start', 'score': 12.70, }, { 'env-title': 'atari-up-n-down', 'env-variant': 'Human start', 'score': 707.20, }, { 'env-title': 'atari-venture', 'env-variant': 'Human start', 'score': 18.00, }, { 'env-title': 'atari-video-pinball', 'env-variant': 'Human start', 'score': 20452.0, }, { 'env-title': 'atari-wizard-of-wor', 'env-variant': 'Human start', 'score': 804.00, }, { 'env-title': 'atari-zaxxon', 'env-variant': 'Human start', 'score': 475.00, }, ]
entries = [{'env-title': 'atari-alien', 'env-variant': 'Human start', 'score': 128.3}, {'env-title': 'atari-amidar', 'env-variant': 'Human start', 'score': 11.8}, {'env-title': 'atari-assault', 'env-variant': 'Human start', 'score': 166.9}, {'env-title': 'atari-asterix', 'env-variant': 'Human start', 'score': 164.5}, {'env-title': 'atari-asteroids', 'env-variant': 'Human start', 'score': 871.3}, {'env-title': 'atari-atlantis', 'env-variant': 'Human start', 'score': 13463.0}, {'env-title': 'atari-bank-heist', 'env-variant': 'Human start', 'score': 21.7}, {'env-title': 'atari-battle-zone', 'env-variant': 'Human start', 'score': 3560.0}, {'env-title': 'atari-beam-rider', 'env-variant': 'Human start', 'score': 254.6}, {'env-title': 'atari-bowling', 'env-variant': 'Human start', 'score': 35.2}, {'env-title': 'atari-boxing', 'env-variant': 'Human start', 'score': -1.5}, {'env-title': 'atari-breakout', 'env-variant': 'Human start', 'score': 1.6}, {'env-title': 'atari-centipede', 'env-variant': 'Human start', 'score': 1925.5}, {'env-title': 'atari-chopper-command', 'env-variant': 'Human start', 'score': 644.0}, {'env-title': 'atari-crazy-climber', 'env-variant': 'Human start', 'score': 9337.0}, {'env-title': 'atari-demon-attack', 'env-variant': 'Human start', 'score': 208.3}, {'env-title': 'atari-double-dunk', 'env-variant': 'Human start', 'score': -16.0}, {'env-title': 'atari-enduro', 'env-variant': 'Human start', 'score': -81.8}, {'env-title': 'atari-fishing-derby', 'env-variant': 'Human start', 'score': -77.1}, {'env-title': 'atari-freeway', 'env-variant': 'Human start', 'score': 0.1}, {'env-title': 'atari-frostbite', 'env-variant': 'Human start', 'score': 66.4}, {'env-title': 'atari-gopher', 'env-variant': 'Human start', 'score': 250.0}, {'env-title': 'atari-gravitar', 'env-variant': 'Human start', 'score': 245.5}, {'env-title': 'atari-hero', 'env-variant': 'Human start', 'score': 1580.3}, {'env-title': 'atari-ice-hockey', 'env-variant': 'Human start', 'score': -9.7}, {'env-title': 'atari-jamesbond', 'env-variant': 'Human start', 'score': 33.5}, {'env-title': 'atari-kangaroo', 'env-variant': 'Human start', 'score': 100.0}, {'env-title': 'atari-krull', 'env-variant': 'Human start', 'score': 1151.9}, {'env-title': 'atari-kung-fu-master', 'env-variant': 'Human start', 'score': 304.0}, {'env-title': 'atari-montezuma-revenge', 'env-variant': 'Human start', 'score': 25.0}, {'env-title': 'atari-ms-pacman', 'env-variant': 'Human start', 'score': 197.8}, {'env-title': 'atari-name-this-game', 'env-variant': 'Human start', 'score': 1747.8}, {'env-title': 'atari-pong', 'env-variant': 'Human start', 'score': -18.0}, {'env-title': 'atari-private-eye', 'env-variant': 'Human start', 'score': 662.8}, {'env-title': 'atari-qbert', 'env-variant': 'Human start', 'score': 183.0}, {'env-title': 'atari-riverraid', 'env-variant': 'Human start', 'score': 588.3}, {'env-title': 'atari-road-runner', 'env-variant': 'Human start', 'score': 200.0}, {'env-title': 'atari-robotank', 'env-variant': 'Human start', 'score': 2.4}, {'env-title': 'atari-seaquest', 'env-variant': 'Human start', 'score': 215.5}, {'env-title': 'atari-space-invaders', 'env-variant': 'Human start', 'score': 182.6}, {'env-title': 'atari-star-gunner', 'env-variant': 'Human start', 'score': 697.0}, {'env-title': 'atari-tennis', 'env-variant': 'Human start', 'score': -21.4}, {'env-title': 'atari-time-pilot', 'env-variant': 'Human start', 'score': 3273.0}, {'env-title': 'atari-tutankham', 'env-variant': 'Human start', 'score': 12.7}, {'env-title': 'atari-up-n-down', 'env-variant': 'Human start', 'score': 707.2}, {'env-title': 'atari-venture', 'env-variant': 'Human start', 'score': 18.0}, {'env-title': 'atari-video-pinball', 'env-variant': 'Human start', 'score': 20452.0}, {'env-title': 'atari-wizard-of-wor', 'env-variant': 'Human start', 'score': 804.0}, {'env-title': 'atari-zaxxon', 'env-variant': 'Human start', 'score': 475.0}]
class BoxField: BOXES = 'bbox' KEYPOINTS = 'keypoints' LABELS = 'label' MASKS = 'masks' NUM_BOXES = 'num_boxes' SCORES = 'scores' WEIGHTS = 'weights' class DatasetField: IMAGES = 'images' IMAGES_INFO = 'images_information' IMAGES_PMASK = 'images_padding_mask'
class Boxfield: boxes = 'bbox' keypoints = 'keypoints' labels = 'label' masks = 'masks' num_boxes = 'num_boxes' scores = 'scores' weights = 'weights' class Datasetfield: images = 'images' images_info = 'images_information' images_pmask = 'images_padding_mask'
# # PySNMP MIB module HH3C-WAPI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-WAPI-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:30:34 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon") ifDescr, ifIndex = mibBuilder.importSymbols("IF-MIB", "ifDescr", "ifIndex") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Integer32, MibIdentifier, ModuleIdentity, ObjectIdentity, IpAddress, Unsigned32, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, iso, Bits, Gauge32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibIdentifier", "ModuleIdentity", "ObjectIdentity", "IpAddress", "Unsigned32", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "iso", "Bits", "Gauge32", "Counter64") TextualConvention, MacAddress, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "DisplayString", "TruthValue") hh3cwapiMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 77)) if mibBuilder.loadTexts: hh3cwapiMIB.setLastUpdated('201012011757Z') if mibBuilder.loadTexts: hh3cwapiMIB.setOrganization('Hangzhou H3C Tech. Co., Ltd.') if mibBuilder.loadTexts: hh3cwapiMIB.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ') if mibBuilder.loadTexts: hh3cwapiMIB.setDescription('HH3C-WAPI-MIB is an extension of MIB in WAPI protocol. This MIB contains objects to manage configuration and monitor running state for WAPI feature.') hh3cwapiMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1)) hh3cwapiMIBStatsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2)) hh3cwapiMIBTableObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3)) hh3cwapiTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4)) hh3cwapiModeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiModeEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiModeEnabled.setDescription('When this object is set to TRUE, it shall indicate that WAPI is enabled. Otherwise, it shall indicate that WAPI is disabled.') hh3cwapiASIPAddressType = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 2), InetAddressType().clone('ipv4')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setDescription('This object is used to set global IP addresses type (IPv4 or IPv6) of AS.') hh3cwapiASIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 3), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiASIPAddress.setDescription('This object is used to set the global IP address of AS.') hh3cwapiCertificateInstalled = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the entity has installed certificate. Otherwise, it shall indicate that the entity hasn't installed certificate.") hh3cwapiStatsWAISignatureErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setDescription('This counter increases when the received packet of WAI signature is wrong.') hh3cwapiStatsWAIHMACErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setDescription('This counter increases when the received packet of WAI message authentication key checking error occurs.') hh3cwapiStatsWAIAuthRsltFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setDescription('This counter increases when the WAI authentication result is unsuccessful.') hh3cwapiStatsWAIDiscardCounters = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setDescription('This counter increases when the received packet of WAI are discarded.') hh3cwapiStatsWAITimeoutCounters = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setDescription('This counter increases when the packet of WAI overtime are detected.') hh3cwapiStatsWAIFormatErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setDescription('This counter increases when the WAI packet of WAI format error is detected.') hh3cwapiStatsWAICtfHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setDescription('This counter increases when the WAI certificate authenticates unsuccessfully.') hh3cwapiStatsWAIUniHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setDescription('This counter increases when the WAI unicast cipher key negotiates unsuccessfully.') hh3cwapiStatsWAIMulHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setDescription('This counter increases when the WAI multicast cipher key announces unsuccessfully.') hh3cwapiConfigTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1), ) if mibBuilder.loadTexts: hh3cwapiConfigTable.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigTable.setDescription('The table containing WAPI configuration objects.') hh3cwapiConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hh3cwapiConfigEntry.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigEntry.setDescription('An entry in the hh3cwapiConfigTable.') hh3cwapiConfigASIPAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 1), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setDescription('This object is used to set IP addresses type of AS.') hh3cwapiConfigASIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 2), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setDescription('This object is used to set the IP address of AS.') hh3cwapiConfigAuthMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("certificate", 1), ("psk", 2), ("certificatePsk", 3))).clone('certificate')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setDescription('This object selects a mechanism for WAPI authentication method. The default is certificate.') hh3cwapiConfigAuthMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("standard", 1), ("radiusExtension", 2))).clone('standard')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setDescription('This object selects a mechanism for WAPI authentication mode. When the value is standard, it shall indicate that the entity acts accord with the official definition. Otherwise, it shall indicate that the entity finishs authentication by means of RADIUS. The default is standard.') hh3cwapiConfigISPDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 24))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setDescription('The ISP domain name.') hh3cwapiConfigCertificateDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setDescription('The PKI domain name.') hh3cwapiConfigASName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigASName.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASName.setDescription('The name of AS.') hh3cwapiConfigBKRekeyEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 8), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setDescription('This object indicates whether the BK rekey function is supported. When the value is TURE, it shall indicate that the BK rekey function is supported. Otherwise, it shall indicate that the BK rekey function is not supported.') hh3cwapiConfigExtTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2), ) if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setDescription('The table containing WAPI configuration objects for SSID.') hh3cwapiConfigExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1), ).setIndexNames((0, "HH3C-WAPI-MIB", "hh3cwapiConfigServicePolicyID")) if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setDescription('An extend entry in the hh3cwapiConfigExtTable.') hh3cwapiConfigServicePolicyID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setDescription('Represents the ID of each service policy.') hh3cwapiConfigUnicastCipherEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setDescription('This object enables or disables the unicast cipher.') hh3cwapiConfigUnicastCipherSize = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setDescription('This object indicates the length in bits of the unicast cipher key. This should be 256 for SMS4, first 128 bits for encrypting, last 128 bits for integrity checking.') hh3cwapiConfigAuthenticationSuiteEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setDescription('This variable indicates the corresponding AKM suite is enabled or disabled.') hh3cwapiConfigAuthenticationSuite = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setDescription('The selector of an AKM suite. It consists of an OUI (the first 3 octets) and a cipher suite identifier (the last octet).') hh3cwapiCfgExtASIPAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 6), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setDescription('This object is used to set IP addresses type of AS.') hh3cwapiCfgExtASIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 7), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setDescription('This object is used to set the IP address of AS.') hh3cwapiCfgExtASName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setDescription('This object is used to set the name of AS.') hh3cwapiCfgExtCertDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setDescription('This object is used to set the PKI domain name.') hh3cwapiCfgExtCertInstalled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the SSID has installed certificate. Otherwise, it shall indicate that the SSID hasn't installed certificate.") hh3cwapiTrapPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0)) hh3cwapiUserwithInvalidCertificate = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId")) if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setStatus('current') if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setDescription('This trap is sent when a user intrudes upon network with invalid certificate.') hh3cwapiStationReplayAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 2)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId")) if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setDescription('This trap is sent when an attacker records and replays network transactions.') hh3cwapiTamperAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 3)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId")) if mibBuilder.loadTexts: hh3cwapiTamperAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTamperAttack.setDescription('This trap is sent when an attacker monitors network traffic and maliciously changes data in transit(for example, an attacker may modify the contents of a WAI message).') hh3cwapiLowSafeLevelAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 4)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId")) if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setDescription('This trap is sent when a station associates AP(Access Point), creates packet of Unicast Key Negotiation Response with wrong WIE(WAPI Information Element) of ASUE(Authentication Supplicant Entity).') hh3cwapiAddressRedirectionAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 5)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId")) if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setDescription('This trap is sent when an attacker maliciously changes destination MAC address of WPI(WLAN Privacy Infrastructure) frame.') hh3cwapiTrapInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1)) hh3cwapiTrapInfoMacAddr = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 1), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setDescription('The MAC address of the WAPI user.') hh3cwapiTrapInfoAPId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 2), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setDescription('To uniquely identify each AP.') hh3cwapiTrapInfoRadioId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 3), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setDescription('Represents each radio.') hh3cwapiTrapInfoBSSId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setDescription('As MAC Address format, it is to identify BSS.') mibBuilder.exportSymbols("HH3C-WAPI-MIB", hh3cwapiConfigAuthMode=hh3cwapiConfigAuthMode, hh3cwapiMIBStatsObjects=hh3cwapiMIBStatsObjects, hh3cwapiTrapPrefix=hh3cwapiTrapPrefix, hh3cwapiTrapInfoMacAddr=hh3cwapiTrapInfoMacAddr, hh3cwapiStatsWAIMulHskFailures=hh3cwapiStatsWAIMulHskFailures, hh3cwapiTrapInfoBSSId=hh3cwapiTrapInfoBSSId, hh3cwapiConfigASName=hh3cwapiConfigASName, hh3cwapiModeEnabled=hh3cwapiModeEnabled, hh3cwapiConfigExtEntry=hh3cwapiConfigExtEntry, hh3cwapiTrap=hh3cwapiTrap, hh3cwapiMIB=hh3cwapiMIB, hh3cwapiConfigServicePolicyID=hh3cwapiConfigServicePolicyID, hh3cwapiUserwithInvalidCertificate=hh3cwapiUserwithInvalidCertificate, hh3cwapiAddressRedirectionAttack=hh3cwapiAddressRedirectionAttack, hh3cwapiStationReplayAttack=hh3cwapiStationReplayAttack, hh3cwapiTrapInfoAPId=hh3cwapiTrapInfoAPId, hh3cwapiConfigExtTable=hh3cwapiConfigExtTable, hh3cwapiTamperAttack=hh3cwapiTamperAttack, hh3cwapiASIPAddressType=hh3cwapiASIPAddressType, hh3cwapiCfgExtASName=hh3cwapiCfgExtASName, PYSNMP_MODULE_ID=hh3cwapiMIB, hh3cwapiTrapInfo=hh3cwapiTrapInfo, hh3cwapiMIBObjects=hh3cwapiMIBObjects, hh3cwapiASIPAddress=hh3cwapiASIPAddress, hh3cwapiStatsWAICtfHskFailures=hh3cwapiStatsWAICtfHskFailures, hh3cwapiCfgExtCertInstalled=hh3cwapiCfgExtCertInstalled, hh3cwapiStatsWAIHMACErrors=hh3cwapiStatsWAIHMACErrors, hh3cwapiTrapInfoRadioId=hh3cwapiTrapInfoRadioId, hh3cwapiStatsWAIUniHskFailures=hh3cwapiStatsWAIUniHskFailures, hh3cwapiConfigUnicastCipherSize=hh3cwapiConfigUnicastCipherSize, hh3cwapiCfgExtCertDomain=hh3cwapiCfgExtCertDomain, hh3cwapiStatsWAISignatureErrors=hh3cwapiStatsWAISignatureErrors, hh3cwapiConfigASIPAddressType=hh3cwapiConfigASIPAddressType, hh3cwapiConfigUnicastCipherEnabled=hh3cwapiConfigUnicastCipherEnabled, hh3cwapiConfigAuthenticationSuite=hh3cwapiConfigAuthenticationSuite, hh3cwapiLowSafeLevelAttack=hh3cwapiLowSafeLevelAttack, hh3cwapiStatsWAIAuthRsltFailures=hh3cwapiStatsWAIAuthRsltFailures, hh3cwapiConfigTable=hh3cwapiConfigTable, hh3cwapiCfgExtASIPAddress=hh3cwapiCfgExtASIPAddress, hh3cwapiConfigBKRekeyEnabled=hh3cwapiConfigBKRekeyEnabled, hh3cwapiCfgExtASIPAddressType=hh3cwapiCfgExtASIPAddressType, hh3cwapiMIBTableObjects=hh3cwapiMIBTableObjects, hh3cwapiConfigCertificateDomain=hh3cwapiConfigCertificateDomain, hh3cwapiConfigASIPAddress=hh3cwapiConfigASIPAddress, hh3cwapiConfigEntry=hh3cwapiConfigEntry, hh3cwapiConfigAuthenticationSuiteEnabled=hh3cwapiConfigAuthenticationSuiteEnabled, hh3cwapiConfigISPDomain=hh3cwapiConfigISPDomain, hh3cwapiStatsWAITimeoutCounters=hh3cwapiStatsWAITimeoutCounters, hh3cwapiStatsWAIFormatErrors=hh3cwapiStatsWAIFormatErrors, hh3cwapiStatsWAIDiscardCounters=hh3cwapiStatsWAIDiscardCounters, hh3cwapiCertificateInstalled=hh3cwapiCertificateInstalled, hh3cwapiConfigAuthMethod=hh3cwapiConfigAuthMethod)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint') (hh3c_common,) = mibBuilder.importSymbols('HH3C-OID-MIB', 'hh3cCommon') (if_descr, if_index) = mibBuilder.importSymbols('IF-MIB', 'ifDescr', 'ifIndex') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (integer32, mib_identifier, module_identity, object_identity, ip_address, unsigned32, time_ticks, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, iso, bits, gauge32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'MibIdentifier', 'ModuleIdentity', 'ObjectIdentity', 'IpAddress', 'Unsigned32', 'TimeTicks', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'iso', 'Bits', 'Gauge32', 'Counter64') (textual_convention, mac_address, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'MacAddress', 'DisplayString', 'TruthValue') hh3cwapi_mib = module_identity((1, 3, 6, 1, 4, 1, 25506, 2, 77)) if mibBuilder.loadTexts: hh3cwapiMIB.setLastUpdated('201012011757Z') if mibBuilder.loadTexts: hh3cwapiMIB.setOrganization('Hangzhou H3C Tech. Co., Ltd.') if mibBuilder.loadTexts: hh3cwapiMIB.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ') if mibBuilder.loadTexts: hh3cwapiMIB.setDescription('HH3C-WAPI-MIB is an extension of MIB in WAPI protocol. This MIB contains objects to manage configuration and monitor running state for WAPI feature.') hh3cwapi_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1)) hh3cwapi_mib_stats_objects = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2)) hh3cwapi_mib_table_objects = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3)) hh3cwapi_trap = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4)) hh3cwapi_mode_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiModeEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiModeEnabled.setDescription('When this object is set to TRUE, it shall indicate that WAPI is enabled. Otherwise, it shall indicate that WAPI is disabled.') hh3cwapi_asip_address_type = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 2), inet_address_type().clone('ipv4')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setDescription('This object is used to set global IP addresses type (IPv4 or IPv6) of AS.') hh3cwapi_asip_address = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 3), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiASIPAddress.setDescription('This object is used to set the global IP address of AS.') hh3cwapi_certificate_installed = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the entity has installed certificate. Otherwise, it shall indicate that the entity hasn't installed certificate.") hh3cwapi_stats_wai_signature_errors = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setDescription('This counter increases when the received packet of WAI signature is wrong.') hh3cwapi_stats_waihmac_errors = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setDescription('This counter increases when the received packet of WAI message authentication key checking error occurs.') hh3cwapi_stats_wai_auth_rslt_failures = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setDescription('This counter increases when the WAI authentication result is unsuccessful.') hh3cwapi_stats_wai_discard_counters = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setDescription('This counter increases when the received packet of WAI are discarded.') hh3cwapi_stats_wai_timeout_counters = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setDescription('This counter increases when the packet of WAI overtime are detected.') hh3cwapi_stats_wai_format_errors = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setDescription('This counter increases when the WAI packet of WAI format error is detected.') hh3cwapi_stats_wai_ctf_hsk_failures = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setDescription('This counter increases when the WAI certificate authenticates unsuccessfully.') hh3cwapi_stats_wai_uni_hsk_failures = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setDescription('This counter increases when the WAI unicast cipher key negotiates unsuccessfully.') hh3cwapi_stats_wai_mul_hsk_failures = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setDescription('This counter increases when the WAI multicast cipher key announces unsuccessfully.') hh3cwapi_config_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1)) if mibBuilder.loadTexts: hh3cwapiConfigTable.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigTable.setDescription('The table containing WAPI configuration objects.') hh3cwapi_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hh3cwapiConfigEntry.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigEntry.setDescription('An entry in the hh3cwapiConfigTable.') hh3cwapi_config_asip_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 1), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setDescription('This object is used to set IP addresses type of AS.') hh3cwapi_config_asip_address = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 2), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setDescription('This object is used to set the IP address of AS.') hh3cwapi_config_auth_method = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('certificate', 1), ('psk', 2), ('certificatePsk', 3))).clone('certificate')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setDescription('This object selects a mechanism for WAPI authentication method. The default is certificate.') hh3cwapi_config_auth_mode = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('standard', 1), ('radiusExtension', 2))).clone('standard')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setDescription('This object selects a mechanism for WAPI authentication mode. When the value is standard, it shall indicate that the entity acts accord with the official definition. Otherwise, it shall indicate that the entity finishs authentication by means of RADIUS. The default is standard.') hh3cwapi_config_isp_domain = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 24))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setDescription('The ISP domain name.') hh3cwapi_config_certificate_domain = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setDescription('The PKI domain name.') hh3cwapi_config_as_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigASName.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigASName.setDescription('The name of AS.') hh3cwapi_config_bk_rekey_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 8), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setDescription('This object indicates whether the BK rekey function is supported. When the value is TURE, it shall indicate that the BK rekey function is supported. Otherwise, it shall indicate that the BK rekey function is not supported.') hh3cwapi_config_ext_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2)) if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setDescription('The table containing WAPI configuration objects for SSID.') hh3cwapi_config_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1)).setIndexNames((0, 'HH3C-WAPI-MIB', 'hh3cwapiConfigServicePolicyID')) if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setDescription('An extend entry in the hh3cwapiConfigExtTable.') hh3cwapi_config_service_policy_id = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 1), integer32()) if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setDescription('Represents the ID of each service policy.') hh3cwapi_config_unicast_cipher_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 2), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setDescription('This object enables or disables the unicast cipher.') hh3cwapi_config_unicast_cipher_size = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setDescription('This object indicates the length in bits of the unicast cipher key. This should be 256 for SMS4, first 128 bits for encrypting, last 128 bits for integrity checking.') hh3cwapi_config_authentication_suite_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setDescription('This variable indicates the corresponding AKM suite is enabled or disabled.') hh3cwapi_config_authentication_suite = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setStatus('current') if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setDescription('The selector of an AKM suite. It consists of an OUI (the first 3 octets) and a cipher suite identifier (the last octet).') hh3cwapi_cfg_ext_asip_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 6), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setDescription('This object is used to set IP addresses type of AS.') hh3cwapi_cfg_ext_asip_address = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 7), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setDescription('This object is used to set the IP address of AS.') hh3cwapi_cfg_ext_as_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setDescription('This object is used to set the name of AS.') hh3cwapi_cfg_ext_cert_domain = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setDescription('This object is used to set the PKI domain name.') hh3cwapi_cfg_ext_cert_installed = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 10), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setStatus('current') if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the SSID has installed certificate. Otherwise, it shall indicate that the SSID hasn't installed certificate.") hh3cwapi_trap_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0)) hh3cwapi_userwith_invalid_certificate = notification_type((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 1)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifDescr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoMacAddr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoAPId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoRadioId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoBSSId')) if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setStatus('current') if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setDescription('This trap is sent when a user intrudes upon network with invalid certificate.') hh3cwapi_station_replay_attack = notification_type((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 2)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifDescr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoMacAddr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoAPId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoRadioId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoBSSId')) if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setDescription('This trap is sent when an attacker records and replays network transactions.') hh3cwapi_tamper_attack = notification_type((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 3)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifDescr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoMacAddr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoAPId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoRadioId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoBSSId')) if mibBuilder.loadTexts: hh3cwapiTamperAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTamperAttack.setDescription('This trap is sent when an attacker monitors network traffic and maliciously changes data in transit(for example, an attacker may modify the contents of a WAI message).') hh3cwapi_low_safe_level_attack = notification_type((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 4)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifDescr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoMacAddr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoAPId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoRadioId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoBSSId')) if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setDescription('This trap is sent when a station associates AP(Access Point), creates packet of Unicast Key Negotiation Response with wrong WIE(WAPI Information Element) of ASUE(Authentication Supplicant Entity).') hh3cwapi_address_redirection_attack = notification_type((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 5)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifDescr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoMacAddr'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoAPId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoRadioId'), ('HH3C-WAPI-MIB', 'hh3cwapiTrapInfoBSSId')) if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setStatus('current') if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setDescription('This trap is sent when an attacker maliciously changes destination MAC address of WPI(WLAN Privacy Infrastructure) frame.') hh3cwapi_trap_info = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1)) hh3cwapi_trap_info_mac_addr = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 1), mac_address()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setDescription('The MAC address of the WAPI user.') hh3cwapi_trap_info_ap_id = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 2), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setDescription('To uniquely identify each AP.') hh3cwapi_trap_info_radio_id = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 3), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setDescription('Represents each radio.') hh3cwapi_trap_info_bss_id = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 4), mac_address()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setStatus('current') if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setDescription('As MAC Address format, it is to identify BSS.') mibBuilder.exportSymbols('HH3C-WAPI-MIB', hh3cwapiConfigAuthMode=hh3cwapiConfigAuthMode, hh3cwapiMIBStatsObjects=hh3cwapiMIBStatsObjects, hh3cwapiTrapPrefix=hh3cwapiTrapPrefix, hh3cwapiTrapInfoMacAddr=hh3cwapiTrapInfoMacAddr, hh3cwapiStatsWAIMulHskFailures=hh3cwapiStatsWAIMulHskFailures, hh3cwapiTrapInfoBSSId=hh3cwapiTrapInfoBSSId, hh3cwapiConfigASName=hh3cwapiConfigASName, hh3cwapiModeEnabled=hh3cwapiModeEnabled, hh3cwapiConfigExtEntry=hh3cwapiConfigExtEntry, hh3cwapiTrap=hh3cwapiTrap, hh3cwapiMIB=hh3cwapiMIB, hh3cwapiConfigServicePolicyID=hh3cwapiConfigServicePolicyID, hh3cwapiUserwithInvalidCertificate=hh3cwapiUserwithInvalidCertificate, hh3cwapiAddressRedirectionAttack=hh3cwapiAddressRedirectionAttack, hh3cwapiStationReplayAttack=hh3cwapiStationReplayAttack, hh3cwapiTrapInfoAPId=hh3cwapiTrapInfoAPId, hh3cwapiConfigExtTable=hh3cwapiConfigExtTable, hh3cwapiTamperAttack=hh3cwapiTamperAttack, hh3cwapiASIPAddressType=hh3cwapiASIPAddressType, hh3cwapiCfgExtASName=hh3cwapiCfgExtASName, PYSNMP_MODULE_ID=hh3cwapiMIB, hh3cwapiTrapInfo=hh3cwapiTrapInfo, hh3cwapiMIBObjects=hh3cwapiMIBObjects, hh3cwapiASIPAddress=hh3cwapiASIPAddress, hh3cwapiStatsWAICtfHskFailures=hh3cwapiStatsWAICtfHskFailures, hh3cwapiCfgExtCertInstalled=hh3cwapiCfgExtCertInstalled, hh3cwapiStatsWAIHMACErrors=hh3cwapiStatsWAIHMACErrors, hh3cwapiTrapInfoRadioId=hh3cwapiTrapInfoRadioId, hh3cwapiStatsWAIUniHskFailures=hh3cwapiStatsWAIUniHskFailures, hh3cwapiConfigUnicastCipherSize=hh3cwapiConfigUnicastCipherSize, hh3cwapiCfgExtCertDomain=hh3cwapiCfgExtCertDomain, hh3cwapiStatsWAISignatureErrors=hh3cwapiStatsWAISignatureErrors, hh3cwapiConfigASIPAddressType=hh3cwapiConfigASIPAddressType, hh3cwapiConfigUnicastCipherEnabled=hh3cwapiConfigUnicastCipherEnabled, hh3cwapiConfigAuthenticationSuite=hh3cwapiConfigAuthenticationSuite, hh3cwapiLowSafeLevelAttack=hh3cwapiLowSafeLevelAttack, hh3cwapiStatsWAIAuthRsltFailures=hh3cwapiStatsWAIAuthRsltFailures, hh3cwapiConfigTable=hh3cwapiConfigTable, hh3cwapiCfgExtASIPAddress=hh3cwapiCfgExtASIPAddress, hh3cwapiConfigBKRekeyEnabled=hh3cwapiConfigBKRekeyEnabled, hh3cwapiCfgExtASIPAddressType=hh3cwapiCfgExtASIPAddressType, hh3cwapiMIBTableObjects=hh3cwapiMIBTableObjects, hh3cwapiConfigCertificateDomain=hh3cwapiConfigCertificateDomain, hh3cwapiConfigASIPAddress=hh3cwapiConfigASIPAddress, hh3cwapiConfigEntry=hh3cwapiConfigEntry, hh3cwapiConfigAuthenticationSuiteEnabled=hh3cwapiConfigAuthenticationSuiteEnabled, hh3cwapiConfigISPDomain=hh3cwapiConfigISPDomain, hh3cwapiStatsWAITimeoutCounters=hh3cwapiStatsWAITimeoutCounters, hh3cwapiStatsWAIFormatErrors=hh3cwapiStatsWAIFormatErrors, hh3cwapiStatsWAIDiscardCounters=hh3cwapiStatsWAIDiscardCounters, hh3cwapiCertificateInstalled=hh3cwapiCertificateInstalled, hh3cwapiConfigAuthMethod=hh3cwapiConfigAuthMethod)
class Solution: def longestPalindromeSubseq(self, s: str) -> int: n = len(s) dp = [[0 for _ in range(n+1) ] for _ in range(n+1)] for i in range(1,n+1): for j in range(1,n+1): if( s[i-1] == s[n-j]): dp[i][j] = 1+dp[i-1][j-1] else: dp[i][j] = max(dp[i-1][j],dp[i][j-1]) return dp[n][n]
class Solution: def longest_palindrome_subseq(self, s: str) -> int: n = len(s) dp = [[0 for _ in range(n + 1)] for _ in range(n + 1)] for i in range(1, n + 1): for j in range(1, n + 1): if s[i - 1] == s[n - j]: dp[i][j] = 1 + dp[i - 1][j - 1] else: dp[i][j] = max(dp[i - 1][j], dp[i][j - 1]) return dp[n][n]
class JsutCounter: __secretCount = 0 def count(self): self.__secretCount += 1 print(self.__secretCount) counter = JustCounter() counter.count() counter.count() # print(counter.__secretCount) print(counter._JustCounter.__secretCount) #public:normal variables #private:__ #protected:_
class Jsutcounter: __secret_count = 0 def count(self): self.__secretCount += 1 print(self.__secretCount) counter = just_counter() counter.count() counter.count() print(counter._JustCounter.__secretCount)
class Solution: def max_dp(self, nums2: List[int]) -> int: dp=[0,0,nums2[0]] for num in nums2[1:]: dp.append(num+max(dp[-2], dp[-3])) return max(dp[-1], dp[-2]) def rob(self, nums: List[int]) -> int: if len(nums)<=3: return max(nums) elif len(nums)==4: return max(nums[0]+nums[2], nums[1]+nums[-1]) else: dp=[0,0,0] cand1 = nums[0]+self.max_dp(nums[2:-1]) cand2 = nums[-1]+self.max_dp(nums[1:-2]) cand3 = self.max_dp(nums[1:-1]) return max(cand1, cand2, cand3) # [1,2,1,0] # [2,7,9,3,1]
class Solution: def max_dp(self, nums2: List[int]) -> int: dp = [0, 0, nums2[0]] for num in nums2[1:]: dp.append(num + max(dp[-2], dp[-3])) return max(dp[-1], dp[-2]) def rob(self, nums: List[int]) -> int: if len(nums) <= 3: return max(nums) elif len(nums) == 4: return max(nums[0] + nums[2], nums[1] + nums[-1]) else: dp = [0, 0, 0] cand1 = nums[0] + self.max_dp(nums[2:-1]) cand2 = nums[-1] + self.max_dp(nums[1:-2]) cand3 = self.max_dp(nums[1:-1]) return max(cand1, cand2, cand3)
#-*- coding:utf-8 -*- def display(name,age): print (name,age)
def display(name, age): print(name, age)
n = int(input("Digite o valor de n: ")) i=0 count = 0 while count<n: if (i % 2) != 0: print (i) count = count + 1 i = i + 1
n = int(input('Digite o valor de n: ')) i = 0 count = 0 while count < n: if i % 2 != 0: print(i) count = count + 1 i = i + 1
# pylint: disable=missing-class-docstring """Exception classes for Eddington.""" class EddingtonException(Exception): # noqa: D101 pass # Interval Errors class IntervalError(EddingtonException): # noqa: D101 pass class IntervalIntersectionError(IntervalError): # noqa: D101 def __init__(self, *intervals): # noqa: D107 super().__init__(f"The intervals {intervals} do not intersect") # Fitting Function Errors class FittingFunctionLoadError(EddingtonException): # noqa: D101 pass class FittingFunctionSaveError(EddingtonException): # noqa: D101 pass class FittingFunctionRuntimeError(EddingtonException): # noqa: D101 pass # Fitting Data Errors class FittingDataError(EddingtonException): # noqa: D101 pass class FittingDataColumnsLengthError(FittingDataError): # noqa: D101 msg = "All columns in FittingData should have the same length" def __init__(self) -> None: # noqa: D107 super().__init__(self.msg) class FittingDataInvalidFile(FittingDataError): # noqa: D101 pass class FittingDataColumnIndexError(FittingDataError): # noqa: D101 def __init__(self, index: int, max_index: int) -> None: # noqa: D107 super().__init__( f"No column number {index} in data. " f"index should be between 1 and {max_index}" ) class FittingDataColumnExistenceError(FittingDataError): # noqa: D101 def __init__(self, column: str) -> None: # noqa: D107 super().__init__(f'Could not find column "{column}" in data') class FittingDataRecordIndexError(FittingDataError): # noqa: D101 def __init__(self, index: int, number_of_records: int) -> None: # noqa: D107 super().__init__( f"Could not find record with index {index} in data. " f"Index should be between 1 and {number_of_records}." ) class FittingDataRecordsSelectionError(FittingDataError): # noqa: D101 pass class FittingDataSetError(FittingDataError): # noqa: D101 pass # Fitting Errors class FittingError(EddingtonException): # noqa: D101 pass # Plot Errors class PlottingError(EddingtonException): # noqa: D101 pass # CLI Errors class EddingtonCLIError(EddingtonException): # noqa: D101 pass
"""Exception classes for Eddington.""" class Eddingtonexception(Exception): pass class Intervalerror(EddingtonException): pass class Intervalintersectionerror(IntervalError): def __init__(self, *intervals): super().__init__(f'The intervals {intervals} do not intersect') class Fittingfunctionloaderror(EddingtonException): pass class Fittingfunctionsaveerror(EddingtonException): pass class Fittingfunctionruntimeerror(EddingtonException): pass class Fittingdataerror(EddingtonException): pass class Fittingdatacolumnslengtherror(FittingDataError): msg = 'All columns in FittingData should have the same length' def __init__(self) -> None: super().__init__(self.msg) class Fittingdatainvalidfile(FittingDataError): pass class Fittingdatacolumnindexerror(FittingDataError): def __init__(self, index: int, max_index: int) -> None: super().__init__(f'No column number {index} in data. index should be between 1 and {max_index}') class Fittingdatacolumnexistenceerror(FittingDataError): def __init__(self, column: str) -> None: super().__init__(f'Could not find column "{column}" in data') class Fittingdatarecordindexerror(FittingDataError): def __init__(self, index: int, number_of_records: int) -> None: super().__init__(f'Could not find record with index {index} in data. Index should be between 1 and {number_of_records}.') class Fittingdatarecordsselectionerror(FittingDataError): pass class Fittingdataseterror(FittingDataError): pass class Fittingerror(EddingtonException): pass class Plottingerror(EddingtonException): pass class Eddingtonclierror(EddingtonException): pass
# # PySNMP MIB module WWP-LEOS-BENCHMARK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WWP-LEOS-BENCHMARK-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:30:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, Unsigned32, iso, ModuleIdentity, Bits, NotificationType, IpAddress, Gauge32, Integer32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Counter64, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Unsigned32", "iso", "ModuleIdentity", "Bits", "NotificationType", "IpAddress", "Gauge32", "Integer32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Counter64", "TimeTicks") DisplayString, MacAddress, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention", "TruthValue") wwpModulesLeos, = mibBuilder.importSymbols("WWP-SMI", "wwpModulesLeos") wwpLeosBenchmarkMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43)) wwpLeosBenchmarkMIB.setRevisions(('2012-02-13 08:00', '2012-02-03 08:00', '2010-12-14 08:00', '2010-11-25 08:00', '2010-11-15 08:00',)) if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setLastUpdated('201202130800Z') if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setOrganization('Ciena, Inc') class BenchmarkLatencyPdvTestState(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9)) namedValues = NamedValues(("idle", 1), ("sendingTraffic", 2), ("waitingForTimestampData", 3), ("waitingForResidualPackets", 4), ("processingResults", 5), ("stoppedByIntervalTimer", 6), ("stoppedByDurationTimer", 7), ("stoppedByUser", 8), ("done", 9)) wwpLeosBenchmarkMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1)) wwpLeosBenchmarkModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1)) wwpLeosBenchmarkReflectorModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2)) wwpLeosBenchmarkGeneratorModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3)) wwpLeosBenchmarkFpgaStats = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4)) wwpLeosBenchmarkPortStats = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5)) wwpLeosBenchmarkProfileObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6)) wwpLeosBenchmarkRole = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("reflector", 2), ("generator", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkRole.setStatus('current') wwpLeosBenchmarkPort = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkPort.setStatus('current') wwpLeosBenchmarkMode = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("inService", 2), ("outOfService", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkMode.setStatus('current') wwpLeosBenchmarkEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkEnable.setStatus('current') wwpLeosBenchmarkOperEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkOperEnable.setStatus('current') wwpLeosBenchmarkLocalFpgaMac = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 6), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkLocalFpgaMac.setStatus('current') wwpLeosBenchmarkReflectorEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorEnable.setStatus('current') wwpLeosBenchmarkReflectorVid = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVid.setStatus('current') wwpLeosBenchmarkReflectorVendorType = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("ciena", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVendorType.setStatus('current') wwpLeosBenchmarkGeneratorEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorEnable.setStatus('current') wwpLeosBenchmarkGeneratorprofileUnderTest = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorprofileUnderTest.setStatus('current') wwpLeosBenchmarkGeneratorThroughputTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("idle", 1), ("running", 2), ("waitingForResidualPackets", 3), ("processingResults", 4), ("stoppedByIntervalTimer", 5), ("stoppedByDurationTimer", 6), ("stoppedByUser", 7), ("done", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorThroughputTestState.setStatus('current') wwpLeosBenchmarkGeneratorFramelossTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("idle", 1), ("runningFirstTest", 2), ("waitingForResidualFirstPackets", 3), ("processingFirstResults", 4), ("runningSecondTest", 5), ("waitingForResidualSecondPackets", 6), ("processingSecondResults", 7), ("stoppedByIntervalTimer", 8), ("stoppedByDurationTimer", 9), ("stoppedByUser", 10), ("done", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorFramelossTestState.setStatus('current') wwpLeosBenchmarkGeneratorLatencyTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 5), BenchmarkLatencyPdvTestState()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorLatencyTestState.setStatus('current') wwpLeosBenchmarkGeneratorPdvTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 6), BenchmarkLatencyPdvTestState()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorPdvTestState.setStatus('current') wwpLeosBenchmarkGeneratorRfc2544State = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("idle", 1), ("running", 2), ("stoppedByIntervalTimer", 3), ("stoppedByDurationTimer", 4), ("stoppedByUser", 5), ("done", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorRfc2544State.setStatus('current') wwpLeosBenchmarkGeneratorCurrentPktSize = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentPktSize.setStatus('current') wwpLeosBenchmarkGeneratorCurrentRate = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentRate.setStatus('current') wwpLeosBenchmarkGeneratorSamplesCompleted = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorSamplesCompleted.setStatus('current') wwpLeosBenchmarkGeneratorCurrentIteration = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentIteration.setStatus('current') wwpLeosBenchmarkGeneratorTotalIterations = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorTotalIterations.setStatus('current') wwpLeosBenchmarkProfileTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileTable.setStatus('current') wwpLeosBenchmarkProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileEntryId")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntry.setStatus('current') wwpLeosBenchmarkProfileEntryId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 24))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryId.setStatus('current') wwpLeosBenchmarkProfileEntryName = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryName.setStatus('current') wwpLeosBenchmarkProfileEntryEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 3), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEnabled.setStatus('current') wwpLeosBenchmarkProfileEntryStarted = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryStarted.setStatus('current') wwpLeosBenchmarkProfileEntryInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("t15min", 1), ("t1hr", 2), ("t6hr", 3), ("tCompletion", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryInterval.setStatus('current') wwpLeosBenchmarkProfileEntryDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("t15min", 1), ("t1hr", 2), ("t6hr", 3), ("t24hr", 4), ("tIndefinite", 5), ("tOnce", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDuration.setStatus('current') wwpLeosBenchmarkProfileEntryThroughputTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 7), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryThroughputTest.setStatus('current') wwpLeosBenchmarkProfileEntryFramelossTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 8), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFramelossTest.setStatus('current') wwpLeosBenchmarkProfileEntryLatencyTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 9), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryLatencyTest.setStatus('current') wwpLeosBenchmarkProfileEntryPdvTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 10), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPdvTest.setStatus('current') wwpLeosBenchmarkProfileEntryRfc2544Suite = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 11), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryRfc2544Suite.setStatus('current') wwpLeosBenchmarkProfileEntryDstmac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 12), MacAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstmac.setStatus('current') wwpLeosBenchmarkProfileEntryEncapType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("untagged", 1), ("dot1q", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEncapType.setStatus('current') wwpLeosBenchmarkProfileEntryVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVid.setStatus('current') wwpLeosBenchmarkProfileEntryPcp = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPcp.setStatus('current') wwpLeosBenchmarkProfileEntryCfi = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCfi.setStatus('current') wwpLeosBenchmarkProfileEntryTpid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryTpid.setStatus('current') wwpLeosBenchmarkProfileEntryPduType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ethernet", 1), ("ip", 2), ("udpecho", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPduType.setStatus('current') wwpLeosBenchmarkProfileEntrySrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 19), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySrcIpAddr.setStatus('current') wwpLeosBenchmarkProfileEntryDstIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 20), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstIpAddr.setStatus('current') wwpLeosBenchmarkProfileEntryDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDscp.setStatus('current') wwpLeosBenchmarkProfileEntryCustomPayload = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 22), OctetString().subtype(subtypeSpec=ValueSizeConstraint(256, 256)).setFixedLength(256)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCustomPayload.setStatus('current') wwpLeosBenchmarkProfileEntryBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryBandwidth.setStatus('current') wwpLeosBenchmarkProfileEntryVidValidation = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 24), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVidValidation.setStatus('current') wwpLeosBenchmarkProfileEntryMaxSearches = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSearches.setStatus('current') wwpLeosBenchmarkProfileEntryMaxSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSamples.setStatus('current') wwpLeosBenchmarkProfileEntrySamplingInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 600))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySamplingInterval.setStatus('current') wwpLeosBenchmarkProfileEntryFrameLossStartBw = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("profileBandwidth", 1), ("maximumThroughput", 2), ("maximumLineRate", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFrameLossStartBw.setStatus('current') wwpLeosBenchmarkProfileThroughputStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatisticsTable.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileThroughputStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsEntry.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsProfileId.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSize.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsMin = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMin.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsMax = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMax.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsAvg.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsIterations = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsIterations.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveVid.setStatus('current') wwpLeosBenchmarkProfileThroughputStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 9), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveDstMac.setStatus('current') wwpLeosBenchmarkProfileFramelossStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatisticsTable.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsRateIndex")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsEntry.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsProfileId.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsRateIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRateIndex.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSize.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRate.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsFirst = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFirst.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsSecond = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsSecond.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveVid.setStatus('current') wwpLeosBenchmarkProfileFramelossStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 9), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveDstMac.setStatus('current') wwpLeosBenchmarkProfileLatencyStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatisticsTable.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileLatencyStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsEntry.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsProfileId.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSize.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsMin = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMin.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsMax = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMax.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsAvg.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsSamples.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveVid.setStatus('current') wwpLeosBenchmarkProfileLatencyStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 9), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveDstMac.setStatus('current') wwpLeosBenchmarkProfilePdvStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatisticsTable.setStatus('current') wwpLeosBenchmarkProfilePdvStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfilePdvStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsEntry.setStatus('current') wwpLeosBenchmarkProfilePdvStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsProfileId.setStatus('current') wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex.setStatus('current') wwpLeosBenchmarkProfilePdvStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSize.setStatus('current') wwpLeosBenchmarkProfilePdvStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsAvg.setStatus('current') wwpLeosBenchmarkProfilePdvStatsSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsSamples.setStatus('current') wwpLeosBenchmarkProfilePdvStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveVid.setStatus('current') wwpLeosBenchmarkProfilePdvStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 7), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveDstMac.setStatus('current') wwpLeosBenchmarkProfileFrameSizeTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6), ) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeTable.setStatus('current') wwpLeosBenchmarkProfileFrameSizeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFrameSizeProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFrameSizeIndex")) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeEntry.setStatus('current') wwpLeosBenchmarkProfileFrameSizeProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeProfileId.setStatus('current') wwpLeosBenchmarkProfileFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeIndex.setStatus('current') wwpLeosBenchmarkProfileFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSize.setStatus('current') wwpLeosBenchmarkFpgaStatsRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsRxPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsCrcPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsCrcPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsUdpChecksumPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsUdpChecksumPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscardPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsDuplicatePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDuplicatePkts.setStatus('current') wwpLeosBenchmarkFpgaStatsOOSeqPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOSeqPkts.setStatus('deprecated') wwpLeosBenchmarkFpgaStatsTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsTxPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsOOOPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOOPkts.setStatus('current') wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts.setStatus('current') wwpLeosBenchmarkPortStatsTxBytes = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxBytes.setStatus('current') wwpLeosBenchmarkPortStatsTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPkts.setStatus('current') wwpLeosBenchmarkPortStatsCrcErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsCrcErrorPkts.setStatus('current') wwpLeosBenchmarkPortStatsUcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsMcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsMcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsBcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsBcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsUndersizePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUndersizePkts.setStatus('current') wwpLeosBenchmarkPortStatsOversizePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsOversizePkts.setStatus('current') wwpLeosBenchmarkPortStatsFragmentsPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsFragmentsPkts.setStatus('current') wwpLeosBenchmarkPortStatsJabbersPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsJabbersPkts.setStatus('current') wwpLeosBenchmarkPortStatsTxPausePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPausePkts.setStatus('current') wwpLeosBenchmarkPortStatsTxDropPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDropPkts.setStatus('current') wwpLeosBenchmarkPortStatsTxDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDiscardPkts.setStatus('current') wwpLeosBenchmarkPortStatsTxLOutRangePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxLOutRangePkts.setStatus('current') wwpLeosBenchmarkPortStatsTx64OctsPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx64OctsPkts.setStatus('current') wwpLeosBenchmarkPortStatsTx65To127Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx65To127Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx128To255Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx128To255Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx256To511Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx256To511Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx512To1023Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx512To1023Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx1024To1518Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 20), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1024To1518Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx1519To2047Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1519To2047Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx2048To4095Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 22), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx2048To4095Pkts.setStatus('current') wwpLeosBenchmarkPortStatsTx4096To9216Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 23), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx4096To9216Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRxBytes = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBytes.setStatus('current') wwpLeosBenchmarkPortStatsRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 25), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxExDeferPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 26), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxExDeferPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxDeferPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 27), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxDeferPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxGiantPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 28), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxGiantPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxUnderRunPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 29), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUnderRunPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxCrcErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 30), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxCrcErrorPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxLCheckErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLCheckErrorPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxLOutRangePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 32), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLOutRangePkts.setStatus('current') wwpLeosBenchmarkPortStatsRxPausePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPausePkts.setStatus('current') wwpLeosBenchmarkPortStatsRxUcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 34), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxMcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxMcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsRxBcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 36), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBcastPkts.setStatus('current') wwpLeosBenchmarkPortStatsRx64Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx64Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx65To127Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 38), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx65To127Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx128To255Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx128To255Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx256To511Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 40), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx256To511Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx512To1023Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 41), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx512To1023Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx1024To1518Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 42), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1024To1518Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx1519To2047Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 43), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1519To2047Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx2048To4095Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 44), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx2048To4095Pkts.setStatus('current') wwpLeosBenchmarkPortStatsRx4096To9216Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 45), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx4096To9216Pkts.setStatus('current') mibBuilder.exportSymbols("WWP-LEOS-BENCHMARK-MIB", wwpLeosBenchmarkProfileLatencyStatsAvg=wwpLeosBenchmarkProfileLatencyStatsAvg, wwpLeosBenchmarkProfileEntryBandwidth=wwpLeosBenchmarkProfileEntryBandwidth, wwpLeosBenchmarkPortStatsRx128To255Pkts=wwpLeosBenchmarkPortStatsRx128To255Pkts, wwpLeosBenchmarkProfileFrameSizeProfileId=wwpLeosBenchmarkProfileFrameSizeProfileId, wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts=wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts, wwpLeosBenchmarkPortStatsTx65To127Pkts=wwpLeosBenchmarkPortStatsTx65To127Pkts, wwpLeosBenchmarkProfileLatencyStatsActiveVid=wwpLeosBenchmarkProfileLatencyStatsActiveVid, wwpLeosBenchmarkProfileFramelossStatsProfileId=wwpLeosBenchmarkProfileFramelossStatsProfileId, wwpLeosBenchmarkProfileLatencyStatsProfileId=wwpLeosBenchmarkProfileLatencyStatsProfileId, wwpLeosBenchmarkGeneratorCurrentRate=wwpLeosBenchmarkGeneratorCurrentRate, wwpLeosBenchmarkPort=wwpLeosBenchmarkPort, wwpLeosBenchmarkProfileLatencyStatisticsTable=wwpLeosBenchmarkProfileLatencyStatisticsTable, wwpLeosBenchmarkProfileEntryMaxSamples=wwpLeosBenchmarkProfileEntryMaxSamples, wwpLeosBenchmarkProfileThroughputStatisticsTable=wwpLeosBenchmarkProfileThroughputStatisticsTable, wwpLeosBenchmarkPortStatsTx512To1023Pkts=wwpLeosBenchmarkPortStatsTx512To1023Pkts, wwpLeosBenchmarkProfileEntrySamplingInterval=wwpLeosBenchmarkProfileEntrySamplingInterval, wwpLeosBenchmarkPortStatsTx1024To1518Pkts=wwpLeosBenchmarkPortStatsTx1024To1518Pkts, wwpLeosBenchmarkPortStatsRx1519To2047Pkts=wwpLeosBenchmarkPortStatsRx1519To2047Pkts, wwpLeosBenchmarkProfileThroughputStatsMin=wwpLeosBenchmarkProfileThroughputStatsMin, wwpLeosBenchmarkProfileEntryThroughputTest=wwpLeosBenchmarkProfileEntryThroughputTest, wwpLeosBenchmarkPortStatsTx2048To4095Pkts=wwpLeosBenchmarkPortStatsTx2048To4095Pkts, wwpLeosBenchmarkReflectorVendorType=wwpLeosBenchmarkReflectorVendorType, wwpLeosBenchmarkProfileEntryPdvTest=wwpLeosBenchmarkProfileEntryPdvTest, wwpLeosBenchmarkPortStatsRx256To511Pkts=wwpLeosBenchmarkPortStatsRx256To511Pkts, wwpLeosBenchmarkProfileEntrySrcIpAddr=wwpLeosBenchmarkProfileEntrySrcIpAddr, wwpLeosBenchmarkPortStatsRx2048To4095Pkts=wwpLeosBenchmarkPortStatsRx2048To4095Pkts, wwpLeosBenchmarkProfileEntryMaxSearches=wwpLeosBenchmarkProfileEntryMaxSearches, wwpLeosBenchmarkMode=wwpLeosBenchmarkMode, wwpLeosBenchmarkProfileEntryFramelossTest=wwpLeosBenchmarkProfileEntryFramelossTest, wwpLeosBenchmarkProfileObjects=wwpLeosBenchmarkProfileObjects, wwpLeosBenchmarkPortStatsRxBcastPkts=wwpLeosBenchmarkPortStatsRxBcastPkts, wwpLeosBenchmarkPortStatsUcastPkts=wwpLeosBenchmarkPortStatsUcastPkts, wwpLeosBenchmarkProfileEntryCfi=wwpLeosBenchmarkProfileEntryCfi, wwpLeosBenchmarkProfilePdvStatisticsTable=wwpLeosBenchmarkProfilePdvStatisticsTable, wwpLeosBenchmarkPortStatsRxGiantPkts=wwpLeosBenchmarkPortStatsRxGiantPkts, wwpLeosBenchmarkProfileLatencyStatsMin=wwpLeosBenchmarkProfileLatencyStatsMin, wwpLeosBenchmarkFpgaStatsTxPkts=wwpLeosBenchmarkFpgaStatsTxPkts, wwpLeosBenchmarkFpgaStatsCrcPkts=wwpLeosBenchmarkFpgaStatsCrcPkts, wwpLeosBenchmarkPortStatsBcastPkts=wwpLeosBenchmarkPortStatsBcastPkts, wwpLeosBenchmarkPortStats=wwpLeosBenchmarkPortStats, wwpLeosBenchmarkProfileEntryCustomPayload=wwpLeosBenchmarkProfileEntryCustomPayload, wwpLeosBenchmarkPortStatsCrcErrorPkts=wwpLeosBenchmarkPortStatsCrcErrorPkts, wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex=wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex, wwpLeosBenchmarkGeneratorCurrentIteration=wwpLeosBenchmarkGeneratorCurrentIteration, wwpLeosBenchmarkProfileFramelossStatsRateIndex=wwpLeosBenchmarkProfileFramelossStatsRateIndex, wwpLeosBenchmarkProfileFramelossStatsActiveVid=wwpLeosBenchmarkProfileFramelossStatsActiveVid, wwpLeosBenchmarkProfileEntryStarted=wwpLeosBenchmarkProfileEntryStarted, wwpLeosBenchmarkMIBObjects=wwpLeosBenchmarkMIBObjects, wwpLeosBenchmarkProfileFrameSizeTable=wwpLeosBenchmarkProfileFrameSizeTable, wwpLeosBenchmarkPortStatsRx64Pkts=wwpLeosBenchmarkPortStatsRx64Pkts, wwpLeosBenchmarkProfileThroughputStatsProfileId=wwpLeosBenchmarkProfileThroughputStatsProfileId, wwpLeosBenchmarkPortStatsJabbersPkts=wwpLeosBenchmarkPortStatsJabbersPkts, wwpLeosBenchmarkPortStatsRx4096To9216Pkts=wwpLeosBenchmarkPortStatsRx4096To9216Pkts, wwpLeosBenchmarkProfileEntryTpid=wwpLeosBenchmarkProfileEntryTpid, wwpLeosBenchmarkProfileLatencyStatsActiveDstMac=wwpLeosBenchmarkProfileLatencyStatsActiveDstMac, wwpLeosBenchmarkFpgaStatsDiscardPkts=wwpLeosBenchmarkFpgaStatsDiscardPkts, wwpLeosBenchmarkPortStatsTx64OctsPkts=wwpLeosBenchmarkPortStatsTx64OctsPkts, wwpLeosBenchmarkGeneratorFramelossTestState=wwpLeosBenchmarkGeneratorFramelossTestState, wwpLeosBenchmarkPortStatsTx128To255Pkts=wwpLeosBenchmarkPortStatsTx128To255Pkts, wwpLeosBenchmarkProfileLatencyStatsFrameSize=wwpLeosBenchmarkProfileLatencyStatsFrameSize, wwpLeosBenchmarkPortStatsTxDiscardPkts=wwpLeosBenchmarkPortStatsTxDiscardPkts, wwpLeosBenchmarkProfileFrameSizeEntry=wwpLeosBenchmarkProfileFrameSizeEntry, wwpLeosBenchmarkGeneratorEnable=wwpLeosBenchmarkGeneratorEnable, wwpLeosBenchmarkOperEnable=wwpLeosBenchmarkOperEnable, wwpLeosBenchmarkProfileFrameSizeIndex=wwpLeosBenchmarkProfileFrameSizeIndex, wwpLeosBenchmarkPortStatsRxUnderRunPkts=wwpLeosBenchmarkPortStatsRxUnderRunPkts, wwpLeosBenchmarkPortStatsTx1519To2047Pkts=wwpLeosBenchmarkPortStatsTx1519To2047Pkts, wwpLeosBenchmarkProfilePdvStatsFrameSize=wwpLeosBenchmarkProfilePdvStatsFrameSize, BenchmarkLatencyPdvTestState=BenchmarkLatencyPdvTestState, wwpLeosBenchmarkProfileLatencyStatsMax=wwpLeosBenchmarkProfileLatencyStatsMax, wwpLeosBenchmarkProfileEntryInterval=wwpLeosBenchmarkProfileEntryInterval, wwpLeosBenchmarkProfileEntryEncapType=wwpLeosBenchmarkProfileEntryEncapType, wwpLeosBenchmarkPortStatsRxLCheckErrorPkts=wwpLeosBenchmarkPortStatsRxLCheckErrorPkts, wwpLeosBenchmarkProfileEntryDuration=wwpLeosBenchmarkProfileEntryDuration, wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex=wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsRxPausePkts=wwpLeosBenchmarkPortStatsRxPausePkts, wwpLeosBenchmarkProfileEntryDscp=wwpLeosBenchmarkProfileEntryDscp, wwpLeosBenchmarkGeneratorTotalIterations=wwpLeosBenchmarkGeneratorTotalIterations, wwpLeosBenchmarkProfileLatencyStatsEntry=wwpLeosBenchmarkProfileLatencyStatsEntry, wwpLeosBenchmarkGeneratorModule=wwpLeosBenchmarkGeneratorModule, wwpLeosBenchmarkReflectorModule=wwpLeosBenchmarkReflectorModule, wwpLeosBenchmarkProfileEntryId=wwpLeosBenchmarkProfileEntryId, wwpLeosBenchmarkGeneratorCurrentPktSize=wwpLeosBenchmarkGeneratorCurrentPktSize, wwpLeosBenchmarkMIB=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsTxDropPkts=wwpLeosBenchmarkPortStatsTxDropPkts, wwpLeosBenchmarkPortStatsRxUcastPkts=wwpLeosBenchmarkPortStatsRxUcastPkts, wwpLeosBenchmarkGeneratorLatencyTestState=wwpLeosBenchmarkGeneratorLatencyTestState, wwpLeosBenchmarkProfilePdvStatsActiveVid=wwpLeosBenchmarkProfilePdvStatsActiveVid, wwpLeosBenchmarkPortStatsRxMcastPkts=wwpLeosBenchmarkPortStatsRxMcastPkts, wwpLeosBenchmarkProfileEntryLatencyTest=wwpLeosBenchmarkProfileEntryLatencyTest, wwpLeosBenchmarkProfileFramelossStatsRate=wwpLeosBenchmarkProfileFramelossStatsRate, wwpLeosBenchmarkFpgaStatsDuplicatePkts=wwpLeosBenchmarkFpgaStatsDuplicatePkts, wwpLeosBenchmarkProfileFramelossStatsSecond=wwpLeosBenchmarkProfileFramelossStatsSecond, wwpLeosBenchmarkRole=wwpLeosBenchmarkRole, wwpLeosBenchmarkProfileFramelossStatsFirst=wwpLeosBenchmarkProfileFramelossStatsFirst, wwpLeosBenchmarkProfileEntryVid=wwpLeosBenchmarkProfileEntryVid, wwpLeosBenchmarkProfileFramelossStatisticsTable=wwpLeosBenchmarkProfileFramelossStatisticsTable, wwpLeosBenchmarkPortStatsRxPkts=wwpLeosBenchmarkPortStatsRxPkts, wwpLeosBenchmarkPortStatsFragmentsPkts=wwpLeosBenchmarkPortStatsFragmentsPkts, wwpLeosBenchmarkReflectorEnable=wwpLeosBenchmarkReflectorEnable, wwpLeosBenchmarkPortStatsTxPausePkts=wwpLeosBenchmarkPortStatsTxPausePkts, wwpLeosBenchmarkFpgaStats=wwpLeosBenchmarkFpgaStats, wwpLeosBenchmarkGeneratorRfc2544State=wwpLeosBenchmarkGeneratorRfc2544State, wwpLeosBenchmarkPortStatsTxLOutRangePkts=wwpLeosBenchmarkPortStatsTxLOutRangePkts, wwpLeosBenchmarkPortStatsRxDeferPkts=wwpLeosBenchmarkPortStatsRxDeferPkts, wwpLeosBenchmarkModule=wwpLeosBenchmarkModule, wwpLeosBenchmarkPortStatsRxExDeferPkts=wwpLeosBenchmarkPortStatsRxExDeferPkts, wwpLeosBenchmarkPortStatsRx512To1023Pkts=wwpLeosBenchmarkPortStatsRx512To1023Pkts, wwpLeosBenchmarkProfileTable=wwpLeosBenchmarkProfileTable, wwpLeosBenchmarkProfileEntryEnabled=wwpLeosBenchmarkProfileEntryEnabled, wwpLeosBenchmarkProfileEntryDstmac=wwpLeosBenchmarkProfileEntryDstmac, wwpLeosBenchmarkProfileEntryVidValidation=wwpLeosBenchmarkProfileEntryVidValidation, wwpLeosBenchmarkProfileThroughputStatsAvg=wwpLeosBenchmarkProfileThroughputStatsAvg, wwpLeosBenchmarkEnable=wwpLeosBenchmarkEnable, wwpLeosBenchmarkProfilePdvStatsEntry=wwpLeosBenchmarkProfilePdvStatsEntry, wwpLeosBenchmarkPortStatsUndersizePkts=wwpLeosBenchmarkPortStatsUndersizePkts, wwpLeosBenchmarkProfileEntryPduType=wwpLeosBenchmarkProfileEntryPduType, wwpLeosBenchmarkPortStatsTx4096To9216Pkts=wwpLeosBenchmarkPortStatsTx4096To9216Pkts, wwpLeosBenchmarkProfileThroughputStatsFrameSize=wwpLeosBenchmarkProfileThroughputStatsFrameSize, wwpLeosBenchmarkLocalFpgaMac=wwpLeosBenchmarkLocalFpgaMac, wwpLeosBenchmarkProfileEntryPcp=wwpLeosBenchmarkProfileEntryPcp, wwpLeosBenchmarkFpgaStatsUdpChecksumPkts=wwpLeosBenchmarkFpgaStatsUdpChecksumPkts, wwpLeosBenchmarkPortStatsRxLOutRangePkts=wwpLeosBenchmarkPortStatsRxLOutRangePkts, wwpLeosBenchmarkPortStatsOversizePkts=wwpLeosBenchmarkPortStatsOversizePkts, wwpLeosBenchmarkProfilePdvStatsSamples=wwpLeosBenchmarkProfilePdvStatsSamples, wwpLeosBenchmarkProfileFramelossStatsEntry=wwpLeosBenchmarkProfileFramelossStatsEntry, wwpLeosBenchmarkPortStatsRxBytes=wwpLeosBenchmarkPortStatsRxBytes, wwpLeosBenchmarkGeneratorPdvTestState=wwpLeosBenchmarkGeneratorPdvTestState, wwpLeosBenchmarkGeneratorSamplesCompleted=wwpLeosBenchmarkGeneratorSamplesCompleted, wwpLeosBenchmarkProfileFramelossStatsFrameSize=wwpLeosBenchmarkProfileFramelossStatsFrameSize, wwpLeosBenchmarkGeneratorprofileUnderTest=wwpLeosBenchmarkGeneratorprofileUnderTest, wwpLeosBenchmarkProfileThroughputStatsIterations=wwpLeosBenchmarkProfileThroughputStatsIterations, wwpLeosBenchmarkFpgaStatsOOSeqPkts=wwpLeosBenchmarkFpgaStatsOOSeqPkts, wwpLeosBenchmarkFpgaStatsOOOPkts=wwpLeosBenchmarkFpgaStatsOOOPkts, wwpLeosBenchmarkProfileThroughputStatsEntry=wwpLeosBenchmarkProfileThroughputStatsEntry, wwpLeosBenchmarkFpgaStatsRxPkts=wwpLeosBenchmarkFpgaStatsRxPkts, wwpLeosBenchmarkGeneratorThroughputTestState=wwpLeosBenchmarkGeneratorThroughputTestState, wwpLeosBenchmarkProfileEntryDstIpAddr=wwpLeosBenchmarkProfileEntryDstIpAddr, wwpLeosBenchmarkProfileThroughputStatsActiveVid=wwpLeosBenchmarkProfileThroughputStatsActiveVid, wwpLeosBenchmarkPortStatsRxCrcErrorPkts=wwpLeosBenchmarkPortStatsRxCrcErrorPkts, wwpLeosBenchmarkPortStatsRx65To127Pkts=wwpLeosBenchmarkPortStatsRx65To127Pkts, wwpLeosBenchmarkProfileThroughputStatsMax=wwpLeosBenchmarkProfileThroughputStatsMax, wwpLeosBenchmarkProfileEntry=wwpLeosBenchmarkProfileEntry, wwpLeosBenchmarkProfileEntryFrameLossStartBw=wwpLeosBenchmarkProfileEntryFrameLossStartBw, wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex=wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex, wwpLeosBenchmarkProfileThroughputStatsActiveDstMac=wwpLeosBenchmarkProfileThroughputStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsAvg=wwpLeosBenchmarkProfilePdvStatsAvg, PYSNMP_MODULE_ID=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsRx1024To1518Pkts=wwpLeosBenchmarkPortStatsRx1024To1518Pkts, wwpLeosBenchmarkProfilePdvStatsActiveDstMac=wwpLeosBenchmarkProfilePdvStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsProfileId=wwpLeosBenchmarkProfilePdvStatsProfileId, wwpLeosBenchmarkProfileFramelossStatsActiveDstMac=wwpLeosBenchmarkProfileFramelossStatsActiveDstMac, wwpLeosBenchmarkProfileEntryRfc2544Suite=wwpLeosBenchmarkProfileEntryRfc2544Suite, wwpLeosBenchmarkReflectorVid=wwpLeosBenchmarkReflectorVid, wwpLeosBenchmarkProfileLatencyStatsSamples=wwpLeosBenchmarkProfileLatencyStatsSamples, wwpLeosBenchmarkProfileEntryName=wwpLeosBenchmarkProfileEntryName, wwpLeosBenchmarkPortStatsTxBytes=wwpLeosBenchmarkPortStatsTxBytes, wwpLeosBenchmarkProfileFrameSize=wwpLeosBenchmarkProfileFrameSize, wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex=wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsMcastPkts=wwpLeosBenchmarkPortStatsMcastPkts, wwpLeosBenchmarkPortStatsTxPkts=wwpLeosBenchmarkPortStatsTxPkts, wwpLeosBenchmarkPortStatsTx256To511Pkts=wwpLeosBenchmarkPortStatsTx256To511Pkts)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter32, unsigned32, iso, module_identity, bits, notification_type, ip_address, gauge32, integer32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, counter64, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Unsigned32', 'iso', 'ModuleIdentity', 'Bits', 'NotificationType', 'IpAddress', 'Gauge32', 'Integer32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Counter64', 'TimeTicks') (display_string, mac_address, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TextualConvention', 'TruthValue') (wwp_modules_leos,) = mibBuilder.importSymbols('WWP-SMI', 'wwpModulesLeos') wwp_leos_benchmark_mib = module_identity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43)) wwpLeosBenchmarkMIB.setRevisions(('2012-02-13 08:00', '2012-02-03 08:00', '2010-12-14 08:00', '2010-11-25 08:00', '2010-11-15 08:00')) if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setLastUpdated('201202130800Z') if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setOrganization('Ciena, Inc') class Benchmarklatencypdvteststate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9)) named_values = named_values(('idle', 1), ('sendingTraffic', 2), ('waitingForTimestampData', 3), ('waitingForResidualPackets', 4), ('processingResults', 5), ('stoppedByIntervalTimer', 6), ('stoppedByDurationTimer', 7), ('stoppedByUser', 8), ('done', 9)) wwp_leos_benchmark_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1)) wwp_leos_benchmark_module = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1)) wwp_leos_benchmark_reflector_module = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2)) wwp_leos_benchmark_generator_module = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3)) wwp_leos_benchmark_fpga_stats = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4)) wwp_leos_benchmark_port_stats = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5)) wwp_leos_benchmark_profile_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6)) wwp_leos_benchmark_role = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('reflector', 2), ('generator', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkRole.setStatus('current') wwp_leos_benchmark_port = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkPort.setStatus('current') wwp_leos_benchmark_mode = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('inService', 2), ('outOfService', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkMode.setStatus('current') wwp_leos_benchmark_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkEnable.setStatus('current') wwp_leos_benchmark_oper_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkOperEnable.setStatus('current') wwp_leos_benchmark_local_fpga_mac = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 6), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkLocalFpgaMac.setStatus('current') wwp_leos_benchmark_reflector_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorEnable.setStatus('current') wwp_leos_benchmark_reflector_vid = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 2), integer32().subtype(subtypeSpec=value_range_constraint(-1, 4095))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVid.setStatus('current') wwp_leos_benchmark_reflector_vendor_type = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('ciena', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVendorType.setStatus('current') wwp_leos_benchmark_generator_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorEnable.setStatus('current') wwp_leos_benchmark_generatorprofile_under_test = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorprofileUnderTest.setStatus('current') wwp_leos_benchmark_generator_throughput_test_state = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('idle', 1), ('running', 2), ('waitingForResidualPackets', 3), ('processingResults', 4), ('stoppedByIntervalTimer', 5), ('stoppedByDurationTimer', 6), ('stoppedByUser', 7), ('done', 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorThroughputTestState.setStatus('current') wwp_leos_benchmark_generator_frameloss_test_state = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('idle', 1), ('runningFirstTest', 2), ('waitingForResidualFirstPackets', 3), ('processingFirstResults', 4), ('runningSecondTest', 5), ('waitingForResidualSecondPackets', 6), ('processingSecondResults', 7), ('stoppedByIntervalTimer', 8), ('stoppedByDurationTimer', 9), ('stoppedByUser', 10), ('done', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorFramelossTestState.setStatus('current') wwp_leos_benchmark_generator_latency_test_state = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 5), benchmark_latency_pdv_test_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorLatencyTestState.setStatus('current') wwp_leos_benchmark_generator_pdv_test_state = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 6), benchmark_latency_pdv_test_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorPdvTestState.setStatus('current') wwp_leos_benchmark_generator_rfc2544_state = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('idle', 1), ('running', 2), ('stoppedByIntervalTimer', 3), ('stoppedByDurationTimer', 4), ('stoppedByUser', 5), ('done', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorRfc2544State.setStatus('current') wwp_leos_benchmark_generator_current_pkt_size = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentPktSize.setStatus('current') wwp_leos_benchmark_generator_current_rate = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentRate.setStatus('current') wwp_leos_benchmark_generator_samples_completed = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorSamplesCompleted.setStatus('current') wwp_leos_benchmark_generator_current_iteration = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentIteration.setStatus('current') wwp_leos_benchmark_generator_total_iterations = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorTotalIterations.setStatus('current') wwp_leos_benchmark_profile_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileTable.setStatus('current') wwp_leos_benchmark_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileEntryId')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntry.setStatus('current') wwp_leos_benchmark_profile_entry_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 24))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryId.setStatus('current') wwp_leos_benchmark_profile_entry_name = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryName.setStatus('current') wwp_leos_benchmark_profile_entry_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 3), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEnabled.setStatus('current') wwp_leos_benchmark_profile_entry_started = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryStarted.setStatus('current') wwp_leos_benchmark_profile_entry_interval = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('t15min', 1), ('t1hr', 2), ('t6hr', 3), ('tCompletion', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryInterval.setStatus('current') wwp_leos_benchmark_profile_entry_duration = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('t15min', 1), ('t1hr', 2), ('t6hr', 3), ('t24hr', 4), ('tIndefinite', 5), ('tOnce', 6)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDuration.setStatus('current') wwp_leos_benchmark_profile_entry_throughput_test = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 7), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryThroughputTest.setStatus('current') wwp_leos_benchmark_profile_entry_frameloss_test = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 8), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFramelossTest.setStatus('current') wwp_leos_benchmark_profile_entry_latency_test = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 9), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryLatencyTest.setStatus('current') wwp_leos_benchmark_profile_entry_pdv_test = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 10), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPdvTest.setStatus('current') wwp_leos_benchmark_profile_entry_rfc2544_suite = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 11), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryRfc2544Suite.setStatus('current') wwp_leos_benchmark_profile_entry_dstmac = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 12), mac_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstmac.setStatus('current') wwp_leos_benchmark_profile_entry_encap_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('untagged', 1), ('dot1q', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEncapType.setStatus('current') wwp_leos_benchmark_profile_entry_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVid.setStatus('current') wwp_leos_benchmark_profile_entry_pcp = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPcp.setStatus('current') wwp_leos_benchmark_profile_entry_cfi = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 1))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCfi.setStatus('current') wwp_leos_benchmark_profile_entry_tpid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryTpid.setStatus('current') wwp_leos_benchmark_profile_entry_pdu_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ethernet', 1), ('ip', 2), ('udpecho', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPduType.setStatus('current') wwp_leos_benchmark_profile_entry_src_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 19), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySrcIpAddr.setStatus('current') wwp_leos_benchmark_profile_entry_dst_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 20), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstIpAddr.setStatus('current') wwp_leos_benchmark_profile_entry_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDscp.setStatus('current') wwp_leos_benchmark_profile_entry_custom_payload = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 22), octet_string().subtype(subtypeSpec=value_size_constraint(256, 256)).setFixedLength(256)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCustomPayload.setStatus('current') wwp_leos_benchmark_profile_entry_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryBandwidth.setStatus('current') wwp_leos_benchmark_profile_entry_vid_validation = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 24), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVidValidation.setStatus('current') wwp_leos_benchmark_profile_entry_max_searches = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 25), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSearches.setStatus('current') wwp_leos_benchmark_profile_entry_max_samples = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 26), integer32().subtype(subtypeSpec=value_range_constraint(2, 20))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSamples.setStatus('current') wwp_leos_benchmark_profile_entry_sampling_interval = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 27), integer32().subtype(subtypeSpec=value_range_constraint(1, 600))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySamplingInterval.setStatus('current') wwp_leos_benchmark_profile_entry_frame_loss_start_bw = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('profileBandwidth', 1), ('maximumThroughput', 2), ('maximumLineRate', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFrameLossStartBw.setStatus('current') wwp_leos_benchmark_profile_throughput_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatisticsTable.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileThroughputStatsProfileId'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsEntry.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsProfileId.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_frame_size_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSize.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_min = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMin.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_max = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMax.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_avg = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsAvg.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_iterations = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsIterations.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_active_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveVid.setStatus('current') wwp_leos_benchmark_profile_throughput_stats_active_dst_mac = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 9), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveDstMac.setStatus('current') wwp_leos_benchmark_profile_frameloss_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatisticsTable.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileFramelossStatsProfileId'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileFramelossStatsRateIndex')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsEntry.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsProfileId.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_frame_size_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_rate_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRateIndex.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSize.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_rate = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRate.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_first = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFirst.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_second = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsSecond.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_active_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveVid.setStatus('current') wwp_leos_benchmark_profile_frameloss_stats_active_dst_mac = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 9), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveDstMac.setStatus('current') wwp_leos_benchmark_profile_latency_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatisticsTable.setStatus('current') wwp_leos_benchmark_profile_latency_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileLatencyStatsProfileId'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsEntry.setStatus('current') wwp_leos_benchmark_profile_latency_stats_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsProfileId.setStatus('current') wwp_leos_benchmark_profile_latency_stats_frame_size_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex.setStatus('current') wwp_leos_benchmark_profile_latency_stats_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSize.setStatus('current') wwp_leos_benchmark_profile_latency_stats_min = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMin.setStatus('current') wwp_leos_benchmark_profile_latency_stats_max = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMax.setStatus('current') wwp_leos_benchmark_profile_latency_stats_avg = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsAvg.setStatus('current') wwp_leos_benchmark_profile_latency_stats_samples = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsSamples.setStatus('current') wwp_leos_benchmark_profile_latency_stats_active_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveVid.setStatus('current') wwp_leos_benchmark_profile_latency_stats_active_dst_mac = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 9), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveDstMac.setStatus('current') wwp_leos_benchmark_profile_pdv_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatisticsTable.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfilePdvStatsProfileId'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsEntry.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsProfileId.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_frame_size_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSize.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_avg = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsAvg.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_samples = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsSamples.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_active_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveVid.setStatus('current') wwp_leos_benchmark_profile_pdv_stats_active_dst_mac = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 7), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveDstMac.setStatus('current') wwp_leos_benchmark_profile_frame_size_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6)) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeTable.setStatus('current') wwp_leos_benchmark_profile_frame_size_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1)).setIndexNames((0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileFrameSizeProfileId'), (0, 'WWP-LEOS-BENCHMARK-MIB', 'wwpLeosBenchmarkProfileFrameSizeIndex')) if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeEntry.setStatus('current') wwp_leos_benchmark_profile_frame_size_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeProfileId.setStatus('current') wwp_leos_benchmark_profile_frame_size_index = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 9))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeIndex.setStatus('current') wwp_leos_benchmark_profile_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSize.setStatus('current') wwp_leos_benchmark_fpga_stats_rx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 1), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsRxPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_crc_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsCrcPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_udp_checksum_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsUdpChecksumPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_discard_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscardPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_duplicate_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDuplicatePkts.setStatus('current') wwp_leos_benchmark_fpga_stats_oo_seq_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOSeqPkts.setStatus('deprecated') wwp_leos_benchmark_fpga_stats_tx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsTxPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_ooo_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 8), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOOPkts.setStatus('current') wwp_leos_benchmark_fpga_stats_disc_seq_num_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts.setStatus('current') wwp_leos_benchmark_port_stats_tx_bytes = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 1), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxBytes.setStatus('current') wwp_leos_benchmark_port_stats_tx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPkts.setStatus('current') wwp_leos_benchmark_port_stats_crc_error_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsCrcErrorPkts.setStatus('current') wwp_leos_benchmark_port_stats_ucast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_mcast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsMcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_bcast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsBcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_undersize_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUndersizePkts.setStatus('current') wwp_leos_benchmark_port_stats_oversize_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 8), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsOversizePkts.setStatus('current') wwp_leos_benchmark_port_stats_fragments_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsFragmentsPkts.setStatus('current') wwp_leos_benchmark_port_stats_jabbers_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsJabbersPkts.setStatus('current') wwp_leos_benchmark_port_stats_tx_pause_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPausePkts.setStatus('current') wwp_leos_benchmark_port_stats_tx_drop_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDropPkts.setStatus('current') wwp_leos_benchmark_port_stats_tx_discard_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDiscardPkts.setStatus('current') wwp_leos_benchmark_port_stats_tx_l_out_range_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 14), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxLOutRangePkts.setStatus('current') wwp_leos_benchmark_port_stats_tx64_octs_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 15), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx64OctsPkts.setStatus('current') wwp_leos_benchmark_port_stats_tx65_to127_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 16), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx65To127Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx128_to255_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 17), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx128To255Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx256_to511_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 18), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx256To511Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx512_to1023_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 19), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx512To1023Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx1024_to1518_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 20), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1024To1518Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx1519_to2047_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 21), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1519To2047Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx2048_to4095_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 22), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx2048To4095Pkts.setStatus('current') wwp_leos_benchmark_port_stats_tx4096_to9216_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 23), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx4096To9216Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_bytes = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 24), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBytes.setStatus('current') wwp_leos_benchmark_port_stats_rx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 25), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_ex_defer_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 26), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxExDeferPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_defer_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 27), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxDeferPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_giant_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 28), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxGiantPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_under_run_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 29), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUnderRunPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_crc_error_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 30), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxCrcErrorPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_l_check_error_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 31), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLCheckErrorPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_l_out_range_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 32), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLOutRangePkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_pause_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 33), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPausePkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_ucast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 34), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_mcast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 35), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxMcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx_bcast_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 36), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBcastPkts.setStatus('current') wwp_leos_benchmark_port_stats_rx64_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 37), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx64Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx65_to127_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 38), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx65To127Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx128_to255_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 39), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx128To255Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx256_to511_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 40), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx256To511Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx512_to1023_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 41), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx512To1023Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx1024_to1518_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 42), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1024To1518Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx1519_to2047_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 43), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1519To2047Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx2048_to4095_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 44), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx2048To4095Pkts.setStatus('current') wwp_leos_benchmark_port_stats_rx4096_to9216_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 45), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx4096To9216Pkts.setStatus('current') mibBuilder.exportSymbols('WWP-LEOS-BENCHMARK-MIB', wwpLeosBenchmarkProfileLatencyStatsAvg=wwpLeosBenchmarkProfileLatencyStatsAvg, wwpLeosBenchmarkProfileEntryBandwidth=wwpLeosBenchmarkProfileEntryBandwidth, wwpLeosBenchmarkPortStatsRx128To255Pkts=wwpLeosBenchmarkPortStatsRx128To255Pkts, wwpLeosBenchmarkProfileFrameSizeProfileId=wwpLeosBenchmarkProfileFrameSizeProfileId, wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts=wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts, wwpLeosBenchmarkPortStatsTx65To127Pkts=wwpLeosBenchmarkPortStatsTx65To127Pkts, wwpLeosBenchmarkProfileLatencyStatsActiveVid=wwpLeosBenchmarkProfileLatencyStatsActiveVid, wwpLeosBenchmarkProfileFramelossStatsProfileId=wwpLeosBenchmarkProfileFramelossStatsProfileId, wwpLeosBenchmarkProfileLatencyStatsProfileId=wwpLeosBenchmarkProfileLatencyStatsProfileId, wwpLeosBenchmarkGeneratorCurrentRate=wwpLeosBenchmarkGeneratorCurrentRate, wwpLeosBenchmarkPort=wwpLeosBenchmarkPort, wwpLeosBenchmarkProfileLatencyStatisticsTable=wwpLeosBenchmarkProfileLatencyStatisticsTable, wwpLeosBenchmarkProfileEntryMaxSamples=wwpLeosBenchmarkProfileEntryMaxSamples, wwpLeosBenchmarkProfileThroughputStatisticsTable=wwpLeosBenchmarkProfileThroughputStatisticsTable, wwpLeosBenchmarkPortStatsTx512To1023Pkts=wwpLeosBenchmarkPortStatsTx512To1023Pkts, wwpLeosBenchmarkProfileEntrySamplingInterval=wwpLeosBenchmarkProfileEntrySamplingInterval, wwpLeosBenchmarkPortStatsTx1024To1518Pkts=wwpLeosBenchmarkPortStatsTx1024To1518Pkts, wwpLeosBenchmarkPortStatsRx1519To2047Pkts=wwpLeosBenchmarkPortStatsRx1519To2047Pkts, wwpLeosBenchmarkProfileThroughputStatsMin=wwpLeosBenchmarkProfileThroughputStatsMin, wwpLeosBenchmarkProfileEntryThroughputTest=wwpLeosBenchmarkProfileEntryThroughputTest, wwpLeosBenchmarkPortStatsTx2048To4095Pkts=wwpLeosBenchmarkPortStatsTx2048To4095Pkts, wwpLeosBenchmarkReflectorVendorType=wwpLeosBenchmarkReflectorVendorType, wwpLeosBenchmarkProfileEntryPdvTest=wwpLeosBenchmarkProfileEntryPdvTest, wwpLeosBenchmarkPortStatsRx256To511Pkts=wwpLeosBenchmarkPortStatsRx256To511Pkts, wwpLeosBenchmarkProfileEntrySrcIpAddr=wwpLeosBenchmarkProfileEntrySrcIpAddr, wwpLeosBenchmarkPortStatsRx2048To4095Pkts=wwpLeosBenchmarkPortStatsRx2048To4095Pkts, wwpLeosBenchmarkProfileEntryMaxSearches=wwpLeosBenchmarkProfileEntryMaxSearches, wwpLeosBenchmarkMode=wwpLeosBenchmarkMode, wwpLeosBenchmarkProfileEntryFramelossTest=wwpLeosBenchmarkProfileEntryFramelossTest, wwpLeosBenchmarkProfileObjects=wwpLeosBenchmarkProfileObjects, wwpLeosBenchmarkPortStatsRxBcastPkts=wwpLeosBenchmarkPortStatsRxBcastPkts, wwpLeosBenchmarkPortStatsUcastPkts=wwpLeosBenchmarkPortStatsUcastPkts, wwpLeosBenchmarkProfileEntryCfi=wwpLeosBenchmarkProfileEntryCfi, wwpLeosBenchmarkProfilePdvStatisticsTable=wwpLeosBenchmarkProfilePdvStatisticsTable, wwpLeosBenchmarkPortStatsRxGiantPkts=wwpLeosBenchmarkPortStatsRxGiantPkts, wwpLeosBenchmarkProfileLatencyStatsMin=wwpLeosBenchmarkProfileLatencyStatsMin, wwpLeosBenchmarkFpgaStatsTxPkts=wwpLeosBenchmarkFpgaStatsTxPkts, wwpLeosBenchmarkFpgaStatsCrcPkts=wwpLeosBenchmarkFpgaStatsCrcPkts, wwpLeosBenchmarkPortStatsBcastPkts=wwpLeosBenchmarkPortStatsBcastPkts, wwpLeosBenchmarkPortStats=wwpLeosBenchmarkPortStats, wwpLeosBenchmarkProfileEntryCustomPayload=wwpLeosBenchmarkProfileEntryCustomPayload, wwpLeosBenchmarkPortStatsCrcErrorPkts=wwpLeosBenchmarkPortStatsCrcErrorPkts, wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex=wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex, wwpLeosBenchmarkGeneratorCurrentIteration=wwpLeosBenchmarkGeneratorCurrentIteration, wwpLeosBenchmarkProfileFramelossStatsRateIndex=wwpLeosBenchmarkProfileFramelossStatsRateIndex, wwpLeosBenchmarkProfileFramelossStatsActiveVid=wwpLeosBenchmarkProfileFramelossStatsActiveVid, wwpLeosBenchmarkProfileEntryStarted=wwpLeosBenchmarkProfileEntryStarted, wwpLeosBenchmarkMIBObjects=wwpLeosBenchmarkMIBObjects, wwpLeosBenchmarkProfileFrameSizeTable=wwpLeosBenchmarkProfileFrameSizeTable, wwpLeosBenchmarkPortStatsRx64Pkts=wwpLeosBenchmarkPortStatsRx64Pkts, wwpLeosBenchmarkProfileThroughputStatsProfileId=wwpLeosBenchmarkProfileThroughputStatsProfileId, wwpLeosBenchmarkPortStatsJabbersPkts=wwpLeosBenchmarkPortStatsJabbersPkts, wwpLeosBenchmarkPortStatsRx4096To9216Pkts=wwpLeosBenchmarkPortStatsRx4096To9216Pkts, wwpLeosBenchmarkProfileEntryTpid=wwpLeosBenchmarkProfileEntryTpid, wwpLeosBenchmarkProfileLatencyStatsActiveDstMac=wwpLeosBenchmarkProfileLatencyStatsActiveDstMac, wwpLeosBenchmarkFpgaStatsDiscardPkts=wwpLeosBenchmarkFpgaStatsDiscardPkts, wwpLeosBenchmarkPortStatsTx64OctsPkts=wwpLeosBenchmarkPortStatsTx64OctsPkts, wwpLeosBenchmarkGeneratorFramelossTestState=wwpLeosBenchmarkGeneratorFramelossTestState, wwpLeosBenchmarkPortStatsTx128To255Pkts=wwpLeosBenchmarkPortStatsTx128To255Pkts, wwpLeosBenchmarkProfileLatencyStatsFrameSize=wwpLeosBenchmarkProfileLatencyStatsFrameSize, wwpLeosBenchmarkPortStatsTxDiscardPkts=wwpLeosBenchmarkPortStatsTxDiscardPkts, wwpLeosBenchmarkProfileFrameSizeEntry=wwpLeosBenchmarkProfileFrameSizeEntry, wwpLeosBenchmarkGeneratorEnable=wwpLeosBenchmarkGeneratorEnable, wwpLeosBenchmarkOperEnable=wwpLeosBenchmarkOperEnable, wwpLeosBenchmarkProfileFrameSizeIndex=wwpLeosBenchmarkProfileFrameSizeIndex, wwpLeosBenchmarkPortStatsRxUnderRunPkts=wwpLeosBenchmarkPortStatsRxUnderRunPkts, wwpLeosBenchmarkPortStatsTx1519To2047Pkts=wwpLeosBenchmarkPortStatsTx1519To2047Pkts, wwpLeosBenchmarkProfilePdvStatsFrameSize=wwpLeosBenchmarkProfilePdvStatsFrameSize, BenchmarkLatencyPdvTestState=BenchmarkLatencyPdvTestState, wwpLeosBenchmarkProfileLatencyStatsMax=wwpLeosBenchmarkProfileLatencyStatsMax, wwpLeosBenchmarkProfileEntryInterval=wwpLeosBenchmarkProfileEntryInterval, wwpLeosBenchmarkProfileEntryEncapType=wwpLeosBenchmarkProfileEntryEncapType, wwpLeosBenchmarkPortStatsRxLCheckErrorPkts=wwpLeosBenchmarkPortStatsRxLCheckErrorPkts, wwpLeosBenchmarkProfileEntryDuration=wwpLeosBenchmarkProfileEntryDuration, wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex=wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsRxPausePkts=wwpLeosBenchmarkPortStatsRxPausePkts, wwpLeosBenchmarkProfileEntryDscp=wwpLeosBenchmarkProfileEntryDscp, wwpLeosBenchmarkGeneratorTotalIterations=wwpLeosBenchmarkGeneratorTotalIterations, wwpLeosBenchmarkProfileLatencyStatsEntry=wwpLeosBenchmarkProfileLatencyStatsEntry, wwpLeosBenchmarkGeneratorModule=wwpLeosBenchmarkGeneratorModule, wwpLeosBenchmarkReflectorModule=wwpLeosBenchmarkReflectorModule, wwpLeosBenchmarkProfileEntryId=wwpLeosBenchmarkProfileEntryId, wwpLeosBenchmarkGeneratorCurrentPktSize=wwpLeosBenchmarkGeneratorCurrentPktSize, wwpLeosBenchmarkMIB=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsTxDropPkts=wwpLeosBenchmarkPortStatsTxDropPkts, wwpLeosBenchmarkPortStatsRxUcastPkts=wwpLeosBenchmarkPortStatsRxUcastPkts, wwpLeosBenchmarkGeneratorLatencyTestState=wwpLeosBenchmarkGeneratorLatencyTestState, wwpLeosBenchmarkProfilePdvStatsActiveVid=wwpLeosBenchmarkProfilePdvStatsActiveVid, wwpLeosBenchmarkPortStatsRxMcastPkts=wwpLeosBenchmarkPortStatsRxMcastPkts, wwpLeosBenchmarkProfileEntryLatencyTest=wwpLeosBenchmarkProfileEntryLatencyTest, wwpLeosBenchmarkProfileFramelossStatsRate=wwpLeosBenchmarkProfileFramelossStatsRate, wwpLeosBenchmarkFpgaStatsDuplicatePkts=wwpLeosBenchmarkFpgaStatsDuplicatePkts, wwpLeosBenchmarkProfileFramelossStatsSecond=wwpLeosBenchmarkProfileFramelossStatsSecond, wwpLeosBenchmarkRole=wwpLeosBenchmarkRole, wwpLeosBenchmarkProfileFramelossStatsFirst=wwpLeosBenchmarkProfileFramelossStatsFirst, wwpLeosBenchmarkProfileEntryVid=wwpLeosBenchmarkProfileEntryVid, wwpLeosBenchmarkProfileFramelossStatisticsTable=wwpLeosBenchmarkProfileFramelossStatisticsTable, wwpLeosBenchmarkPortStatsRxPkts=wwpLeosBenchmarkPortStatsRxPkts, wwpLeosBenchmarkPortStatsFragmentsPkts=wwpLeosBenchmarkPortStatsFragmentsPkts, wwpLeosBenchmarkReflectorEnable=wwpLeosBenchmarkReflectorEnable, wwpLeosBenchmarkPortStatsTxPausePkts=wwpLeosBenchmarkPortStatsTxPausePkts, wwpLeosBenchmarkFpgaStats=wwpLeosBenchmarkFpgaStats, wwpLeosBenchmarkGeneratorRfc2544State=wwpLeosBenchmarkGeneratorRfc2544State, wwpLeosBenchmarkPortStatsTxLOutRangePkts=wwpLeosBenchmarkPortStatsTxLOutRangePkts, wwpLeosBenchmarkPortStatsRxDeferPkts=wwpLeosBenchmarkPortStatsRxDeferPkts, wwpLeosBenchmarkModule=wwpLeosBenchmarkModule, wwpLeosBenchmarkPortStatsRxExDeferPkts=wwpLeosBenchmarkPortStatsRxExDeferPkts, wwpLeosBenchmarkPortStatsRx512To1023Pkts=wwpLeosBenchmarkPortStatsRx512To1023Pkts, wwpLeosBenchmarkProfileTable=wwpLeosBenchmarkProfileTable, wwpLeosBenchmarkProfileEntryEnabled=wwpLeosBenchmarkProfileEntryEnabled, wwpLeosBenchmarkProfileEntryDstmac=wwpLeosBenchmarkProfileEntryDstmac, wwpLeosBenchmarkProfileEntryVidValidation=wwpLeosBenchmarkProfileEntryVidValidation, wwpLeosBenchmarkProfileThroughputStatsAvg=wwpLeosBenchmarkProfileThroughputStatsAvg, wwpLeosBenchmarkEnable=wwpLeosBenchmarkEnable, wwpLeosBenchmarkProfilePdvStatsEntry=wwpLeosBenchmarkProfilePdvStatsEntry, wwpLeosBenchmarkPortStatsUndersizePkts=wwpLeosBenchmarkPortStatsUndersizePkts, wwpLeosBenchmarkProfileEntryPduType=wwpLeosBenchmarkProfileEntryPduType, wwpLeosBenchmarkPortStatsTx4096To9216Pkts=wwpLeosBenchmarkPortStatsTx4096To9216Pkts, wwpLeosBenchmarkProfileThroughputStatsFrameSize=wwpLeosBenchmarkProfileThroughputStatsFrameSize, wwpLeosBenchmarkLocalFpgaMac=wwpLeosBenchmarkLocalFpgaMac, wwpLeosBenchmarkProfileEntryPcp=wwpLeosBenchmarkProfileEntryPcp, wwpLeosBenchmarkFpgaStatsUdpChecksumPkts=wwpLeosBenchmarkFpgaStatsUdpChecksumPkts, wwpLeosBenchmarkPortStatsRxLOutRangePkts=wwpLeosBenchmarkPortStatsRxLOutRangePkts, wwpLeosBenchmarkPortStatsOversizePkts=wwpLeosBenchmarkPortStatsOversizePkts, wwpLeosBenchmarkProfilePdvStatsSamples=wwpLeosBenchmarkProfilePdvStatsSamples, wwpLeosBenchmarkProfileFramelossStatsEntry=wwpLeosBenchmarkProfileFramelossStatsEntry, wwpLeosBenchmarkPortStatsRxBytes=wwpLeosBenchmarkPortStatsRxBytes, wwpLeosBenchmarkGeneratorPdvTestState=wwpLeosBenchmarkGeneratorPdvTestState, wwpLeosBenchmarkGeneratorSamplesCompleted=wwpLeosBenchmarkGeneratorSamplesCompleted, wwpLeosBenchmarkProfileFramelossStatsFrameSize=wwpLeosBenchmarkProfileFramelossStatsFrameSize, wwpLeosBenchmarkGeneratorprofileUnderTest=wwpLeosBenchmarkGeneratorprofileUnderTest, wwpLeosBenchmarkProfileThroughputStatsIterations=wwpLeosBenchmarkProfileThroughputStatsIterations, wwpLeosBenchmarkFpgaStatsOOSeqPkts=wwpLeosBenchmarkFpgaStatsOOSeqPkts, wwpLeosBenchmarkFpgaStatsOOOPkts=wwpLeosBenchmarkFpgaStatsOOOPkts, wwpLeosBenchmarkProfileThroughputStatsEntry=wwpLeosBenchmarkProfileThroughputStatsEntry, wwpLeosBenchmarkFpgaStatsRxPkts=wwpLeosBenchmarkFpgaStatsRxPkts, wwpLeosBenchmarkGeneratorThroughputTestState=wwpLeosBenchmarkGeneratorThroughputTestState, wwpLeosBenchmarkProfileEntryDstIpAddr=wwpLeosBenchmarkProfileEntryDstIpAddr, wwpLeosBenchmarkProfileThroughputStatsActiveVid=wwpLeosBenchmarkProfileThroughputStatsActiveVid, wwpLeosBenchmarkPortStatsRxCrcErrorPkts=wwpLeosBenchmarkPortStatsRxCrcErrorPkts, wwpLeosBenchmarkPortStatsRx65To127Pkts=wwpLeosBenchmarkPortStatsRx65To127Pkts, wwpLeosBenchmarkProfileThroughputStatsMax=wwpLeosBenchmarkProfileThroughputStatsMax, wwpLeosBenchmarkProfileEntry=wwpLeosBenchmarkProfileEntry, wwpLeosBenchmarkProfileEntryFrameLossStartBw=wwpLeosBenchmarkProfileEntryFrameLossStartBw, wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex=wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex, wwpLeosBenchmarkProfileThroughputStatsActiveDstMac=wwpLeosBenchmarkProfileThroughputStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsAvg=wwpLeosBenchmarkProfilePdvStatsAvg, PYSNMP_MODULE_ID=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsRx1024To1518Pkts=wwpLeosBenchmarkPortStatsRx1024To1518Pkts, wwpLeosBenchmarkProfilePdvStatsActiveDstMac=wwpLeosBenchmarkProfilePdvStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsProfileId=wwpLeosBenchmarkProfilePdvStatsProfileId, wwpLeosBenchmarkProfileFramelossStatsActiveDstMac=wwpLeosBenchmarkProfileFramelossStatsActiveDstMac, wwpLeosBenchmarkProfileEntryRfc2544Suite=wwpLeosBenchmarkProfileEntryRfc2544Suite, wwpLeosBenchmarkReflectorVid=wwpLeosBenchmarkReflectorVid, wwpLeosBenchmarkProfileLatencyStatsSamples=wwpLeosBenchmarkProfileLatencyStatsSamples, wwpLeosBenchmarkProfileEntryName=wwpLeosBenchmarkProfileEntryName, wwpLeosBenchmarkPortStatsTxBytes=wwpLeosBenchmarkPortStatsTxBytes, wwpLeosBenchmarkProfileFrameSize=wwpLeosBenchmarkProfileFrameSize, wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex=wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsMcastPkts=wwpLeosBenchmarkPortStatsMcastPkts, wwpLeosBenchmarkPortStatsTxPkts=wwpLeosBenchmarkPortStatsTxPkts, wwpLeosBenchmarkPortStatsTx256To511Pkts=wwpLeosBenchmarkPortStatsTx256To511Pkts)
# -*- coding: UTF-8 -*- # Copyright 2013-2017 Luc Saffre # License: BSD (see file COPYING for details) """ Plugins ======= .. autosummary:: :toctree: cosi contacts b2c Not used ======== .. autosummary:: :toctree: orders delivery """
""" Plugins ======= .. autosummary:: :toctree: cosi contacts b2c Not used ======== .. autosummary:: :toctree: orders delivery """
""" SE - number SE - symbols SE - (SE SE SE ...) EXAMPLES: 1 -> 1 ahoj -> ahoj (a ahoj) -> ( -> a -> ahoj -> ) ((ahoj a) (a) a) -> ( -> ( -> ahoj -> a -> ) -> ( -> ) -> ) """ STR_SURROUND = ["\"", "'"] ESCAPE_CHAR = "\\" def lexer(value): """Yield token""" buffer = list() last = '' state = 'normal' line = 1 for ch in value: if ch == '\n': line += 1 # comment if ch == ';': state = 'comment' if state == 'comment': if ch == '\n': state = 'normal' continue # string if ch in STR_SURROUND and last != ESCAPE_CHAR: if state == 'normal': state = 'string' elif state == 'string': state = 'normal' if state == 'string': buffer.append(ch) continue if ch == '`' and not buffer: yield (ch, line) # normal if ch == '(': yield (ch, line) elif ch in (' ', '\n', ')'): if buffer: yield (''.join(buffer), line) buffer = list() if ch == ')': yield (ch, line) elif ch != '`': buffer.append(ch) last = ch if buffer: yield (''.join(buffer), line)
""" SE - number SE - symbols SE - (SE SE SE ...) EXAMPLES: 1 -> 1 ahoj -> ahoj (a ahoj) -> ( -> a -> ahoj -> ) ((ahoj a) (a) a) -> ( -> ( -> ahoj -> a -> ) -> ( -> ) -> ) """ str_surround = ['"', "'"] escape_char = '\\' def lexer(value): """Yield token""" buffer = list() last = '' state = 'normal' line = 1 for ch in value: if ch == '\n': line += 1 if ch == ';': state = 'comment' if state == 'comment': if ch == '\n': state = 'normal' continue if ch in STR_SURROUND and last != ESCAPE_CHAR: if state == 'normal': state = 'string' elif state == 'string': state = 'normal' if state == 'string': buffer.append(ch) continue if ch == '`' and (not buffer): yield (ch, line) if ch == '(': yield (ch, line) elif ch in (' ', '\n', ')'): if buffer: yield (''.join(buffer), line) buffer = list() if ch == ')': yield (ch, line) elif ch != '`': buffer.append(ch) last = ch if buffer: yield (''.join(buffer), line)
# # PySNMP MIB module CISCOSB-CDP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-CDP-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:22:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection") cdpCacheDeviceIndex, cdpCacheEntry, cdpCacheIfIndex = mibBuilder.importSymbols("CISCO-CDP-MIB", "cdpCacheDeviceIndex", "cdpCacheEntry", "cdpCacheIfIndex") rndErrorDesc, rndErrorSeverity = mibBuilder.importSymbols("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc", "rndErrorSeverity") rndNotifications, switch001 = mibBuilder.importSymbols("CISCOSB-MIB", "rndNotifications", "switch001") InterfaceIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "InterfaceIndexOrZero") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") VlanId, PortList = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId", "PortList") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, TimeTicks, Integer32, Counter64, ObjectIdentity, MibIdentifier, Gauge32, Counter32, NotificationType, iso, Bits, IpAddress, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "TimeTicks", "Integer32", "Counter64", "ObjectIdentity", "MibIdentifier", "Gauge32", "Counter32", "NotificationType", "iso", "Bits", "IpAddress", "Unsigned32") TruthValue, DisplayString, TextualConvention, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention", "MacAddress") rlCdp = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137)) rlCdp.setRevisions(('2008-09-14 00:00', '2010-08-11 00:00', '2010-10-25 00:00', '2010-11-10 00:00', '2010-11-14 00:00', '2011-01-09 00:00', '2011-02-15 00:00', '2012-02-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlCdp.setRevisionsDescriptions(('Initial revision.', 'Added rlCdpLogMismatchVoiceVlanEnable, rlCdpLogMismatchNativeVlanEnable', 'Added rlCdpSecondaryCacheTable. Added maxNeighborsExceededInSecondaryCache. Renamed maxNeighborsExceeded to maxNeighborsExceededInMainCache.', 'Added rlCdpGlobalLogMismatchDuplexEnable. Added rlCdpGlobalLogMismatchVoiceVlanEnable. Added rlCdpGlobalLogMismatchNativeVlanEnable.', 'Added rlCdpTlvTable. Added rlCdpAdvertiseApplianceTlv.', 'Added rlCdpValidateMandatoryTlvs.', 'Added rlCdpLogMismatchDuplexTrap. Added rlCdpLogMismatchVoiceVlanTrap. Added rlCdpLogMismatchNativeVlanTrap.', 'Added rlCdpTlvSysName to rlCdpTlvTable.',)) if mibBuilder.loadTexts: rlCdp.setLastUpdated('201102150000Z') if mibBuilder.loadTexts: rlCdp.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: rlCdp.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>') if mibBuilder.loadTexts: rlCdp.setDescription('The private MIB module definition for CDP protocol.') class RlCdpVersionTypes(TextualConvention, Integer32): description = 'version-v1 - cdp version 1 version-v2 - cdp version 2 ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("version-v1", 1), ("version-v2", 2)) class RlCdpCounterTypes(TextualConvention, Integer32): description = ' v1OutputPackets counter specifies the number of sent CDP packets with version 1 v2OutputPackets counter specifies the number of sent CDP packets with version 2 v1InputPackets counter specifies the number of received CDP packets with version 1 v2InputPackets counter specifies the number of received CDP packets with version 2 totalInputPackets counter specifies the total number of received CDP packets totalOutputPackets counter specifies the total number of sent CDP packets illegalChksum counter specifies the number of received CDP packets with illegal checksum. errorPackets counter specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) maxNeighborsExceededInMainCache counter specifies the number of times a CDP neighbor could not be stored in the main cache. maxNeighborsExceededInSecondaryCache specifies counter the number of times a CDP neighbor could not be stored in the secondary cache. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) namedValues = NamedValues(("totalInputPackets", 1), ("v1InputPackets", 2), ("v2InputPackets", 3), ("totalOutputPackets", 4), ("v1OutputPackets", 5), ("v2OutputPackets", 6), ("illegalChksum", 7), ("errorPackets", 8), ("maxNeighborsExceededInMainCache", 9), ("maxNeighborsExceededInSecondaryCache", 10)) class RlCdpPduActionTypes(TextualConvention, Integer32): description = 'filtering - CDP packets would filtered (dropped). bridging - CDP packets bridged as regular data packets ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("filtering", 1), ("bridging", 2), ("flooding", 3)) rlCdpVersionAdvertised = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 1), RlCdpVersionTypes()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpVersionAdvertised.setStatus('current') if mibBuilder.loadTexts: rlCdpVersionAdvertised.setDescription('Specifies the verison of sent CDP packets') rlCdpSourceInterface = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 2), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpSourceInterface.setStatus('current') if mibBuilder.loadTexts: rlCdpSourceInterface.setDescription('Specifices the CDP source-interface, which the IP address advertised into TLV is accoding to this source-interface instead of the outgoing interface. value of 0 indicates no source interface. value must belong to an ethernet port/lag ') rlCdpLogMismatchDuplexEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 3), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received duplex mode. To enable loging on specific interface set the corresponing bit.') rlCdpCountersTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4), ) if mibBuilder.loadTexts: rlCdpCountersTable.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersTable.setDescription('This table contains all CDP counters values, indexed by counter name') rlCdpCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpCountersName")) if mibBuilder.loadTexts: rlCdpCountersEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersEntry.setDescription('The row definition for this table.') rlCdpCountersName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 1), RlCdpCounterTypes()) if mibBuilder.loadTexts: rlCdpCountersName.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersName.setDescription('counter name used as key for counters table ') rlCdpCountersValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpCountersValue.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersValue.setDescription('the value of the counter name specisifed by rlCdpCountersName, unsuppo will have no entry in the tab.') rlCdpCountersClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 5), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpCountersClear.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersClear.setDescription('By setting the MIB to True, all error and traffic counters are set to zero.') rlCdpCacheClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 6), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpCacheClear.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheClear.setDescription('By setting the MIB to True, all entries from the cdp cache table is deleted.') rlCdpVoiceVlanId = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpVoiceVlanId.setStatus('obsolete') if mibBuilder.loadTexts: rlCdpVoiceVlanId.setDescription('voice vlan Id, used as the Appliance Vlan-Id TLV') rlCdpCacheTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8), ) if mibBuilder.loadTexts: rlCdpCacheTable.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheTable.setDescription('The (conceptual) table contains externtion for the cdpCache table. indexed by cdpCacheEntry.') rlCdpCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1), ) cdpCacheEntry.registerAugmentions(("CISCOSB-CDP-MIB", "rlCdpCacheEntry")) rlCdpCacheEntry.setIndexNames(*cdpCacheEntry.getIndexNames()) if mibBuilder.loadTexts: rlCdpCacheEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheEntry.setDescription('The row definition for this table.') rlCdpCacheVersionExt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpCacheVersionExt.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheVersionExt.setDescription('This field contains the extention of the cdpCacheVersion field in the cdpCache table. In case the neighbour advertised the SW TLV as a string with length larger than 160, this field contains the chacters from place 160 and on. Zero-length strings indicates no Version field (TLV) was reported in the most recent CDP message, or it was smaller than 160 chars ') rlCdpCacheTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setDescription('This field indicates the time remains in seconds till the entry should be expried. ') rlCdpCacheCdpVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 3), RlCdpVersionTypes()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setDescription('This field indicates the cdp version that was reported in the most recent CDP message.') rlCdpPduAction = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 9), RlCdpPduActionTypes().clone('bridging')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpPduAction.setStatus('current') if mibBuilder.loadTexts: rlCdpPduAction.setDescription('Defines CDP packets handling when CDP is globally disabled.') rlCdpLogMismatchVoiceVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 10), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received voice VLAN. To enable logging on specific interface set the corresponing bit.') rlCdpLogMismatchNativeVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 11), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received native VLAN. To enable loging on specific interface set the corresponing bit.') rlCdpSecondaryCacheTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12), ) if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setDescription('The (conceptual) table contains partial information from cdpCache table. indexed by rlCdpSecondaryCacheEntry.') rlCdpSecondaryCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1), ).setIndexNames((0, "CISCO-CDP-MIB", "cdpCacheIfIndex"), (0, "CISCO-CDP-MIB", "cdpCacheDeviceIndex")) if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setDescription('An entry (conceptual row) in the rlCdpSecondaryCacheTable, containing partial information received via CDP on one interface from one device. Entries appear when a CDP advertisement is received from a neighbor device. Entries disappear when CDP is disabled on the interface, globally or when the secondary cache is cleared') rlCdpSecondaryCacheMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setDescription('The MAC address of the neighbor.') rlCdpSecondaryCachePlatform = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setDescription("The Device's Hardware Platform prefix, as reported in the most recent CDP message. The zero-length string indicates that no Platform field (TLV) was reported in the most recent CDP message.") rlCdpSecondaryCacheCapabilities = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setDescription("The Device's Functional Capabilities as reported in the most recent CDP message.") rlCdpSecondaryCacheVoiceVlanID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setDescription("The remote device's VoIP VLAN ID, as reported in the most recent CDP message. This object is not instantiated if no Appliance VLAN-ID field (TLV) was reported in the most recently received CDP message.") rlCdpSecondaryCacheTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setDescription('This field indicates the number of seconds till the entry is expried. ') rlCdpGlobalLogMismatchDuplexEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 13), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received duplex mode.') rlCdpGlobalLogMismatchVoiceVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 14), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received voice VLAN.') rlCdpGlobalLogMismatchNativeVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 15), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received native VLAN.') rlCdpTlvTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16), ) if mibBuilder.loadTexts: rlCdpTlvTable.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvTable.setDescription('The (conceptual) table contains the local advertised information. indexed by rlCdpTlvEntry.') rlCdpTlvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpTlvIfIndex")) if mibBuilder.loadTexts: rlCdpTlvEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvEntry.setDescription('An entry (conceptual row) in the rlCdpTlvTable, containing local information advertised by CDP on one interface. Entries are available only when CDP is globally enabled, for interfaces on which CDP is enabled and the interface state is UP.') rlCdpTlvIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: rlCdpTlvIfIndex.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvIfIndex.setDescription('The ifIndex value of the local interface. A value of zero is used to access TLVs which do not changed between interfaces.') rlCdpTlvDeviceIdFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("serialNumber", 1), ("macAddress", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setDescription('An indication of the format of Device-Id contained in the corresponding instance of rlCdpTlvDeviceId. serialNumber(1) indicates that the value of rlCdpTlvDeviceId object is in the form of an ASCII string contain the device serial number. macAddress(2) indicates that the value of rlCdpTlvDeviceId object is in the form of Layer 2 MAC address. other(3) indicates that the value of rlCdpTlvDeviceId object is in the form of a platform specific ASCII string contain info that identifies the device. For example: ASCII string contains serialNumber appended/prepened with system name.') rlCdpTlvDeviceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvDeviceId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDeviceId.setDescription('The Device-ID string as will be advertised in subsequent CDP messages.') rlCdpTlvAddress1Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 4), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setDescription('The Inet address type of rlCdpTlvAddress1') rlCdpTlvAddress1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 5), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress1.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress1.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress1Type had the value 'ipv4(1)', then this object would be an IPv4-address.") rlCdpTlvAddress2Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 6), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setDescription('The Inet address type of rlCdpTlvAddress2') rlCdpTlvAddress2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 7), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress2.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress2.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress2Type had the value 'ipv6(2)', then this object would be an IPv6-address.") rlCdpTlvAddress3Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 8), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setDescription('The Inet address type of rlCdpTlvAddress3') rlCdpTlvAddress3 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 9), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvAddress3.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress3.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress3Type had the value 'ipv6(2)', then this object would be an IPv6-address.") rlCdpTlvPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPortId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPortId.setDescription("The Port-ID string as will be advertised in subsequent CDP messages from this interface. This will typically be the value of the ifName object (e.g., 'Ethernet0').") rlCdpTlvCapabilities = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvCapabilities.setReference('Cisco Discovery Protocol Specification, 10/19/94.') if mibBuilder.loadTexts: rlCdpTlvCapabilities.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvCapabilities.setDescription("The Device's Functional Capabilities as will be advertised in subsequent CDP messages. For latest set of specific values, see the latest version of the CDP specification.") rlCdpTlvVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvVersion.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvVersion.setDescription('The Version string as will be advertised in subsequent CDP messages.') rlCdpTlvPlatform = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPlatform.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPlatform.setDescription("The Device's Hardware Platform as will be advertised in subsequent CDP messages.") rlCdpTlvNativeVLAN = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setDescription("The local device's interface's native VLAN, as will be advertised in subsequent CDP messages.") rlCdpTlvDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("halfduplex", 2), ("fullduplex", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvDuplex.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDuplex.setDescription("The local device's interface's duplex mode, as will be advertised in subsequent CDP messages.") rlCdpTlvApplianceID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvApplianceID.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvApplianceID.setDescription("The local device's Appliance ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.") rlCdpTlvApplianceVlanID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setDescription("The local device's VoIP VLAN ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.") rlCdpTlvExtendedTrust = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("untrusted", 0), ("trusted", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setDescription("The local device's interface's extended trust mode, as will be advertised in subsequent CDP messages. A value of zero indicates the absence of extended trust.") rlCdpTlvCosForUntrustedPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 19), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setDescription('The COS value with which all packets received on an untrusted port should be marked by a simple switching device which cannot itself classify individual packets. This TLV only has any meaning if corresponding instance of rlCdpTlvExtendedTrust indicates the absence of extended trust.') rlCdpTlvPowerAvailableRequestId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 20), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setDescription('The Power Available TLV Request-ID field echoes the Request-ID field last received in a Power Requested TLV. It is 0 if no Power Requested TLV has been received since the interface last transitioned to ifOperState == Up.') rlCdpTlvPowerAvailablePowerManagementId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setDescription('The Power Available TLV Power-Management-ID field.') rlCdpTlvPowerAvailable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 22), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setDescription('The Power Available TLV Available-Power field indicates the number of milliwatts of power available to powered devices at the time this object is instatiated.') rlCdpTlvPowerAvailableManagementPowerLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 23), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setDescription("The Power Available TLV Management-Power-Level field indicates the number of milliwatts representing the supplier's request to the powered device for its Power Consumption TLV. A value of 0xFFFFFFFF indicates the local device has no preference.") rlCdpTlvSysName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 24), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpTlvSysName.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvSysName.setDescription('The sysName MIB as will be advertised in subsequent CDP messages.') rlCdpAdvertiseApplianceTlv = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 17), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setStatus('current') if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setDescription('By setting the MIB to True Appliance VLAN-ID TLV may be advertised. A value of False will prevent this TLV from being advertised.') rlCdpValidateMandatoryTlvs = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 18), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setStatus('current') if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setDescription('By setting the MIB to true all mandatory TLVs 0x0001-0x0006 will be validated. Incoming CDP frames without any of the TLVs will be dropped. A value of false indicates that only the Device ID TLV (0x0001) is mandatory. Frames containing Device ID TLV will be processed, regardless of whether other TLVs are present or not.') rlCdpInterfaceCountersTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19), ) if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setDescription('This table contains all CDP counters values, indexed by interface id.') rlCdpInterfaceCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpInterfaceId")) if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setDescription('The row definition for this table.') rlCdpInterfaceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: rlCdpInterfaceId.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceId.setDescription('Interface id, used as index for interface counters table.') rlCdpInterfaceTotalInputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setDescription('Num of received packets on rlCdpInterfaceId') rlCdpInterfaceV1InputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setDescription('Num of v1 received packets on rlCdpInterfaceId') rlCdpInterfaceV2InputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setDescription('Num of v2 received packets on rlCdpInterfaceId') rlCdpInterfaceTotalOutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setDescription('Num of sent packets from rlCdpInterfaceId') rlCdpInterfaceV1OutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setDescription('Num of v1 sent packets from rlCdpInterfaceId') rlCdpInterfaceV2OutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setDescription('Num of v2 sent packets from rlCdpInterfaceId') rlCdpInterfaceIllegalChksum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setDescription('Num of received packets with illegal CDP checksum.') rlCdpInterfaceErrorPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setDescription('specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) ') rlCdpInterfaceMaxNeighborsExceededInMainCache = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setDescription('specifies the number of times a CDP neighbor could not be stored in the main cache. ') rlCdpInterfaceMaxNeighborsExceededInSecondaryCache = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setDescription(' specifies the number of times a CDP neighbor could not be stored in the secondary cache.') rlCdpInterfaceCountersClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 20), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setDescription('By setting the scalar to a interface id , all error and traffic counters of this interface are set to zero. To clear the counters for ALL interfaces set the scalar to 0x0FFFFFFF') rlCdpLogMismatchDuplexTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 224)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity")) if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setDescription('Warning trap indicating that duplex mismatch has been detected by CDP') rlCdpLogMismatchVoiceVlanTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 225)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity")) if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setDescription('Warning trap indicating that voice vlan mismatch has been detected by CDP') rlCdpLogMismatchNativeVlanTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 226)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity")) if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setDescription('Warning trap indicating that native vlan mismatch has been detected by CDP') mibBuilder.exportSymbols("CISCOSB-CDP-MIB", rlCdpInterfaceTotalInputPackets=rlCdpInterfaceTotalInputPackets, rlCdpTlvCosForUntrustedPorts=rlCdpTlvCosForUntrustedPorts, rlCdpTlvAddress3Type=rlCdpTlvAddress3Type, rlCdpAdvertiseApplianceTlv=rlCdpAdvertiseApplianceTlv, rlCdpCountersName=rlCdpCountersName, rlCdpSecondaryCachePlatform=rlCdpSecondaryCachePlatform, rlCdpCacheEntry=rlCdpCacheEntry, rlCdpTlvPowerAvailable=rlCdpTlvPowerAvailable, rlCdpInterfaceV2OutputPackets=rlCdpInterfaceV2OutputPackets, rlCdpInterfaceMaxNeighborsExceededInSecondaryCache=rlCdpInterfaceMaxNeighborsExceededInSecondaryCache, rlCdpLogMismatchVoiceVlanTrap=rlCdpLogMismatchVoiceVlanTrap, rlCdpSourceInterface=rlCdpSourceInterface, PYSNMP_MODULE_ID=rlCdp, rlCdpLogMismatchNativeVlanEnable=rlCdpLogMismatchNativeVlanEnable, rlCdpTlvTable=rlCdpTlvTable, rlCdpTlvNativeVLAN=rlCdpTlvNativeVLAN, rlCdpSecondaryCacheMacAddress=rlCdpSecondaryCacheMacAddress, rlCdpInterfaceV1OutputPackets=rlCdpInterfaceV1OutputPackets, rlCdpTlvAddress3=rlCdpTlvAddress3, rlCdpCountersClear=rlCdpCountersClear, rlCdpGlobalLogMismatchVoiceVlanEnable=rlCdpGlobalLogMismatchVoiceVlanEnable, rlCdpCountersTable=rlCdpCountersTable, rlCdpTlvAddress2Type=rlCdpTlvAddress2Type, rlCdpVersionAdvertised=rlCdpVersionAdvertised, rlCdpTlvSysName=rlCdpTlvSysName, rlCdpTlvDuplex=rlCdpTlvDuplex, rlCdpInterfaceErrorPackets=rlCdpInterfaceErrorPackets, rlCdpTlvAddress2=rlCdpTlvAddress2, rlCdpGlobalLogMismatchNativeVlanEnable=rlCdpGlobalLogMismatchNativeVlanEnable, rlCdpLogMismatchDuplexTrap=rlCdpLogMismatchDuplexTrap, rlCdpCacheVersionExt=rlCdpCacheVersionExt, rlCdpTlvApplianceID=rlCdpTlvApplianceID, RlCdpCounterTypes=RlCdpCounterTypes, rlCdpInterfaceCountersTable=rlCdpInterfaceCountersTable, rlCdpValidateMandatoryTlvs=rlCdpValidateMandatoryTlvs, rlCdpCacheClear=rlCdpCacheClear, rlCdpTlvExtendedTrust=rlCdpTlvExtendedTrust, rlCdpInterfaceV1InputPackets=rlCdpInterfaceV1InputPackets, rlCdpTlvPowerAvailableRequestId=rlCdpTlvPowerAvailableRequestId, rlCdpCacheTimeToLive=rlCdpCacheTimeToLive, rlCdpTlvEntry=rlCdpTlvEntry, rlCdpInterfaceMaxNeighborsExceededInMainCache=rlCdpInterfaceMaxNeighborsExceededInMainCache, rlCdpTlvAddress1=rlCdpTlvAddress1, RlCdpPduActionTypes=RlCdpPduActionTypes, rlCdpTlvDeviceId=rlCdpTlvDeviceId, rlCdpSecondaryCacheCapabilities=rlCdpSecondaryCacheCapabilities, rlCdpCountersValue=rlCdpCountersValue, rlCdpTlvVersion=rlCdpTlvVersion, rlCdpSecondaryCacheEntry=rlCdpSecondaryCacheEntry, rlCdpSecondaryCacheTimeToLive=rlCdpSecondaryCacheTimeToLive, rlCdpCountersEntry=rlCdpCountersEntry, rlCdpCacheCdpVersion=rlCdpCacheCdpVersion, rlCdpInterfaceCountersClear=rlCdpInterfaceCountersClear, rlCdpPduAction=rlCdpPduAction, rlCdpTlvPowerAvailablePowerManagementId=rlCdpTlvPowerAvailablePowerManagementId, rlCdpTlvPowerAvailableManagementPowerLevel=rlCdpTlvPowerAvailableManagementPowerLevel, rlCdpSecondaryCacheTable=rlCdpSecondaryCacheTable, rlCdpLogMismatchDuplexEnable=rlCdpLogMismatchDuplexEnable, rlCdp=rlCdp, rlCdpInterfaceCountersEntry=rlCdpInterfaceCountersEntry, rlCdpLogMismatchVoiceVlanEnable=rlCdpLogMismatchVoiceVlanEnable, rlCdpTlvPlatform=rlCdpTlvPlatform, rlCdpTlvIfIndex=rlCdpTlvIfIndex, rlCdpLogMismatchNativeVlanTrap=rlCdpLogMismatchNativeVlanTrap, rlCdpInterfaceV2InputPackets=rlCdpInterfaceV2InputPackets, rlCdpTlvDeviceIdFormat=rlCdpTlvDeviceIdFormat, rlCdpCacheTable=rlCdpCacheTable, rlCdpTlvCapabilities=rlCdpTlvCapabilities, RlCdpVersionTypes=RlCdpVersionTypes, rlCdpTlvApplianceVlanID=rlCdpTlvApplianceVlanID, rlCdpTlvAddress1Type=rlCdpTlvAddress1Type, rlCdpInterfaceId=rlCdpInterfaceId, rlCdpInterfaceTotalOutputPackets=rlCdpInterfaceTotalOutputPackets, rlCdpGlobalLogMismatchDuplexEnable=rlCdpGlobalLogMismatchDuplexEnable, rlCdpSecondaryCacheVoiceVlanID=rlCdpSecondaryCacheVoiceVlanID, rlCdpTlvPortId=rlCdpTlvPortId, rlCdpVoiceVlanId=rlCdpVoiceVlanId, rlCdpInterfaceIllegalChksum=rlCdpInterfaceIllegalChksum)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection') (cdp_cache_device_index, cdp_cache_entry, cdp_cache_if_index) = mibBuilder.importSymbols('CISCO-CDP-MIB', 'cdpCacheDeviceIndex', 'cdpCacheEntry', 'cdpCacheIfIndex') (rnd_error_desc, rnd_error_severity) = mibBuilder.importSymbols('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorDesc', 'rndErrorSeverity') (rnd_notifications, switch001) = mibBuilder.importSymbols('CISCOSB-MIB', 'rndNotifications', 'switch001') (interface_index, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'InterfaceIndexOrZero') (inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType') (vlan_id, port_list) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanId', 'PortList') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, time_ticks, integer32, counter64, object_identity, mib_identifier, gauge32, counter32, notification_type, iso, bits, ip_address, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'TimeTicks', 'Integer32', 'Counter64', 'ObjectIdentity', 'MibIdentifier', 'Gauge32', 'Counter32', 'NotificationType', 'iso', 'Bits', 'IpAddress', 'Unsigned32') (truth_value, display_string, textual_convention, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention', 'MacAddress') rl_cdp = module_identity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137)) rlCdp.setRevisions(('2008-09-14 00:00', '2010-08-11 00:00', '2010-10-25 00:00', '2010-11-10 00:00', '2010-11-14 00:00', '2011-01-09 00:00', '2011-02-15 00:00', '2012-02-14 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlCdp.setRevisionsDescriptions(('Initial revision.', 'Added rlCdpLogMismatchVoiceVlanEnable, rlCdpLogMismatchNativeVlanEnable', 'Added rlCdpSecondaryCacheTable. Added maxNeighborsExceededInSecondaryCache. Renamed maxNeighborsExceeded to maxNeighborsExceededInMainCache.', 'Added rlCdpGlobalLogMismatchDuplexEnable. Added rlCdpGlobalLogMismatchVoiceVlanEnable. Added rlCdpGlobalLogMismatchNativeVlanEnable.', 'Added rlCdpTlvTable. Added rlCdpAdvertiseApplianceTlv.', 'Added rlCdpValidateMandatoryTlvs.', 'Added rlCdpLogMismatchDuplexTrap. Added rlCdpLogMismatchVoiceVlanTrap. Added rlCdpLogMismatchNativeVlanTrap.', 'Added rlCdpTlvSysName to rlCdpTlvTable.')) if mibBuilder.loadTexts: rlCdp.setLastUpdated('201102150000Z') if mibBuilder.loadTexts: rlCdp.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: rlCdp.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>') if mibBuilder.loadTexts: rlCdp.setDescription('The private MIB module definition for CDP protocol.') class Rlcdpversiontypes(TextualConvention, Integer32): description = 'version-v1 - cdp version 1 version-v2 - cdp version 2 ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('version-v1', 1), ('version-v2', 2)) class Rlcdpcountertypes(TextualConvention, Integer32): description = ' v1OutputPackets counter specifies the number of sent CDP packets with version 1 v2OutputPackets counter specifies the number of sent CDP packets with version 2 v1InputPackets counter specifies the number of received CDP packets with version 1 v2InputPackets counter specifies the number of received CDP packets with version 2 totalInputPackets counter specifies the total number of received CDP packets totalOutputPackets counter specifies the total number of sent CDP packets illegalChksum counter specifies the number of received CDP packets with illegal checksum. errorPackets counter specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) maxNeighborsExceededInMainCache counter specifies the number of times a CDP neighbor could not be stored in the main cache. maxNeighborsExceededInSecondaryCache specifies counter the number of times a CDP neighbor could not be stored in the secondary cache. ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) named_values = named_values(('totalInputPackets', 1), ('v1InputPackets', 2), ('v2InputPackets', 3), ('totalOutputPackets', 4), ('v1OutputPackets', 5), ('v2OutputPackets', 6), ('illegalChksum', 7), ('errorPackets', 8), ('maxNeighborsExceededInMainCache', 9), ('maxNeighborsExceededInSecondaryCache', 10)) class Rlcdppduactiontypes(TextualConvention, Integer32): description = 'filtering - CDP packets would filtered (dropped). bridging - CDP packets bridged as regular data packets ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('filtering', 1), ('bridging', 2), ('flooding', 3)) rl_cdp_version_advertised = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 1), rl_cdp_version_types()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpVersionAdvertised.setStatus('current') if mibBuilder.loadTexts: rlCdpVersionAdvertised.setDescription('Specifies the verison of sent CDP packets') rl_cdp_source_interface = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 2), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpSourceInterface.setStatus('current') if mibBuilder.loadTexts: rlCdpSourceInterface.setDescription('Specifices the CDP source-interface, which the IP address advertised into TLV is accoding to this source-interface instead of the outgoing interface. value of 0 indicates no source interface. value must belong to an ethernet port/lag ') rl_cdp_log_mismatch_duplex_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 3), port_list()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received duplex mode. To enable loging on specific interface set the corresponing bit.') rl_cdp_counters_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4)) if mibBuilder.loadTexts: rlCdpCountersTable.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersTable.setDescription('This table contains all CDP counters values, indexed by counter name') rl_cdp_counters_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1)).setIndexNames((0, 'CISCOSB-CDP-MIB', 'rlCdpCountersName')) if mibBuilder.loadTexts: rlCdpCountersEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersEntry.setDescription('The row definition for this table.') rl_cdp_counters_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 1), rl_cdp_counter_types()) if mibBuilder.loadTexts: rlCdpCountersName.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersName.setDescription('counter name used as key for counters table ') rl_cdp_counters_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpCountersValue.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersValue.setDescription('the value of the counter name specisifed by rlCdpCountersName, unsuppo will have no entry in the tab.') rl_cdp_counters_clear = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 5), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpCountersClear.setStatus('current') if mibBuilder.loadTexts: rlCdpCountersClear.setDescription('By setting the MIB to True, all error and traffic counters are set to zero.') rl_cdp_cache_clear = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 6), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpCacheClear.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheClear.setDescription('By setting the MIB to True, all entries from the cdp cache table is deleted.') rl_cdp_voice_vlan_id = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 4094))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpVoiceVlanId.setStatus('obsolete') if mibBuilder.loadTexts: rlCdpVoiceVlanId.setDescription('voice vlan Id, used as the Appliance Vlan-Id TLV') rl_cdp_cache_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8)) if mibBuilder.loadTexts: rlCdpCacheTable.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheTable.setDescription('The (conceptual) table contains externtion for the cdpCache table. indexed by cdpCacheEntry.') rl_cdp_cache_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1)) cdpCacheEntry.registerAugmentions(('CISCOSB-CDP-MIB', 'rlCdpCacheEntry')) rlCdpCacheEntry.setIndexNames(*cdpCacheEntry.getIndexNames()) if mibBuilder.loadTexts: rlCdpCacheEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheEntry.setDescription('The row definition for this table.') rl_cdp_cache_version_ext = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 1), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpCacheVersionExt.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheVersionExt.setDescription('This field contains the extention of the cdpCacheVersion field in the cdpCache table. In case the neighbour advertised the SW TLV as a string with length larger than 160, this field contains the chacters from place 160 and on. Zero-length strings indicates no Version field (TLV) was reported in the most recent CDP message, or it was smaller than 160 chars ') rl_cdp_cache_time_to_live = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setDescription('This field indicates the time remains in seconds till the entry should be expried. ') rl_cdp_cache_cdp_version = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 3), rl_cdp_version_types()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setStatus('current') if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setDescription('This field indicates the cdp version that was reported in the most recent CDP message.') rl_cdp_pdu_action = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 9), rl_cdp_pdu_action_types().clone('bridging')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpPduAction.setStatus('current') if mibBuilder.loadTexts: rlCdpPduAction.setDescription('Defines CDP packets handling when CDP is globally disabled.') rl_cdp_log_mismatch_voice_vlan_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 10), port_list()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received voice VLAN. To enable logging on specific interface set the corresponing bit.') rl_cdp_log_mismatch_native_vlan_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 11), port_list()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received native VLAN. To enable loging on specific interface set the corresponing bit.') rl_cdp_secondary_cache_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12)) if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setDescription('The (conceptual) table contains partial information from cdpCache table. indexed by rlCdpSecondaryCacheEntry.') rl_cdp_secondary_cache_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1)).setIndexNames((0, 'CISCO-CDP-MIB', 'cdpCacheIfIndex'), (0, 'CISCO-CDP-MIB', 'cdpCacheDeviceIndex')) if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setDescription('An entry (conceptual row) in the rlCdpSecondaryCacheTable, containing partial information received via CDP on one interface from one device. Entries appear when a CDP advertisement is received from a neighbor device. Entries disappear when CDP is disabled on the interface, globally or when the secondary cache is cleared') rl_cdp_secondary_cache_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setDescription('The MAC address of the neighbor.') rl_cdp_secondary_cache_platform = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setDescription("The Device's Hardware Platform prefix, as reported in the most recent CDP message. The zero-length string indicates that no Platform field (TLV) was reported in the most recent CDP message.") rl_cdp_secondary_cache_capabilities = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setDescription("The Device's Functional Capabilities as reported in the most recent CDP message.") rl_cdp_secondary_cache_voice_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setDescription("The remote device's VoIP VLAN ID, as reported in the most recent CDP message. This object is not instantiated if no Appliance VLAN-ID field (TLV) was reported in the most recently received CDP message.") rl_cdp_secondary_cache_time_to_live = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setStatus('current') if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setDescription('This field indicates the number of seconds till the entry is expried. ') rl_cdp_global_log_mismatch_duplex_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 13), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received duplex mode.') rl_cdp_global_log_mismatch_voice_vlan_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 14), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received voice VLAN.') rl_cdp_global_log_mismatch_native_vlan_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 15), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setStatus('current') if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received native VLAN.') rl_cdp_tlv_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16)) if mibBuilder.loadTexts: rlCdpTlvTable.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvTable.setDescription('The (conceptual) table contains the local advertised information. indexed by rlCdpTlvEntry.') rl_cdp_tlv_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1)).setIndexNames((0, 'CISCOSB-CDP-MIB', 'rlCdpTlvIfIndex')) if mibBuilder.loadTexts: rlCdpTlvEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvEntry.setDescription('An entry (conceptual row) in the rlCdpTlvTable, containing local information advertised by CDP on one interface. Entries are available only when CDP is globally enabled, for interfaces on which CDP is enabled and the interface state is UP.') rl_cdp_tlv_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: rlCdpTlvIfIndex.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvIfIndex.setDescription('The ifIndex value of the local interface. A value of zero is used to access TLVs which do not changed between interfaces.') rl_cdp_tlv_device_id_format = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('serialNumber', 1), ('macAddress', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setDescription('An indication of the format of Device-Id contained in the corresponding instance of rlCdpTlvDeviceId. serialNumber(1) indicates that the value of rlCdpTlvDeviceId object is in the form of an ASCII string contain the device serial number. macAddress(2) indicates that the value of rlCdpTlvDeviceId object is in the form of Layer 2 MAC address. other(3) indicates that the value of rlCdpTlvDeviceId object is in the form of a platform specific ASCII string contain info that identifies the device. For example: ASCII string contains serialNumber appended/prepened with system name.') rl_cdp_tlv_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvDeviceId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDeviceId.setDescription('The Device-ID string as will be advertised in subsequent CDP messages.') rl_cdp_tlv_address1_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 4), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setDescription('The Inet address type of rlCdpTlvAddress1') rl_cdp_tlv_address1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 5), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress1.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress1.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress1Type had the value 'ipv4(1)', then this object would be an IPv4-address.") rl_cdp_tlv_address2_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 6), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setDescription('The Inet address type of rlCdpTlvAddress2') rl_cdp_tlv_address2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 7), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress2.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress2.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress2Type had the value 'ipv6(2)', then this object would be an IPv6-address.") rl_cdp_tlv_address3_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 8), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setDescription('The Inet address type of rlCdpTlvAddress3') rl_cdp_tlv_address3 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 9), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvAddress3.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvAddress3.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress3Type had the value 'ipv6(2)', then this object would be an IPv6-address.") rl_cdp_tlv_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 10), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPortId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPortId.setDescription("The Port-ID string as will be advertised in subsequent CDP messages from this interface. This will typically be the value of the ifName object (e.g., 'Ethernet0').") rl_cdp_tlv_capabilities = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvCapabilities.setReference('Cisco Discovery Protocol Specification, 10/19/94.') if mibBuilder.loadTexts: rlCdpTlvCapabilities.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvCapabilities.setDescription("The Device's Functional Capabilities as will be advertised in subsequent CDP messages. For latest set of specific values, see the latest version of the CDP specification.") rl_cdp_tlv_version = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 12), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvVersion.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvVersion.setDescription('The Version string as will be advertised in subsequent CDP messages.') rl_cdp_tlv_platform = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 13), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPlatform.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPlatform.setDescription("The Device's Hardware Platform as will be advertised in subsequent CDP messages.") rl_cdp_tlv_native_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setDescription("The local device's interface's native VLAN, as will be advertised in subsequent CDP messages.") rl_cdp_tlv_duplex = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('halfduplex', 2), ('fullduplex', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvDuplex.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvDuplex.setDescription("The local device's interface's duplex mode, as will be advertised in subsequent CDP messages.") rl_cdp_tlv_appliance_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 16), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvApplianceID.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvApplianceID.setDescription("The local device's Appliance ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.") rl_cdp_tlv_appliance_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 17), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setDescription("The local device's VoIP VLAN ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.") rl_cdp_tlv_extended_trust = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('untrusted', 0), ('trusted', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setDescription("The local device's interface's extended trust mode, as will be advertised in subsequent CDP messages. A value of zero indicates the absence of extended trust.") rl_cdp_tlv_cos_for_untrusted_ports = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 19), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setDescription('The COS value with which all packets received on an untrusted port should be marked by a simple switching device which cannot itself classify individual packets. This TLV only has any meaning if corresponding instance of rlCdpTlvExtendedTrust indicates the absence of extended trust.') rl_cdp_tlv_power_available_request_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 20), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setDescription('The Power Available TLV Request-ID field echoes the Request-ID field last received in a Power Requested TLV. It is 0 if no Power Requested TLV has been received since the interface last transitioned to ifOperState == Up.') rl_cdp_tlv_power_available_power_management_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setDescription('The Power Available TLV Power-Management-ID field.') rl_cdp_tlv_power_available = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 22), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setDescription('The Power Available TLV Available-Power field indicates the number of milliwatts of power available to powered devices at the time this object is instatiated.') rl_cdp_tlv_power_available_management_power_level = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 23), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setDescription("The Power Available TLV Management-Power-Level field indicates the number of milliwatts representing the supplier's request to the powered device for its Power Consumption TLV. A value of 0xFFFFFFFF indicates the local device has no preference.") rl_cdp_tlv_sys_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 24), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpTlvSysName.setStatus('current') if mibBuilder.loadTexts: rlCdpTlvSysName.setDescription('The sysName MIB as will be advertised in subsequent CDP messages.') rl_cdp_advertise_appliance_tlv = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 17), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setStatus('current') if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setDescription('By setting the MIB to True Appliance VLAN-ID TLV may be advertised. A value of False will prevent this TLV from being advertised.') rl_cdp_validate_mandatory_tlvs = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 18), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setStatus('current') if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setDescription('By setting the MIB to true all mandatory TLVs 0x0001-0x0006 will be validated. Incoming CDP frames without any of the TLVs will be dropped. A value of false indicates that only the Device ID TLV (0x0001) is mandatory. Frames containing Device ID TLV will be processed, regardless of whether other TLVs are present or not.') rl_cdp_interface_counters_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19)) if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setDescription('This table contains all CDP counters values, indexed by interface id.') rl_cdp_interface_counters_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1)).setIndexNames((0, 'CISCOSB-CDP-MIB', 'rlCdpInterfaceId')) if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setDescription('The row definition for this table.') rl_cdp_interface_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 1), interface_index()) if mibBuilder.loadTexts: rlCdpInterfaceId.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceId.setDescription('Interface id, used as index for interface counters table.') rl_cdp_interface_total_input_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setDescription('Num of received packets on rlCdpInterfaceId') rl_cdp_interface_v1_input_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setDescription('Num of v1 received packets on rlCdpInterfaceId') rl_cdp_interface_v2_input_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setDescription('Num of v2 received packets on rlCdpInterfaceId') rl_cdp_interface_total_output_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setDescription('Num of sent packets from rlCdpInterfaceId') rl_cdp_interface_v1_output_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setDescription('Num of v1 sent packets from rlCdpInterfaceId') rl_cdp_interface_v2_output_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setDescription('Num of v2 sent packets from rlCdpInterfaceId') rl_cdp_interface_illegal_chksum = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setDescription('Num of received packets with illegal CDP checksum.') rl_cdp_interface_error_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setDescription('specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) ') rl_cdp_interface_max_neighbors_exceeded_in_main_cache = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setDescription('specifies the number of times a CDP neighbor could not be stored in the main cache. ') rl_cdp_interface_max_neighbors_exceeded_in_secondary_cache = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setDescription(' specifies the number of times a CDP neighbor could not be stored in the secondary cache.') rl_cdp_interface_counters_clear = mib_scalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 20), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setStatus('current') if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setDescription('By setting the scalar to a interface id , all error and traffic counters of this interface are set to zero. To clear the counters for ALL interfaces set the scalar to 0x0FFFFFFF') rl_cdp_log_mismatch_duplex_trap = notification_type((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 224)).setObjects(('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorDesc'), ('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorSeverity')) if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setDescription('Warning trap indicating that duplex mismatch has been detected by CDP') rl_cdp_log_mismatch_voice_vlan_trap = notification_type((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 225)).setObjects(('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorDesc'), ('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorSeverity')) if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setDescription('Warning trap indicating that voice vlan mismatch has been detected by CDP') rl_cdp_log_mismatch_native_vlan_trap = notification_type((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 226)).setObjects(('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorDesc'), ('CISCOSB-DEVICEPARAMS-MIB', 'rndErrorSeverity')) if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setStatus('current') if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setDescription('Warning trap indicating that native vlan mismatch has been detected by CDP') mibBuilder.exportSymbols('CISCOSB-CDP-MIB', rlCdpInterfaceTotalInputPackets=rlCdpInterfaceTotalInputPackets, rlCdpTlvCosForUntrustedPorts=rlCdpTlvCosForUntrustedPorts, rlCdpTlvAddress3Type=rlCdpTlvAddress3Type, rlCdpAdvertiseApplianceTlv=rlCdpAdvertiseApplianceTlv, rlCdpCountersName=rlCdpCountersName, rlCdpSecondaryCachePlatform=rlCdpSecondaryCachePlatform, rlCdpCacheEntry=rlCdpCacheEntry, rlCdpTlvPowerAvailable=rlCdpTlvPowerAvailable, rlCdpInterfaceV2OutputPackets=rlCdpInterfaceV2OutputPackets, rlCdpInterfaceMaxNeighborsExceededInSecondaryCache=rlCdpInterfaceMaxNeighborsExceededInSecondaryCache, rlCdpLogMismatchVoiceVlanTrap=rlCdpLogMismatchVoiceVlanTrap, rlCdpSourceInterface=rlCdpSourceInterface, PYSNMP_MODULE_ID=rlCdp, rlCdpLogMismatchNativeVlanEnable=rlCdpLogMismatchNativeVlanEnable, rlCdpTlvTable=rlCdpTlvTable, rlCdpTlvNativeVLAN=rlCdpTlvNativeVLAN, rlCdpSecondaryCacheMacAddress=rlCdpSecondaryCacheMacAddress, rlCdpInterfaceV1OutputPackets=rlCdpInterfaceV1OutputPackets, rlCdpTlvAddress3=rlCdpTlvAddress3, rlCdpCountersClear=rlCdpCountersClear, rlCdpGlobalLogMismatchVoiceVlanEnable=rlCdpGlobalLogMismatchVoiceVlanEnable, rlCdpCountersTable=rlCdpCountersTable, rlCdpTlvAddress2Type=rlCdpTlvAddress2Type, rlCdpVersionAdvertised=rlCdpVersionAdvertised, rlCdpTlvSysName=rlCdpTlvSysName, rlCdpTlvDuplex=rlCdpTlvDuplex, rlCdpInterfaceErrorPackets=rlCdpInterfaceErrorPackets, rlCdpTlvAddress2=rlCdpTlvAddress2, rlCdpGlobalLogMismatchNativeVlanEnable=rlCdpGlobalLogMismatchNativeVlanEnable, rlCdpLogMismatchDuplexTrap=rlCdpLogMismatchDuplexTrap, rlCdpCacheVersionExt=rlCdpCacheVersionExt, rlCdpTlvApplianceID=rlCdpTlvApplianceID, RlCdpCounterTypes=RlCdpCounterTypes, rlCdpInterfaceCountersTable=rlCdpInterfaceCountersTable, rlCdpValidateMandatoryTlvs=rlCdpValidateMandatoryTlvs, rlCdpCacheClear=rlCdpCacheClear, rlCdpTlvExtendedTrust=rlCdpTlvExtendedTrust, rlCdpInterfaceV1InputPackets=rlCdpInterfaceV1InputPackets, rlCdpTlvPowerAvailableRequestId=rlCdpTlvPowerAvailableRequestId, rlCdpCacheTimeToLive=rlCdpCacheTimeToLive, rlCdpTlvEntry=rlCdpTlvEntry, rlCdpInterfaceMaxNeighborsExceededInMainCache=rlCdpInterfaceMaxNeighborsExceededInMainCache, rlCdpTlvAddress1=rlCdpTlvAddress1, RlCdpPduActionTypes=RlCdpPduActionTypes, rlCdpTlvDeviceId=rlCdpTlvDeviceId, rlCdpSecondaryCacheCapabilities=rlCdpSecondaryCacheCapabilities, rlCdpCountersValue=rlCdpCountersValue, rlCdpTlvVersion=rlCdpTlvVersion, rlCdpSecondaryCacheEntry=rlCdpSecondaryCacheEntry, rlCdpSecondaryCacheTimeToLive=rlCdpSecondaryCacheTimeToLive, rlCdpCountersEntry=rlCdpCountersEntry, rlCdpCacheCdpVersion=rlCdpCacheCdpVersion, rlCdpInterfaceCountersClear=rlCdpInterfaceCountersClear, rlCdpPduAction=rlCdpPduAction, rlCdpTlvPowerAvailablePowerManagementId=rlCdpTlvPowerAvailablePowerManagementId, rlCdpTlvPowerAvailableManagementPowerLevel=rlCdpTlvPowerAvailableManagementPowerLevel, rlCdpSecondaryCacheTable=rlCdpSecondaryCacheTable, rlCdpLogMismatchDuplexEnable=rlCdpLogMismatchDuplexEnable, rlCdp=rlCdp, rlCdpInterfaceCountersEntry=rlCdpInterfaceCountersEntry, rlCdpLogMismatchVoiceVlanEnable=rlCdpLogMismatchVoiceVlanEnable, rlCdpTlvPlatform=rlCdpTlvPlatform, rlCdpTlvIfIndex=rlCdpTlvIfIndex, rlCdpLogMismatchNativeVlanTrap=rlCdpLogMismatchNativeVlanTrap, rlCdpInterfaceV2InputPackets=rlCdpInterfaceV2InputPackets, rlCdpTlvDeviceIdFormat=rlCdpTlvDeviceIdFormat, rlCdpCacheTable=rlCdpCacheTable, rlCdpTlvCapabilities=rlCdpTlvCapabilities, RlCdpVersionTypes=RlCdpVersionTypes, rlCdpTlvApplianceVlanID=rlCdpTlvApplianceVlanID, rlCdpTlvAddress1Type=rlCdpTlvAddress1Type, rlCdpInterfaceId=rlCdpInterfaceId, rlCdpInterfaceTotalOutputPackets=rlCdpInterfaceTotalOutputPackets, rlCdpGlobalLogMismatchDuplexEnable=rlCdpGlobalLogMismatchDuplexEnable, rlCdpSecondaryCacheVoiceVlanID=rlCdpSecondaryCacheVoiceVlanID, rlCdpTlvPortId=rlCdpTlvPortId, rlCdpVoiceVlanId=rlCdpVoiceVlanId, rlCdpInterfaceIllegalChksum=rlCdpInterfaceIllegalChksum)
unique_symbols= { 1:'I', 5:'V', 10:'X', 50:'L', 100:'C', 500:'D', 1000:'M' } def calculateRoman(algarism, place): if algarism==0: return '' elif place>=4: return algarism * unique_symbols[1000] elif algarism>5: if algarism==9: return unique_symbols[10**(place-1)]+unique_symbols[10**place] else: return unique_symbols[5*10**(place-1)] + (algarism-5) * unique_symbols[10**(place-1)] elif algarism<5: if algarism==4: return unique_symbols[10**(place-1)] + unique_symbols[5*10**(place-1)] else: return algarism * unique_symbols[10**(place-1)] else: return unique_symbols[5*10**(place-1)] def converter(integer): place=0 roman='' while integer!=0: rest= integer%10 integer//=10 place+=1 roman= calculateRoman(rest, place) + roman return roman if __name__ == "__main__": while True: try: integer = input('Insert an Integer: ') if integer.isdecimal(): integer= int(integer) else: print('Insert a valid Integer') continue if integer<1 or integer>10000: raise roman=converter(integer) print("{} converts into {}".format(integer, roman)) break except: print("Integer is too high")
unique_symbols = {1: 'I', 5: 'V', 10: 'X', 50: 'L', 100: 'C', 500: 'D', 1000: 'M'} def calculate_roman(algarism, place): if algarism == 0: return '' elif place >= 4: return algarism * unique_symbols[1000] elif algarism > 5: if algarism == 9: return unique_symbols[10 ** (place - 1)] + unique_symbols[10 ** place] else: return unique_symbols[5 * 10 ** (place - 1)] + (algarism - 5) * unique_symbols[10 ** (place - 1)] elif algarism < 5: if algarism == 4: return unique_symbols[10 ** (place - 1)] + unique_symbols[5 * 10 ** (place - 1)] else: return algarism * unique_symbols[10 ** (place - 1)] else: return unique_symbols[5 * 10 ** (place - 1)] def converter(integer): place = 0 roman = '' while integer != 0: rest = integer % 10 integer //= 10 place += 1 roman = calculate_roman(rest, place) + roman return roman if __name__ == '__main__': while True: try: integer = input('Insert an Integer: ') if integer.isdecimal(): integer = int(integer) else: print('Insert a valid Integer') continue if integer < 1 or integer > 10000: raise roman = converter(integer) print('{} converts into {}'.format(integer, roman)) break except: print('Integer is too high')
class Solution: """ @param grid: a list of lists of integers @return: An integer, minimizes the sum of all numbers along its path """ """ f[] """ def minPathSum(self, grid): # write your code here if grid is None or not grid:return 0 m = len(grid) n = len(grid[0]) f = [[0] * n for _ in range(m)] f[0][0] = grid[0][0] for i in range(1, m): f[i][0] = f[i - 1][0] + grid[i][0] for j in range(1, n): f[0][j] = f[0][j - 1] + grid[0][j] f[i][j] = min(f[i - 1][j], f[i][j - 1])+grid[i][j] return f[m - 1][n - 1] s=Solution() print(s.minPathSum( [[1,3,1],[1,5,1],[4,2,1]]))
class Solution: """ @param grid: a list of lists of integers @return: An integer, minimizes the sum of all numbers along its path """ '\n \n f[]\n ' def min_path_sum(self, grid): if grid is None or not grid: return 0 m = len(grid) n = len(grid[0]) f = [[0] * n for _ in range(m)] f[0][0] = grid[0][0] for i in range(1, m): f[i][0] = f[i - 1][0] + grid[i][0] for j in range(1, n): f[0][j] = f[0][j - 1] + grid[0][j] f[i][j] = min(f[i - 1][j], f[i][j - 1]) + grid[i][j] return f[m - 1][n - 1] s = solution() print(s.minPathSum([[1, 3, 1], [1, 5, 1], [4, 2, 1]]))
class MapAsObject: def __init__(self, wrapped): self.wrapped = wrapped def __getattr__(self, key): try: return self.wrapped[key] except KeyError: raise AttributeError("%r object has no attribute %r" % (self.__class__.__name__, key)) def get(self, *args, **kwargs): return self.wrapped.get(*args, **kwargs) def __str__(self): return str(self.wrapped) def as_object(wrapped_map): return MapAsObject(wrapped_map)
class Mapasobject: def __init__(self, wrapped): self.wrapped = wrapped def __getattr__(self, key): try: return self.wrapped[key] except KeyError: raise attribute_error('%r object has no attribute %r' % (self.__class__.__name__, key)) def get(self, *args, **kwargs): return self.wrapped.get(*args, **kwargs) def __str__(self): return str(self.wrapped) def as_object(wrapped_map): return map_as_object(wrapped_map)
fhand = open(input('Enter file name: ')) d = dict() for ln in fhand: if not ln.startswith('From '): continue words = ln.split() time = words[5] d[time[:2]] = d.get(time[:2],0) + 1 l = list() for key,val in d.items(): l.append((val,key)) l.sort() for val,key in l: print(key,val)
fhand = open(input('Enter file name: ')) d = dict() for ln in fhand: if not ln.startswith('From '): continue words = ln.split() time = words[5] d[time[:2]] = d.get(time[:2], 0) + 1 l = list() for (key, val) in d.items(): l.append((val, key)) l.sort() for (val, key) in l: print(key, val)
dbname='postgres' user='postgres' password='q1w2e3r4' host='127.0.0.1'
dbname = 'postgres' user = 'postgres' password = 'q1w2e3r4' host = '127.0.0.1'
""" MIT License Copyright (c) 2021 Daud 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. """ GOOGLE_ICON = 'https://image.flaticon.com/teams/slug/google.jpg' class Result: """Represents a result from the given search query. Attributes ---------- title: `str` The title of the returned result. snippet: Optional[`str`] The short description of the website, if any. url: `str` The returned website url. image_url: Optional[`str`] The preview image of the website, if any. total: `str` The average total results of the given query. time: `str` The time used to search the query (in seconds). """ def __init__(self, title, description, url, image_url, total, time) -> None: self.title = title self.description = description self.url = url self.image_url = image_url self.total = total self.time = time def __repr__(self) -> str: return "<aiocse.result.Result object title={0.title!r} description={0.description!r} " \ "url={0.url!r} image_url={0.image_url!r}>".format(self) @classmethod def to_list(cls, data, img): """Converts a dict to Result object.""" results = [] total = data['searchInformation']['formattedTotalResults'] time = data['searchInformation']['formattedSearchTime'] for item in data['items']: title = item.get('title') desc = item.get('snippet') if img: image_url = item['link'] try: url = item['image']['contextLink'] except KeyError: url = image_url else: url = item['link'] i = item.get('pagemap') if not i: image_url = GOOGLE_ICON else: img = i.get('cse_image') if not i: image_url = GOOGLE_ICON else: try: image_url = img[0]['src'] if image_url.startswith('x-raw-image'): image_url = i['cse_thumbnail'][0]['src'] except TypeError: image_url = GOOGLE_ICON results.append(cls(title, desc, url, image_url, total, time)) return results
""" MIT License Copyright (c) 2021 Daud 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. """ google_icon = 'https://image.flaticon.com/teams/slug/google.jpg' class Result: """Represents a result from the given search query. Attributes ---------- title: `str` The title of the returned result. snippet: Optional[`str`] The short description of the website, if any. url: `str` The returned website url. image_url: Optional[`str`] The preview image of the website, if any. total: `str` The average total results of the given query. time: `str` The time used to search the query (in seconds). """ def __init__(self, title, description, url, image_url, total, time) -> None: self.title = title self.description = description self.url = url self.image_url = image_url self.total = total self.time = time def __repr__(self) -> str: return '<aiocse.result.Result object title={0.title!r} description={0.description!r} url={0.url!r} image_url={0.image_url!r}>'.format(self) @classmethod def to_list(cls, data, img): """Converts a dict to Result object.""" results = [] total = data['searchInformation']['formattedTotalResults'] time = data['searchInformation']['formattedSearchTime'] for item in data['items']: title = item.get('title') desc = item.get('snippet') if img: image_url = item['link'] try: url = item['image']['contextLink'] except KeyError: url = image_url else: url = item['link'] i = item.get('pagemap') if not i: image_url = GOOGLE_ICON else: img = i.get('cse_image') if not i: image_url = GOOGLE_ICON else: try: image_url = img[0]['src'] if image_url.startswith('x-raw-image'): image_url = i['cse_thumbnail'][0]['src'] except TypeError: image_url = GOOGLE_ICON results.append(cls(title, desc, url, image_url, total, time)) return results
Blue = 0 Red = 0 Yellow = 0 Green = 0 Gold = 1 Health = 100 Experience = 0 if Gold == 1: print("The chest opens") Health += 50 Experience += 100 elif Blue == 1: print("DEATH Appears") Health -= 100 elif Red == 1: print("The chest burns you") Health -= 50 elif Yellow == 1: print("A monster appears behind you") elif Green == 1: print("A giant boulder falls from the ceiling and rolls toward you") else: print("You need a key to open this") print("Health:", Health) print("Experience:", Experience) if Health <= 0: print("GAME OVER") else: print("")
blue = 0 red = 0 yellow = 0 green = 0 gold = 1 health = 100 experience = 0 if Gold == 1: print('The chest opens') health += 50 experience += 100 elif Blue == 1: print('DEATH Appears') health -= 100 elif Red == 1: print('The chest burns you') health -= 50 elif Yellow == 1: print('A monster appears behind you') elif Green == 1: print('A giant boulder falls from the ceiling and rolls toward you') else: print('You need a key to open this') print('Health:', Health) print('Experience:', Experience) if Health <= 0: print('GAME OVER') else: print('')
numList = [3, 4, 5, 6, 7] length = len(numList) for i in range(length): print(2 * numList[i])
num_list = [3, 4, 5, 6, 7] length = len(numList) for i in range(length): print(2 * numList[i])
# # @lc app=leetcode id=273 lang=python3 # # [273] Integer to English Words # # @lc code=start class Solution: def numberToWords(self, num: int) -> str: v0 = ["Thousand", "Million", "Billion"] v1 = ["", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"] v2 = ["", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"] ret = [] def convert_hundred(sub_num): h_ret = [] hundred = sub_num // 100 if hundred > 0: h_ret.append(v1[hundred]) h_ret.append("Hundred") sub_num = sub_num % 100 if sub_num > 19: ten = sub_num // 10 sub_num = sub_num % 10 h_ret.append(v2[ten]) if sub_num > 0: h_ret.append(v1[sub_num]) elif sub_num > 0: h_ret.append(v1[sub_num]) return " ".join(h_ret) sub_num = num % 1000 ret = [convert_hundred(sub_num)] + ret num = num // 1000 for i in range(3): if num == 0: break sub_num = num % 1000 if sub_num > 0: ret = [convert_hundred(sub_num), v0[i]] + ret num = num // 1000 ret = " ".join([i for i in ret if i != ""]) return ret if ret else "Zero" # @lc code=end s = Solution() # WA1 # num = 0 # WA2 # num = 20 # WA3 num = 1000010001 ret = s.numberToWords(num) print(f"'{ret}'")
class Solution: def number_to_words(self, num: int) -> str: v0 = ['Thousand', 'Million', 'Billion'] v1 = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen'] v2 = ['', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'] ret = [] def convert_hundred(sub_num): h_ret = [] hundred = sub_num // 100 if hundred > 0: h_ret.append(v1[hundred]) h_ret.append('Hundred') sub_num = sub_num % 100 if sub_num > 19: ten = sub_num // 10 sub_num = sub_num % 10 h_ret.append(v2[ten]) if sub_num > 0: h_ret.append(v1[sub_num]) elif sub_num > 0: h_ret.append(v1[sub_num]) return ' '.join(h_ret) sub_num = num % 1000 ret = [convert_hundred(sub_num)] + ret num = num // 1000 for i in range(3): if num == 0: break sub_num = num % 1000 if sub_num > 0: ret = [convert_hundred(sub_num), v0[i]] + ret num = num // 1000 ret = ' '.join([i for i in ret if i != '']) return ret if ret else 'Zero' s = solution() num = 1000010001 ret = s.numberToWords(num) print(f"'{ret}'")
class JeevesException(Exception): """ Base exception class for jeeves. """ pass class UserNotAdded(JeevesException): """ An JeevesException that raises when there is not a user added to the server or "not found". Parameters ---------- name : string The name of the Member not found. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, name): self.name = name self.message = "{} is not added to anything or is a non-existant user"\ .format(name) class UserInsufficentPermissions(JeevesException): """ An JeevesException that raises when a Member does not have sufficent permissions. Parameters ----------- name : string The name of the Member not found. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, name): self.name = name self.message = "{} does not have sufficent permissions".format(name) class BadInput(JeevesException): """ An JeevesException that raises when the input was bad. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, message): self.message = message class InvalidType(JeevesException): """ An JeevesException that raises when the input was bad. Parameters ----------- type1 : type The type we got. type2 : type The type we expected. location : str A string with the location of the incident. Attributes ---------- message : str The message that is generated from this error. """ def __init__(self, type1, type2, location): self.message = "Got type:{} but expected type:{} - in {}".format(\ type1,type2,location) class BadArgs(JeevesException): """ A JeevesException that raises when bad **kwargs are passed in. Parameters ----------- what : str What argument was bad. where : str Location where it was bad. why : str Why the argument was bad. Attributes ----------- message : str The message that is generated from this error. """ def __init__(self,what,where,why): self.message = "{} at {} had a bad argument because {}".format(\ what,where,why)
class Jeevesexception(Exception): """ Base exception class for jeeves. """ pass class Usernotadded(JeevesException): """ An JeevesException that raises when there is not a user added to the server or "not found". Parameters ---------- name : string The name of the Member not found. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, name): self.name = name self.message = '{} is not added to anything or is a non-existant user'.format(name) class Userinsufficentpermissions(JeevesException): """ An JeevesException that raises when a Member does not have sufficent permissions. Parameters ----------- name : string The name of the Member not found. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, name): self.name = name self.message = '{} does not have sufficent permissions'.format(name) class Badinput(JeevesException): """ An JeevesException that raises when the input was bad. Attributes ---------- message : string The message that is generated from this error. """ def __init__(self, message): self.message = message class Invalidtype(JeevesException): """ An JeevesException that raises when the input was bad. Parameters ----------- type1 : type The type we got. type2 : type The type we expected. location : str A string with the location of the incident. Attributes ---------- message : str The message that is generated from this error. """ def __init__(self, type1, type2, location): self.message = 'Got type:{} but expected type:{} - in {}'.format(type1, type2, location) class Badargs(JeevesException): """ A JeevesException that raises when bad **kwargs are passed in. Parameters ----------- what : str What argument was bad. where : str Location where it was bad. why : str Why the argument was bad. Attributes ----------- message : str The message that is generated from this error. """ def __init__(self, what, where, why): self.message = '{} at {} had a bad argument because {}'.format(what, where, why)
''' IQ test ''' n = int(input()) numbers = list(map(int, input().split(' '))) even = 0 odd = 0 first_eve = -1 first_odd = -1 for i in range(n): if numbers[i] % 2 == 0: even += 1 if first_eve == -1: first_eve = i else: odd += 1 if first_odd == -1: first_odd = i if even >= 2 and first_odd != -1: print(first_odd+1) break if odd >= 2 and first_eve != -1: print(first_eve+1) break
""" IQ test """ n = int(input()) numbers = list(map(int, input().split(' '))) even = 0 odd = 0 first_eve = -1 first_odd = -1 for i in range(n): if numbers[i] % 2 == 0: even += 1 if first_eve == -1: first_eve = i else: odd += 1 if first_odd == -1: first_odd = i if even >= 2 and first_odd != -1: print(first_odd + 1) break if odd >= 2 and first_eve != -1: print(first_eve + 1) break
class Solution: def canVisitAllRooms(self, rooms: List[List[int]]) -> bool: opened = set() N = len(rooms) opened.add(0) toOpen = rooms[0] while toOpen: nextRound = set() for room in toOpen: for newKey in rooms[room]: if newKey not in opened: nextRound.add(newKey) opened.add(room) toOpen = list(nextRound) if len(opened) == N: return True return False
class Solution: def can_visit_all_rooms(self, rooms: List[List[int]]) -> bool: opened = set() n = len(rooms) opened.add(0) to_open = rooms[0] while toOpen: next_round = set() for room in toOpen: for new_key in rooms[room]: if newKey not in opened: nextRound.add(newKey) opened.add(room) to_open = list(nextRound) if len(opened) == N: return True return False
class UndoSelectiveEnum(basestring): """ all|wrong Possible values: <ul> <li> "all" - Undo all shared data, <li> "wrong" - Only undo the incorrectly shared data </ul> """ @staticmethod def get_api_name(): return "undo-selective-enum"
class Undoselectiveenum(basestring): """ all|wrong Possible values: <ul> <li> "all" - Undo all shared data, <li> "wrong" - Only undo the incorrectly shared data </ul> """ @staticmethod def get_api_name(): return 'undo-selective-enum'
''' Python program to compute the sum of the negative and positive numbers of an array of integers and display the largest sum. Original array elements: {0, 15, 16, 17, -14, -13, -12, -11, -10, 18, 19, 20} Largest sum - Positive/Negative numbers of the said array: 105 Original array elements: {0, 3, 4, 5, 9, -22, -44, -11} Largest sum - Positive/Negative numbers of the said array: -77 ''' def test(lst): pos_sum = 0 neg_sum = 0 for n in lst: if n > 0: pos_sum += n elif n < 0: neg_sum += n print ("Pos Sum", pos_sum) print ("Neg Sum", neg_sum) return max(pos_sum, neg_sum, key=abs) nums = { 0, -10, -11, -12, -13, -14, 15, 16, 17, 18, 19, 20 }; print("Original array elements:"); print(nums) print("Largest sum - Positive/Negative numbers of the said array: ", test(nums)); nums = { -11, -22, -44, 0, 3, 4 , 5, 9 }; print("\nOriginal array elements:"); print(nums) print("Largest sum - Positive/Negative numbers of the said array: ", test(nums));
""" Python program to compute the sum of the negative and positive numbers of an array of integers and display the largest sum. Original array elements: {0, 15, 16, 17, -14, -13, -12, -11, -10, 18, 19, 20} Largest sum - Positive/Negative numbers of the said array: 105 Original array elements: {0, 3, 4, 5, 9, -22, -44, -11} Largest sum - Positive/Negative numbers of the said array: -77 """ def test(lst): pos_sum = 0 neg_sum = 0 for n in lst: if n > 0: pos_sum += n elif n < 0: neg_sum += n print('Pos Sum', pos_sum) print('Neg Sum', neg_sum) return max(pos_sum, neg_sum, key=abs) nums = {0, -10, -11, -12, -13, -14, 15, 16, 17, 18, 19, 20} print('Original array elements:') print(nums) print('Largest sum - Positive/Negative numbers of the said array: ', test(nums)) nums = {-11, -22, -44, 0, 3, 4, 5, 9} print('\nOriginal array elements:') print(nums) print('Largest sum - Positive/Negative numbers of the said array: ', test(nums))
'''input 549 817 715 603 1152 600 300 220 420 520 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem A if __name__ == '__main__': a = int(input()) b = int(input()) c = int(input()) d = int(input()) print(min(a, b) + min(c, d))
"""input 549 817 715 603 1152 600 300 220 420 520 """ if __name__ == '__main__': a = int(input()) b = int(input()) c = int(input()) d = int(input()) print(min(a, b) + min(c, d))
# -*- coding: utf-8 -*- """Main module.""" def silly_sort(unsilly_list): """ This function was created in order to arrenge a range of rangers. Please, move on and don't ask me why. """ size = len(unsilly_list) for i in range(size): unsilly_list[i], unsilly_list[size-1-i] = \ unsilly_list[size-1-i], unsilly_list[i] print("Silly!")
"""Main module.""" def silly_sort(unsilly_list): """ This function was created in order to arrenge a range of rangers. Please, move on and don't ask me why. """ size = len(unsilly_list) for i in range(size): (unsilly_list[i], unsilly_list[size - 1 - i]) = (unsilly_list[size - 1 - i], unsilly_list[i]) print('Silly!')
list_1 = [2,3,1,4,2,3,5,6,8,5,8,9,10,9,6] s = set(list_1) list_2 = list(s) #print(list_2) n = 3 l = len(list_1) #print(l) b = int((len(list_2)/n)) s1 = list_2.__getslice__(0, b) s2 = list_2.__getslice__(len(s1), len(s1)+b) #l1 = list(enumerate(s1, 1)) #l2 = list(enumerate(s2, 1)) print(s1,s2) #print(l1, l2)
list_1 = [2, 3, 1, 4, 2, 3, 5, 6, 8, 5, 8, 9, 10, 9, 6] s = set(list_1) list_2 = list(s) n = 3 l = len(list_1) b = int(len(list_2) / n) s1 = list_2.__getslice__(0, b) s2 = list_2.__getslice__(len(s1), len(s1) + b) print(s1, s2)
#shape of small b: def for_b(): """printing small 'b' using for loop""" for row in range(7): for col in range(4): if col==0 or col in(1,2) and row in(3,6) or col==3 and row in(4,5) : print("*",end=" ") else: print(" ",end=" ") print() def while_b(): """printing small 'b' using while loop""" i=0 while i<7: j=0 while j<4: if j==0 or i==3 and j not in(3,3) or i==6 and j not in(0,3) or j==3 and i in(4,5): print("*",end=" ") else: print(" ",end=" ") j+=1 print() i+=1
def for_b(): """printing small 'b' using for loop""" for row in range(7): for col in range(4): if col == 0 or (col in (1, 2) and row in (3, 6)) or (col == 3 and row in (4, 5)): print('*', end=' ') else: print(' ', end=' ') print() def while_b(): """printing small 'b' using while loop""" i = 0 while i < 7: j = 0 while j < 4: if j == 0 or (i == 3 and j not in (3, 3)) or (i == 6 and j not in (0, 3)) or (j == 3 and i in (4, 5)): print('*', end=' ') else: print(' ', end=' ') j += 1 print() i += 1
def get_token_files(parser, logic, logging, args=0): if args: if "hid" not in args.keys(): parser.print("missing honeypotid") return hid = args["hid"] for h in hid: r = logic.get_token_files(h) if r != "": parser.print("Tokens loaded and saved: \n" + r) else: parser.print(h+": Tokens not downloaded") else: parser.print("missing arguments")
def get_token_files(parser, logic, logging, args=0): if args: if 'hid' not in args.keys(): parser.print('missing honeypotid') return hid = args['hid'] for h in hid: r = logic.get_token_files(h) if r != '': parser.print('Tokens loaded and saved: \n' + r) else: parser.print(h + ': Tokens not downloaded') else: parser.print('missing arguments')
class Queue: def __init__(self, initial_size=10): self.arr = [0 for _ in range(initial_size)] self.next_index = 0 self.front_index = -1 self.queue_size = 0
class Queue: def __init__(self, initial_size=10): self.arr = [0 for _ in range(initial_size)] self.next_index = 0 self.front_index = -1 self.queue_size = 0
def alterarPosicao(changePosition, change): """This looks complicated but I'm doing this: Current_pos == (x, y) change == (a, b) new_position == ((x + a), (y + b)) """ return (changePosition[0] + change[0]), (changePosition[1] + change[1]) posicaoAtual = (10, 1) posicaoAtual = alterarPosicao(posicaoAtual, [-4, 2]) print(posicaoAtual) # Prints: (6, 3) posicaoAtual = alterarPosicao(posicaoAtual, [2, 5]) print(posicaoAtual) # Prints: (8, 8)
def alterar_posicao(changePosition, change): """This looks complicated but I'm doing this: Current_pos == (x, y) change == (a, b) new_position == ((x + a), (y + b)) """ return (changePosition[0] + change[0], changePosition[1] + change[1]) posicao_atual = (10, 1) posicao_atual = alterar_posicao(posicaoAtual, [-4, 2]) print(posicaoAtual) posicao_atual = alterar_posicao(posicaoAtual, [2, 5]) print(posicaoAtual)
# -*- coding: utf-8 -*- """Responses. responses serve both testing purpose aswell as dynamic docstring replacement. """ responses = { "_v3_Availability": { "url": "/openapi/root/v1/features/availability", "response": [ {'Available': True, 'Feature': 'News'}, {'Available': True, 'Feature': 'GainersLosers'}, {'Available': True, 'Feature': 'Calendar'}, {'Available': True, 'Feature': 'Chart'} ] }, "_v3_CreateAvailabilitySubscription": { "url": "/openapi/root/v1/features/availability/subscriptions", "body": { 'RefreshRate': 5000, 'ReferenceId': 'Features', 'ContextId': '20190209072629616' }, "response": { 'ContextId': '20190209072629616', 'InactivityTimeout': 30, 'ReferenceId': 'Features', 'RefreshRate': 0, 'Snapshot': [ {'Available': True, 'Feature': 'News'}, {'Available': True, 'Feature': 'GainersLosers'}, {'Available': True, 'Feature': 'Calendar'}, {'Available': True, 'Feature': 'Chart'}], 'State': 'Active' }, }, "_v3_RemoveAvailabilitySubscription": { "url": "/openapi/root/v1/features/availability/subscriptions/" "{ContextId}/{ReferenceId}", "route": { "ContextId": '20190209072629616', "ReferenceId": 'Features', }, "response": '' }, }
"""Responses. responses serve both testing purpose aswell as dynamic docstring replacement. """ responses = {'_v3_Availability': {'url': '/openapi/root/v1/features/availability', 'response': [{'Available': True, 'Feature': 'News'}, {'Available': True, 'Feature': 'GainersLosers'}, {'Available': True, 'Feature': 'Calendar'}, {'Available': True, 'Feature': 'Chart'}]}, '_v3_CreateAvailabilitySubscription': {'url': '/openapi/root/v1/features/availability/subscriptions', 'body': {'RefreshRate': 5000, 'ReferenceId': 'Features', 'ContextId': '20190209072629616'}, 'response': {'ContextId': '20190209072629616', 'InactivityTimeout': 30, 'ReferenceId': 'Features', 'RefreshRate': 0, 'Snapshot': [{'Available': True, 'Feature': 'News'}, {'Available': True, 'Feature': 'GainersLosers'}, {'Available': True, 'Feature': 'Calendar'}, {'Available': True, 'Feature': 'Chart'}], 'State': 'Active'}}, '_v3_RemoveAvailabilitySubscription': {'url': '/openapi/root/v1/features/availability/subscriptions/{ContextId}/{ReferenceId}', 'route': {'ContextId': '20190209072629616', 'ReferenceId': 'Features'}, 'response': ''}}
#reference to https://github.com/matterport/Mask_RCNN.git and mrcnn/utils.py def download_trained_weights(coco_model_path, verbose=1): """Download COCO trained weights from Releases. coco_model_path: local path of COCO trained weights """ if verbose > 0: print("Downloading pretrained model to " + coco_model_path + " ...") with urllib.request.urlopen(COCO_MODEL_URL) as resp, open(coco_model_path, 'wb') as out: shutil.copyfileobj(resp, out) if verbose > 0: print("... done downloading pretrained model!")
def download_trained_weights(coco_model_path, verbose=1): """Download COCO trained weights from Releases. coco_model_path: local path of COCO trained weights """ if verbose > 0: print('Downloading pretrained model to ' + coco_model_path + ' ...') with urllib.request.urlopen(COCO_MODEL_URL) as resp, open(coco_model_path, 'wb') as out: shutil.copyfileobj(resp, out) if verbose > 0: print('... done downloading pretrained model!')
def divisores(n): div=[] for i in range(1,n-1): if n % i ==0: div.append(i) return div def amigos(a,b): div_a = divisores(a) div_b = divisores(b) sigma_a = sum(div_a) sigma_b = sum(div_b) if sigma_a == b or sigma_b == a: return True else: return False assert amigos(220,284) == True, "ejemplo 1 incorrecto" assert amigos(6,5) == False, "ejemplo 2 incorrecto"
def divisores(n): div = [] for i in range(1, n - 1): if n % i == 0: div.append(i) return div def amigos(a, b): div_a = divisores(a) div_b = divisores(b) sigma_a = sum(div_a) sigma_b = sum(div_b) if sigma_a == b or sigma_b == a: return True else: return False assert amigos(220, 284) == True, 'ejemplo 1 incorrecto' assert amigos(6, 5) == False, 'ejemplo 2 incorrecto'
""" blueberrymath. Open Source Mathematical Package. """ __version__ = "0.1.1" __author__ = 'Rogger Garcia | Fausto German'
""" blueberrymath. Open Source Mathematical Package. """ __version__ = '0.1.1' __author__ = 'Rogger Garcia | Fausto German'
def print_formatted(number): width = len(str(bin(number))) # Since the last column is always filled for i in range(1, number+1): print(str(i).rjust(width-2, '.') + oct(i).lstrip("0o").rjust(width-1, '.') + hex(i).lstrip("0x").upper().rjust(width-1, '.') + bin(i).lstrip("0b").rjust(width-1, '.') ) if __name__ == "__main__": n = int(input()) print_formatted(n)
def print_formatted(number): width = len(str(bin(number))) for i in range(1, number + 1): print(str(i).rjust(width - 2, '.') + oct(i).lstrip('0o').rjust(width - 1, '.') + hex(i).lstrip('0x').upper().rjust(width - 1, '.') + bin(i).lstrip('0b').rjust(width - 1, '.')) if __name__ == '__main__': n = int(input()) print_formatted(n)
# Copyright 2014 F5 Networks Inc. # # 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. # # CONSTANTS MODULE MIN_TMOS_MAJOR_VERSION = 11 MIN_TMOS_MINOR_VERSION = 5 MIN_EXTRA_MB = 500 DEFAULT_HOSTNAME = 'bigip1' MAX_HOSTNAME_LENGTH = 128 DEFAULT_FOLDER = "Common" FOLDER_CACHE_TIMEOUT = 120 CONNECTION_TIMEOUT = 30 FDB_POPULATE_STATIC_ARP = True # DEVICE LOCK PREFIX DEVICE_LOCK_PREFIX = 'lock_' # DIR TO CACHE WSDLS. SET TO NONE TO READ FROM DEVICE # WSDL_CACHE_DIR = "/data/iControl-11.4.0/sdk/wsdl/" WSDL_CACHE_DIR = '' # HA CONSTANTS HA_VLAN_NAME = "HA" HA_SELFIP_NAME = "HA" # VIRTUAL SERVER CONSTANTS VS_PREFIX = 'vs' # POOL CONSTANTS POOL_PREFIX = 'pool' # POOL CONSTANTS MONITOR_PREFIX = 'monitor' # VLAN CONSTANTS VLAN_PREFIX = 'vlan' # BIG-IP PLATFORM CONSTANTS BIGIP_VE_PLATFORM_ID = 'Z100' # DEVICE CONSTANTS DEVICE_DEFAULT_DOMAIN = ".local" DEVICE_HEALTH_SCORE_CPU_WEIGHT = 1 DEVICE_HEALTH_SCORE_MEM_WEIGHT = 1 DEVICE_HEALTH_SCORE_CPS_WEIGHT = 1 DEVICE_HEALTH_SCORE_CPS_PERIOD = 5 DEVICE_HEALTH_SCORE_CPS_MAX = 100 # DEVICE GROUP CONSTANTS PEER_ADD_ATTEMPTS_MAX = 10 PEER_ADD_ATTEMPT_DELAY = 2 DEFAULT_SYNC_MODE = 'autosync' # MAX RAM SYNC DELAY IS 63 SECONDS # (3+6+9+12+15+18) = 63 SYNC_DELAY = 3 MAX_SYNC_ATTEMPTS = 10 # SHARED CONFIG CONSTANTS SHARED_CONFIG_DEFAULT_TRAFFIC_GROUP = 'traffic-group-local-only' SHARED_CONFIG_DEFAULT_FLOATING_TRAFFIC_GROUP = 'traffic-group-1' VXLAN_UDP_PORT = 4789
min_tmos_major_version = 11 min_tmos_minor_version = 5 min_extra_mb = 500 default_hostname = 'bigip1' max_hostname_length = 128 default_folder = 'Common' folder_cache_timeout = 120 connection_timeout = 30 fdb_populate_static_arp = True device_lock_prefix = 'lock_' wsdl_cache_dir = '' ha_vlan_name = 'HA' ha_selfip_name = 'HA' vs_prefix = 'vs' pool_prefix = 'pool' monitor_prefix = 'monitor' vlan_prefix = 'vlan' bigip_ve_platform_id = 'Z100' device_default_domain = '.local' device_health_score_cpu_weight = 1 device_health_score_mem_weight = 1 device_health_score_cps_weight = 1 device_health_score_cps_period = 5 device_health_score_cps_max = 100 peer_add_attempts_max = 10 peer_add_attempt_delay = 2 default_sync_mode = 'autosync' sync_delay = 3 max_sync_attempts = 10 shared_config_default_traffic_group = 'traffic-group-local-only' shared_config_default_floating_traffic_group = 'traffic-group-1' vxlan_udp_port = 4789
# File: crowdstrike_consts.py # # Copyright (c) 2016-2020 Splunk Inc. # # 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. # # # Json keys specific to the app's input parameters/config and the output result CROWDSTRIKE_JSON_URL = "url" CROWDSTRIKE_FILTER_REQUEST_STR = '{0}rest/container?page_size=0'\ '&_filter_asset={1}'\ '&_filter_name__contains="{2}"'\ '&_filter_start_time__gte="{3}"' # Status messages for the app CROWDSTRIKE_SUCC_CONNECTIVITY_TEST = "Connectivity test passed" CROWDSTRIKE_ERR_CONNECTIVITY_TEST = "Connectivity test failed" CROWDSTRIKE_ERR_CONNECTING = "Error connecting to server" CROWDSTRIKE_ERR_FROM_SERVER = "Error from Server, Status Code: {status}, Message: {message}" CROWDSTRIKE_UNABLE_TO_PARSE_DATA = "Unable to parse data from server" CROWDSTRIKE_ERR_EVENTS_FETCH = "Error occurred while fetching the DetectionSummaryEvents from the CrowdStrike server datafeed URL stream" CROWDSTRIKE_LIMIT_VALIDATION_ALLOW_ZERO_MSG = "Please provide zero or a valid positive integer value in the {parameter} parameter" CROWDSTRIKE_LIMIT_VALIDATION_MSG = "Please provide a valid non-zero positive integer value in the {parameter} parameter" CROWDSTRIKE_ERROR_CODE = "Error code unavailable" CROWDSTRIKE_ERROR_MESSAGE = "Unknown error occurred. Please check the asset configuration and|or action parameters." CROWDSTRIKE_INTEGER_VALIDATION_MESSAGE = "Please provide a valid integer value in the {} parameter" # Progress messages format string CROWDSTRIKE_USING_BASE_URL = "Using base url: {base_url}" CROWDSTRIKE_BASE_ENDPOINT = "/sensors/entities/datafeed/v1" CROWDSTRIKE_ERR_RESOURCES_KEY_EMPTY = "Resources key empty or not present" CROWDSTRIKE_ERR_DATAFEED_EMPTY = "Datafeed key empty or not present" CROWDSTRIKE_ERR_META_KEY_EMPTY = "Meta key empty or not present" CROWDSTRIKE_ERR_SESSION_TOKEN_NOT_FOUND = "Session token, not found" CROWDSTRIKE_MSG_GETTING_EVENTS = "Getting maximum {max_events} DetectionSummaryEvents from id {lower_id} onwards (ids might not be contiguous)" CROWDSTRIKE_NO_MORE_FEEDS_AVAILABLE = "No more feeds available" CROWDSTRIKE_JSON_UUID = "uuid" CROWDSTRIKE_JSON_API_KEY = "api_key" CROWDSTRIKE_JSON_ACCESS = "access" CROWDSTRIKE_ERR_CONN_FAILED = "Please make sure the system time is correct." CROWDSTRIKE_ERR_CONN_FAILED += "\r\nCrowdStrike credentials validation might fail in case the time is misconfigured." CROWDSTRIKE_ERR_CONN_FAILED += "\r\nYou can also try choosing a different Access Type" DEFAULT_POLLNOW_EVENTS_COUNT = 2000 DEFAULT_EVENTS_COUNT = 10000 DEFAULT_BLANK_LINES_ALLOWABLE_LIMIT = 50
crowdstrike_json_url = 'url' crowdstrike_filter_request_str = '{0}rest/container?page_size=0&_filter_asset={1}&_filter_name__contains="{2}"&_filter_start_time__gte="{3}"' crowdstrike_succ_connectivity_test = 'Connectivity test passed' crowdstrike_err_connectivity_test = 'Connectivity test failed' crowdstrike_err_connecting = 'Error connecting to server' crowdstrike_err_from_server = 'Error from Server, Status Code: {status}, Message: {message}' crowdstrike_unable_to_parse_data = 'Unable to parse data from server' crowdstrike_err_events_fetch = 'Error occurred while fetching the DetectionSummaryEvents from the CrowdStrike server datafeed URL stream' crowdstrike_limit_validation_allow_zero_msg = 'Please provide zero or a valid positive integer value in the {parameter} parameter' crowdstrike_limit_validation_msg = 'Please provide a valid non-zero positive integer value in the {parameter} parameter' crowdstrike_error_code = 'Error code unavailable' crowdstrike_error_message = 'Unknown error occurred. Please check the asset configuration and|or action parameters.' crowdstrike_integer_validation_message = 'Please provide a valid integer value in the {} parameter' crowdstrike_using_base_url = 'Using base url: {base_url}' crowdstrike_base_endpoint = '/sensors/entities/datafeed/v1' crowdstrike_err_resources_key_empty = 'Resources key empty or not present' crowdstrike_err_datafeed_empty = 'Datafeed key empty or not present' crowdstrike_err_meta_key_empty = 'Meta key empty or not present' crowdstrike_err_session_token_not_found = 'Session token, not found' crowdstrike_msg_getting_events = 'Getting maximum {max_events} DetectionSummaryEvents from id {lower_id} onwards (ids might not be contiguous)' crowdstrike_no_more_feeds_available = 'No more feeds available' crowdstrike_json_uuid = 'uuid' crowdstrike_json_api_key = 'api_key' crowdstrike_json_access = 'access' crowdstrike_err_conn_failed = 'Please make sure the system time is correct.' crowdstrike_err_conn_failed += '\r\nCrowdStrike credentials validation might fail in case the time is misconfigured.' crowdstrike_err_conn_failed += '\r\nYou can also try choosing a different Access Type' default_pollnow_events_count = 2000 default_events_count = 10000 default_blank_lines_allowable_limit = 50
HANDSHAKING = 0 STATUS = 1 LOGIN = 2 PLAY = 3
handshaking = 0 status = 1 login = 2 play = 3
class Node: def __init__(self, data): self.data = data self.next = None class Queue: def __init__(self): self.head = None self.last = None self.l = [] def isEmpty(self): return self.head == None # Method to add an item to the queue def Enqueue(self, item): temp = Node(item) self.l.append(item) if self.head == None: self.head = self.last = temp return self.last.next = temp self.last = temp # Method to remove an item from queue def Dequeue(self): if self.isEmpty(): return temp = self.head self.head = temp.next if(self.head == None): self.last = None z = self.l[0] self.l = self.l[1:] return z
class Node: def __init__(self, data): self.data = data self.next = None class Queue: def __init__(self): self.head = None self.last = None self.l = [] def is_empty(self): return self.head == None def enqueue(self, item): temp = node(item) self.l.append(item) if self.head == None: self.head = self.last = temp return self.last.next = temp self.last = temp def dequeue(self): if self.isEmpty(): return temp = self.head self.head = temp.next if self.head == None: self.last = None z = self.l[0] self.l = self.l[1:] return z
datasets = { "cv-corpus-7.0-2021-07-21": { "directories": ["speakers"], "audio_extensions": [".wav", ".flac"], "transcript_extension": ".txt" }, "LibriTTS": { "directories": ["train-clean-100", "train-clean-360", "train-other-500"], "audio_extensions": [".wav", ".flac"], "transcript_extension": ".original.txt" #"transcript_extension": ".normalized.txt" }, "TEDLIUM_release-3": { # slr51 "directories": ["speakers"], "audio_extensions": [".wav"], "transcript_extension": ".txt" }, "VCTK-Corpus": { "directories": ["speakers"], "audio_extensions": [".flac"], "transcript_extension": ".txt" }, } slr_datasets_wav = { "slr41": ["slr41/speakers"], "slr42": ["slr42/speakers"], "slr43": ["slr43/speakers"], "slr44": ["slr44/speakers"], "slr51": ["TEDLIUM_release-3/speakers"], # TED-LIUM v3 "slr61": ["slr61/speakers"], "slr63": ["slr63/speakers"], "slr64": ["slr64/speakers"], "slr65": ["slr65/speakers"], "slr66": ["slr66/speakers"], "slr69": ["slr69/speakers"], "slr70": ["slr70/speakers"], "slr71": ["slr71/speakers"], "slr72": ["slr72/speakers"], "slr73": ["slr73/speakers"], "slr74": ["slr74/speakers"], "slr75": ["slr75/speakers"], "slr76": ["slr76/speakers"], "slr77": ["slr77/speakers"], "slr78": ["slr78/speakers"], "slr79": ["slr79/speakers"], "slr80": ["slr80/speakers"], "slr96": ["slr96/train/audio"], "slr100": [ # Multilingual TEDx (without translations) "mtedx/ar-ar/data/train", "mtedx/de-de/data/train", "mtedx/el-el/data/train", "mtedx/es-es/data/train", "mtedx/fr-fr/data/train", "mtedx/it-it/data/train", "mtedx/pt-pt/data/train", "mtedx/ru-ru/data/train" ] } slr_datasets_flac = { "slr82": ["slr82/CN-Celeb_flac/data", "slr82/CN-Celeb2_flac/data"] } commonvoice_datasets = { "commonvoice-7": { "all": ["cv-corpus-7.0-2021-07-21/speakers"], "en": ["cv-corpus-7.0-2021-07-21/en/speakers"] # TODO: other ndividual languages }, } other_datasets = { "LJSpeech-1.1": [], "VCTK": ["VCTK-Corpus/wav48_silence_trimmed"], "nasjonalbank": ["nasjonal-bank/speakers"] }
datasets = {'cv-corpus-7.0-2021-07-21': {'directories': ['speakers'], 'audio_extensions': ['.wav', '.flac'], 'transcript_extension': '.txt'}, 'LibriTTS': {'directories': ['train-clean-100', 'train-clean-360', 'train-other-500'], 'audio_extensions': ['.wav', '.flac'], 'transcript_extension': '.original.txt'}, 'TEDLIUM_release-3': {'directories': ['speakers'], 'audio_extensions': ['.wav'], 'transcript_extension': '.txt'}, 'VCTK-Corpus': {'directories': ['speakers'], 'audio_extensions': ['.flac'], 'transcript_extension': '.txt'}} slr_datasets_wav = {'slr41': ['slr41/speakers'], 'slr42': ['slr42/speakers'], 'slr43': ['slr43/speakers'], 'slr44': ['slr44/speakers'], 'slr51': ['TEDLIUM_release-3/speakers'], 'slr61': ['slr61/speakers'], 'slr63': ['slr63/speakers'], 'slr64': ['slr64/speakers'], 'slr65': ['slr65/speakers'], 'slr66': ['slr66/speakers'], 'slr69': ['slr69/speakers'], 'slr70': ['slr70/speakers'], 'slr71': ['slr71/speakers'], 'slr72': ['slr72/speakers'], 'slr73': ['slr73/speakers'], 'slr74': ['slr74/speakers'], 'slr75': ['slr75/speakers'], 'slr76': ['slr76/speakers'], 'slr77': ['slr77/speakers'], 'slr78': ['slr78/speakers'], 'slr79': ['slr79/speakers'], 'slr80': ['slr80/speakers'], 'slr96': ['slr96/train/audio'], 'slr100': ['mtedx/ar-ar/data/train', 'mtedx/de-de/data/train', 'mtedx/el-el/data/train', 'mtedx/es-es/data/train', 'mtedx/fr-fr/data/train', 'mtedx/it-it/data/train', 'mtedx/pt-pt/data/train', 'mtedx/ru-ru/data/train']} slr_datasets_flac = {'slr82': ['slr82/CN-Celeb_flac/data', 'slr82/CN-Celeb2_flac/data']} commonvoice_datasets = {'commonvoice-7': {'all': ['cv-corpus-7.0-2021-07-21/speakers'], 'en': ['cv-corpus-7.0-2021-07-21/en/speakers']}} other_datasets = {'LJSpeech-1.1': [], 'VCTK': ['VCTK-Corpus/wav48_silence_trimmed'], 'nasjonalbank': ['nasjonal-bank/speakers']}
# Copyright 2019 DIVERSIS Software. All Rights Reserved. # 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. def NetworkConfig(netType): if netType == 1: layerOutDimSize = [16, 32, 64, 128, 256, 64, 10] kernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3],[1],[1]] strideSize = [2,2,2,2,2,1,1] poolKernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3]] poolSize = [1,1,1,1,1,1,1] dropoutInput = 1.0 dropoutPool = [1.0,1.0,1.0,1.0,1.0,1.0,1.0] elif netType == 2: layerOutDimSize = [16,16,32,32,64,64,64,128,128,128,128,128,128,128,10] kernelSize = [[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[1],[1]] strideSize = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] poolKernelSize = [[2,2],[2,2],[2,2],[2, 2],[2, 2],[2, 2],[2,2],[2,2],[2,2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2]] poolSize = [1,2,1,2,1,1,2,1,1,2,1,1,2,1,1] dropoutInput = 1.0 dropoutPool = [0.3,1.0,0.4,1.0,0.4,0.4,1.0,0.4,0.4,1.0,0.4,0.4,0.5,0.5,1.0] elif netType == 3: layerOutDimSize = [64, 128, 256, 512, 1024,256,10] kernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3],[1],[1]] strideSize = [2,2,2,2,2,1,1] poolKernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3]] poolSize = [1,1,1,1,1,1,1] dropoutInput = 1.0 dropoutPool = [1.0,1.0,1.0,1.0,1.0,1.0,1.0] elif netType == 4: layerOutDimSize = [16,16,16,16,32,32,32,32,64,64,64,64,128,128,128,128,256,256,256,256,256,10] kernelSize = [[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[3, 3],[1],[1]] strideSize = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] poolKernelSize = [[2,2],[2,2],[2,2],[2,2],[2,2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2,2],[2,2],[2,2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2],[2, 2]] poolSize = [1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1] dropoutInput = 1.0 dropoutPool = [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0] elif netType == 5: layerOutDimSize = [512,128,64,32,10] kernelSize = [[1],[1],[1],[1],[1]] strideSize = [1,1,1,1,1] poolKernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3]] poolSize = [1,1,1,1,1] dropoutInput = 1.0 dropoutPool = [1.0,1.0,1.0,1.0,1.0] elif netType == 6: layerOutDimSize = [128,128,128,128,128,128,128,128,128,128,128,128,10] kernelSize = [[1],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1]] strideSize = [1,1,1,1,1,1,1,1,1,1,1,1,1] poolKernelSize = [[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3]] poolSize = [1,1,1,1,1,1,1,1,1,1,1,1,1] dropoutInput = 1.0 dropoutPool = [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0] else: print("Network Type is not selected properly") return layerOutDimSize,kernelSize,strideSize,poolKernelSize,poolSize,dropoutInput,dropoutPool
def network_config(netType): if netType == 1: layer_out_dim_size = [16, 32, 64, 128, 256, 64, 10] kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [1], [1]] stride_size = [2, 2, 2, 2, 2, 1, 1] pool_kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3]] pool_size = [1, 1, 1, 1, 1, 1, 1] dropout_input = 1.0 dropout_pool = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] elif netType == 2: layer_out_dim_size = [16, 16, 32, 32, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 10] kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [1], [1]] stride_size = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] pool_kernel_size = [[2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]] pool_size = [1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1] dropout_input = 1.0 dropout_pool = [0.3, 1.0, 0.4, 1.0, 0.4, 0.4, 1.0, 0.4, 0.4, 1.0, 0.4, 0.4, 0.5, 0.5, 1.0] elif netType == 3: layer_out_dim_size = [64, 128, 256, 512, 1024, 256, 10] kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [1], [1]] stride_size = [2, 2, 2, 2, 2, 1, 1] pool_kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3]] pool_size = [1, 1, 1, 1, 1, 1, 1] dropout_input = 1.0 dropout_pool = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] elif netType == 4: layer_out_dim_size = [16, 16, 16, 16, 32, 32, 32, 32, 64, 64, 64, 64, 128, 128, 128, 128, 256, 256, 256, 256, 256, 10] kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [1], [1]] stride_size = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] pool_kernel_size = [[2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]] pool_size = [1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1] dropout_input = 1.0 dropout_pool = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] elif netType == 5: layer_out_dim_size = [512, 128, 64, 32, 10] kernel_size = [[1], [1], [1], [1], [1]] stride_size = [1, 1, 1, 1, 1] pool_kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3]] pool_size = [1, 1, 1, 1, 1] dropout_input = 1.0 dropout_pool = [1.0, 1.0, 1.0, 1.0, 1.0] elif netType == 6: layer_out_dim_size = [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 10] kernel_size = [[1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1]] stride_size = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] pool_kernel_size = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3]] pool_size = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] dropout_input = 1.0 dropout_pool = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] else: print('Network Type is not selected properly') return (layerOutDimSize, kernelSize, strideSize, poolKernelSize, poolSize, dropoutInput, dropoutPool)
# https://app.codility.com/demo/results/trainingPURU8U-DP4/ def solution(array): set_array = set() for val in array: if val not in set_array : set_array.add(val) return len(set_array) if __name__ == '__main__': print(solution([0]))
def solution(array): set_array = set() for val in array: if val not in set_array: set_array.add(val) return len(set_array) if __name__ == '__main__': print(solution([0]))
# The key 'ICE' is repeated to match the length of the string and later they are xored taking eacg character at a time def xor(string,key): length = divmod(len(string),len(key)) key = key*length[0]+key[0:length[1]] return ''.join([chr(ord(a)^ord(b)) for a,b in zip(string,key)]) if __name__ == "__main__": print (xor("\n".join([line.strip() for line in open('5.txt')]),"ICE")).encode('hex')
def xor(string, key): length = divmod(len(string), len(key)) key = key * length[0] + key[0:length[1]] return ''.join([chr(ord(a) ^ ord(b)) for (a, b) in zip(string, key)]) if __name__ == '__main__': print(xor('\n'.join([line.strip() for line in open('5.txt')]), 'ICE')).encode('hex')
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ Created Date: Wednesday October 23rd 2019 Author: Dmitry Kislov E-mail: kislov@easydan.com ----- Last Modified: Wednesday, October 23rd 2019, 9:08:59 am Modified By: Dmitry Kislov ----- Copyright (c) 2019 """
""" Created Date: Wednesday October 23rd 2019 Author: Dmitry Kislov E-mail: kislov@easydan.com ----- Last Modified: Wednesday, October 23rd 2019, 9:08:59 am Modified By: Dmitry Kislov ----- Copyright (c) 2019 """
Root.default = 'C' Scale.scale = 'major' Clock.bpm = 120 notas = [0, 3, 5, 4] frequencia = var(notas, 4) d0 >> play( '<x |o2| ><---{[----]-*}>', sample=4, dur=1/2 ) s0 >> space( notas, dur=1/4, apm=3, pan=[-1, 0, 1] ) s1 >> bass( frequencia, dur=1/4, oct=4, ) s2 >> spark( frequencia, dur=[1/2, 1/4], ) + (0, 2, 4) s3 >> pluck( s2.degree, dur=[1/4, 1, 1/2, 2], pan=[-1, 1] )
Root.default = 'C' Scale.scale = 'major' Clock.bpm = 120 notas = [0, 3, 5, 4] frequencia = var(notas, 4) d0 >> play('<x |o2| ><---{[----]-*}>', sample=4, dur=1 / 2) s0 >> space(notas, dur=1 / 4, apm=3, pan=[-1, 0, 1]) s1 >> bass(frequencia, dur=1 / 4, oct=4) s2 >> spark(frequencia, dur=[1 / 2, 1 / 4]) + (0, 2, 4) s3 >> pluck(s2.degree, dur=[1 / 4, 1, 1 / 2, 2], pan=[-1, 1])