content
stringlengths
7
1.05M
name = 'http' __doc__ = "The http module provides access to methods concerning the http request and response" def build(env,path): self = env.get_new_module(path+'.'+name) dbpy = env.get_module('dbpy') #TODO: #look... all this duplication of data in the request. #eh. #DOC:get_params """ The parsed parameters from the request url in a multidict """ self.get_params = env.get_params #DOC:post_params """ If the request was a post request, the parsed parameters from the body of the post """ self.post_params = env.post_params #DOC:request """ The raw request object. """ self.request = env.request @env.register(self) def set_response_header(header,value): """ Sets the header `header` to the value given by `value` """ env.response.set_header(header,value) @env.register(self) def get_request_header(header): """ Returns the header specified by `header` """ return env.request.headers.get(header) @env.register(self) def set_response_status(status): """ Sets the HTTP Status code of the response to `status` """ env.response.status = status @env.register(self) def redirect(where,immediately=True,status=302): """ Redirects the HTTP request to another location. The target location is given by `where`. If immediately is true, the script will exit immediately once this function is executed. The status is 302 by default, but could be set to whatever. """ set_response_status(302) set_response_header('Location',where) if immediately: dbpy.die("redirecting") @env.register(self) def error(which,message,immediately=True): """ Returns an error response """ env.response.status = which env.response.body = message env.response.error = True if immediately: dbpy.die("User Error - %d" % which) return self
class Store: def callStore(nestedList, store, inpCounter): counter=[0] i=nestedList inList=[["("],["("]] quit=False while not quit: repeat=True while repeat: repeat=False i=nestedList number=0 while not quit and type(i)==list and counter!=inpCounter: #print("i",i,"number",number,"full counter:",counter) if len(counter)>number: if len(i)>counter[number]: i=i[counter[number]] number+=1 else: del counter[-1] if len(counter)>0: counter[-1]+=1 inList[0].append(")") inList[1].append(")") repeat=True break else: repeat=False quit=True else: inList[0].append("(") inList[1].append("(") counter.append(0) if len(counter)>0: #print("\n","i:",i,"\n") if counter==inpCounter: inList[0].append(store) else: inList[0].append(i) inList[1].append(len(counter)) counter[-1]+=1 inList[0].append(")") inList[1].append(")") generate=[] gLocate=[] gCount=0 gInCount=0 maxDepth=0 for i in inList[1]: if type(i)==int: maxDepth=max(i,maxDepth) #print("inlist:",inList) for depth in range(maxDepth,0,-1): #print("\n\n\nDepth:",depth) gInCount=0 gCount=0 inOne=False newOne=True for checkCounter in range(len(inList[1])): #print("CC:",checkCounter,"gLoc:",gLocate,"gen:",generate,"gCount:",gCount,"GIC:",gInCount) if gCount<len(gLocate): if inOne and checkCounter>gLocate[gCount][-1]+1: gCount+=1 inOne=False elif gLocate[gCount][0]<=checkCounter: inOne=True if not newOne and type(inList[0][checkCounter])==str: #for ginnercount; see when element ends parNetSum+=1-2*int(inList[0][checkCounter]=="(") if parNetSum==1: newOne=True elif inList[1][checkCounter]==depth+1 and newOne: #if there is an element in front of check, add one to ginnercount newOne=False parNetSum=0 #number of closing parentheses-number of open parentheses gInCount+=1 elif inList[1][checkCounter]==depth:#if check found an entry if inOne:#if in existing list generate[gCount].insert(gInCount,inList[0][checkCounter]) gLocate[gCount].insert(gInCount,checkCounter) gInCount+=1 else:#if not in existing list; make new one gInCount=0 generate.insert(gCount,[inList[0][checkCounter]]) gLocate.insert(gCount,[checkCounter]) inOne=True gInCount+=1 x=0 #print("\nCombining generate") while x<len(gLocate)-1: #if there are no ")" between end of one list and start of next, combine lists #print("gLoc:",gLocate,"x:",x) for j in range(gLocate[x][-1],gLocate[x+1][0]): if type(inList[1][j])==str: break elif j==gLocate[x+1][0]-1: #combine lxsts for locate and gen generate[x].extend(generate[x+1]) gLocate[x].extend(gLocate[x+1]) del generate[x+1] del gLocate[x+1] x-=1 x+=1 for i in range(len(generate)):#nest lists generate[i]=[generate[i]] #print("new generate:",generate) #print("\ninput inList[1]",inList[1]) x=0 for i in gLocate: x=i[0]-1 while inList[1][x]==0: x-=1 #print("x:",x) inList[1][x]=0 x=i[-1]+1 while inList[1][x]==0: x+=1 inList[1][x]=0 #print("output inList[1]:",inList[1]) generate=generate[0][0] nestedList=generate return generate
SOCIAL_AUTH_TWITTER_KEY = 'LXgJdyaJRF0PeGlKakqg1HRF9' SOCIAL_AUTH_TWITTER_SECRET = 'rjGbkkELyUhGt3GiEUUIW2A2S2yFtyB2GXmf23nDrgcqoQPZ5R' SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
class MyClassName: __private = 123 non_private = __private * 2 mine = MyClassName() mine.non_private 246 mine.__private mine._MyClassName__private 123
""" 九成九的乘法表 """ row=1 while row<=9: col=1 while col<=row: print("%d*%d=%d"%(col,row,row*col),end="\t") col+=1 #print("%d"%row) print("") row+=1
# Eoin Lees # Ascii Table for i in range(0, 256): print(f"{i:3} {i:08b} {chr(i)}")
class Signal: def __init__(self): pass def generate(self, df): pass
# https://www.codingame.com/training/easy/brick-in-the-wall def solution(): max_row_bricks = int(input()) num_bricks = int(input()) bricks = map(int, input().split()) work = 0 row, row_bricks = 1, 0 for brick in sorted(bricks, reverse=True): work += ((row - 1) * 6.5 / 100) * 10 * brick row_bricks += 1 if row_bricks == max_row_bricks: row_bricks = 0 row += 1 print('{0:.3f}'.format(work)) solution()
""" Prompts user to provide integer within a range """ def request_integer_in_range(prompt, lowest, highest): """ Purpose: prompts user for an integer, tests that an integer was provided, and verifies the integer is within an acceptable range. Inputs: prompt (str): request to present to user. lowest (int): lowest acceptable value. highest (int): highest acceptable value. Return (int): the accepted response from user. """ # Create an error prompt to use later, if needed #error_prompt = "Please enter an integer between " + str(lowest) #error_prompt = error_prompt + " and " + str(highest) + ": " # Prompt user. response = input(prompt) # Loop until an acceptable response is received. while True: # Test to see if the response can be converted to an int. try: response = int(response) # If response in desired range, we're done. if (response >= lowest) & (response <= highest): # Exit the while loop since response is in the desired range break # Otherwise the catchall recovery will be executed. # One can use an specific exception statement to catch conversion error except ValueError: print("ValueError: You did not enter an integer") response = input("Please enter an integer between " + str(lowest) + " and " + str(highest) + ": ") # One can also use an else statement to catch any error not otherwise # specifically handled. else: print("Catchall recovery: Number out of range") response = input("Please enter an integer between " + str(lowest) + " and " + str(highest) + ": ") # Check the resultant integer is in the valid range print(response, " is acceptable.") return response #def main(): #""" Test harness """ #answer = request_integer_in_range("Enter integer between 0 and 5: ", 0, 5) #print("main received ", answer) #main()
# -*- coding: utf-8 -*- """ sphinxcontrib.napoleon._upstream ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Functions to help compatibility with upstream sphinx.ext.napoleon. :copyright: Copyright 2013-2018 by Rob Ruana, see AUTHORS. :license: BSD, see LICENSE for details. """ def _(message, *args): """ NOOP implementation of sphinx.locale.get_translation shortcut. """ return message
#!/usr/bin/env python str="../data/example-data-english.csv" file = open(str, "r") fileout = open(str+"B", "w") for line in file: array=line.split(",") for i in range(len(array)-5): #print (line.split(",")[i]) fileout.write(line.split(",")[i]+", "); fileout.write(line.split(",")[i+1]+"\n "); fileout.close(); file.close();
# vim: set et ts=4 sw=4 fileencoding=utf-8: ''' tests ===== '''
num_list = [] num = input('Please enter a number: ') while num != 'done' and num != 'DONE': try: num_list.append(int(num)) num = input('Please enter a number: ') except: num = input("Not a number. Please enter a number Or 'done' to finish: ") try: print('Maximum number: ', max(num_list)) print('Minimum number: ', min(num_list)) except: print('NO INPUT!')
num = int(input("Digite um número inteiro:")) print("""Escolha para qual conversão você quer: [ 1 ] para Binário [ 2 ] para Octal [ 3 ] para Hexadecimal""") opç = int(input("Sua opção é:")) if opç == 1: print("A conversão de {} para Binario é {}" .format(num, bin(num)[2:])) elif opç == 2: print("A conversão de {} para Octal é {}" .format(num, oct(num)[2:])) elif opç == 3: print("A conversão de {} para Hexadecimal é {}" .format(num, hex(num)[2:])) else: print("Digito errado,tente novamente.")
#!/usr/bin/env python3 class Graph: """A collection of components and edges""" def __init__(self, name): self.name = name self.nodes = {} self.edges = {} self.initializers = {} def add_node(self, name, component): 'adds a node to the graph with name name.' self.nodes[name] = {'name':name, 'component':component} self.edges[name] = {} self.initializers[name] = {} def remove_node(self, name): 'removes a node with from the graph.' if name in self.nodes: del self.nodes[name] for port in tuple(self.edges[name].keys()): self.remove_edge(name, port) for port in tuple(self.initializers[name].keys()): self.remove_initializer(name, port) def get_node(self, name, default=None): "returns the node with name name" return self.nodes.get(name, default) def rename_node(self, name, new_name): "renames the node from name to new_name" node = self.nodes.get(name) if node: self.nodes[new_name] = node del self.nodes[name] self.edges[new_name] = self.edges[name] del self.edges[name] for edge in self.edges[new_name].values(): if edge['from']['node'] == name: self.edges[new_name] \ [edge['from']['port']] \ ['from']['node'] = new_name self.edges[edge['to']['node']] \ [edge['to']['port']] \ ['from']['node'] = new_name else: self.edges[new_name] \ [edge['to']['port']] \ ['to']['node'] = new_name self.edges[edge['from']['node']] \ [edge['from']['port']] \ ['to']['node'] = new_name def add_edge(self, out_node, out_port, in_node, in_port): 'adds an edge beween out_node and in_node at ports out_port and in_port' if out_node not in self.nodes: raise Exception("Creating connction to node {} that doesn't exist".format(out_node)) if in_node not in self.nodes: raise Exception("Creating connction to node {} that doesn't exist".format(in_node)) edge = {'from': {'node': out_node, 'port': out_port}, 'to': {'node': in_node, 'port': in_port}} self.edges[out_node][out_port] = edge self.edges[in_node][in_port] = edge def remove_edge(self, name, port): "deletes the edge at name's port" edge = self.edges.get(name, {}).get(port, None) if edge: del self.edges[edge['from']['node']][edge['from']['port']] del self.edges[edge['to']['node']][edge['to']['port']] def add_initial(self, data, node, port): """Adds an initial data signal""" self.initializers[node][port] = {'from': {'data':data}, 'to': {'node':node, 'port':port}} def remove_initial(self, node, port): """Removes initial data signal""" if node in self.initializers and port in self.initializers[node]: del self.initializers[node][port]
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def convertBST(self, root): """ :type root: TreeNode :rtype: TreeNode """ def dfs(node): if node is not None: yield from dfs(node.right) yield node yield from dfs(node.left) acc = 0 for node in dfs(root): acc += node.val node.val = acc dfs(root) return root
summary_response = { 'data': { 'battery': { 'state': 'ONLINE', 'val': 2.0 }, 'grid': { 'state': 'ONLINE', 'val': 40.0, 'something_else': 'not_included' }, 'house': { 'state': 'ONLINE', 'val': 25.0 }, 'solar': { 'state': 'ONLINE', 'val': 30.0, 'other_key': 'blah' }, 'key5': { 'this_isnt': 'included' } } } expected = { 'battery': { 'state': 'ONLINE', 'value': 2.0 }, 'grid': { 'state': 'ONLINE', 'value': 40.0 }, 'house': { 'state': 'ONLINE', 'value': 25.0 }, 'solar': { 'state': 'ONLINE', 'value': 30.0 }, } summary_response_2 = { 'data': { 'battery': { 'state': 'ONLINE', 'val': 2.0 }, 'grid': { 'state': 'ONLINE', 'val': 40.0, 'something_else': 'not_included' } } } expected_2 = { 'battery': { 'state': 'ONLINE', 'value': 2.0 }, 'grid': { 'state': 'ONLINE', 'value': 40.0 } }
# -*- coding: utf-8 -*- INVALID_URLS = [ 'http://', 'http://.', 'http://..', 'http://../', 'http://?', 'http://??', 'http://??/', 'http://#', 'http://##', 'http://##/', 'http://foo.bar?q=Spaces should be encoded', '//', '//a', '///a', '///', 'http:///a', 'foo.com', 'rdar://1234', 'h://test', 'http:// shouldfail.com', ':// should fail', 'http://foo.bar/foo(bar)baz quux', 'htto://foo.bar/', 'http://-error-.invalid/', 'http://-a.b.co', 'http://a.b-.co', 'http://.www.foo.bar/', ] VALID_URLS = [ 'http://foo.com/blah_blah', 'http://foo.com/blah_blah/', 'http://foo.com/blah_blah_(wikipedia)', 'http://foo.com/blah_blah_(wikipedia)_(again)', 'http://www.example.com/wpstyle/?p=364', 'https://www.example.com/foo/?bar=baz&inga=42&quux', 'http://142.42.1.1/', 'http://142.42.1.1:8080/', 'http://foo.com/blah_(wikipedia)#cite-132', 'http://foo.com/blah_(wikipedia)_blah#cite-1', u'http://foo.com/unicode_(✪)_in_parens', 'http://foo.com/(something)?after=parens', 'http://sub.damowmow.com/', 'http://code.google.com/events/#&product=browser', 'http://j.mp', 'ftp://foo.bar/baz', 'http://foo.bar/?q=Test%20URL-encoded%20stuff', 'http://1337.net', 'http://a.b-c.de', 'http://223.255.255.254', 'http://a.b--c.de/', ]
def merge(left, right): result = [] i, j = 0, 0 while len(left) and j < len(right): if left[i] <= right[j]: result.append(left[i]) i += 1 else: result.append(right[j]) j += 1 result += left[i:] result += right[j:] return result def mergesort(arr): if len(arr) <= 1: return arr middle = int(len(arr) / 2) left = mergesort(arr[:middle]) right = mergesort(arr[middle:]) return merge(left, right) if __name__ == '__main__': print(mergesort([5, 4, 3, 2, 1]))
class OperationABC: pass class BaseTable(OperationABC): def __init__(self, table, db): self.table = table self.database = db class Selection(OperationABC): def __init__(self, pred): self.predicate = pred
# Question 6 num = float(input("Enter a number: ")) print("difference:", num-17) if num > 17: print("double of absolute value of difference:", abs(num - 17) * 2)
# Time: O(n + logc), c is the number of candies # Space: O(1) class Solution(object): def distributeCandies(self, candies, num_people): """ :type candies: int :type num_people: int :rtype: List[int] """ # find max integer p s.t. sum(1 + 2 + ... + p) <= C # => remaining : 0 <= C-(1+p)*p/2 < p+1 # => -2p-2 < p^2+p-2C <= 0 # => 2C+1/4 < (p+3/2)^2 and (p+1/2)^2 <= 2C+1/4 # => sqrt(2C+1/4)-3/2 < p <= sqrt(2C+1/4)-1/2 # => p = floor(sqrt(2C+1/4)-1/2) p = int((2*candies + 0.25)**0.5 - 0.5) remaining = candies - (p+1)*p//2 rows, cols = divmod(p, num_people) result = [0]*num_people for i in xrange(num_people): result[i] = (i+1)*(rows+1) + (rows*(rows+1)//2)*num_people if i < cols else \ (i+1)*rows + ((rows-1)*rows//2)*num_people result[cols] += remaining return result # Time: O(n + logc), c is the number of candies # Space: O(1) class Solution2(object): def distributeCandies(self, candies, num_people): """ :type candies: int :type num_people: int :rtype: List[int] """ # find max integer p s.t. sum(1 + 2 + ... + p) <= C left, right = 1, candies while left <= right: mid = left + (right-left)//2 if not ((mid <= candies*2 // (mid+1))): right = mid-1 else: left = mid+1 p = right remaining = candies - (p+1)*p//2 rows, cols = divmod(p, num_people) result = [0]*num_people for i in xrange(num_people): result[i] = (i+1)*(rows+1) + (rows*(rows+1)//2)*num_people if i < cols else \ (i+1)*rows + ((rows-1)*rows//2)*num_people result[cols] += remaining return result # Time: O(sqrt(c)), c is the number of candies # Space: O(1) class Solution3(object): def distributeCandies(self, candies, num_people): """ :type candies: int :type num_people: int :rtype: List[int] """ result = [0]*num_people i = 0 while candies != 0: result[i % num_people] += min(candies, i+1) candies -= min(candies, i+1) i += 1 return result
class Notification(object): def __init__(self, token, chat_id, logger): super(Notification, self).__init__() self.token = token self.chat_id = chat_id self.logger = logger self.chat_id_list = chat_id.split() def notify(self, user, message): pass def broadcast(self, message): pass class MockNotification(Notification): def __init__(self, token, chat_id, logger): Notification.__init__(self, token, chat_id, logger) self.logger.debug('MockNotification initialized') def notify(self, user, message): self.logger.info('Message {} send to user {}'.format(message, user)) def broadcast(self, message): self.logger.debug("Initialized Broadcast") for identification in self.chat_id_list: self.logger.info("Message {} send to {}".format(message, identification)) self.logger.debug("Finished broadcasting")
# 250. Count Univalue Subtrees # [email protected] # Given a binary tree, count the number of uni-value subtrees. # A Uni-value subtree means all nodes of the subtree have the same value. # For example: # Given binary tree, # 5 # / \ # 1 5 # / \ \ # 5 5 5 # return 4. # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def countUnivalSubtrees(self, root): """ :type root: TreeNode :rtype: int """ # sol 1: # DFS # runtime: 85ms self.cnt = 0 def dfs(root): if not root: return True left, right = dfs(root.left), dfs(root.right) # postorder. if left and right: if root.left and root.left.val != root.val: return False if root.right and root.right.val != root.val: return False self.cnt += 1 return True return False # if not root: return 0 dfs(root) return self.cnt
class Board(): def __init__(self, height, width, food, hazards, snakes): self.height = height self.width = width self.food = food self.hazards = hazards self.snakes = snakes
# print(3 + 5) # print(7 - 4) # print(3 * 2) # print(6 / 3) # print(2 ** 3) # PEDMAS LR # () # ** # * / # + - print(3 * 3 + 3 / 3 - 3) # Adding brackets around the addition increases priority print(3 * (3 + 3) / 3 - 3)
# write a function that takes a list of lists # Each list has 5 numbers # reverse each list in the big list but maintain the order of the lists # e.g given [[1, 2, 3], [4, 5, 6], [7, 8]] return [[3, 2, 1], [6, 5, 4], [8, 7]] # for more info on this quiz, go to this url: http://www.programmr.com/reverse-lists def reverse_lists(arr_y): rev_lst = [] for i in arr_y: i.reverse() rev_lst.append(i) return rev_lst print(reverse_lists([[1, 2, 3], [4, 5, 6], [7, 8]]))
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This data is in a separate file so that src/chrome/app/policy/PRESUBMIT.py # can load it too without having to load pyautolib. class PolicyPrefsTestCases(object): """A list of test cases for policy_prefs_ui.py.""" BROWSER = 0 SEARCH_ENGINES = 1 PASSWORDS = 2 AUTOFILL = 3 CONTENT = 4 HOMEPAGE = 5 LANGUAGES = 6 ACCOUNTS = 7 # Each policy has an entry with a tuple (Value, Pages, OS) # # |Value| is the value the policy should have when it is enforced. # # |Pages| is a list with integer indices into |settings_pages|, and lists all # the pages that should display the managed-banner. # Leave empty if this policy doesn't display anything visible in # the settings. # # |OS| is a list of platforms where this policy should be tested. When empty, # all platforms are tested. Valid platforms are 'win', 'mac', 'linux' # and 'chromeos'. policies = { 'HomepageLocation': ('http://chromium.org', [ HOMEPAGE ]), 'HomepageIsNewTabPage': (True, [ HOMEPAGE ]), # TODO(joaodasilva): Couldn't verify on linux. 'DefaultBrowserSettingEnabled': (False, [], [ 'win', 'mac', 'linux' ]), # TODO(joaodasilva): Test this on windows. 'ApplicationLocaleValue': ('', [], [ 'win' ]), 'AlternateErrorPagesEnabled': (False, [ BROWSER ]), 'SearchSuggestEnabled': (False, [ BROWSER ]), 'DnsPrefetchingEnabled': (False, [ BROWSER ]), 'DisableSpdy': (True, []), 'DisabledSchemes': ( ['file' ], []), 'JavascriptEnabled': (False, [ CONTENT ]), 'IncognitoEnabled': (False, []), 'IncognitoModeAvailability': (1, []), 'SavingBrowserHistoryDisabled': (True, []), 'RemoteAccessClientFirewallTraversal': (True, []), 'RemoteAccessHostFirewallTraversal': (True, []), 'PrintingEnabled': (False, []), # Note: supported_on is empty for this policy. 'CloudPrintProxyEnabled': (True, [], []), 'CloudPrintSubmitEnabled': (False, [], [ 'win', 'mac', 'linux' ]), 'SafeBrowsingEnabled': (False, [ BROWSER ]), # TODO(joaodasilva): This is only in place on official builds, but the # SetUserCloudPolicy call is a nop on official builds. Should be BROWSER. 'MetricsReportingEnabled': (False, []), 'PasswordManagerEnabled': (False, [ BROWSER ]), # TODO(joaodasilva): Should be PASSWORDS too. http://crbug.com/97749 'PasswordManagerAllowShowPasswords': (False, [ BROWSER ]), 'AutoFillEnabled': (False, [ BROWSER ]), 'DisabledPlugins': (['Flash'], []), 'EnabledPlugins': (['Flash'], []), 'DisabledPluginsExceptions': (['Flash'], []), 'DisablePluginFinder': (True, []), # TODO(joaodasilva): Should be PERSONAL. http://crbug.com/97749 'SyncDisabled': (True, []), 'UserDataDir': ('${users}/${user_name}/chrome-test', [], [ 'win', 'mac' ]), 'DiskCacheDir': ('${user_home}/test-cache', [], [ 'win', 'mac', 'linux' ]), 'DiskCacheSize': (100, [], [ 'win', 'mac', 'linux' ]), 'MediaCacheSize': (200, [], [ 'win', 'mac', 'linux' ]), 'DownloadDirectory': ('${user_home}/test-downloads', [ BROWSER ], [ 'win', 'mac', 'linux' ]), 'ClearSiteDataOnExit': (True, [ CONTENT ]), # TODO(joaodasilva): Should be BROWSER. http://crbug.com/97749 'ProxyMode': ('direct', [], [ 'win', 'mac', 'linux' ]), # TODO(joaodasilva): Should be BROWSER. http://crbug.com/97749 'ProxyServerMode': (0, [], [ 'win', 'mac', 'linux' ]), 'ProxyServer': ('http://localhost:8080', [], [ 'win', 'mac', 'linux' ]), 'ProxyPacUrl': ('http://localhost:8080/proxy.pac', [], [ 'win', 'mac', 'linux' ]), 'ProxyBypassList': ('localhost', [], [ 'win', 'mac', 'linux' ]), # Note: this policy is only used internally for now. 'ProxySettings': ({}, [], []), 'EnableOriginBoundCerts': (False, [], [ 'win', 'mac', 'linux' ]), 'DisableSSLRecordSplitting': (False, []), 'EnableOnlineRevocationChecks': (False, []), 'AuthSchemes': ('AuthSchemes', []), 'DisableAuthNegotiateCnameLookup': (True, []), 'EnableAuthNegotiatePort': (False, []), 'AuthServerWhitelist': ('localhost', []), 'AuthNegotiateDelegateWhitelist': ('localhost', []), 'GSSAPILibraryName': ('libwhatever.so', [], [ 'mac', 'linux' ]), 'AllowCrossOriginAuthPrompt': (False, [], [ 'win', 'mac', 'linux' ]), 'ExtensionInstallBlacklist': ( ['*'], []), 'ExtensionInstallWhitelist': ( ['lcncmkcnkcdbbanbjakcencbaoegdjlp' ], []), 'ExtensionInstallForcelist': ( ['lcncmkcnkcdbbanbjakcencbaoegdjlp;' + 'https://clients2.google.com/service/update2/crx' ], []), 'ShowHomeButton': (True, [ BROWSER ]), 'DeveloperToolsDisabled': (True, []), 'RestoreOnStartup': (0, [ BROWSER ]), # TODO(joaodasilva): Should be BROWSER. http://crbug.com/97749 'RestoreOnStartupURLs': ([ 'chromium.org' ], []), # TODO(joaodasilva): The banner is out of place. http://crbug.com/77791 'BlockThirdPartyCookies': (True, [ CONTENT ]), # TODO(joaodasilva): Should be BROWSER. http://crbug.com/97749 'DefaultSearchProviderEnabled': (False, []), 'DefaultSearchProviderName': ('google.com', []), 'DefaultSearchProviderKeyword': ('google', []), # TODO(joaodasilva): Should be BROWSER. http://crbug.com/97749 'DefaultSearchProviderSearchURL': ('http://www.google.com/?q={searchTerms}', []), 'DefaultSearchProviderSuggestURL': ('http://www.google.com/suggest?q={searchTerms}', []), 'DefaultSearchProviderInstantURL': ('http://www.google.com/instant?q={searchTerms}', []), 'DefaultSearchProviderIconURL': ('http://www.google.com/favicon.ico', []), 'DefaultSearchProviderEncodings': ([ 'UTF-8' ], []), 'DefaultCookiesSetting': (2, [ CONTENT ]), 'DefaultImagesSetting': (2, [ CONTENT ]), 'DefaultJavaScriptSetting': (2, [ CONTENT ]), 'DefaultPluginsSetting': (2, [ CONTENT ]), 'DefaultPopupsSetting': (2, [ CONTENT ]), 'DefaultNotificationsSetting': (2, [ CONTENT ]), 'DefaultGeolocationSetting': (2, [ CONTENT ]), 'AutoSelectCertificateForUrls': ([ '{\'pattern\':\'https://example.com\',' + '\'filter\':{\'ISSUER\':{\'CN\': \'issuer-name\'}}}' ], []), 'CookiesAllowedForUrls': ([ '[*.]google.com' ], []), 'CookiesBlockedForUrls': ([ '[*.]google.com' ], []), 'CookiesSessionOnlyForUrls': ([ '[*.]google.com' ], []), 'ImagesAllowedForUrls': ([ '[*.]google.com' ], []), 'ImagesBlockedForUrls': ([ '[*.]google.com' ], []), 'JavaScriptAllowedForUrls': ([ '[*.]google.com' ], []), 'JavaScriptBlockedForUrls': ([ '[*.]google.com' ], []), 'PluginsAllowedForUrls': ([ '[*.]google.com' ], []), 'PluginsBlockedForUrls': ([ '[*.]google.com' ], []), 'PopupsAllowedForUrls': ([ '[*.]google.com' ], []), 'PopupsBlockedForUrls': ([ '[*.]google.com' ], []), 'NotificationsAllowedForUrls': ([ '[*.]google.com' ], []), 'NotificationsBlockedForUrls': ([ '[*.]google.com' ], []), 'Disable3DAPIs': (True, []), 'InstantEnabled': (False, [ BROWSER ]), 'TranslateEnabled': (False, [ BROWSER ]), 'AllowOutdatedPlugins': (False, []), 'AlwaysAuthorizePlugins': (True, []), 'BookmarkBarEnabled': (False, [ BROWSER ]), 'EditBookmarksEnabled': (False, []), 'AllowFileSelectionDialogs': (False, [ BROWSER ], [ 'win', 'mac', 'linux' ]), 'ImportBookmarks': (False, [], [ 'win', 'mac', 'linux' ]), 'ImportHistory': (False, [], [ 'win', 'mac', 'linux' ]), 'ImportHomepage': (False, [], [ 'win', 'mac', 'linux' ]), 'ImportSearchEngine': (False, [], [ 'win', 'mac', 'linux' ]), 'ImportSavedPasswords': (False, [], [ 'win', 'mac', 'linux' ]), 'MaxConnectionsPerProxy': (32, []), 'HideWebStorePromo': (True, []), 'URLBlacklist': ([ 'google.com' ], []), 'URLWhitelist': ([ 'google.com' ], []), 'EnterpriseWebStoreURL': ('', []), 'EnterpriseWebStoreName': ('', []), 'EnableMemoryInfo': (True, []), 'DisablePrintPreview': (True, [], [ 'win', 'mac', 'linux' ]), 'BackgroundModeEnabled': (True, [ BROWSER ], [ 'win', 'linux' ]), # ChromeOS-only policies: 'ChromeOsLockOnIdleSuspend': (True, [ BROWSER ], [ 'chromeos' ]), 'PolicyRefreshRate': (300000, [], [ 'chromeos' ]), 'OpenNetworkConfiguration': ('', [], [ 'chromeos' ]), 'GDataDisabled': (True, [], [ 'chromeos' ]), 'GDataDisabledOverCellular': (True, [], [ 'chromeos' ]), # ChromeOS Device policies: 'DevicePolicyRefreshRate': (300000, [], [ 'chromeos' ]), 'ChromeOsReleaseChannel': ('stable-channel', [], [ 'chromeos' ]), 'ChromeOsReleaseChannelDelegated': (False, [], [ 'chromeos' ]), 'DeviceOpenNetworkConfiguration': ('', [], [ 'chromeos' ]), 'ReportDeviceVersionInfo': (True, [], [ 'chromeos' ]), 'ReportDeviceActivityTimes': (True, [], [ 'chromeos' ]), 'ReportDeviceBootMode': (True, [], [ 'chromeos' ]), 'DeviceAllowNewUsers': (True, [], [ 'chromeos' ]), 'DeviceUserWhitelist': ([], [], [ 'chromeos' ]), 'DeviceGuestModeEnabled': (True, [], [ 'chromeos' ]), 'DeviceShowUserNamesOnSignin': (True, [], [ 'chromeos' ]), 'DeviceDataRoamingEnabled': (True, [], [ 'chromeos' ]), 'DeviceMetricsReportingEnabled': (True, [], [ 'chromeos' ]), 'DeviceEphemeralUsersEnabled': (True, [], [ 'chromeos' ]), 'DeviceIdleLogoutTimeout': (60000, [], [ 'chromeos' ]), 'DeviceIdleLogoutWarningDuration': (15000, [], [ 'chromeos' ]), 'DeviceLoginScreenSaverId': ('lcncmkcnkcdbbanbjakcencbaoegdjlp', [], [ 'chromeos' ]), 'DeviceLoginScreenSaverTimeout': (30000, [], [ 'chromeos' ]), 'DeviceStartUpUrls': ([ 'http://google.com' ], [], [ 'chromeos' ]), 'DeviceAppPack': ([], [], [ 'chromeos' ]), 'DeviceAutoUpdateDisabled': (True, [], [ 'chromeos' ]), # Chrome Frame policies: 'ChromeFrameRendererSettings': (0, [], []), 'RenderInChromeFrameList': ([ 'google.com' ], [], []), 'RenderInHostList': ([ 'google.com' ], [], []), 'ChromeFrameContentTypes': ([ 'text/xml' ], [], []), 'GCFUserDataDir': ('${user_name}/test-frame', [], []), 'AdditionalLaunchParameters': ('--enable-media-stream', [], []), }
# Licensed under an MIT style license -- see LICENSE.md __author__ = ["Charlie Hoy <[email protected]>"] def psd_plot( read_variable, default_analysis=None, plot_kwargs={}, extra_lines=[], text="As an example, we now plot the PSDs stored in the file" ): """Return a string containing the function to generate a plot showing the stored PSDs Parameters ---------- read_variable: str name of the read object default_analysis: str, optional The analysis PSD that you wish to plot plot_kwargs: dict, optional kwargs for the `.plot()` method. extra_lines: list, optional additional lines to add to the end of the string text: str, optional Markdown text explaining the plot """ if default_analysis is None: raise ValueError("Please provide a default analysis to use") kwargs = ", ".join([f"{key}={item}" for key, item in plot_kwargs.items()]) string = "psd = {}.psd['{}']\n".format(read_variable, default_analysis) string += "fig = psd.plot({})\n".format(kwargs) string += "\n".join(extra_lines) if text is not None: return [text, string] return [string]
head = '''<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body> <div data-role="page" id="pageone"> <div data-role="header"> <h1>List of devices</h1> </div> <div data-role="main" class="ui-content"> <h2>Interfaces with less than .5Mb and an error rate of .005% are not shown</h2> <div data-role="collapsible"> <h4>''' foot =''' <h1>By Daniel Himes</h1> </div> </div> </body> </html> ''' next_item = ''' </ul> </div> <div data-role="collapsible"> <h4> '''
class Solution: def getNoZeroIntegers(self, n: int) -> List[int]: while True: a = random.randint(1, n - 1) b = n - a if '0' not in str(a) and '0' not in str(b): return [a, b]
print("Welcome to MiOS") yesValues = ["y", "yes", "true", "t"] on = True loggedIn = False def yn(val): return val.lower() in yesValues while on: account = input("Do you have an account? (y/n): ") if yn(account): print("Please login: ") user = input("Enter your username: ") userpassFile = open("usersInfo", "r") userInfo = [userpassFile.read().splitlines()] userInfoList = userInfo[0] try: userInfoList.index(user) except: print("Username is incorrect") continue while on: password = input("Enter your password: ") passIndex = userInfoList.index(user) + 1 if password == userInfoList[passIndex]: print("Logged In!") loggedIn = True break else: print("Incorrect password") continue break break elif not yn(account): create = input("Would you like to create an account? ") if yn(create): while on: createdUserName = input("What will your username be? ") userpassFile = open("usersInfo", "r") userInfo = [userpassFile.read().splitlines()] userInfoList = userInfo[0] if createdUserName in userInfoList: print("Username is already taken") continue userpassFile.close userpassFile = open("usersInfo", "a+") userpassFile.write("\n" + createdUserName) createdPassword = input("What will your password be? ") userpassFile.write("\n" + createdPassword) userpassFile.close break elif not yn(create): continue
class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ d = {")":"(","}":"{","]":"["} inneed = ["(","[","{"] list1 = [] input_lens = len(s) if input_lens == 0: return True for i in range(input_lens): if len(list1)==0 and s[i] not in inneed: return False if s[i] in inneed: list1.append(s[i]) if s[i] not in inneed: if list1[-1] != d[s[i]]: return False else: list1.pop() if list1 == []: return True else: return False
class Solution(object): def numSquares(self, n): """ :type n: int :rtype: int """ dp = [n] * (n + 1) dp[0] = 0 for target in range(1, n+1): for s in range(1, target + 1): square = s * s if target - square < 0: break dp[target] = min(dp[target], 1 + dp[target - square]) return dp[n]
def createPageFile(title: str, description: str, rating: float): pagestr = "{{-start-}}\n ${description}\n ====Rating===\n ${rating}\n{{-stop-}}" f = open("%s" % (title), "w+") pagestr = pagestr.replace("${description}", description) pagestr = pagestr.replace("${rating}", str(rating)) f.write(pagestr) f.close() return
#!/usr/bin/env python # -*- coding: utf-8 -*- # ================================================== # @Time : 2019-05-30 19:44 # @Author : ryuchen # @File : constants.py # @Desc : # ================================================== CUCKOO_GUEST_PORT = 8000 CUCKOO_GUEST_INIT = 0x001 CUCKOO_GUEST_RUNNING = 0x002 CUCKOO_GUEST_COMPLETED = 0x003 CUCKOO_GUEST_FAILED = 0x004 GITHUB_URL = "https://github.com/cuckoosandbox/cuckoo" ISSUES_PAGE_URL = "https://github.com/cuckoosandbox/cuckoo/issues" DOCS_URL = "https://cuckoo.sh/docs" def faq(entry): return "%s/faq/index.html#%s" % (DOCS_URL, entry)
class Config(object): DEBUG = False TESTING = False UPLOAD_FOLDER = 'store' class DevConfig(Config): DEBUG = True class TestConfig(Config): TESTING = True DEBUG = False UPLOAD_FOLDER = 'test_store'
# clean code def is_even(num): return num % 2 == 0 print(is_even(51)) # *args **args def super_func(*args): return sum(args) print(super_func(1,2,3,4,5)) #15 def another_super_func(**kwargs): print(kwargs) total = 0 for items in kwargs.values(): total += items return total print(another_super_func(num1=5,num2=10)) #{'num1': 5, 'num2': 10} #List Slicing creates a new slice amazon_cart = [ 'notebooks', 'sunglasses', 'toys', 'grapes' ] amazon_cart[0] ='laptop' print(amazon_cart[0::2]) #['laptop', 'toys'] new_cart = amazon_cart[:] #coppy amazon cart new_cart[0] = 'gum' print(new_cart) #['gum', 'sunglasses', 'toys', 'grapes'] print(amazon_cart)#['notebooks', 'sunglasses', 'toys', 'grapes'] #Matrix -> multi dimensional lists matrix = [ [1,2,3], [2,4,6], [7,8,9] ] print(matrix[0][1]) # List Methods basket = [1,2,3,4,5] #adding print(basket) #[1, 2, 3, 4, 5] print(basket.append(100)) #None print(basket) #[1, 2, 3, 4, 5, 100] basket.insert(3,200) print(basket) #[1, 2, 3, 200, 4, 5, 100] new_list = basket.extend([500]) print("new LIst",new_list) #new LIst None new_list= basket print(new_list) #[1, 2, 3, 200, 4, 5, 100, 500] #removing basket.pop() #removes at the end of the list print(basket.pop(0)) #1 -> removes the first item and returns it print(basket) #[2, 3, 200, 4, 5, 100] print(basket.remove(2)) # None -> returns nothing, only modifies the list by removin mumber 2 print(basket) #[3, 200, 4, 5, 100] basket.clear() # removes all the items from list print(basket) # [] #Index (item, start, finish) -> letters.index('d',0,2) letters = ['x','a','b','c','d','e','f'] print(letters.index('d')) # 4 -> returns the index where the letter d is #Python Keywords -> sorted() produces a new array print('d' in letters) # True print(letters.count("c")) # 1 # letters.sort() # print(letters) # ['a', 'b', 'c', 'd', 'e', 'f', 'x'] print(sorted(letters)) #['a', 'b', 'c', 'd', 'e', 'f', 'x'] copied_list = letters.copy() # copies the original list copied_list.reverse() print(copied_list) #['f', 'e', 'd', 'c', 'b', 'a', 'x'] print(letters[::-1]) # -> creates a new array and reverses it #Range print(list(range(1,20))) #[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] print(list(range(20))) #[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] -> starts at 0 #.join() creates a new item sentence = '!' new_sentence = sentence.join(['hi', 'my', 'name']) print(new_sentence) # hi!my!name sentence = ' ' new_sentence = sentence.join(['hi', 'my', 'name']) print(new_sentence) #hi my name new_sentence = ' '.join(['hi', 'my', 'name']) print(new_sentence) #hi my name # List unpacking a,b,c, *other, d = [1,2,3,4,5,6,7,8,9] # -> assigns a variable to each item in list print(a) # 1 print(b) # 2 print(c) # 3 print(other) #[4, 5, 6, 7, 8] print(d) # 9 # None -> the abscense of value weapons = None print(weapons) # Dictionary or dict -> data structure -> unordered key, value pairs dictionary = { 'a': [1,2,3], 'b': 6, } print(dictionary['b']) # 6 print(dictionary['a'][1]) # 2 my_list_dict = [ {'a':[4,5,6], 'b': "hello", 'c': True}, {'a':[7,8,9], 'b': "hello", 'c': True} ] print(my_list_dict[1]['a'][2]) # 9 #get() -> it will look for the key and if it's not there it will return None, no errors print(dictionary.get('age')) # None print(dictionary.get('age', 55)) # 55 -> it will look for age if not found it gill return default value 55 dictionary2 = dict(name='JohnC') print(dictionary2) #{'name': 'JohnC'} # Find an item in a dictionary print("age" in dictionary2) #False print('name' in dictionary2) #True print('hello' in my_list_dict[0].values()) #True print('a' in my_list_dict[0].keys()) #True print(dictionary2.items()) #dict_items([('name', 'JohnC')]) dictionary3 = dictionary2.copy() # will copy the dictionary dictionary2.clear() # -> will clear the dictionary and return an empty {} print(dictionary2) #{} print(dictionary3) # {'name': 'JohnC'} dictionary3['age'] = 20 print(dictionary3.update({'age': 40})) print(dictionary3) #Tuples -> immutable list -> you can use list methods in tuples like len, in , slice, unzipping my_tuple = (1,2,3,4,5,1,1) # my_tuple[0] = 9 # TypeError: 'tuple' object does not support item assignment new_tuple = my_tuple[1:4] print(new_tuple) #(2, 3, 4) print(my_tuple.count(1)) # 3 -> it counts how many times 1 is in tuple print(my_tuple.index(4)) # 3 -> it returns the index of number 4 # Sets -> unordered collection of unique items(no duplicates) my_set = {1,2,3,4,5,5} print(my_set) #{1, 2, 3, 4, 5} duplicate_list = [1,2,3,4,5,5,4,4,3,3,6,6,7,8,] # make it into a set with no duplicates no_duplicates_set = set(duplicate_list) print(no_duplicates_set) #{1, 2, 3, 4, 5, 6, 7, 8} #Sets methods print("difference",no_duplicates_set.difference(my_set)) #difference {8, 6, 7} print(my_set.discard(3)) print(my_set) #{1, 2, 4, 5} #no_duplicates_set.difference_update(my_set) # -> it removes the numbers that are not in my_set print(no_duplicates_set) #{3, 6, 7, 8} print(my_set.intersection(no_duplicates_set)) #{1, 2, 4, 5} -> it will return the same numbers that are present in both sets print(my_set.union(no_duplicates_set)) # {1, 2, 3, 4, 5, 6, 7, 8} -> it will combine both sets and remove duplicates print(my_set | no_duplicates_set) # {1, 2, 3, 4, 5, 6, 7, 8} -> it will also combine both sets and remove duplicates # Ternary Operator -> conditional expressions #condition_if_true if condition else condition_if_else is_friend = False can_message = "message allowed" if is_friend else "not allowed" print(can_message) #Short Circuiting -> only one condidtion is true -> the interpreter stops evaluating after one condition is true is_friend_true = True is_User = True if is_friend_true or is_User: print("best friends forever") #Logical operators: ''' > < == != <= >= and or not ''' # == checks for equality print(True == 1) #true print('' == 1)# false print([] == 1)# false print(10 == 10.0)# true print([] == [])#true # is checks for location in memory print(True is True) #true print('' is 1)# false print([] is 1)# false print(10 is 10.0)# false print([] is [])#false #Loops -> for loop will work with lists, tuples, sets, strings for item in "The dance of the wind": #print(item) pass for item in (1,2,3,4,5): for x in ['a','b','c']: print(item, x) # iterable - list, dictionary, tuple, set, string -> one by one check each item in the collection user_sample = { "name": "Golem", "age": 500, "can_swim": False } for item in user_sample: print(item) for item in user_sample.values(): print("value",item) for item in user_sample.items(): key,value = item print(key, value) for key,value in user_sample.items(): #same as above print(key, value) my_adding_list = [1,2,3,4,5,6,7,8,9,10] total = 0 for item in my_adding_list: total += item print(total) #55 #Range object for item in range(10): print(item) # will print 0 to 9 for _ in range(0,10,2): print(_) # will print 0,2,4,6,8 for _ in range(5): print(list(range(10))) ''' [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ''' #Enumerate will give you an index in an enumerable item for i,char in enumerate('Helllloooo'): print(i, char) ''' 0 H 1 e 2 l 3 l 4 l 5 l 6 o 7 o 8 o 9 o ''' for i, char in enumerate((list(range(100)))): if char == 50: print(i, char) #while loop -> while a condition is true do something i = 0 while i < 10: print(i) i = i + 1 # while True: # response = input("say something: ") # if (response == "bye"): # break picture = [ [0,0,0,1,0,0,0], [0,0,1,1,1,0,0], [0,1,1,1,1,1,0], [1,1,1,1,1,1,1], [0,0,0,1,0,0,0], [0,0,0,1,0,0,0], ] # iterate over picture # if 0 -> print " " # if 1 -> print * for row in picture: for pixel in row: if (pixel == 1): print("*", end=" ") else: print(" ", end=" " ) print(" ") #need a new line after every row ''' * * * * * * * * * * * * * * * * * * ''' #Find duplicates some_list = [ 'a','b','c','b','c','m','n','n' ] duplicates = [] for value in some_list: if some_list.count(value) > 1: if value not in duplicates: duplicates.append(value) print(duplicates)
class Fabric: def __init__(self, width, height): self._width = width self._height = height self._area = [] for row in range(0, height): self._area.append([]) for column in range(0, width): self._area[row].append(0) def claim(self, piece): for row in range(0, piece.height): for column in range(0, piece.width): self._area[piece.top_offset + row][piece.left_offset + column] += 1 def area(self): area = "\n" for row in range(0, self._height): for column in range(0, self._width): if self._area[row][column] == 0: area += "." else: area += str(self._area[row][column]) area += '\n' return area @property def overlapping_inches(self): _overlapping_inches = 0 for row in range(0, self._height): for column in range(0, self._width): if self._area[row][column] > 1: _overlapping_inches += 1 return _overlapping_inches
DAY = 11 def part1(data): data = [ord(c) for c in data] while not is_valid(data): for j in range(len(data)-1, -1,-1): data[j] = data[j]+1 if data[j] > ord("z"): data[j] = ord("a") else: break return "".join(chr(c) for c in data) def part2(data): data = [ord(c) for c in data] for j in range(len(data)-1, -1,-1): data[j] = data[j]+1 if data[j] > ord("z"): data[j] = ord("a") else: break while not is_valid(data): for j in range(len(data)-1, -1,-1): data[j] = data[j]+1 if data[j] > ord("z"): data[j] = ord("a") else: break return "".join(chr(c) for c in data) def is_valid(s): for j in range(len(s)-1): if s[j] == s[j+1]: last = s[j] break else: return False for j in range(len(s)-1): if s[j] == s[j+1] and s[j] != last: break else: return False if ord("i") in s or ord("o") in s or ord("l") in s: return False for j in range(len(s)-2): if s[j]== s[j+1]-1 and s[j] == s[j+2]-2: break else: return False return True p1 = part1("vzbxkghb") print(p1) print(part2(p1))
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/12/27 10:32 AM # @Author : Insomnia # @Desc : 把数组排成最小的数字 # @File : RangeMinNum.py # @Software: PyCharm class Solution: def rangeMinNum(self, arr): num = [str(val) for val in arr] num.sort() num.reverse() res = ''.join((val for val in num)) print(res) return ''.join(res).lstrip('0') or '0' if __name__ == '__main__': print("Hello world!") arr = [3, 32, 321] sol = Solution() print(sol.rangeMinNum(arr))
# colorsystem.py is the full list of colors that can be used to easily create themes. class Gray: B0 = '#000000' B10 = '#19232D' B20 = '#293544' B30 = '#37414F' B40 = '#455364' B50 = '#54687A' B60 = '#60798B' B70 = '#788D9C' B80 = '#9DA9B5' B90 = '#ACB1B6' B100 = '#B9BDC1' B110 = '#C9CDD0' B120 = '#CED1D4' B130 = '#E0E1E3' B140 = '#FAFAFA' B150 = '#FFFFFF' class Blue: B0 = '#000000' B10 = '#062647' B20 = '#26486B' B30 = '#375A7F' B40 = '#346792' B50 = '#1A72BB' B60 = '#057DCE' B70 = '#259AE9' B80 = '#37AEFE' B90 = '#73C7FF' B100 = '#9FCBFF' B110 = '#C2DFFA' B120 = '#CEE8FF' B130 = '#DAEDFF' B140 = '#F5FAFF' B150 = '##FFFFFF'
# encoding: utf-8 ################################################## # This script shows an example of variable assignment. It explores the different options for storing vales into # variables ################################################## # ################################################## # Author: Diego Pajarito # Copyright: Copyright 2020, IAAC # Credits: [Institute for Advanced Architecture of Catalonia - IAAC, Advanced Architecture group] # License: Apache License Version 2.0 # Version: 1.0.0 # Maintainer: Diego Pajarito # Email: [email protected] # Status: development ################################################## # We don't need any library so far # Let's write our code # Let's create two variables and assign them two values x = 99 y = 63 # Let's assign the result of an operation to a third variable z = x * y # Let's print out the result print('The value assigned is:') print(z) # Let's assign the result of an operation to a third variable z = x * y - x + y # Let's print out the result print('The value assigned is:') print(z) # Let's assign a new value to this variable and print again z = x - y print('The value assigned now is:') print(z) # We can also assign values or variable's values x = z y = 'Now I store text' # Let's see how we ended up storing values print('The value in -x- now is:') print(x) print('The value in -y- now is:') print(y) print('The value in -x- now is:') print(z)
""" 面试题50(一):字符串中第一个只出现一次的字符 题目:在字符串中找出第一个只出现一次的字符。如输入"abaccdeff",则输出 'b'。 """ def first_not_repeat(s: str) -> str: """ Parameters ----------- Returns --------- Notes ------ """ if not s: return "" dct = {} for c in s: if c in dct: dct[c] += 1 else: dct[c] = 1 for c in s: if dct[c] == 1: return c return "" if __name__ == '__main__': res = first_not_repeat("ba") print(res)
data = [] with open("input.txt", "r") as file: for line in file.readlines(): line = line.replace("\n", "") data.append(line) def countTrees(data, step_right, step_down): check_index = step_right count = 0 for i in range(step_down, len(data), step_down): if data[i][check_index % len(data[i])] == "#": count += 1 check_index += step_right return count def problem1(data): return countTrees(data, 3, 1) def problem2(data): total = 1 for step in [1, 3, 5, 7]: total *= countTrees(data, step, 1) total *= countTrees(data, 1, 2) return total print(f"Problem 1: {problem1(data)}") print(f"Problem 2: {problem2(data)}")
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"source": "01_noisyimagenette.ipynb", "df": "01_noisyimagenette.ipynb", "get_inverse_transform": "01_noisyimagenette.ipynb", "lbl_dict": "01_noisyimagenette.ipynb", "lbl_dict_inv": "01_noisyimagenette.ipynb", "get_dls": "01_noisyimagenette.ipynb", "dls_5": "01_noisyimagenette.ipynb", "learn_5": "01_noisyimagenette.ipynb", "train_preds": "01_noisyimagenette.ipynb", "val_preds": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "train_ordered_label_errors": "01_noisyimagenette.ipynb", "noisy_train": "01_noisyimagenette.ipynb", "preds_50": "01_noisyimagenette.ipynb", "confidence": "01_noisyimagenette.ipynb", "noisy_train_50": "01_noisyimagenette.ipynb", "high_confident_noisy": "01_noisyimagenette.ipynb", "path": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "x": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "n": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "rng": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "noise_idxs": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "mnist": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "dls": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "learn": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb", "val_ordered_label_errors": "02_NoisyMitigation_using_LabelSmoothing_MNIST.ipynb"} modules = ["noisyimagenette.py", "labelsmoothing.py"] doc_url = "https://manisnesan.github.io/fsdl/" git_url = "https://github.com/manisnesan/fsdl/tree/main/" def custom_doc_links(name): return None
# Program to sort the array according to count of set bits in binary representation :) def count_1(var): count = 0 while var: count += var % 2 var = var // 2 return count arr = list(map(int, input("Enter the elements of array *With spaces b/w number* :").split())) arr_new = [(arr[i], i) for i in range(len(arr))] sort_list = sorted(arr_new, key=lambda x: count_1(x[0]), reverse=True) sort_list = [x[0] for x in sort_list] print(sort_list)
#!/usr/bin/python # -------------------------------------- # Filters # -------------------------------------- class FilterModule(object): def filters(self): return { 'assign_underlay_asn': self.assign_underlay_asn, 'get_local_asn': self.get_local_asn, 'filter_own_links': self.filter_own_links } def assign_underlay_asn(self, links, asn_start, filter_device=None): """ Incrementally picks an autonomous system number (ASN) starting from `asn_start` for each endpoint device. :param links: a list of links. Each link must be represented as a dict. The dict format is the same as the return value, but without the asn attributes :param asn_start: starting ASN. it can be int or str :param filter_device: a device name. If present, the return value is filtered to return only the links belonging to this device :return: list of links. Each link is a dict: { source: { node: { name: str asn: str } interface: { name: str unit: str ip_address: ip/mask } }, target: { node: { name: str asn: str } interface: { name: str unit: str ip_address: ip/mask } } } """ # Keep track of which devices have been already assigned an ASN to asn_tracker = {} # Iterate over links and assign asn asn = int(asn_start) for link in links: source_name = link["source"]["node"]["name"] if source_name not in asn_tracker: # Pick a new asn link["source"]["node"]["asn"] = str(asn) # Update the asn tracker asn_tracker[source_name] = asn # Increment the asn for the next device asn += 1 else: # Just copy the asn already selected for this device before link["source"]["node"]["asn"] = asn_tracker[source_name] # Same for the other link endpoint target_name = link["target"]["node"]["name"] if target_name not in asn_tracker: # Pick a new asn link["target"]["node"]["asn"] = str(asn) # Update the asn tracker asn_tracker[target_name] = asn # Increment the asn for the next device asn += 1 else: # Just copy the asn already selected for this device before link["target"]["node"]["asn"] = asn_tracker[target_name] if filter_device: # Filter the result to only include links belonging to the filter device links = [l for l in links if l["source"]["node"]["name"] == filter_device or l["target"]["node"]["name"] == filter_device] return links def filter_own_links(self, links, device): # Filter the links to only include links belonging to the device links = [l for l in links if l["source"]["node"]["name"] == device or l["target"]["node"]["name"] == device] return links def get_local_asn(self, device_links, device): """ From the list of links with already ASNs assigned, retrieve and return the ASN of the device :param device_links: a list of links the device is connected to. Each link must be represented as a dict which includes the asn information { source: { node: { name: str asn: str } interface: { name: str unit: str ip_address: ip/mask } }, target: { node: { name: str asn: str } interface: { name: str unit: str ip_address: ip/mask } } } :param device: the name of the device you want to retrieve the asn for :return: str. The asn of the device """ # Pick the first link if device_links[0]["source"]["node"]["name"] == device: return device_links[0]["source"]["node"]["asn"] elif device_links[0]["target"]["node"]["name"] == device: return device_links[0]["target"]["node"]["asn"] else: raise ValueError("device {} not found in the first link. No ASN can be retrieved. " "The device provided as input must be included in the device_links".format(device))
# max(iterable, *[, key, default]) list1 = [1, 2, 3, 2, 1, 2, 4, 3] max_item = max(list1) max_item = max(list1, key=lambda x: list1.count(x), default=1) print('max_item: ', max_item) # max_item: 2 print('default: ', max((), default=111)) # default: 111 lstobj = [ {'name': 'xiaoming', 'age': 18, 'gender': 'male'}, {'name': 'xiaohong', 'age': 20, 'gender': 'female'} ] print('max age: ', max(lstobj, key=lambda x: x['age'])) # max age: {'name': 'xiaohong', 'age': 20, 'gender': 'female'} dist1 = {'a': 3, 'b': 2, 'c': 1} print('max dist: ', max(dist1)) # max dist: c
data = input() elements = data.split(' ') products = {} for index in range(0, len(elements), 2): key = elements[index] quantity = int(elements[index + 1]) products[key] = quantity searched_products = input().split(' ') for item in searched_products: if item in products.keys(): quantity = products[item] print(f'We have {quantity} of {item} left') else: print(f"Sorry, we don't have {item}")
#!/usr/bin/env python3 # Day 30: Check If a String Is a Valid Sequence from Root to Leaves Path in a # Binary Tree # # Given a binary tree where each path going from the root to any leaf form a # valid sequence, check if a given string is a valid sequence in such binary # tree. # We get the given string from the concatenation of an array of integers arr # and the concatenation of all values of the nodes along a path results in a # sequence in the given binary tree. # # Constraints: # - 1 <= arr.length <= 5000 # - 0 <= arr[i] <= 9 # - Each node's value is between [0 - 9]. # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def isValidSequence(self, root: TreeNode, arr: [int]) -> bool: # This whole function could be written as a single boolean expression, # but let's split it for the sake of readability if root is None: return False if root.val != arr[0]: return False if len(arr) == 1: return root.left is None and root.right is None else: return self.isValidSequence(root.left, arr[1:]) \ or self.isValidSequence(root.right, arr[1:]) # Tests test_tree = TreeNode(0) test_tree.right = TreeNode(0) test_tree.right.left = TreeNode(0) test_tree.left = TreeNode(1) test_tree.left.left = TreeNode(0) test_tree.left.left.right = TreeNode(1) test_tree.left.right = TreeNode(1) test_tree.left.right.left = TreeNode(0) test_tree.left.right.right = TreeNode(0) assert Solution().isValidSequence(test_tree, [0,1,0,1]) == True assert Solution().isValidSequence(test_tree, [0,0,1]) == False assert Solution().isValidSequence(test_tree, [0,1,1]) == False
class Solution(object): def matrixReshape(self, nums, r, c): """ :type nums: List[List[int]] :type r: int :type c: int :rtype: List[List[int]] """ if len(nums) * len(nums[0]) != r * c: return nums res = [] for i in range(len(nums)): ii = i * len(nums[i]) for j in range(len(nums[i])): nth = ii + j if nth % c == 0: res.append([nums[i][j]]) else: res[-1].append(nums[i][j]) return res def test_matrix_reshape(): s = Solution() assert [[1, 2, 3, 4]] == s.matrixReshape([[1, 2], [3, 4]], 1, 4) assert [[1, 2], [3, 4]] == s.matrixReshape([[1, 2], [3, 4]], 2, 4)
data = ( 'yeoss', # 0x00 'yeong', # 0x01 'yeoj', # 0x02 'yeoc', # 0x03 'yeok', # 0x04 'yeot', # 0x05 'yeop', # 0x06 'yeoh', # 0x07 'ye', # 0x08 'yeg', # 0x09 'yegg', # 0x0a 'yegs', # 0x0b 'yen', # 0x0c 'yenj', # 0x0d 'yenh', # 0x0e 'yed', # 0x0f 'yel', # 0x10 'yelg', # 0x11 'yelm', # 0x12 'yelb', # 0x13 'yels', # 0x14 'yelt', # 0x15 'yelp', # 0x16 'yelh', # 0x17 'yem', # 0x18 'yeb', # 0x19 'yebs', # 0x1a 'yes', # 0x1b 'yess', # 0x1c 'yeng', # 0x1d 'yej', # 0x1e 'yec', # 0x1f 'yek', # 0x20 'yet', # 0x21 'yep', # 0x22 'yeh', # 0x23 'o', # 0x24 'og', # 0x25 'ogg', # 0x26 'ogs', # 0x27 'on', # 0x28 'onj', # 0x29 'onh', # 0x2a 'od', # 0x2b 'ol', # 0x2c 'olg', # 0x2d 'olm', # 0x2e 'olb', # 0x2f 'ols', # 0x30 'olt', # 0x31 'olp', # 0x32 'olh', # 0x33 'om', # 0x34 'ob', # 0x35 'obs', # 0x36 'os', # 0x37 'oss', # 0x38 'ong', # 0x39 'oj', # 0x3a 'oc', # 0x3b 'ok', # 0x3c 'ot', # 0x3d 'op', # 0x3e 'oh', # 0x3f 'wa', # 0x40 'wag', # 0x41 'wagg', # 0x42 'wags', # 0x43 'wan', # 0x44 'wanj', # 0x45 'wanh', # 0x46 'wad', # 0x47 'wal', # 0x48 'walg', # 0x49 'walm', # 0x4a 'walb', # 0x4b 'wals', # 0x4c 'walt', # 0x4d 'walp', # 0x4e 'walh', # 0x4f 'wam', # 0x50 'wab', # 0x51 'wabs', # 0x52 'was', # 0x53 'wass', # 0x54 'wang', # 0x55 'waj', # 0x56 'wac', # 0x57 'wak', # 0x58 'wat', # 0x59 'wap', # 0x5a 'wah', # 0x5b 'wae', # 0x5c 'waeg', # 0x5d 'waegg', # 0x5e 'waegs', # 0x5f 'waen', # 0x60 'waenj', # 0x61 'waenh', # 0x62 'waed', # 0x63 'wael', # 0x64 'waelg', # 0x65 'waelm', # 0x66 'waelb', # 0x67 'waels', # 0x68 'waelt', # 0x69 'waelp', # 0x6a 'waelh', # 0x6b 'waem', # 0x6c 'waeb', # 0x6d 'waebs', # 0x6e 'waes', # 0x6f 'waess', # 0x70 'waeng', # 0x71 'waej', # 0x72 'waec', # 0x73 'waek', # 0x74 'waet', # 0x75 'waep', # 0x76 'waeh', # 0x77 'oe', # 0x78 'oeg', # 0x79 'oegg', # 0x7a 'oegs', # 0x7b 'oen', # 0x7c 'oenj', # 0x7d 'oenh', # 0x7e 'oed', # 0x7f 'oel', # 0x80 'oelg', # 0x81 'oelm', # 0x82 'oelb', # 0x83 'oels', # 0x84 'oelt', # 0x85 'oelp', # 0x86 'oelh', # 0x87 'oem', # 0x88 'oeb', # 0x89 'oebs', # 0x8a 'oes', # 0x8b 'oess', # 0x8c 'oeng', # 0x8d 'oej', # 0x8e 'oec', # 0x8f 'oek', # 0x90 'oet', # 0x91 'oep', # 0x92 'oeh', # 0x93 'yo', # 0x94 'yog', # 0x95 'yogg', # 0x96 'yogs', # 0x97 'yon', # 0x98 'yonj', # 0x99 'yonh', # 0x9a 'yod', # 0x9b 'yol', # 0x9c 'yolg', # 0x9d 'yolm', # 0x9e 'yolb', # 0x9f 'yols', # 0xa0 'yolt', # 0xa1 'yolp', # 0xa2 'yolh', # 0xa3 'yom', # 0xa4 'yob', # 0xa5 'yobs', # 0xa6 'yos', # 0xa7 'yoss', # 0xa8 'yong', # 0xa9 'yoj', # 0xaa 'yoc', # 0xab 'yok', # 0xac 'yot', # 0xad 'yop', # 0xae 'yoh', # 0xaf 'u', # 0xb0 'ug', # 0xb1 'ugg', # 0xb2 'ugs', # 0xb3 'un', # 0xb4 'unj', # 0xb5 'unh', # 0xb6 'ud', # 0xb7 'ul', # 0xb8 'ulg', # 0xb9 'ulm', # 0xba 'ulb', # 0xbb 'uls', # 0xbc 'ult', # 0xbd 'ulp', # 0xbe 'ulh', # 0xbf 'um', # 0xc0 'ub', # 0xc1 'ubs', # 0xc2 'us', # 0xc3 'uss', # 0xc4 'ung', # 0xc5 'uj', # 0xc6 'uc', # 0xc7 'uk', # 0xc8 'ut', # 0xc9 'up', # 0xca 'uh', # 0xcb 'weo', # 0xcc 'weog', # 0xcd 'weogg', # 0xce 'weogs', # 0xcf 'weon', # 0xd0 'weonj', # 0xd1 'weonh', # 0xd2 'weod', # 0xd3 'weol', # 0xd4 'weolg', # 0xd5 'weolm', # 0xd6 'weolb', # 0xd7 'weols', # 0xd8 'weolt', # 0xd9 'weolp', # 0xda 'weolh', # 0xdb 'weom', # 0xdc 'weob', # 0xdd 'weobs', # 0xde 'weos', # 0xdf 'weoss', # 0xe0 'weong', # 0xe1 'weoj', # 0xe2 'weoc', # 0xe3 'weok', # 0xe4 'weot', # 0xe5 'weop', # 0xe6 'weoh', # 0xe7 'we', # 0xe8 'weg', # 0xe9 'wegg', # 0xea 'wegs', # 0xeb 'wen', # 0xec 'wenj', # 0xed 'wenh', # 0xee 'wed', # 0xef 'wel', # 0xf0 'welg', # 0xf1 'welm', # 0xf2 'welb', # 0xf3 'wels', # 0xf4 'welt', # 0xf5 'welp', # 0xf6 'welh', # 0xf7 'wem', # 0xf8 'web', # 0xf9 'webs', # 0xfa 'wes', # 0xfb 'wess', # 0xfc 'weng', # 0xfd 'wej', # 0xfe 'wec', # 0xff )
def test(): # if an assertion fails, the message will be displayed # --> must have the correct arithmetic mean assert numbers_one_mean == 4.0, "Are you calculating the arithmetic mean?" # --> must have the first function call assert "mean(numbers_one)" in __solution__, "Did you call the mean function with numbers_one as input?" # --> must have the second function call assert "inspect(numbers_one" in __solution__, "Did you call the inspect function with numbers_one as input?" # --> must have the first emoji assert ":mag_right:" in __solution__, "Did you display a magnifying glass emoji with :mag_right:?" # --> must have the second emoji assert ":rocket:" in __solution__, "Did you display a rocket emoji with :rocket:?" # --> must not have a TODO marker in the solution assert "TODO" not in __solution__, "Did you remove the TODO marker when finished?" # display a congratulations for a correct solution __msg__.good("Well done!")
class Category: """It should be able to instantiate objects based on different budget categories like food, clothing, and entertainment. When objects are created, they are passed in the name of the category. Attributes: category: A string of category of the category class ledger: A list of al leger totalSpent: An float that hold how muck we has spend """ def __init__(self, category): """Inits SampleClass with blah.""" self.category = category self.ledger = [] self.totalSpent = 0 def deposit(self, amount, description=""): """A deposit method that accepts an amount and description. If no description is given, it should default to an empty string. The method should append an object to the ledger list in the form of {"amount": amount, "description": description}. """ self.ledger.append({ 'amount': amount, 'description': description }) def withdraw(self, deposit, description=""): """A withdraw method that is similar to the deposit method, but the amount passed in should be stored in the ledger as a negative number. If there are not enough funds, nothing should be added to the ledger. This method should return True if the withdrawal took place, and False otherwise. """ if not self.check_funds(deposit): return False self.ledger.append({ 'amount': deposit * -1, 'description': description }) self.totalSpent += deposit return True def get_balance(self): """A get_balance method that returns the current balance of the budget category based on the deposits and withdrawals that have occurred. """ return sum(item['amount'] for item in self.ledger) def transfer(self, amount, destCategory): """A transfer method that accepts an amount and another budget category as arguments. The method should add a withdrawal with the amount and the description "Transfer to [Destination Budget Category]". The method should then add a deposit to the other budget category with the amount and the description "Transfer from [Source Budget Category]". If there are not enough funds, nothing should be added to either ledger """ if not self.check_funds(amount): return False self.withdraw(amount, 'Transfer to {}'.format(destCategory.category)) destCategory.deposit(amount, 'Transfer from {}'.format(self.category)) return True def check_funds(self, amount): """A check_funds method that accepts an amount as an argument. It returns False if the amount is less than the balance of the budget category and returns True otherwise. This method should be used by both the withdraw method and transfer method. """ return amount <= self.get_balance() def __str__(self): """When the budget object is printed it should display: * A title line of 30 characters where the name of the category is centered in a line of `*` characters. * A list of the items in the ledger. Each line should show the description and amount. The first 23 characters of the description should be displayed, then the amount. The amount should be right aligned, contain two decimal places, and display a maximum of 7 characters. * A line displaying the category total. """ strings = [] strings.append('{:*^30s}'.format(self.category)) for posting in self.ledger: strings.append('{:<23}{:7.2f}'.format(posting['description'][:23] , posting['amount'])) strings.append('Total: {}'.format(self.get_balance())) return "\n".join(strings) def create_spend_chart(categories): total = sum([category.totalSpent for category in categories]) totalPerCategory = [int((category.totalSpent/total) * 100 // 10 * 10) for category in categories] rows = [] for i in range(100, -10, -10): row = ['{:>3}|'.format(i)] for spending in totalPerCategory: if i <= spending: row.append('o') else: row.append(' ') rows.append(row) result = 'Percentage spent by category\n' format_list = ['{:>3}' for item in range(len(totalPerCategory) - 1)] s = '{}{:>2}' + ''.join(format_list) + ' \n' for row in rows: result += s.format(*row) result += '{:4}{:-<{}}\n'.format(' ', '', len(totalPerCategory) * 2 + 4) maxCategoryLength = max([len(i.category) for i in categories]) verticalCategoryFormatList = ['{:<3}' for item in range(len(totalPerCategory))] verticalCategoryFormatString = ' ' + ''.join(verticalCategoryFormatList) + '\n' for i in range(0, maxCategoryLength, 1): row = [] for j in categories: if i <= len(j.category) - 1 : row.append(j.category[i]) else: row.append(' ') result += verticalCategoryFormatString.format(*row) return result[:-1]
class EndLine (Exception): pass
# Time: O(n) # Space: O(n) # freq table class Solution(object): def findLonely(self, nums): """ :type nums: List[int] :rtype: List[int] """ cnt = collections.Counter(nums) return [x for x in nums if cnt[x] == 1 and x-1 not in cnt and x+1 not in cnt]
# 7_lineNumbers.py # A program that rewrites a file with line numbers # Date: 10/6/2020 # Name: Ben Goldstone def main(): readFileName = input("What is the name of the input file? ") writeFileName = input("What do you want the name of your output file to be? ") readFile = open(readFileName, "r") writeFile = open(writeFileName, "w") lineNumber = 1 for line in readFile: writeFile.write(f"{lineNumber:5}." + line) lineNumber += 1 writeFile.close() readFile.close() main()
height = int(input()) for i in range(1,height+1): for j in range(0,i+1): print(end=" ") for j in range(i,(2*height)-i+1): print(j,end=" ") print() for i in range(1,height): for j in range(0,height-i+1): print(end=" ") for j in range(height-i,height+i+1): print(j,end=" ") print() # Sample Input :- 4 # Output :- # 1 2 3 4 5 6 7 # 2 3 4 5 6 # 3 4 5 # 4 # 3 4 5 # 2 3 4 5 6 # 1 2 3 4 5 6 7
class Solution: def solve(self, nums): if len(nums) <= 1: return len(nums) sign = lambda x: (x>0)-(x<0) d = sign(nums[1]-nums[0]) streak = 1 if d == 0 else 2 ans = streak for i in range(1,len(nums)-1): if nums[i+1]-nums[i] == 0: streak = 1 elif d == 0 or sign(nums[i+1]-nums[i]) == -d: streak += 1 else: streak = 2 d = sign(nums[i+1]-nums[i]) ans = max(ans, streak) return ans
def getFirst(pair): return pair[0] with open("../inputs/day4.txt","r") as f: data=f.read() # [1518-05-29 00:00] Guard #1151 begins shift data=data.split("\n") data.pop() processedData=[] for el in data: piece=el.split("]") piece[0]=piece[0].replace("[","") piece[0]=piece[0].replace("-","") piece[0]=piece[0].replace(":","") piece[0]=piece[0].replace(" ","") piece[0]=int(piece[0]) if "#" in piece[1]: piece[1]=piece[1].split(" ")[2] piece[1]=int(piece[1].replace("#","")) processedData.append(piece) processedData.sort(key=getFirst) # print(processedData) guards={} currentGuard=-1 startDate=-1 asleepCounter=0 wakeUpCounter=0 for shift in processedData: # print(shift) if shift[1]!=' falls asleep' and shift[1]!=' wakes up': currentGuard=shift[1] elif shift[1]==' falls asleep': startDate=shift[0] asleepCounter+=1 else: wakeUpCounter+=1 time=shift[0]-startDate if currentGuard in guards: guards[currentGuard]+=time else: guards[currentGuard]=time lazyGuard=max(guards, key=guards.get) currentGuard=-1 minutes={} for shift in processedData: print(shift) if shift[1]==lazyGuard: currentGuard=shift[1] elif shift[1]==' falls asleep' and currentGuard==lazyGuard: startDate=shift[0] asleepCounter+=1 elif shift[1]==' wakes up' and currentGuard==lazyGuard: wakeUpCounter+=1 for i in range(int(str(startDate)[8:]),int(str(shift[0])[8:])): if i in minutes: minutes[i]+=1 else: minutes[i]=1 # time=shift[0]-startDate else: currentGuard=-1 keyMinute=max(minutes, key=minutes.get) print(lazyGuard,keyMinute,lazyGuard*keyMinute)
# There is a fence with n posts, each post can be painted with one of the k colors. # You have to paint all the posts such that no more than two adjacent fence posts have the same color. # Return the total number of ways you can paint the fence. # Note: # n and k are non-negative integers. # Example: # Input: n = 3, k = 2 # Output: 6 # Explanation: Take c1 as color 1, c2 as color 2. All possible ways are: # post1 post2 post3 # ----- ----- ----- ----- # 1 c1 c1 c2 # 2 c1 c2 c1 # 3 c1 c2 c2 # 4 c2 c1 c1 # 5 c2 c1 c2 # 6 c2 c2 c1 class Solution(object): def numWays(self, n, k): """ :type n: int :type k: int :rtype: int """ # 数学方法 O(n) # 这道题让我们粉刷篱笆,有n个部分需要刷,有k种颜色的油漆,规定了不能有超过两个的相同颜色涂的部分,问我们总共有多少种刷法。 # 那么我们首先来分析一下, # 如果n=0的话,说明没有需要刷的部分,直接返回0即可, # 如果n为1的话,那么有几种颜色,就有几种刷法,所以应该返回k, # 当n=2时,k=2时,我们可以分两种情况来统计,一种是相邻部分没有相同的,一种相同部分有相同的颜色, # 那么对于没有相同的,对于第一个格子,我们有k种填法,对于下一个相邻的格子,由于不能相同,所以我们只有k-1种填法。 # 而有相同部分颜色的刷法和上一个格子的不同颜色刷法相同,因为我们下一格的颜色和之前那个格子颜色刷成一样的即可, # 最后总共的刷法就是把不同和相同两个刷法加起来。 if n == 0 or k == 0 : return 0 same, diff = 0, k for i in range(2, n+1): temp = diff diff = (same + diff) * (k - 1) same = temp return same + diff
# -*- coding: utf-8 -*- """ Created on Fri Aug 24 09:07:47 2018 @author: Lützenkirchen, Heberling, Jara This module contains functions that are supossed to be used in one or more classes in order to remove redundancy. """
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('..')) # sys.setrecursionlimit(1500) # import pdoc # from typing import Sequence # # # def _flatten_submodules(modules: Sequence[pdoc.Module]): # for module in modules: # yield module # for submodule in module.submodules(): # yield from _flatten_submodules((submodule,)) # # # context = pdoc.Context() # module = pdoc.Module('kvirt', context=context) # modules = list(_flatten_submodules([module])) # # with open('docs/index.md', 'a+') as d: # d.write(pdoc._render_template('/pdf.mako', modules=modules)) # -- Project information ----------------------------------------------------- project = 'Kcli' copyright = '2020, karmab' author = 'karmab' # The full version, including alpha/beta/rc tags release = '99.0' master_doc = 'index' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. # extensions = ['autoapi.extension'] # extensions = ['sphinx.ext.autodoc', 'autoapi.extension', 'sphinx_rtd_theme', 'sphinx.ext.napoleon'] # extensions = ['autoapi.extension', 'sphinx_rtd_theme', 'sphinx.ext.napoleon'] extensions = ['sphinx_rtd_theme', 'sphinx.ext.napoleon'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static']
""" Book: Hands-On MQTT Programming with Python Author: Gaston C. Hillar - Twitter.com/gastonhillar Publisher: Packt Publishing Ltd. - http://www.packtpub.com """ SURFBOARD_STATUS_IDLE = 0 SURFBOARD_STATUS_PADDLING = 1 SURFBOARD_STATUS_RIDING = 2 SURFBOARD_STATUS_RIDE_FINISHED = 3 SURFBOARD_STATUS_WIPED_OUT = 4 SURFBOARD_STATUS_DICTIONARY = { SURFBOARD_STATUS_IDLE: 'Idle', SURFBOARD_STATUS_PADDLING: 'Paddling', SURFBOARD_STATUS_RIDING: 'Riding', SURFBOARD_STATUS_RIDE_FINISHED: 'Ride finished', SURFBOARD_STATUS_WIPED_OUT: 'Wiped out', }
def parsinator(x): s=dict() for i in range(0,len(x)): for j in range(0,len(x[i])): if x[i][j]=='#': s[j,i,0,0]=True return (s,0,0,0,0,len(x)-1,len(x[i])-1,0,0) banana = [(a,b,c,d) for a in [-1,0,1] for b in [-1,0,1] for c in [-1,0,1] for d in [-1,0,1] if (a,b,c,d)!=(0,0,0,0)] def count(s,x,y,z,w): #nb = [(a+x,b+y,c+z,d+w) for a in [-1,0,1] for b in [-1,0,1] for c in [-1,0,1] for d in [-1,0,1] if (a,b,c,d)!=(0,0,0,0) and (a+x,b+y,c+z,d+w) in s ] nb = [(t[0]+x,t[1]+y,t[2]+z,t[3]+w) for t in banana if (t[0]+x,t[1]+y,t[2]+z,t[3]+w) in s ] return len(nb) def check(s,x,y,z,w): c = count(s,x,y,z,w) if c==3: return True if c==2 and (x,y,z,w) in s: return True return False def sim(space): (s,minx,miny,minz,minw,maxx,maxy,maxz,maxw) = space ns = {(x,y,z,w):True for x in range(minx-1,maxx+2) for y in range(miny-1,maxy+2) for z in range(minz-1,maxz+2) for w in range(minw-1,maxw+2) if (check(s,x,y,z,w))} for (x,y,z,w) in ns: if x<minx: minx=x if x>maxx: maxx=x if y<miny: miny=y if y>maxy: maxy=y if z<minz: minz=z if z>maxz: maxz=z if w<minw: minw=w if w>maxw: maxw=w return (ns,minx,miny,minz,minw,maxx,maxy,maxz,maxw) def draw(space): return (s,minx,miny,minz,minw,maxx,maxy,maxz,maxw) = space for w in range(minw,maxw+1): for z in range(minz,maxz+1): for y in range(miny,maxy+1): for x in range(minx, maxx+1): if (x,y,z) in s: print("#",end=''); else: print(".",end=''); print("") print("") print("") inshort=[".#.","..#","###"] #inshort=["...","###","..."] inlong = [".##.####",".#.....#", "#.###.##", "#####.##", "#...##.#", "#######.", "##.#####",".##...#."] space=parsinator(inlong) for i in range(0,6): space=sim(space) draw(space) print(len(space[0]))
grafo3 = [{ "a": [ { "aresta": "ac", "incidencia": 1 }, { "aresta": "ad", "incidencia": 1 }, { "aresta": "af", "incidencia": 1 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "b": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 1 }, { "aresta": "be", "incidencia": 1 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "c": [ { "aresta": "ac", "incidencia": 1 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 1 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], }, { "d": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 1 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 1 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 1 }, { "aresta": "df", "incidencia": 1 }], }, { "e": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 1 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 1 }, { "aresta": "df", "incidencia": 0 }], }, { "f": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 1 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 1 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 1 }], }, { "g": [ { "aresta": "ac", "incidencia": 0 }, { "aresta": "ad", "incidencia": 0 }, { "aresta": "af", "incidencia": 0 }, { "aresta": "bd", "incidencia": 0 }, { "aresta": "be", "incidencia": 0 }, { "aresta": "cf", "incidencia": 0 }, { "aresta": "de", "incidencia": 0 }, { "aresta": "df", "incidencia": 0 }], },] for i in range(len(grafo3)): print(grafo3[i])
#!/bin/python def insertNewElement(ar, pos): e = ar[pos] idx = pos - 1 while idx >=0 and ar[idx] > e: ar[idx+1] = ar[idx] idx -= 1 ar[idx+1] = e def insertionSort(ar): if len(ar) <= 1: return for pos in range(1, len(ar)): insertNewElement(ar, pos) print(' '.join(str(v) for v in ar)) m = input() ar = [int(i) for i in raw_input().strip().split()] insertionSort(ar)
Sys_User_Name = "EthanWayne" Sys_Password = "123456" User_Name = input("Please enter your name: ") User_Password = input("Please enter your password: ") if User_Name != Sys_User_Name and User_Password == Sys_Password: print("Wrong user name...") elif User_Name == Sys_User_Name and User_Password != Sys_Password: print("Wrong password...") elif User_Name != Sys_User_Name and User_Password != Sys_Password: print("Wrong user name and password!") else: print("Login successfulS")
def to_method(view, **base_kwargs): """Convert view function to instance method """ def _view(self, request, *args, **kwargs): _kwargs = base_kwargs.copy() _kwargs.update(kwargs) return view(request, *args, **_kwargs) return _view
while True: valor = int(input("Valor (de 120 à 1001):")) if valor>=120 and valor<1002: break qtd=0 while valor>2: valor=valor/2 qtd+=1 print(qtd)
""" T: O(N) S: O(N) Walk down the tree and calculate all created binary numbers. Calculating the next number is as simple as shifting previous left(multiplying by two) and adding additional digit to the end using OR. """ class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def sumRootToLeaf(self, root: TreeNode) -> int: self.result = 0 self.process_all_paths(root, 0) return self.result def process_all_paths(self, node: TreeNode, total: int) -> None: if node: total <<= 1 total |= node.val if not node.right and not node.left: self.result += total else: self.process_all_paths(node.left, total) self.process_all_paths(node.right, total)
# # PySNMP MIB module IP-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/IP-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:17:37 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( OctetString, Integer, ObjectIdentifier, ) = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion") ( InterfaceIndex, ) = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") ( InetAddress, InetVersion, InetAddressPrefixLength, InetZoneIndex, InetAddressType, ) = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetVersion", "InetAddressPrefixLength", "InetZoneIndex", "InetAddressType") ( NotificationGroup, ObjectGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ( MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, ModuleIdentity, TimeTicks, Counter64, NotificationType, Integer32, Unsigned32, ObjectIdentity, Gauge32, zeroDotZero, iso, MibIdentifier, Bits, mib_2, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "ModuleIdentity", "TimeTicks", "Counter64", "NotificationType", "Integer32", "Unsigned32", "ObjectIdentity", "Gauge32", "zeroDotZero", "iso", "MibIdentifier", "Bits", "mib-2", "Counter32") ( DisplayString, TextualConvention, StorageType, RowStatus, PhysAddress, TimeStamp, TestAndIncr, TruthValue, RowPointer, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "StorageType", "RowStatus", "PhysAddress", "TimeStamp", "TestAndIncr", "TruthValue", "RowPointer") ipMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 48)).setRevisions(("2006-02-02 00:00", "1994-11-01 00:00", "1991-03-31 00:00",)) if mibBuilder.loadTexts: ipMIB.setLastUpdated('200602020000Z') if mibBuilder.loadTexts: ipMIB.setOrganization('IETF IPv6 MIB Revision Team') if mibBuilder.loadTexts: ipMIB.setContactInfo('Editor:\n\n\n Shawn A. Routhier\n Interworking Labs\n 108 Whispering Pines Dr. Suite 235\n Scotts Valley, CA 95066\n USA\n EMail: <[email protected]>') if mibBuilder.loadTexts: ipMIB.setDescription('The MIB module for managing IP and ICMP implementations, but\n excluding their management of IP routes.\n\n Copyright (C) The Internet Society (2006). This version of\n this MIB module is part of RFC 4293; see the RFC itself for\n full legal notices.') class IpAddressOriginTC(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6,)) namedValues = NamedValues(("other", 1), ("manual", 2), ("dhcp", 4), ("linklayer", 5), ("random", 6),) class IpAddressStatusTC(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,)) namedValues = NamedValues(("preferred", 1), ("deprecated", 2), ("invalid", 3), ("inaccessible", 4), ("unknown", 5), ("tentative", 6), ("duplicate", 7), ("optimistic", 8),) class IpAddressPrefixOriginTC(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5,)) namedValues = NamedValues(("other", 1), ("manual", 2), ("wellknown", 3), ("dhcp", 4), ("routeradv", 5),) class Ipv6AddressIfIdentifierTC(OctetString, TextualConvention): displayHint = '2x:' subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(0,8) ip = MibIdentifier((1, 3, 6, 1, 2, 1, 4)) ipForwarding = MibScalar((1, 3, 6, 1, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("forwarding", 1), ("notForwarding", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipForwarding.setDescription('The indication of whether this entity is acting as an IPv4\n router in respect to the forwarding of datagrams received\n by, but not addressed to, this entity. IPv4 routers forward\n datagrams. IPv4 hosts do not (except those source-routed\n via the host).\n\n When this object is written, the entity should save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.\n Note: a stronger requirement is not used because this object\n was previously defined.') ipDefaultTTL = MibScalar((1, 3, 6, 1, 2, 1, 4, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipDefaultTTL.setDescription('The default value inserted into the Time-To-Live field of\n the IPv4 header of datagrams originated at this entity,\n whenever a TTL value is not supplied by the transport layer\n\n\n protocol.\n\n When this object is written, the entity should save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.\n Note: a stronger requirement is not used because this object\n was previously defined.') ipReasmTimeout = MibScalar((1, 3, 6, 1, 2, 1, 4, 13), Integer32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmTimeout.setDescription('The maximum number of seconds that received fragments are\n held while they are awaiting reassembly at this entity.') ipv6IpForwarding = MibScalar((1, 3, 6, 1, 2, 1, 4, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("forwarding", 1), ("notForwarding", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv6IpForwarding.setDescription('The indication of whether this entity is acting as an IPv6\n router on any interface in respect to the forwarding of\n datagrams received by, but not addressed to, this entity.\n IPv6 routers forward datagrams. IPv6 hosts do not (except\n those source-routed via the host).\n\n When this object is written, the entity SHOULD save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.') ipv6IpDefaultHopLimit = MibScalar((1, 3, 6, 1, 2, 1, 4, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv6IpDefaultHopLimit.setDescription('The default value inserted into the Hop Limit field of the\n IPv6 header of datagrams originated at this entity whenever\n a Hop Limit value is not supplied by the transport layer\n protocol.\n\n When this object is written, the entity SHOULD save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.') ipv4InterfaceTableLastChange = MibScalar((1, 3, 6, 1, 2, 1, 4, 27), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv4InterfaceTableLastChange.setDescription('The value of sysUpTime on the most recent occasion at which\n a row in the ipv4InterfaceTable was added or deleted, or\n when an ipv4InterfaceReasmMaxSize or an\n ipv4InterfaceEnableStatus object was modified.\n\n If new objects are added to the ipv4InterfaceTable that\n require the ipv4InterfaceTableLastChange to be updated when\n they are modified, they must specify that requirement in\n their description clause.') ipv4InterfaceTable = MibTable((1, 3, 6, 1, 2, 1, 4, 28), ) if mibBuilder.loadTexts: ipv4InterfaceTable.setDescription('The table containing per-interface IPv4-specific\n information.') ipv4InterfaceEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 28, 1), ).setIndexNames((0, "IP-MIB", "ipv4InterfaceIfIndex")) if mibBuilder.loadTexts: ipv4InterfaceEntry.setDescription('An entry containing IPv4-specific information for a specific\n interface.') ipv4InterfaceIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 28, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipv4InterfaceIfIndex.setDescription("The index value that uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipv4InterfaceReasmMaxSize = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 28, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv4InterfaceReasmMaxSize.setDescription('The size of the largest IPv4 datagram that this entity can\n re-assemble from incoming IPv4 fragmented datagrams received\n on this interface.') ipv4InterfaceEnableStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 28, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("up", 1), ("down", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv4InterfaceEnableStatus.setDescription('The indication of whether IPv4 is enabled (up) or disabled\n (down) on this interface. This object does not affect the\n state of the interface itself, only its connection to an\n IPv4 stack. The IF-MIB should be used to control the state\n of the interface.') ipv4InterfaceRetransmitTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 28, 1, 4), Unsigned32().clone(1000)).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipv4InterfaceRetransmitTime.setDescription('The time between retransmissions of ARP requests to a\n neighbor when resolving the address or when probing the\n reachability of a neighbor.') ipv6InterfaceTableLastChange = MibScalar((1, 3, 6, 1, 2, 1, 4, 29), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6InterfaceTableLastChange.setDescription('The value of sysUpTime on the most recent occasion at which\n a row in the ipv6InterfaceTable was added or deleted or when\n an ipv6InterfaceReasmMaxSize, ipv6InterfaceIdentifier,\n ipv6InterfaceEnableStatus, ipv6InterfaceReachableTime,\n ipv6InterfaceRetransmitTime, or ipv6InterfaceForwarding\n object was modified.\n\n If new objects are added to the ipv6InterfaceTable that\n require the ipv6InterfaceTableLastChange to be updated when\n they are modified, they must specify that requirement in\n their description clause.') ipv6InterfaceTable = MibTable((1, 3, 6, 1, 2, 1, 4, 30), ) if mibBuilder.loadTexts: ipv6InterfaceTable.setDescription('The table containing per-interface IPv6-specific\n information.') ipv6InterfaceEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 30, 1), ).setIndexNames((0, "IP-MIB", "ipv6InterfaceIfIndex")) if mibBuilder.loadTexts: ipv6InterfaceEntry.setDescription('An entry containing IPv6-specific information for a given\n interface.') ipv6InterfaceIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipv6InterfaceIfIndex.setDescription("The index value that uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipv6InterfaceReasmMaxSize = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1500,65535))).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6InterfaceReasmMaxSize.setDescription('The size of the largest IPv6 datagram that this entity can\n re-assemble from incoming IPv6 fragmented datagrams received\n on this interface.') ipv6InterfaceIdentifier = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 3), Ipv6AddressIfIdentifierTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6InterfaceIdentifier.setDescription('The Interface Identifier for this interface. The Interface\n Identifier is combined with an address prefix to form an\n interface address.\n\n By default, the Interface Identifier is auto-configured\n according to the rules of the link type to which this\n interface is attached.\n\n\n A zero length identifier may be used where appropriate. One\n possible example is a loopback interface.') ipv6InterfaceEnableStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("up", 1), ("down", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv6InterfaceEnableStatus.setDescription('The indication of whether IPv6 is enabled (up) or disabled\n (down) on this interface. This object does not affect the\n state of the interface itself, only its connection to an\n IPv6 stack. The IF-MIB should be used to control the state\n of the interface.\n\n When this object is written, the entity SHOULD save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.') ipv6InterfaceReachableTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 6), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6InterfaceReachableTime.setDescription('The time a neighbor is considered reachable after receiving\n a reachability confirmation.') ipv6InterfaceRetransmitTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 7), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6InterfaceRetransmitTime.setDescription('The time between retransmissions of Neighbor Solicitation\n messages to a neighbor when resolving the address or when\n probing the reachability of a neighbor.') ipv6InterfaceForwarding = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 30, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("forwarding", 1), ("notForwarding", 2),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv6InterfaceForwarding.setDescription('The indication of whether this entity is acting as an IPv6\n router on this interface with respect to the forwarding of\n datagrams received by, but not addressed to, this entity.\n IPv6 routers forward datagrams. IPv6 hosts do not (except\n those source-routed via the host).\n\n This object is constrained by ipv6IpForwarding and is\n ignored if ipv6IpForwarding is set to notForwarding. Those\n systems that do not provide per-interface control of the\n forwarding function should set this object to forwarding for\n all interfaces and allow the ipv6IpForwarding object to\n control the forwarding capability.\n\n When this object is written, the entity SHOULD save the\n change to non-volatile storage and restore the object from\n non-volatile storage upon re-initialization of the system.') ipTrafficStats = MibIdentifier((1, 3, 6, 1, 2, 1, 4, 31)) ipSystemStatsTable = MibTable((1, 3, 6, 1, 2, 1, 4, 31, 1), ) if mibBuilder.loadTexts: ipSystemStatsTable.setDescription('The table containing system wide, IP version specific\n traffic statistics. This table and the ipIfStatsTable\n contain similar objects whose difference is in their\n granularity. Where this table contains system wide traffic\n statistics, the ipIfStatsTable contains the same statistics\n but counted on a per-interface basis.') ipSystemStatsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 31, 1, 1), ).setIndexNames((0, "IP-MIB", "ipSystemStatsIPVersion")) if mibBuilder.loadTexts: ipSystemStatsEntry.setDescription('A statistics entry containing system-wide objects for a\n particular IP version.') ipSystemStatsIPVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 1), InetVersion()) if mibBuilder.loadTexts: ipSystemStatsIPVersion.setDescription('The IP version of this row.') ipSystemStatsInReceives = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInReceives.setDescription('The total number of input IP datagrams received, including\n those received in error.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInReceives = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInReceives.setDescription('The total number of input IP datagrams received, including\n those received in error. This object counts the same\n datagrams as ipSystemStatsInReceives, but allows for larger\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInOctets.setDescription('The total number of octets received in input IP datagrams,\n including those received in error. Octets from datagrams\n counted in ipSystemStatsInReceives MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInOctets.setDescription('The total number of octets received in input IP datagrams,\n including those received in error. This object counts the\n same octets as ipSystemStatsInOctets, but allows for larger\n\n\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInHdrErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInHdrErrors.setDescription('The number of input IP datagrams discarded due to errors in\n their IP headers, including version number mismatch, other\n format errors, hop count exceeded, errors discovered in\n processing their IP options, etc.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInNoRoutes = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInNoRoutes.setDescription('The number of input IP datagrams discarded because no route\n could be found to transmit them to their destination.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInAddrErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInAddrErrors.setDescription("The number of input IP datagrams discarded because the IP\n address in their IP header's destination field was not a\n valid address to be received at this entity. This count\n includes invalid addresses (e.g., ::0). For entities\n that are not IP routers and therefore do not forward\n\n\n datagrams, this counter includes datagrams discarded\n because the destination address was not a local address.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.") ipSystemStatsInUnknownProtos = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInUnknownProtos.setDescription('The number of locally-addressed IP datagrams received\n successfully but discarded because of an unknown or\n unsupported protocol.\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInTruncatedPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInTruncatedPkts.setDescription("The number of input IP datagrams discarded because the\n datagram frame didn't carry enough data.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.") ipSystemStatsInForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInForwDatagrams.setDescription('The number of input datagrams for which this entity was not\n their final IP destination and for which this entity\n attempted to find a route to forward them to that final\n destination. In entities that do not act as IP routers,\n this counter will include only those datagrams that were\n Source-Routed via this entity, and the Source-Route\n processing was successful.\n\n When tracking interface statistics, the counter of the\n incoming interface is incremented for each datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInForwDatagrams.setDescription('The number of input datagrams for which this entity was not\n their final IP destination and for which this entity\n attempted to find a route to forward them to that final\n destination. This object counts the same packets as\n ipSystemStatsInForwDatagrams, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsReasmReqds = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsReasmReqds.setDescription('The number of IP fragments received that needed to be\n reassembled at this interface.\n\n When tracking interface statistics, the counter of the\n interface to which these fragments were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the fragments.\n\n Discontinuities in the value of this counter can occur at\n\n\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsReasmOKs = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsReasmOKs.setDescription('The number of IP datagrams successfully reassembled.\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsReasmFails = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsReasmFails.setDescription('The number of failures detected by the IP re-assembly\n algorithm (for whatever reason: timed out, errors, etc.).\n Note that this is not necessarily a count of discarded IP\n fragments since some algorithms (notably the algorithm in\n RFC 815) can lose track of the number of fragments by\n combining them as they are received.\n\n When tracking interface statistics, the counter of the\n interface to which these fragments were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the fragments.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInDiscards.setDescription('The number of input IP datagrams for which no problems were\n encountered to prevent their continued processing, but\n were discarded (e.g., for lack of buffer space). Note that\n this counter does not include any datagrams discarded while\n awaiting re-assembly.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInDelivers = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInDelivers.setDescription('The total number of datagrams successfully delivered to IP\n user-protocols (including ICMP).\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInDelivers = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInDelivers.setDescription('The total number of datagrams successfully delivered to IP\n user-protocols (including ICMP). This object counts the\n same packets as ipSystemStatsInDelivers, but allows for\n larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutRequests.setDescription('The total number of IP datagrams that local IP user-\n protocols (including ICMP) supplied to IP in requests for\n transmission. Note that this counter does not include any\n datagrams counted in ipSystemStatsOutForwDatagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutRequests.setDescription('The total number of IP datagrams that local IP user-\n protocols (including ICMP) supplied to IP in requests for\n transmission. This object counts the same packets as\n ipSystemStatsOutRequests, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutNoRoutes = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutNoRoutes.setDescription('The number of locally generated IP datagrams discarded\n because no route could be found to transmit them to their\n destination.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutForwDatagrams.setDescription('The number of datagrams for which this entity was not their\n final IP destination and for which it was successful in\n finding a path to their final destination. In entities\n that do not act as IP routers, this counter will include\n only those datagrams that were Source-Routed via this\n entity, and the Source-Route processing was successful.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n forwarded datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutForwDatagrams.setDescription('The number of datagrams for which this entity was not their\n final IP destination and for which it was successful in\n finding a path to their final destination. This object\n counts the same packets as ipSystemStatsOutForwDatagrams,\n but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutDiscards.setDescription('The number of output IP datagrams for which no problem was\n encountered to prevent their transmission to their\n destination, but were discarded (e.g., for lack of\n buffer space). Note that this counter would include\n\n\n datagrams counted in ipSystemStatsOutForwDatagrams if any\n such datagrams met this (discretionary) discard criterion.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutFragReqds = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutFragReqds.setDescription('The number of IP datagrams that would require fragmentation\n in order to be transmitted.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutFragOKs = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutFragOKs.setDescription('The number of IP datagrams that have been successfully\n fragmented.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutFragFails = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutFragFails.setDescription('The number of IP datagrams that have been discarded because\n they needed to be fragmented but could not be. This\n includes IPv4 packets that have the DF bit set and IPv6\n packets that are being forwarded and exceed the outgoing\n link MTU.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for an unsuccessfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutFragCreates = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutFragCreates.setDescription('The number of output datagram fragments that have been\n generated as a result of IP fragmentation.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutTransmits = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutTransmits.setDescription('The total number of IP datagrams that this entity supplied\n to the lower layers for transmission. This includes\n datagrams generated locally and those forwarded by this\n entity.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n\n\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutTransmits = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutTransmits.setDescription('The total number of IP datagrams that this entity supplied\n to the lower layers for transmission. This object counts\n the same datagrams as ipSystemStatsOutTransmits, but allows\n for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutOctets.setDescription('The total number of octets in IP datagrams delivered to the\n lower layers for transmission. Octets from datagrams\n counted in ipSystemStatsOutTransmits MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutOctets.setDescription('The total number of octets in IP datagrams delivered to the\n lower layers for transmission. This objects counts the same\n octets as ipSystemStatsOutOctets, but allows for larger\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n\n\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInMcastPkts.setDescription('The number of IP multicast datagrams received.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInMcastPkts.setDescription('The number of IP multicast datagrams received. This object\n counts the same datagrams as ipSystemStatsInMcastPkts but\n allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInMcastOctets.setDescription('The total number of octets received in IP multicast\n datagrams. Octets from datagrams counted in\n ipSystemStatsInMcastPkts MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInMcastOctets.setDescription('The total number of octets received in IP multicast\n datagrams. This object counts the same octets as\n ipSystemStatsInMcastOctets, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutMcastPkts.setDescription('The number of IP multicast datagrams transmitted.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutMcastPkts.setDescription('The number of IP multicast datagrams transmitted. This\n object counts the same datagrams as\n ipSystemStatsOutMcastPkts, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutMcastOctets.setDescription('The total number of octets transmitted in IP multicast\n datagrams. Octets from datagrams counted in\n\n\n ipSystemStatsOutMcastPkts MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 41), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutMcastOctets.setDescription('The total number of octets transmitted in IP multicast\n datagrams. This object counts the same octets as\n ipSystemStatsOutMcastOctets, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsInBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsInBcastPkts.setDescription('The number of IP broadcast datagrams received.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCInBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 43), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCInBcastPkts.setDescription('The number of IP broadcast datagrams received. This object\n counts the same datagrams as ipSystemStatsInBcastPkts but\n allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n\n\n ipSystemStatsDiscontinuityTime.') ipSystemStatsOutBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsOutBcastPkts.setDescription('The number of IP broadcast datagrams transmitted.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsHCOutBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 45), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsHCOutBcastPkts.setDescription('The number of IP broadcast datagrams transmitted. This\n object counts the same datagrams as\n ipSystemStatsOutBcastPkts, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipSystemStatsDiscontinuityTime.') ipSystemStatsDiscontinuityTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 46), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsDiscontinuityTime.setDescription("The value of sysUpTime on the most recent occasion at which\n any one or more of this entry's counters suffered a\n discontinuity.\n\n If no such discontinuities have occurred since the last re-\n initialization of the local management subsystem, then this\n object contains a zero value.") ipSystemStatsRefreshRate = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 1, 1, 47), Unsigned32()).setUnits('milli-seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipSystemStatsRefreshRate.setDescription('The minimum reasonable polling interval for this entry.\n This object provides an indication of the minimum amount of\n time required to update the counters in this entry.') ipIfStatsTableLastChange = MibScalar((1, 3, 6, 1, 2, 1, 4, 31, 2), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsTableLastChange.setDescription('The value of sysUpTime on the most recent occasion at which\n a row in the ipIfStatsTable was added or deleted.\n\n If new objects are added to the ipIfStatsTable that require\n the ipIfStatsTableLastChange to be updated when they are\n modified, they must specify that requirement in their\n description clause.') ipIfStatsTable = MibTable((1, 3, 6, 1, 2, 1, 4, 31, 3), ) if mibBuilder.loadTexts: ipIfStatsTable.setDescription('The table containing per-interface traffic statistics. This\n table and the ipSystemStatsTable contain similar objects\n whose difference is in their granularity. Where this table\n contains per-interface statistics, the ipSystemStatsTable\n contains the same statistics, but counted on a system wide\n basis.') ipIfStatsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 31, 3, 1), ).setIndexNames((0, "IP-MIB", "ipIfStatsIPVersion"), (0, "IP-MIB", "ipIfStatsIfIndex")) if mibBuilder.loadTexts: ipIfStatsEntry.setDescription('An interface statistics entry containing objects for a\n particular interface and version of IP.') ipIfStatsIPVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 1), InetVersion()) if mibBuilder.loadTexts: ipIfStatsIPVersion.setDescription('The IP version of this row.') ipIfStatsIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 2), InterfaceIndex()) if mibBuilder.loadTexts: ipIfStatsIfIndex.setDescription("The index value that uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipIfStatsInReceives = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInReceives.setDescription('The total number of input IP datagrams received, including\n those received in error.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInReceives = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInReceives.setDescription('The total number of input IP datagrams received, including\n those received in error. This object counts the same\n datagrams as ipIfStatsInReceives, but allows for larger\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInOctets.setDescription('The total number of octets received in input IP datagrams,\n including those received in error. Octets from datagrams\n counted in ipIfStatsInReceives MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInOctets.setDescription('The total number of octets received in input IP datagrams,\n including those received in error. This object counts the\n same octets as ipIfStatsInOctets, but allows for larger\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInHdrErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInHdrErrors.setDescription('The number of input IP datagrams discarded due to errors in\n their IP headers, including version number mismatch, other\n format errors, hop count exceeded, errors discovered in\n processing their IP options, etc.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInNoRoutes = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInNoRoutes.setDescription('The number of input IP datagrams discarded because no route\n could be found to transmit them to their destination.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInAddrErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInAddrErrors.setDescription("The number of input IP datagrams discarded because the IP\n address in their IP header's destination field was not a\n valid address to be received at this entity. This count\n includes invalid addresses (e.g., ::0). For entities that\n are not IP routers and therefore do not forward datagrams,\n this counter includes datagrams discarded because the\n destination address was not a local address.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.") ipIfStatsInUnknownProtos = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInUnknownProtos.setDescription('The number of locally-addressed IP datagrams received\n successfully but discarded because of an unknown or\n unsupported protocol.\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n\n\n ipIfStatsDiscontinuityTime.') ipIfStatsInTruncatedPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInTruncatedPkts.setDescription("The number of input IP datagrams discarded because the\n datagram frame didn't carry enough data.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.") ipIfStatsInForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInForwDatagrams.setDescription('The number of input datagrams for which this entity was not\n their final IP destination and for which this entity\n attempted to find a route to forward them to that final\n destination. In entities that do not act as IP routers,\n this counter will include only those datagrams that were\n Source-Routed via this entity, and the Source-Route\n processing was successful.\n\n When tracking interface statistics, the counter of the\n incoming interface is incremented for each datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInForwDatagrams.setDescription('The number of input datagrams for which this entity was not\n their final IP destination and for which this entity\n attempted to find a route to forward them to that final\n destination. This object counts the same packets as\n\n\n ipIfStatsInForwDatagrams, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsReasmReqds = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsReasmReqds.setDescription('The number of IP fragments received that needed to be\n reassembled at this interface.\n\n When tracking interface statistics, the counter of the\n interface to which these fragments were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the fragments.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsReasmOKs = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsReasmOKs.setDescription('The number of IP datagrams successfully reassembled.\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsReasmFails = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsReasmFails.setDescription('The number of failures detected by the IP re-assembly\n algorithm (for whatever reason: timed out, errors, etc.).\n Note that this is not necessarily a count of discarded IP\n fragments since some algorithms (notably the algorithm in\n RFC 815) can lose track of the number of fragments by\n combining them as they are received.\n\n When tracking interface statistics, the counter of the\n interface to which these fragments were addressed is\n incremented. This interface might not be the same as the\n input interface for some of the fragments.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInDiscards.setDescription('The number of input IP datagrams for which no problems were\n encountered to prevent their continued processing, but\n were discarded (e.g., for lack of buffer space). Note that\n this counter does not include any datagrams discarded while\n awaiting re-assembly.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInDelivers = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInDelivers.setDescription('The total number of datagrams successfully delivered to IP\n user-protocols (including ICMP).\n\n When tracking interface statistics, the counter of the\n interface to which these datagrams were addressed is\n incremented. This interface might not be the same as the\n\n\n input interface for some of the datagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInDelivers = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInDelivers.setDescription('The total number of datagrams successfully delivered to IP\n user-protocols (including ICMP). This object counts the\n same packets as ipIfStatsInDelivers, but allows for larger\n values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutRequests.setDescription('The total number of IP datagrams that local IP user-\n protocols (including ICMP) supplied to IP in requests for\n transmission. Note that this counter does not include any\n datagrams counted in ipIfStatsOutForwDatagrams.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutRequests.setDescription('The total number of IP datagrams that local IP user-\n protocols (including ICMP) supplied to IP in requests for\n transmission. This object counts the same packets as\n\n\n ipIfStatsOutRequests, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutForwDatagrams.setDescription('The number of datagrams for which this entity was not their\n final IP destination and for which it was successful in\n finding a path to their final destination. In entities\n that do not act as IP routers, this counter will include\n only those datagrams that were Source-Routed via this\n entity, and the Source-Route processing was successful.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n forwarded datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutForwDatagrams = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutForwDatagrams.setDescription('The number of datagrams for which this entity was not their\n final IP destination and for which it was successful in\n finding a path to their final destination. This object\n counts the same packets as ipIfStatsOutForwDatagrams, but\n allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n\n\n ipIfStatsDiscontinuityTime.') ipIfStatsOutDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutDiscards.setDescription('The number of output IP datagrams for which no problem was\n encountered to prevent their transmission to their\n destination, but were discarded (e.g., for lack of\n buffer space). Note that this counter would include\n datagrams counted in ipIfStatsOutForwDatagrams if any such\n datagrams met this (discretionary) discard criterion.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutFragReqds = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutFragReqds.setDescription('The number of IP datagrams that would require fragmentation\n in order to be transmitted.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutFragOKs = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutFragOKs.setDescription('The number of IP datagrams that have been successfully\n fragmented.\n\n When tracking interface statistics, the counter of the\n\n\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutFragFails = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutFragFails.setDescription('The number of IP datagrams that have been discarded because\n they needed to be fragmented but could not be. This\n includes IPv4 packets that have the DF bit set and IPv6\n packets that are being forwarded and exceed the outgoing\n link MTU.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for an unsuccessfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutFragCreates = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutFragCreates.setDescription('The number of output datagram fragments that have been\n generated as a result of IP fragmentation.\n\n When tracking interface statistics, the counter of the\n outgoing interface is incremented for a successfully\n fragmented datagram.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutTransmits = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutTransmits.setDescription('The total number of IP datagrams that this entity supplied\n to the lower layers for transmission. This includes\n datagrams generated locally and those forwarded by this\n entity.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutTransmits = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutTransmits.setDescription('The total number of IP datagrams that this entity supplied\n to the lower layers for transmission. This object counts\n the same datagrams as ipIfStatsOutTransmits, but allows for\n larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutOctets.setDescription('The total number of octets in IP datagrams delivered to the\n lower layers for transmission. Octets from datagrams\n counted in ipIfStatsOutTransmits MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutOctets.setDescription('The total number of octets in IP datagrams delivered to the\n lower layers for transmission. This objects counts the same\n octets as ipIfStatsOutOctets, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInMcastPkts.setDescription('The number of IP multicast datagrams received.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInMcastPkts.setDescription('The number of IP multicast datagrams received. This object\n counts the same datagrams as ipIfStatsInMcastPkts, but\n allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInMcastOctets.setDescription('The total number of octets received in IP multicast\n\n\n datagrams. Octets from datagrams counted in\n ipIfStatsInMcastPkts MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInMcastOctets.setDescription('The total number of octets received in IP multicast\n datagrams. This object counts the same octets as\n ipIfStatsInMcastOctets, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutMcastPkts.setDescription('The number of IP multicast datagrams transmitted.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutMcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutMcastPkts.setDescription('The number of IP multicast datagrams transmitted. This\n object counts the same datagrams as ipIfStatsOutMcastPkts,\n but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n\n\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutMcastOctets.setDescription('The total number of octets transmitted in IP multicast\n datagrams. Octets from datagrams counted in\n ipIfStatsOutMcastPkts MUST be counted here.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutMcastOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 41), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutMcastOctets.setDescription('The total number of octets transmitted in IP multicast\n datagrams. This object counts the same octets as\n ipIfStatsOutMcastOctets, but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsInBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsInBcastPkts.setDescription('The number of IP broadcast datagrams received.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCInBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 43), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCInBcastPkts.setDescription('The number of IP broadcast datagrams received. This object\n counts the same datagrams as ipIfStatsInBcastPkts, but\n allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsOutBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsOutBcastPkts.setDescription('The number of IP broadcast datagrams transmitted.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsHCOutBcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 45), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsHCOutBcastPkts.setDescription('The number of IP broadcast datagrams transmitted. This\n object counts the same datagrams as ipIfStatsOutBcastPkts,\n but allows for larger values.\n\n Discontinuities in the value of this counter can occur at\n re-initialization of the management system, and at other\n times as indicated by the value of\n ipIfStatsDiscontinuityTime.') ipIfStatsDiscontinuityTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 46), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsDiscontinuityTime.setDescription("The value of sysUpTime on the most recent occasion at which\n\n\n any one or more of this entry's counters suffered a\n discontinuity.\n\n If no such discontinuities have occurred since the last re-\n initialization of the local management subsystem, then this\n object contains a zero value.") ipIfStatsRefreshRate = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 31, 3, 1, 47), Unsigned32()).setUnits('milli-seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipIfStatsRefreshRate.setDescription('The minimum reasonable polling interval for this entry.\n This object provides an indication of the minimum amount of\n time required to update the counters in this entry.') ipAddressPrefixTable = MibTable((1, 3, 6, 1, 2, 1, 4, 32), ) if mibBuilder.loadTexts: ipAddressPrefixTable.setDescription("This table allows the user to determine the source of an IP\n address or set of IP addresses, and allows other tables to\n share the information via pointer rather than by copying.\n\n For example, when the node configures both a unicast and\n anycast address for a prefix, the ipAddressPrefix objects\n for those addresses will point to a single row in this\n table.\n\n This table primarily provides support for IPv6 prefixes, and\n several of the objects are less meaningful for IPv4. The\n table continues to allow IPv4 addresses to allow future\n flexibility. In order to promote a common configuration,\n this document includes suggestions for default values for\n IPv4 prefixes. Each of these values may be overridden if an\n object is meaningful to the node.\n\n All prefixes used by this entity should be included in this\n table independent of how the entity learned the prefix.\n (This table isn't limited to prefixes learned from router\n\n\n advertisements.)") ipAddressPrefixEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 32, 1), ).setIndexNames((0, "IP-MIB", "ipAddressPrefixIfIndex"), (0, "IP-MIB", "ipAddressPrefixType"), (0, "IP-MIB", "ipAddressPrefixPrefix"), (0, "IP-MIB", "ipAddressPrefixLength")) if mibBuilder.loadTexts: ipAddressPrefixEntry.setDescription('An entry in the ipAddressPrefixTable.') ipAddressPrefixIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipAddressPrefixIfIndex.setDescription("The index value that uniquely identifies the interface on\n which this prefix is configured. The interface identified\n by a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipAddressPrefixType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 2), InetAddressType()) if mibBuilder.loadTexts: ipAddressPrefixType.setDescription('The address type of ipAddressPrefix.') ipAddressPrefixPrefix = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 3), InetAddress()) if mibBuilder.loadTexts: ipAddressPrefixPrefix.setDescription('The address prefix. The address type of this object is\n specified in ipAddressPrefixType. The length of this object\n is the standard length for objects of that type (4 or 16\n bytes). Any bits after ipAddressPrefixLength must be zero.\n\n Implementors need to be aware that, if the size of\n ipAddressPrefixPrefix exceeds 114 octets, then OIDS of\n instances of columns in this row will have more than 128\n sub-identifiers and cannot be accessed using SNMPv1,\n SNMPv2c, or SNMPv3.') ipAddressPrefixLength = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 4), InetAddressPrefixLength()) if mibBuilder.loadTexts: ipAddressPrefixLength.setDescription("The prefix length associated with this prefix.\n\n The value 0 has no special meaning for this object. It\n simply refers to address '::/0'.") ipAddressPrefixOrigin = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 5), IpAddressPrefixOriginTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefixOrigin.setDescription('The origin of this prefix.') ipAddressPrefixOnLinkFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefixOnLinkFlag.setDescription("This object has the value 'true(1)', if this prefix can be\n used for on-link determination; otherwise, the value is\n 'false(2)'.\n\n The default for IPv4 prefixes is 'true(1)'.") ipAddressPrefixAutonomousFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 7), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefixAutonomousFlag.setDescription("Autonomous address configuration flag. When true(1),\n indicates that this prefix can be used for autonomous\n address configuration (i.e., can be used to form a local\n interface address). If false(2), it is not used to auto-\n configure a local interface address.\n\n The default for IPv4 prefixes is 'false(2)'.") ipAddressPrefixAdvPreferredLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 8), Unsigned32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefixAdvPreferredLifetime.setDescription('The remaining length of time, in seconds, that this prefix\n will continue to be preferred, i.e., time until deprecation.\n\n A value of 4,294,967,295 represents infinity.\n\n The address generated from a deprecated prefix should no\n longer be used as a source address in new communications,\n but packets received on such an interface are processed as\n expected.\n\n The default for IPv4 prefixes is 4,294,967,295 (infinity).') ipAddressPrefixAdvValidLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 32, 1, 9), Unsigned32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefixAdvValidLifetime.setDescription('The remaining length of time, in seconds, that this prefix\n will continue to be valid, i.e., time until invalidation. A\n value of 4,294,967,295 represents infinity.\n\n The address generated from an invalidated prefix should not\n appear as the destination or source address of a packet.\n\n\n The default for IPv4 prefixes is 4,294,967,295 (infinity).') ipAddressSpinLock = MibScalar((1, 3, 6, 1, 2, 1, 4, 33), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipAddressSpinLock.setDescription("An advisory lock used to allow cooperating SNMP managers to\n coordinate their use of the set operation in creating or\n modifying rows within this table.\n\n In order to use this lock to coordinate the use of set\n operations, managers should first retrieve\n ipAddressTableSpinLock. They should then determine the\n appropriate row to create or modify. Finally, they should\n issue the appropriate set command, including the retrieved\n value of ipAddressSpinLock. If another manager has altered\n the table in the meantime, then the value of\n ipAddressSpinLock will have changed, and the creation will\n fail as it will be specifying an incorrect value for\n ipAddressSpinLock. It is suggested, but not required, that\n the ipAddressSpinLock be the first var bind for each set of\n objects representing a 'row' in a PDU.") ipAddressTable = MibTable((1, 3, 6, 1, 2, 1, 4, 34), ) if mibBuilder.loadTexts: ipAddressTable.setDescription("This table contains addressing information relevant to the\n entity's interfaces.\n\n This table does not contain multicast address information.\n Tables for such information should be contained in multicast\n specific MIBs, such as RFC 3019.\n\n While this table is writable, the user will note that\n several objects, such as ipAddressOrigin, are not. The\n intention in allowing a user to write to this table is to\n allow them to add or remove any entry that isn't\n\n\n permanent. The user should be allowed to modify objects\n and entries when that would not cause inconsistencies\n within the table. Allowing write access to objects, such\n as ipAddressOrigin, could allow a user to insert an entry\n and then label it incorrectly.\n\n Note well: When including IPv6 link-local addresses in this\n table, the entry must use an InetAddressType of 'ipv6z' in\n order to differentiate between the possible interfaces.") ipAddressEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 34, 1), ).setIndexNames((0, "IP-MIB", "ipAddressAddrType"), (0, "IP-MIB", "ipAddressAddr")) if mibBuilder.loadTexts: ipAddressEntry.setDescription('An address mapping for a particular interface.') ipAddressAddrType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 1), InetAddressType()) if mibBuilder.loadTexts: ipAddressAddrType.setDescription('The address type of ipAddressAddr.') ipAddressAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 2), InetAddress()) if mibBuilder.loadTexts: ipAddressAddr.setDescription("The IP address to which this entry's addressing information\n\n\n pertains. The address type of this object is specified in\n ipAddressAddrType.\n\n Implementors need to be aware that if the size of\n ipAddressAddr exceeds 116 octets, then OIDS of instances of\n columns in this row will have more than 128 sub-identifiers\n and cannot be accessed using SNMPv1, SNMPv2c, or SNMPv3.") ipAddressIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 3), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipAddressIfIndex.setDescription("The index value that uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("unicast", 1), ("anycast", 2), ("broadcast", 3),)).clone('unicast')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipAddressType.setDescription('The type of address. broadcast(3) is not a valid value for\n IPv6 addresses (RFC 3513).') ipAddressPrefix = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 5), RowPointer().clone((0, 0))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressPrefix.setDescription('A pointer to the row in the prefix table to which this\n address belongs. May be { 0 0 } if there is no such row.') ipAddressOrigin = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 6), IpAddressOriginTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressOrigin.setDescription('The origin of the address.') ipAddressStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 7), IpAddressStatusTC().clone('preferred')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipAddressStatus.setDescription('The status of the address, describing if the address can be\n used for communication.\n\n In the absence of other information, an IPv4 address is\n always preferred(1).') ipAddressCreated = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 8), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressCreated.setDescription('The value of sysUpTime at the time this entry was created.\n If this entry was created prior to the last re-\n initialization of the local network management subsystem,\n then this object contains a zero value.') ipAddressLastChanged = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 9), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAddressLastChanged.setDescription('The value of sysUpTime at the time this entry was last\n updated. If this entry was updated prior to the last re-\n initialization of the local network management subsystem,\n then this object contains a zero value.') ipAddressRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 10), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipAddressRowStatus.setDescription('The status of this conceptual row.\n\n The RowStatus TC requires that this DESCRIPTION clause\n states under which circumstances other objects in this row\n\n\n can be modified. The value of this object has no effect on\n whether other objects in this conceptual row can be\n modified.\n\n A conceptual row can not be made active until the\n ipAddressIfIndex has been set to a valid index.') ipAddressStorageType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 34, 1, 11), StorageType().clone('volatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipAddressStorageType.setDescription("The storage type for this conceptual row. If this object\n has a value of 'permanent', then no other objects are\n required to be able to be modified.") ipNetToPhysicalTable = MibTable((1, 3, 6, 1, 2, 1, 4, 35), ) if mibBuilder.loadTexts: ipNetToPhysicalTable.setDescription("The IP Address Translation table used for mapping from IP\n addresses to physical addresses.\n\n The Address Translation tables contain the IP address to\n 'physical' address equivalences. Some interfaces do not use\n translation tables for determining address equivalences\n (e.g., DDN-X.25 has an algorithmic method); if all\n interfaces are of this type, then the Address Translation\n table is empty, i.e., has zero entries.\n\n While many protocols may be used to populate this table, ARP\n and Neighbor Discovery are the most likely\n options.") ipNetToPhysicalEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 35, 1), ).setIndexNames((0, "IP-MIB", "ipNetToPhysicalIfIndex"), (0, "IP-MIB", "ipNetToPhysicalNetAddressType"), (0, "IP-MIB", "ipNetToPhysicalNetAddress")) if mibBuilder.loadTexts: ipNetToPhysicalEntry.setDescription("Each entry contains one IP address to `physical' address\n equivalence.") ipNetToPhysicalIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipNetToPhysicalIfIndex.setDescription("The index value that uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipNetToPhysicalNetAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 2), InetAddressType()) if mibBuilder.loadTexts: ipNetToPhysicalNetAddressType.setDescription('The type of ipNetToPhysicalNetAddress.') ipNetToPhysicalNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 3), InetAddress()) if mibBuilder.loadTexts: ipNetToPhysicalNetAddress.setDescription("The IP Address corresponding to the media-dependent\n `physical' address. The address type of this object is\n specified in ipNetToPhysicalAddressType.\n\n Implementors need to be aware that if the size of\n\n\n ipNetToPhysicalNetAddress exceeds 115 octets, then OIDS of\n instances of columns in this row will have more than 128\n sub-identifiers and cannot be accessed using SNMPv1,\n SNMPv2c, or SNMPv3.") ipNetToPhysicalPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 4), PhysAddress().subtype(subtypeSpec=ValueSizeConstraint(0,65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToPhysicalPhysAddress.setDescription("The media-dependent `physical' address.\n\n As the entries in this table are typically not persistent\n when this object is written the entity SHOULD NOT save the\n change to non-volatile storage.") ipNetToPhysicalLastUpdated = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipNetToPhysicalLastUpdated.setDescription('The value of sysUpTime at the time this entry was last\n updated. If this entry was updated prior to the last re-\n initialization of the local network management subsystem,\n then this object contains a zero value.') ipNetToPhysicalType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5,))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("dynamic", 3), ("static", 4), ("local", 5),)).clone('static')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToPhysicalType.setDescription("The type of mapping.\n\n Setting this object to the value invalid(2) has the effect\n of invalidating the corresponding entry in the\n ipNetToPhysicalTable. That is, it effectively dis-\n associates the interface identified with said entry from the\n mapping identified with said entry. It is an\n implementation-specific matter as to whether the agent\n\n\n removes an invalidated entry from the table. Accordingly,\n management stations must be prepared to receive tabular\n information from agents that corresponds to entries not\n currently in use. Proper interpretation of such entries\n requires examination of the relevant ipNetToPhysicalType\n object.\n\n The 'dynamic(3)' type indicates that the IP address to\n physical addresses mapping has been dynamically resolved\n using e.g., IPv4 ARP or the IPv6 Neighbor Discovery\n protocol.\n\n The 'static(4)' type indicates that the mapping has been\n statically configured. Both of these refer to entries that\n provide mappings for other entities addresses.\n\n The 'local(5)' type indicates that the mapping is provided\n for an entity's own interface address.\n\n As the entries in this table are typically not persistent\n when this object is written the entity SHOULD NOT save the\n change to non-volatile storage.") ipNetToPhysicalState = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,))).clone(namedValues=NamedValues(("reachable", 1), ("stale", 2), ("delay", 3), ("probe", 4), ("invalid", 5), ("unknown", 6), ("incomplete", 7),))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipNetToPhysicalState.setDescription('The Neighbor Unreachability Detection state for the\n interface when the address mapping in this entry is used.\n If Neighbor Unreachability Detection is not in use (e.g. for\n IPv4), this object is always unknown(6).') ipNetToPhysicalRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 35, 1, 8), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToPhysicalRowStatus.setDescription("The status of this conceptual row.\n\n The RowStatus TC requires that this DESCRIPTION clause\n states under which circumstances other objects in this row\n can be modified. The value of this object has no effect on\n whether other objects in this conceptual row can be\n modified.\n\n A conceptual row can not be made active until the\n ipNetToPhysicalPhysAddress object has been set.\n\n Note that if the ipNetToPhysicalType is set to 'invalid',\n the managed node may delete the entry independent of the\n state of this object.") ipv6ScopeZoneIndexTable = MibTable((1, 3, 6, 1, 2, 1, 4, 36), ) if mibBuilder.loadTexts: ipv6ScopeZoneIndexTable.setDescription('The table used to describe IPv6 unicast and multicast scope\n zones.\n\n For those objects that have names rather than numbers, the\n names were chosen to coincide with the names used in the\n IPv6 address architecture document. ') ipv6ScopeZoneIndexEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 36, 1), ).setIndexNames((0, "IP-MIB", "ipv6ScopeZoneIndexIfIndex")) if mibBuilder.loadTexts: ipv6ScopeZoneIndexEntry.setDescription('Each entry contains the list of scope identifiers on a given\n interface.') ipv6ScopeZoneIndexIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipv6ScopeZoneIndexIfIndex.setDescription("The index value that uniquely identifies the interface to\n which these scopes belong. The interface identified by a\n particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipv6ScopeZoneIndexLinkLocal = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 2), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexLinkLocal.setDescription('The zone index for the link-local scope on this interface.') ipv6ScopeZoneIndex3 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 3), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndex3.setDescription('The zone index for scope 3 on this interface.') ipv6ScopeZoneIndexAdminLocal = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 4), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexAdminLocal.setDescription('The zone index for the admin-local scope on this interface.') ipv6ScopeZoneIndexSiteLocal = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 5), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexSiteLocal.setDescription('The zone index for the site-local scope on this interface.') ipv6ScopeZoneIndex6 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 6), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndex6.setDescription('The zone index for scope 6 on this interface.') ipv6ScopeZoneIndex7 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 7), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndex7.setDescription('The zone index for scope 7 on this interface.') ipv6ScopeZoneIndexOrganizationLocal = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 8), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexOrganizationLocal.setDescription('The zone index for the organization-local scope on this\n interface.') ipv6ScopeZoneIndex9 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 9), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndex9.setDescription('The zone index for scope 9 on this interface.') ipv6ScopeZoneIndexA = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 10), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexA.setDescription('The zone index for scope A on this interface.') ipv6ScopeZoneIndexB = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 11), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexB.setDescription('The zone index for scope B on this interface.') ipv6ScopeZoneIndexC = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 12), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexC.setDescription('The zone index for scope C on this interface.') ipv6ScopeZoneIndexD = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 36, 1, 13), InetZoneIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipv6ScopeZoneIndexD.setDescription('The zone index for scope D on this interface.') ipDefaultRouterTable = MibTable((1, 3, 6, 1, 2, 1, 4, 37), ) if mibBuilder.loadTexts: ipDefaultRouterTable.setDescription('The table used to describe the default routers known to this\n\n\n entity.') ipDefaultRouterEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 37, 1), ).setIndexNames((0, "IP-MIB", "ipDefaultRouterAddressType"), (0, "IP-MIB", "ipDefaultRouterAddress"), (0, "IP-MIB", "ipDefaultRouterIfIndex")) if mibBuilder.loadTexts: ipDefaultRouterEntry.setDescription('Each entry contains information about a default router known\n to this entity.') ipDefaultRouterAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 37, 1, 1), InetAddressType()) if mibBuilder.loadTexts: ipDefaultRouterAddressType.setDescription('The address type for this row.') ipDefaultRouterAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 37, 1, 2), InetAddress()) if mibBuilder.loadTexts: ipDefaultRouterAddress.setDescription('The IP address of the default router represented by this\n row. The address type of this object is specified in\n ipDefaultRouterAddressType.\n\n Implementers need to be aware that if the size of\n ipDefaultRouterAddress exceeds 115 octets, then OIDS of\n instances of columns in this row will have more than 128\n sub-identifiers and cannot be accessed using SNMPv1,\n SNMPv2c, or SNMPv3.') ipDefaultRouterIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 37, 1, 3), InterfaceIndex()) if mibBuilder.loadTexts: ipDefaultRouterIfIndex.setDescription("The index value that uniquely identifies the interface by\n which the router can be reached. The interface identified\n by a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipDefaultRouterLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 37, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ipDefaultRouterLifetime.setDescription('The remaining length of time, in seconds, that this router\n will continue to be useful as a default router. A value of\n zero indicates that it is no longer useful as a default\n router. It is left to the implementer of the MIB as to\n whether a router with a lifetime of zero is removed from the\n list.\n\n For IPv6, this value should be extracted from the router\n advertisement messages.') ipDefaultRouterPreference = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 37, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-2, -1, 0, 1,))).clone(namedValues=NamedValues(("reserved", -2), ("low", -1), ("medium", 0), ("high", 1),))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipDefaultRouterPreference.setDescription('An indication of preference given to this router as a\n default router as described in he Default Router\n Preferences document. Treating the value as a\n 2 bit signed integer allows for simple arithmetic\n comparisons.\n\n For IPv4 routers or IPv6 routers that are not using the\n updated router advertisement format, this object is set to\n medium (0).') ipv6RouterAdvertSpinLock = MibScalar((1, 3, 6, 1, 2, 1, 4, 38), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipv6RouterAdvertSpinLock.setDescription("An advisory lock used to allow cooperating SNMP managers to\n coordinate their use of the set operation in creating or\n modifying rows within this table.\n\n In order to use this lock to coordinate the use of set\n operations, managers should first retrieve\n ipv6RouterAdvertSpinLock. They should then determine the\n appropriate row to create or modify. Finally, they should\n issue the appropriate set command including the retrieved\n value of ipv6RouterAdvertSpinLock. If another manager has\n altered the table in the meantime, then the value of\n ipv6RouterAdvertSpinLock will have changed and the creation\n will fail as it will be specifying an incorrect value for\n ipv6RouterAdvertSpinLock. It is suggested, but not\n required, that the ipv6RouterAdvertSpinLock be the first var\n bind for each set of objects representing a 'row' in a PDU.") ipv6RouterAdvertTable = MibTable((1, 3, 6, 1, 2, 1, 4, 39), ) if mibBuilder.loadTexts: ipv6RouterAdvertTable.setDescription('The table containing information used to construct router\n advertisements.') ipv6RouterAdvertEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 39, 1), ).setIndexNames((0, "IP-MIB", "ipv6RouterAdvertIfIndex")) if mibBuilder.loadTexts: ipv6RouterAdvertEntry.setDescription('An entry containing information used to construct router\n advertisements.\n\n Information in this table is persistent, and when this\n object is written, the entity SHOULD save the change to\n non-volatile storage.') ipv6RouterAdvertIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: ipv6RouterAdvertIfIndex.setDescription("The index value that uniquely identifies the interface on\n which router advertisements constructed with this\n information will be transmitted. The interface identified\n by a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipv6RouterAdvertSendAdverts = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 2), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertSendAdverts.setDescription('A flag indicating whether the router sends periodic\n router advertisements and responds to router solicitations\n on this interface.') ipv6RouterAdvertMaxInterval = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(4,1800)).clone(600)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertMaxInterval.setDescription('The maximum time allowed between sending unsolicited router\n\n\n advertisements from this interface.') ipv6RouterAdvertMinInterval = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(3,1350))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertMinInterval.setDescription('The minimum time allowed between sending unsolicited router\n advertisements from this interface.\n\n The default is 0.33 * ipv6RouterAdvertMaxInterval, however,\n in the case of a low value for ipv6RouterAdvertMaxInterval,\n the minimum value for this object is restricted to 3.') ipv6RouterAdvertManagedFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertManagedFlag.setDescription("The true/false value to be placed into the 'managed address\n configuration' flag field in router advertisements sent from\n this interface.") ipv6RouterAdvertOtherConfigFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 6), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertOtherConfigFlag.setDescription("The true/false value to be placed into the 'other stateful\n configuration' flag field in router advertisements sent from\n this interface.") ipv6RouterAdvertLinkMTU = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 7), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertLinkMTU.setDescription('The value to be placed in MTU options sent by the router on\n this interface.\n\n A value of zero indicates that no MTU options are sent.') ipv6RouterAdvertReachableTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,3600000))).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertReachableTime.setDescription("The value to be placed in the reachable time field in router\n advertisement messages sent from this interface.\n\n A value of zero in the router advertisement indicates that\n the advertisement isn't specifying a value for reachable\n time.") ipv6RouterAdvertRetransmitTime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 9), Unsigned32()).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertRetransmitTime.setDescription("The value to be placed in the retransmit timer field in\n router advertisements sent from this interface.\n\n A value of zero in the router advertisement indicates that\n the advertisement isn't specifying a value for retrans\n time.") ipv6RouterAdvertCurHopLimit = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertCurHopLimit.setDescription("The default value to be placed in the current hop limit\n field in router advertisements sent from this interface.\n\n\n The value should be set to the current diameter of the\n Internet.\n\n A value of zero in the router advertisement indicates that\n the advertisement isn't specifying a value for curHopLimit.\n\n The default should be set to the value specified in the IANA\n web pages (www.iana.org) at the time of implementation.") ipv6RouterAdvertDefaultLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 11), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0,0),ValueRangeConstraint(4,9000),))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertDefaultLifetime.setDescription('The value to be placed in the router lifetime field of\n router advertisements sent from this interface. This value\n MUST be either 0 or between ipv6RouterAdvertMaxInterval and\n 9000 seconds.\n\n A value of zero indicates that the router is not to be used\n as a default router.\n\n The default is 3 * ipv6RouterAdvertMaxInterval.') ipv6RouterAdvertRowStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 39, 1, 12), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipv6RouterAdvertRowStatus.setDescription('The status of this conceptual row.\n\n As all objects in this conceptual row have default values, a\n row can be created and made active by setting this object\n appropriately.\n\n The RowStatus TC requires that this DESCRIPTION clause\n states under which circumstances other objects in this row\n can be modified. The value of this object has no effect on\n whether other objects in this conceptual row can be\n modified.') icmp = MibIdentifier((1, 3, 6, 1, 2, 1, 5)) icmpStatsTable = MibTable((1, 3, 6, 1, 2, 1, 5, 29), ) if mibBuilder.loadTexts: icmpStatsTable.setDescription('The table of generic system-wide ICMP counters.') icmpStatsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 5, 29, 1), ).setIndexNames((0, "IP-MIB", "icmpStatsIPVersion")) if mibBuilder.loadTexts: icmpStatsEntry.setDescription('A conceptual row in the icmpStatsTable.') icmpStatsIPVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 29, 1, 1), InetVersion()) if mibBuilder.loadTexts: icmpStatsIPVersion.setDescription('The IP version of the statistics.') icmpStatsInMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 29, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpStatsInMsgs.setDescription('The total number of ICMP messages that the entity received.\n Note that this counter includes all those counted by\n icmpStatsInErrors.') icmpStatsInErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 29, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpStatsInErrors.setDescription('The number of ICMP messages that the entity received but\n determined as having ICMP-specific errors (bad ICMP\n checksums, bad length, etc.).') icmpStatsOutMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 29, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpStatsOutMsgs.setDescription('The total number of ICMP messages that the entity attempted\n to send. Note that this counter includes all those counted\n by icmpStatsOutErrors.') icmpStatsOutErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 29, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpStatsOutErrors.setDescription("The number of ICMP messages that this entity did not send\n due to problems discovered within ICMP, such as a lack of\n buffers. This value should not include errors discovered\n outside the ICMP layer, such as the inability of IP to route\n the resultant datagram. In some implementations, there may\n be no types of error that contribute to this counter's\n value.") icmpMsgStatsTable = MibTable((1, 3, 6, 1, 2, 1, 5, 30), ) if mibBuilder.loadTexts: icmpMsgStatsTable.setDescription('The table of system-wide per-version, per-message type ICMP\n counters.') icmpMsgStatsEntry = MibTableRow((1, 3, 6, 1, 2, 1, 5, 30, 1), ).setIndexNames((0, "IP-MIB", "icmpMsgStatsIPVersion"), (0, "IP-MIB", "icmpMsgStatsType")) if mibBuilder.loadTexts: icmpMsgStatsEntry.setDescription('A conceptual row in the icmpMsgStatsTable.\n\n The system should track each ICMP type value, even if that\n ICMP type is not supported by the system. However, a\n given row need not be instantiated unless a message of that\n type has been processed, i.e., the row for\n icmpMsgStatsType=X MAY be instantiated before but MUST be\n instantiated after the first message with Type=X is\n received or transmitted. After receiving or transmitting\n any succeeding messages with Type=X, the relevant counter\n must be incremented.') icmpMsgStatsIPVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 30, 1, 1), InetVersion()) if mibBuilder.loadTexts: icmpMsgStatsIPVersion.setDescription('The IP version of the statistics.') icmpMsgStatsType = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 30, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))) if mibBuilder.loadTexts: icmpMsgStatsType.setDescription('The ICMP type field of the message type being counted by\n this row.\n\n Note that ICMP message types are scoped by the address type\n in use.') icmpMsgStatsInPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 30, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpMsgStatsInPkts.setDescription('The number of input packets for this AF and type.') icmpMsgStatsOutPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 5, 30, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpMsgStatsOutPkts.setDescription('The number of output packets for this AF and type.') ipMIBConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 48, 2)) ipMIBCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 48, 2, 1)) ipMIBGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 48, 2, 2)) ipMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 2, 1, 48, 2, 1, 2)).setObjects(*(("IP-MIB", "ipSystemStatsGroup"), ("IP-MIB", "ipAddressGroup"), ("IP-MIB", "ipNetToPhysicalGroup"), ("IP-MIB", "ipDefaultRouterGroup"), ("IP-MIB", "icmpStatsGroup"), ("IP-MIB", "ipSystemStatsHCOctetGroup"), ("IP-MIB", "ipSystemStatsHCPacketGroup"), ("IP-MIB", "ipIfStatsGroup"), ("IP-MIB", "ipIfStatsHCOctetGroup"), ("IP-MIB", "ipIfStatsHCPacketGroup"), ("IP-MIB", "ipv4GeneralGroup"), ("IP-MIB", "ipv4IfGroup"), ("IP-MIB", "ipv4SystemStatsGroup"), ("IP-MIB", "ipv4SystemStatsHCPacketGroup"), ("IP-MIB", "ipv4IfStatsGroup"), ("IP-MIB", "ipv4IfStatsHCPacketGroup"), ("IP-MIB", "ipv6GeneralGroup2"), ("IP-MIB", "ipv6IfGroup"), ("IP-MIB", "ipAddressPrefixGroup"), ("IP-MIB", "ipv6ScopeGroup"), ("IP-MIB", "ipv6RouterAdvertGroup"), ("IP-MIB", "ipLastChangeGroup"),)) if mibBuilder.loadTexts: ipMIBCompliance2.setDescription('The compliance statement for systems that implement IP -\n either IPv4 or IPv6.\n\n There are a number of INDEX objects that cannot be\n represented in the form of OBJECT clauses in SMIv2, but\n for which we have the following compliance requirements,\n expressed in OBJECT clause form in this description\n clause:\n\n\n -- OBJECT ipSystemStatsIPVersion\n -- SYNTAX InetVersion {ipv4(1), ipv6(2)}\n -- DESCRIPTION\n -- This MIB requires support for only IPv4 and IPv6\n -- versions.\n --\n -- OBJECT ipIfStatsIPVersion\n -- SYNTAX InetVersion {ipv4(1), ipv6(2)}\n -- DESCRIPTION\n -- This MIB requires support for only IPv4 and IPv6\n -- versions.\n --\n -- OBJECT icmpStatsIPVersion\n -- SYNTAX InetVersion {ipv4(1), ipv6(2)}\n -- DESCRIPTION\n -- This MIB requires support for only IPv4 and IPv6\n -- versions.\n --\n -- OBJECT icmpMsgStatsIPVersion\n -- SYNTAX InetVersion {ipv4(1), ipv6(2)}\n -- DESCRIPTION\n -- This MIB requires support for only IPv4 and IPv6\n -- versions.\n --\n -- OBJECT ipAddressPrefixType\n -- SYNTAX InetAddressType {ipv4(1), ipv6(2)}\n -- DESCRIPTION\n -- This MIB requires support for only global IPv4 and\n -- IPv6 address types.\n --\n -- OBJECT ipAddressPrefixPrefix\n -- SYNTAX InetAddress (Size(4 | 16))\n -- DESCRIPTION\n -- This MIB requires support for only global IPv4 and\n -- IPv6 addresses and so the size can be either 4 or\n -- 16 bytes.\n --\n -- OBJECT ipAddressAddrType\n -- SYNTAX InetAddressType {ipv4(1), ipv6(2),\n -- ipv4z(3), ipv6z(4)}\n -- DESCRIPTION\n -- This MIB requires support for only global and\n -- non-global IPv4 and IPv6 address types.\n --\n -- OBJECT ipAddressAddr\n -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20))\n -- DESCRIPTION\n -- This MIB requires support for only global and\n\n\n -- non-global IPv4 and IPv6 addresses and so the size\n -- can be 4, 8, 16, or 20 bytes.\n --\n -- OBJECT ipNetToPhysicalNetAddressType\n -- SYNTAX InetAddressType {ipv4(1), ipv6(2),\n -- ipv4z(3), ipv6z(4)}\n -- DESCRIPTION\n -- This MIB requires support for only global and\n -- non-global IPv4 and IPv6 address types.\n --\n -- OBJECT ipNetToPhysicalNetAddress\n -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20))\n -- DESCRIPTION\n -- This MIB requires support for only global and\n -- non-global IPv4 and IPv6 addresses and so the size\n -- can be 4, 8, 16, or 20 bytes.\n --\n -- OBJECT ipDefaultRouterAddressType\n -- SYNTAX InetAddressType {ipv4(1), ipv6(2),\n -- ipv4z(3), ipv6z(4)}\n -- DESCRIPTION\n -- This MIB requires support for only global and\n -- non-global IPv4 and IPv6 address types.\n --\n -- OBJECT ipDefaultRouterAddress\n -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20))\n -- DESCRIPTION\n -- This MIB requires support for only global and\n -- non-global IPv4 and IPv6 addresses and so the size\n -- can be 4, 8, 16, or 20 bytes.') ipv4GeneralGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 3)).setObjects(*(("IP-MIB", "ipForwarding"), ("IP-MIB", "ipDefaultTTL"), ("IP-MIB", "ipReasmTimeout"),)) if mibBuilder.loadTexts: ipv4GeneralGroup.setDescription('The group of IPv4-specific objects for basic management of\n IPv4 entities.') ipv4IfGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 4)).setObjects(*(("IP-MIB", "ipv4InterfaceReasmMaxSize"), ("IP-MIB", "ipv4InterfaceEnableStatus"), ("IP-MIB", "ipv4InterfaceRetransmitTime"),)) if mibBuilder.loadTexts: ipv4IfGroup.setDescription('The group of IPv4-specific objects for basic management of\n IPv4 interfaces.') ipv6GeneralGroup2 = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 5)).setObjects(*(("IP-MIB", "ipv6IpForwarding"), ("IP-MIB", "ipv6IpDefaultHopLimit"),)) if mibBuilder.loadTexts: ipv6GeneralGroup2.setDescription('The IPv6 group of objects providing for basic management of\n IPv6 entities.') ipv6IfGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 6)).setObjects(*(("IP-MIB", "ipv6InterfaceReasmMaxSize"), ("IP-MIB", "ipv6InterfaceIdentifier"), ("IP-MIB", "ipv6InterfaceEnableStatus"), ("IP-MIB", "ipv6InterfaceReachableTime"), ("IP-MIB", "ipv6InterfaceRetransmitTime"), ("IP-MIB", "ipv6InterfaceForwarding"),)) if mibBuilder.loadTexts: ipv6IfGroup.setDescription('The group of IPv6-specific objects for basic management of\n IPv6 interfaces.') ipLastChangeGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 7)).setObjects(*(("IP-MIB", "ipv4InterfaceTableLastChange"), ("IP-MIB", "ipv6InterfaceTableLastChange"), ("IP-MIB", "ipIfStatsTableLastChange"),)) if mibBuilder.loadTexts: ipLastChangeGroup.setDescription('The last change objects associated with this MIB. These\n objects are optional for all agents. They SHOULD be\n implemented on agents where it is possible to determine the\n proper values. Where it is not possible to determine the\n proper values, for example when the tables are split amongst\n several sub-agents using AgentX, the agent MUST NOT\n implement these objects to return an incorrect or static\n value.') ipSystemStatsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 8)).setObjects(*(("IP-MIB", "ipSystemStatsInReceives"), ("IP-MIB", "ipSystemStatsInOctets"), ("IP-MIB", "ipSystemStatsInHdrErrors"), ("IP-MIB", "ipSystemStatsInNoRoutes"), ("IP-MIB", "ipSystemStatsInAddrErrors"), ("IP-MIB", "ipSystemStatsInUnknownProtos"), ("IP-MIB", "ipSystemStatsInTruncatedPkts"), ("IP-MIB", "ipSystemStatsInForwDatagrams"), ("IP-MIB", "ipSystemStatsReasmReqds"), ("IP-MIB", "ipSystemStatsReasmOKs"), ("IP-MIB", "ipSystemStatsReasmFails"), ("IP-MIB", "ipSystemStatsInDiscards"), ("IP-MIB", "ipSystemStatsInDelivers"), ("IP-MIB", "ipSystemStatsOutRequests"), ("IP-MIB", "ipSystemStatsOutNoRoutes"), ("IP-MIB", "ipSystemStatsOutForwDatagrams"), ("IP-MIB", "ipSystemStatsOutDiscards"), ("IP-MIB", "ipSystemStatsOutFragReqds"), ("IP-MIB", "ipSystemStatsOutFragOKs"), ("IP-MIB", "ipSystemStatsOutFragFails"), ("IP-MIB", "ipSystemStatsOutFragCreates"), ("IP-MIB", "ipSystemStatsOutTransmits"), ("IP-MIB", "ipSystemStatsOutOctets"), ("IP-MIB", "ipSystemStatsInMcastPkts"), ("IP-MIB", "ipSystemStatsInMcastOctets"), ("IP-MIB", "ipSystemStatsOutMcastPkts"), ("IP-MIB", "ipSystemStatsOutMcastOctets"), ("IP-MIB", "ipSystemStatsDiscontinuityTime"), ("IP-MIB", "ipSystemStatsRefreshRate"),)) if mibBuilder.loadTexts: ipSystemStatsGroup.setDescription('IP system wide statistics.') ipv4SystemStatsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 9)).setObjects(*(("IP-MIB", "ipSystemStatsInBcastPkts"), ("IP-MIB", "ipSystemStatsOutBcastPkts"),)) if mibBuilder.loadTexts: ipv4SystemStatsGroup.setDescription('IPv4 only system wide statistics.') ipSystemStatsHCOctetGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 10)).setObjects(*(("IP-MIB", "ipSystemStatsHCInOctets"), ("IP-MIB", "ipSystemStatsHCOutOctets"), ("IP-MIB", "ipSystemStatsHCInMcastOctets"), ("IP-MIB", "ipSystemStatsHCOutMcastOctets"),)) if mibBuilder.loadTexts: ipSystemStatsHCOctetGroup.setDescription('IP system wide statistics for systems that may overflow the\n standard octet counters within 1 hour.') ipSystemStatsHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 11)).setObjects(*(("IP-MIB", "ipSystemStatsHCInReceives"), ("IP-MIB", "ipSystemStatsHCInForwDatagrams"), ("IP-MIB", "ipSystemStatsHCInDelivers"), ("IP-MIB", "ipSystemStatsHCOutRequests"), ("IP-MIB", "ipSystemStatsHCOutForwDatagrams"), ("IP-MIB", "ipSystemStatsHCOutTransmits"), ("IP-MIB", "ipSystemStatsHCInMcastPkts"), ("IP-MIB", "ipSystemStatsHCOutMcastPkts"),)) if mibBuilder.loadTexts: ipSystemStatsHCPacketGroup.setDescription('IP system wide statistics for systems that may overflow the\n standard packet counters within 1 hour.') ipv4SystemStatsHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 12)).setObjects(*(("IP-MIB", "ipSystemStatsHCInBcastPkts"), ("IP-MIB", "ipSystemStatsHCOutBcastPkts"),)) if mibBuilder.loadTexts: ipv4SystemStatsHCPacketGroup.setDescription('IPv4 only system wide statistics for systems that may\n overflow the standard packet counters within 1 hour.') ipIfStatsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 13)).setObjects(*(("IP-MIB", "ipIfStatsInReceives"), ("IP-MIB", "ipIfStatsInOctets"), ("IP-MIB", "ipIfStatsInHdrErrors"), ("IP-MIB", "ipIfStatsInNoRoutes"), ("IP-MIB", "ipIfStatsInAddrErrors"), ("IP-MIB", "ipIfStatsInUnknownProtos"), ("IP-MIB", "ipIfStatsInTruncatedPkts"), ("IP-MIB", "ipIfStatsInForwDatagrams"), ("IP-MIB", "ipIfStatsReasmReqds"), ("IP-MIB", "ipIfStatsReasmOKs"), ("IP-MIB", "ipIfStatsReasmFails"), ("IP-MIB", "ipIfStatsInDiscards"), ("IP-MIB", "ipIfStatsInDelivers"), ("IP-MIB", "ipIfStatsOutRequests"), ("IP-MIB", "ipIfStatsOutForwDatagrams"), ("IP-MIB", "ipIfStatsOutDiscards"), ("IP-MIB", "ipIfStatsOutFragReqds"), ("IP-MIB", "ipIfStatsOutFragOKs"), ("IP-MIB", "ipIfStatsOutFragFails"), ("IP-MIB", "ipIfStatsOutFragCreates"), ("IP-MIB", "ipIfStatsOutTransmits"), ("IP-MIB", "ipIfStatsOutOctets"), ("IP-MIB", "ipIfStatsInMcastPkts"), ("IP-MIB", "ipIfStatsInMcastOctets"), ("IP-MIB", "ipIfStatsOutMcastPkts"), ("IP-MIB", "ipIfStatsOutMcastOctets"), ("IP-MIB", "ipIfStatsDiscontinuityTime"), ("IP-MIB", "ipIfStatsRefreshRate"),)) if mibBuilder.loadTexts: ipIfStatsGroup.setDescription('IP per-interface statistics.') ipv4IfStatsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 14)).setObjects(*(("IP-MIB", "ipIfStatsInBcastPkts"), ("IP-MIB", "ipIfStatsOutBcastPkts"),)) if mibBuilder.loadTexts: ipv4IfStatsGroup.setDescription('IPv4 only per-interface statistics.') ipIfStatsHCOctetGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 15)).setObjects(*(("IP-MIB", "ipIfStatsHCInOctets"), ("IP-MIB", "ipIfStatsHCOutOctets"), ("IP-MIB", "ipIfStatsHCInMcastOctets"), ("IP-MIB", "ipIfStatsHCOutMcastOctets"),)) if mibBuilder.loadTexts: ipIfStatsHCOctetGroup.setDescription('IP per-interfaces statistics for systems that include\n interfaces that may overflow the standard octet\n counters within 1 hour.') ipIfStatsHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 16)).setObjects(*(("IP-MIB", "ipIfStatsHCInReceives"), ("IP-MIB", "ipIfStatsHCInForwDatagrams"), ("IP-MIB", "ipIfStatsHCInDelivers"), ("IP-MIB", "ipIfStatsHCOutRequests"), ("IP-MIB", "ipIfStatsHCOutForwDatagrams"), ("IP-MIB", "ipIfStatsHCOutTransmits"), ("IP-MIB", "ipIfStatsHCInMcastPkts"), ("IP-MIB", "ipIfStatsHCOutMcastPkts"),)) if mibBuilder.loadTexts: ipIfStatsHCPacketGroup.setDescription('IP per-interfaces statistics for systems that include\n interfaces that may overflow the standard packet counters\n within 1 hour.') ipv4IfStatsHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 17)).setObjects(*(("IP-MIB", "ipIfStatsHCInBcastPkts"), ("IP-MIB", "ipIfStatsHCOutBcastPkts"),)) if mibBuilder.loadTexts: ipv4IfStatsHCPacketGroup.setDescription('IPv4 only per-interface statistics for systems that include\n interfaces that may overflow the standard packet counters\n within 1 hour.') ipAddressPrefixGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 18)).setObjects(*(("IP-MIB", "ipAddressPrefixOrigin"), ("IP-MIB", "ipAddressPrefixOnLinkFlag"), ("IP-MIB", "ipAddressPrefixAutonomousFlag"), ("IP-MIB", "ipAddressPrefixAdvPreferredLifetime"), ("IP-MIB", "ipAddressPrefixAdvValidLifetime"),)) if mibBuilder.loadTexts: ipAddressPrefixGroup.setDescription('The group of objects for providing information about address\n prefixes used by this node.') ipAddressGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 19)).setObjects(*(("IP-MIB", "ipAddressSpinLock"), ("IP-MIB", "ipAddressIfIndex"), ("IP-MIB", "ipAddressType"), ("IP-MIB", "ipAddressPrefix"), ("IP-MIB", "ipAddressOrigin"), ("IP-MIB", "ipAddressStatus"), ("IP-MIB", "ipAddressCreated"), ("IP-MIB", "ipAddressLastChanged"), ("IP-MIB", "ipAddressRowStatus"), ("IP-MIB", "ipAddressStorageType"),)) if mibBuilder.loadTexts: ipAddressGroup.setDescription("The group of objects for providing information about the\n addresses relevant to this entity's interfaces.") ipNetToPhysicalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 20)).setObjects(*(("IP-MIB", "ipNetToPhysicalPhysAddress"), ("IP-MIB", "ipNetToPhysicalLastUpdated"), ("IP-MIB", "ipNetToPhysicalType"), ("IP-MIB", "ipNetToPhysicalState"), ("IP-MIB", "ipNetToPhysicalRowStatus"),)) if mibBuilder.loadTexts: ipNetToPhysicalGroup.setDescription('The group of objects for providing information about the\n mappings of network address to physical address known to\n this node.') ipv6ScopeGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 21)).setObjects(*(("IP-MIB", "ipv6ScopeZoneIndexLinkLocal"), ("IP-MIB", "ipv6ScopeZoneIndex3"), ("IP-MIB", "ipv6ScopeZoneIndexAdminLocal"), ("IP-MIB", "ipv6ScopeZoneIndexSiteLocal"), ("IP-MIB", "ipv6ScopeZoneIndex6"), ("IP-MIB", "ipv6ScopeZoneIndex7"), ("IP-MIB", "ipv6ScopeZoneIndexOrganizationLocal"), ("IP-MIB", "ipv6ScopeZoneIndex9"), ("IP-MIB", "ipv6ScopeZoneIndexA"), ("IP-MIB", "ipv6ScopeZoneIndexB"), ("IP-MIB", "ipv6ScopeZoneIndexC"), ("IP-MIB", "ipv6ScopeZoneIndexD"),)) if mibBuilder.loadTexts: ipv6ScopeGroup.setDescription('The group of objects for managing IPv6 scope zones.') ipDefaultRouterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 22)).setObjects(*(("IP-MIB", "ipDefaultRouterLifetime"), ("IP-MIB", "ipDefaultRouterPreference"),)) if mibBuilder.loadTexts: ipDefaultRouterGroup.setDescription('The group of objects for providing information about default\n routers known to this node.') ipv6RouterAdvertGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 23)).setObjects(*(("IP-MIB", "ipv6RouterAdvertSpinLock"), ("IP-MIB", "ipv6RouterAdvertSendAdverts"), ("IP-MIB", "ipv6RouterAdvertMaxInterval"), ("IP-MIB", "ipv6RouterAdvertMinInterval"), ("IP-MIB", "ipv6RouterAdvertManagedFlag"), ("IP-MIB", "ipv6RouterAdvertOtherConfigFlag"), ("IP-MIB", "ipv6RouterAdvertLinkMTU"), ("IP-MIB", "ipv6RouterAdvertReachableTime"), ("IP-MIB", "ipv6RouterAdvertRetransmitTime"), ("IP-MIB", "ipv6RouterAdvertCurHopLimit"), ("IP-MIB", "ipv6RouterAdvertDefaultLifetime"), ("IP-MIB", "ipv6RouterAdvertRowStatus"),)) if mibBuilder.loadTexts: ipv6RouterAdvertGroup.setDescription('The group of objects for controlling information advertised\n by IPv6 routers.') icmpStatsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 24)).setObjects(*(("IP-MIB", "icmpStatsInMsgs"), ("IP-MIB", "icmpStatsInErrors"), ("IP-MIB", "icmpStatsOutMsgs"), ("IP-MIB", "icmpStatsOutErrors"), ("IP-MIB", "icmpMsgStatsInPkts"), ("IP-MIB", "icmpMsgStatsOutPkts"),)) if mibBuilder.loadTexts: icmpStatsGroup.setDescription('The group of objects providing ICMP statistics.') ipInReceives = MibScalar((1, 3, 6, 1, 2, 1, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInReceives.setDescription('The total number of input datagrams received from\n interfaces, including those received in error.\n\n This object has been deprecated, as a new IP version-neutral\n\n\n table has been added. It is loosely replaced by\n ipSystemStatsInRecieves.') ipInHdrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInHdrErrors.setDescription('The number of input datagrams discarded due to errors in\n their IPv4 headers, including bad checksums, version number\n mismatch, other format errors, time-to-live exceeded, errors\n discovered in processing their IPv4 options, etc.\n\n This object has been deprecated as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsInHdrErrors.') ipInAddrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInAddrErrors.setDescription("The number of input datagrams discarded because the IPv4\n address in their IPv4 header's destination field was not a\n valid address to be received at this entity. This count\n includes invalid addresses (e.g., 0.0.0.0) and addresses of\n unsupported Classes (e.g., Class E). For entities which are\n not IPv4 routers, and therefore do not forward datagrams,\n this counter includes datagrams discarded because the\n destination address was not a local address.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsInAddrErrors.") ipForwDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 4, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipForwDatagrams.setDescription('The number of input datagrams for which this entity was not\n their final IPv4 destination, as a result of which an\n attempt was made to find a route to forward them to that\n final destination. In entities which do not act as IPv4\n routers, this counter will include only those packets which\n\n\n were Source-Routed via this entity, and the Source-Route\n option processing was successful.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsInForwDatagrams.') ipInUnknownProtos = MibScalar((1, 3, 6, 1, 2, 1, 4, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInUnknownProtos.setDescription('The number of locally-addressed datagrams received\n successfully but discarded because of an unknown or\n unsupported protocol.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsInUnknownProtos.') ipInDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDiscards.setDescription('The number of input IPv4 datagrams for which no problems\n were encountered to prevent their continued processing, but\n which were discarded (e.g., for lack of buffer space). Note\n that this counter does not include any datagrams discarded\n while awaiting re-assembly.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsInDiscards.') ipInDelivers = MibScalar((1, 3, 6, 1, 2, 1, 4, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDelivers.setDescription('The total number of input datagrams successfully delivered\n to IPv4 user-protocols (including ICMP).\n\n This object has been deprecated as a new IP version neutral\n table has been added. It is loosely replaced by\n\n\n ipSystemStatsIndelivers.') ipOutRequests = MibScalar((1, 3, 6, 1, 2, 1, 4, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutRequests.setDescription('The total number of IPv4 datagrams which local IPv4 user\n protocols (including ICMP) supplied to IPv4 in requests for\n transmission. Note that this counter does not include any\n datagrams counted in ipForwDatagrams.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsOutRequests.') ipOutDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutDiscards.setDescription('The number of output IPv4 datagrams for which no problem was\n encountered to prevent their transmission to their\n destination, but which were discarded (e.g., for lack of\n buffer space). Note that this counter would include\n datagrams counted in ipForwDatagrams if any such packets met\n this (discretionary) discard criterion.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsOutDiscards.') ipOutNoRoutes = MibScalar((1, 3, 6, 1, 2, 1, 4, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutNoRoutes.setDescription("The number of IPv4 datagrams discarded because no route\n could be found to transmit them to their destination. Note\n that this counter includes any packets counted in\n ipForwDatagrams which meet this `no-route' criterion. Note\n that this includes any datagrams which a host cannot route\n because all of its default routers are down.\n\n This object has been deprecated, as a new IP version-neutral\n\n\n table has been added. It is loosely replaced by\n ipSystemStatsOutNoRoutes.") ipReasmReqds = MibScalar((1, 3, 6, 1, 2, 1, 4, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmReqds.setDescription('The number of IPv4 fragments received which needed to be\n reassembled at this entity.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsReasmReqds.') ipReasmOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmOKs.setDescription('The number of IPv4 datagrams successfully re-assembled.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsReasmOKs.') ipReasmFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmFails.setDescription('The number of failures detected by the IPv4 re-assembly\n algorithm (for whatever reason: timed out, errors, etc).\n Note that this is not necessarily a count of discarded IPv4\n fragments since some algorithms (notably the algorithm in\n RFC 815) can lose track of the number of fragments by\n combining them as they are received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsReasmFails.') ipFragOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragOKs.setDescription('The number of IPv4 datagrams that have been successfully\n fragmented at this entity.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsOutFragOKs.') ipFragFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragFails.setDescription("The number of IPv4 datagrams that have been discarded\n because they needed to be fragmented at this entity but\n could not be, e.g., because their Don't Fragment flag was\n set.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n ipSystemStatsOutFragFails.") ipFragCreates = MibScalar((1, 3, 6, 1, 2, 1, 4, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragCreates.setDescription('The number of IPv4 datagram fragments that have been\n generated as a result of fragmentation at this entity.\n\n This object has been deprecated as a new IP version neutral\n table has been added. It is loosely replaced by\n ipSystemStatsOutFragCreates.') ipRoutingDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRoutingDiscards.setDescription('The number of routing entries which were chosen to be\n discarded even though they are valid. One possible reason\n for discarding such an entry could be to free-up buffer\n space for other routing entries.\n\n\n This object was defined in pre-IPv6 versions of the IP MIB.\n It was implicitly IPv4 only, but the original specifications\n did not indicate this protocol restriction. In order to\n clarify the specifications, this object has been deprecated\n and a similar, but more thoroughly clarified, object has\n been added to the IP-FORWARD-MIB.') ipAddrTable = MibTable((1, 3, 6, 1, 2, 1, 4, 20), ) if mibBuilder.loadTexts: ipAddrTable.setDescription("The table of addressing information relevant to this\n entity's IPv4 addresses.\n\n This table has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by the\n ipAddressTable although several objects that weren't deemed\n useful weren't carried forward while another\n (ipAdEntReasmMaxSize) was moved to the ipv4InterfaceTable.") ipAddrEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 20, 1), ).setIndexNames((0, "IP-MIB", "ipAdEntAddr")) if mibBuilder.loadTexts: ipAddrEntry.setDescription("The addressing information for one of this entity's IPv4\n addresses.") ipAdEntAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntAddr.setDescription("The IPv4 address to which this entry's addressing\n information pertains.") ipAdEntIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntIfIndex.setDescription("The index value which uniquely identifies the interface to\n which this entry is applicable. The interface identified by\n a particular value of this index is the same interface as\n identified by the same value of the IF-MIB's ifIndex.") ipAdEntNetMask = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntNetMask.setDescription('The subnet mask associated with the IPv4 address of this\n entry. The value of the mask is an IPv4 address with all\n the network bits set to 1 and all the hosts bits set to 0.') ipAdEntBcastAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,1))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntBcastAddr.setDescription('The value of the least-significant bit in the IPv4 broadcast\n address used for sending datagrams on the (logical)\n interface associated with the IPv4 address of this entry.\n For example, when the Internet standard all-ones broadcast\n address is used, the value will be 1. This value applies to\n both the subnet and network broadcast addresses used by the\n entity on this (logical) interface.') ipAdEntReasmMaxSize = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntReasmMaxSize.setDescription('The size of the largest IPv4 datagram which this entity can\n re-assemble from incoming IPv4 fragmented datagrams received\n on this interface.') ipNetToMediaTable = MibTable((1, 3, 6, 1, 2, 1, 4, 22), ) if mibBuilder.loadTexts: ipNetToMediaTable.setDescription('The IPv4 Address Translation table used for mapping from\n IPv4 addresses to physical addresses.\n\n This table has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by the\n ipNetToPhysicalTable.') ipNetToMediaEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 22, 1), ).setIndexNames((0, "IP-MIB", "ipNetToMediaIfIndex"), (0, "IP-MIB", "ipNetToMediaNetAddress")) if mibBuilder.loadTexts: ipNetToMediaEntry.setDescription("Each entry contains one IpAddress to `physical' address\n equivalence.") ipNetToMediaIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToMediaIfIndex.setDescription("The interface on which this entry's equivalence is\n effective. The interface identified by a particular value\n of this index is the same interface as identified by the\n\n\n same value of the IF-MIB's ifIndex.\n\n This object predates the rule limiting index objects to a\n max access value of 'not-accessible' and so continues to use\n a value of 'read-create'.") ipNetToMediaPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 2), PhysAddress().subtype(subtypeSpec=ValueSizeConstraint(0,65535))).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToMediaPhysAddress.setDescription("The media-dependent `physical' address. This object should\n return 0 when this entry is in the 'incomplete' state.\n\n As the entries in this table are typically not persistent\n when this object is written the entity should not save the\n change to non-volatile storage. Note: a stronger\n requirement is not used because this object was previously\n defined.") ipNetToMediaNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToMediaNetAddress.setDescription("The IpAddress corresponding to the media-dependent\n `physical' address.\n\n This object predates the rule limiting index objects to a\n max access value of 'not-accessible' and so continues to use\n a value of 'read-create'.") ipNetToMediaType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("dynamic", 3), ("static", 4),))).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipNetToMediaType.setDescription('The type of mapping.\n\n Setting this object to the value invalid(2) has the effect\n\n\n of invalidating the corresponding entry in the\n ipNetToMediaTable. That is, it effectively dis-associates\n the interface identified with said entry from the mapping\n identified with said entry. It is an implementation-\n specific matter as to whether the agent removes an\n invalidated entry from the table. Accordingly, management\n stations must be prepared to receive tabular information\n from agents that corresponds to entries not currently in\n use. Proper interpretation of such entries requires\n examination of the relevant ipNetToMediaType object.\n\n As the entries in this table are typically not persistent\n when this object is written the entity should not save the\n change to non-volatile storage. Note: a stronger\n requirement is not used because this object was previously\n defined.') icmpInMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInMsgs.setDescription('The total number of ICMP messages which the entity received.\n Note that this counter includes all those counted by\n icmpInErrors.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n icmpStatsInMsgs.') icmpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInErrors.setDescription('The number of ICMP messages which the entity received but\n determined as having ICMP-specific errors (bad ICMP\n checksums, bad length, etc.).\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n icmpStatsInErrors.') icmpInDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInDestUnreachs.setDescription('The number of ICMP Destination Unreachable messages\n received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimeExcds.setDescription('The number of ICMP Time Exceeded messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInParmProbs.setDescription('The number of ICMP Parameter Problem messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInSrcQuenchs.setDescription('The number of ICMP Source Quench messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInRedirects.setDescription('The number of ICMP Redirect messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchos.setDescription('The number of ICMP Echo (request) messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchoReps.setDescription('The number of ICMP Echo Reply messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestamps.setDescription('The number of ICMP Timestamp (request) messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestampReps.setDescription('The number of ICMP Timestamp Reply messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMasks.setDescription('The number of ICMP Address Mask Request messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpInAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMaskReps.setDescription('The number of ICMP Address Mask Reply messages received.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutMsgs.setDescription('The total number of ICMP messages which this entity\n attempted to send. Note that this counter includes all\n those counted by icmpOutErrors.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n icmpStatsOutMsgs.') icmpOutErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutErrors.setDescription("The number of ICMP messages which this entity did not send\n due to problems discovered within ICMP, such as a lack of\n buffers. This value should not include errors discovered\n outside the ICMP layer, such as the inability of IP to route\n the resultant datagram. In some implementations, there may\n be no types of error which contribute to this counter's\n value.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by\n icmpStatsOutErrors.") icmpOutDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutDestUnreachs.setDescription('The number of ICMP Destination Unreachable messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimeExcds.setDescription('The number of ICMP Time Exceeded messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutParmProbs.setDescription('The number of ICMP Parameter Problem messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutSrcQuenchs.setDescription('The number of ICMP Source Quench messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutRedirects.setDescription('The number of ICMP Redirect messages sent. For a host, this\n object will always be zero, since hosts do not send\n redirects.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchos.setDescription('The number of ICMP Echo (request) messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchoReps.setDescription('The number of ICMP Echo Reply messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestamps.setDescription('The number of ICMP Timestamp (request) messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestampReps.setDescription('The number of ICMP Timestamp Reply messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMasks.setDescription('The number of ICMP Address Mask Request messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') icmpOutAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMaskReps.setDescription('The number of ICMP Address Mask Reply messages sent.\n\n This object has been deprecated, as a new IP version-neutral\n table has been added. It is loosely replaced by a column in\n the icmpMsgStatsTable.') ipMIBCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 48, 2, 1, 1)).setObjects(*(("IP-MIB", "ipGroup"), ("IP-MIB", "icmpGroup"),)) if mibBuilder.loadTexts: ipMIBCompliance.setDescription('The compliance statement for systems that implement only\n IPv4. For version-independence, this compliance statement\n is deprecated in favor of ipMIBCompliance2.') ipGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 1)).setObjects(*(("IP-MIB", "ipForwarding"), ("IP-MIB", "ipDefaultTTL"), ("IP-MIB", "ipInReceives"), ("IP-MIB", "ipInHdrErrors"), ("IP-MIB", "ipInAddrErrors"), ("IP-MIB", "ipForwDatagrams"), ("IP-MIB", "ipInUnknownProtos"), ("IP-MIB", "ipInDiscards"), ("IP-MIB", "ipInDelivers"), ("IP-MIB", "ipOutRequests"), ("IP-MIB", "ipOutDiscards"), ("IP-MIB", "ipOutNoRoutes"), ("IP-MIB", "ipReasmTimeout"), ("IP-MIB", "ipReasmReqds"), ("IP-MIB", "ipReasmOKs"), ("IP-MIB", "ipReasmFails"), ("IP-MIB", "ipFragOKs"), ("IP-MIB", "ipFragFails"), ("IP-MIB", "ipFragCreates"), ("IP-MIB", "ipAdEntAddr"), ("IP-MIB", "ipAdEntIfIndex"), ("IP-MIB", "ipAdEntNetMask"), ("IP-MIB", "ipAdEntBcastAddr"), ("IP-MIB", "ipAdEntReasmMaxSize"), ("IP-MIB", "ipNetToMediaIfIndex"), ("IP-MIB", "ipNetToMediaPhysAddress"), ("IP-MIB", "ipNetToMediaNetAddress"), ("IP-MIB", "ipNetToMediaType"), ("IP-MIB", "ipRoutingDiscards"),)) if mibBuilder.loadTexts: ipGroup.setDescription('The ip group of objects providing for basic management of IP\n entities, exclusive of the management of IP routes.\n\n\n As part of the version independence, this group has been\n deprecated. ') icmpGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 48, 2, 2, 2)).setObjects(*(("IP-MIB", "icmpInMsgs"), ("IP-MIB", "icmpInErrors"), ("IP-MIB", "icmpInDestUnreachs"), ("IP-MIB", "icmpInTimeExcds"), ("IP-MIB", "icmpInParmProbs"), ("IP-MIB", "icmpInSrcQuenchs"), ("IP-MIB", "icmpInRedirects"), ("IP-MIB", "icmpInEchos"), ("IP-MIB", "icmpInEchoReps"), ("IP-MIB", "icmpInTimestamps"), ("IP-MIB", "icmpInTimestampReps"), ("IP-MIB", "icmpInAddrMasks"), ("IP-MIB", "icmpInAddrMaskReps"), ("IP-MIB", "icmpOutMsgs"), ("IP-MIB", "icmpOutErrors"), ("IP-MIB", "icmpOutDestUnreachs"), ("IP-MIB", "icmpOutTimeExcds"), ("IP-MIB", "icmpOutParmProbs"), ("IP-MIB", "icmpOutSrcQuenchs"), ("IP-MIB", "icmpOutRedirects"), ("IP-MIB", "icmpOutEchos"), ("IP-MIB", "icmpOutEchoReps"), ("IP-MIB", "icmpOutTimestamps"), ("IP-MIB", "icmpOutTimestampReps"), ("IP-MIB", "icmpOutAddrMasks"), ("IP-MIB", "icmpOutAddrMaskReps"),)) if mibBuilder.loadTexts: icmpGroup.setDescription('The icmp group of objects providing ICMP statistics.\n\n As part of the version independence, this group has been\n deprecated. ') mibBuilder.exportSymbols("IP-MIB", icmpInTimestampReps=icmpInTimestampReps, ipIfStatsHCInDelivers=ipIfStatsHCInDelivers, ipNetToPhysicalLastUpdated=ipNetToPhysicalLastUpdated, icmpStatsOutMsgs=icmpStatsOutMsgs, ipv6ScopeGroup=ipv6ScopeGroup, ipMIBGroups=ipMIBGroups, ipSystemStatsInForwDatagrams=ipSystemStatsInForwDatagrams, ipSystemStatsOutOctets=ipSystemStatsOutOctets, ipv4IfGroup=ipv4IfGroup, ipv6ScopeZoneIndexEntry=ipv6ScopeZoneIndexEntry, ipAdEntReasmMaxSize=ipAdEntReasmMaxSize, ipSystemStatsInReceives=ipSystemStatsInReceives, ipAddressGroup=ipAddressGroup, ipIfStatsInDelivers=ipIfStatsInDelivers, ipIfStatsHCOutBcastPkts=ipIfStatsHCOutBcastPkts, ipSystemStatsGroup=ipSystemStatsGroup, ipIfStatsInTruncatedPkts=ipIfStatsInTruncatedPkts, ipIfStatsInMcastPkts=ipIfStatsInMcastPkts, ipSystemStatsInMcastPkts=ipSystemStatsInMcastPkts, ipv4IfStatsGroup=ipv4IfStatsGroup, ipTrafficStats=ipTrafficStats, ipIfStatsOutMcastOctets=ipIfStatsOutMcastOctets, ipAdEntBcastAddr=ipAdEntBcastAddr, ipAddressCreated=ipAddressCreated, IpAddressPrefixOriginTC=IpAddressPrefixOriginTC, ipSystemStatsHCOutTransmits=ipSystemStatsHCOutTransmits, ipAddressRowStatus=ipAddressRowStatus, icmp=icmp, ipInReceives=ipInReceives, ipAdEntNetMask=ipAdEntNetMask, ipv4SystemStatsGroup=ipv4SystemStatsGroup, ipInAddrErrors=ipInAddrErrors, ipIfStatsInBcastPkts=ipIfStatsInBcastPkts, ipIfStatsInReceives=ipIfStatsInReceives, ipSystemStatsReasmReqds=ipSystemStatsReasmReqds, ipIfStatsHCOutOctets=ipIfStatsHCOutOctets, ipAddressPrefixPrefix=ipAddressPrefixPrefix, icmpMsgStatsOutPkts=icmpMsgStatsOutPkts, ipIfStatsInAddrErrors=ipIfStatsInAddrErrors, ipIfStatsOutFragReqds=ipIfStatsOutFragReqds, ipv4GeneralGroup=ipv4GeneralGroup, ipReasmTimeout=ipReasmTimeout, ipIfStatsReasmReqds=ipIfStatsReasmReqds, ipIfStatsReasmOKs=ipIfStatsReasmOKs, ipv6RouterAdvertSpinLock=ipv6RouterAdvertSpinLock, ipSystemStatsOutBcastPkts=ipSystemStatsOutBcastPkts, ipv4IfStatsHCPacketGroup=ipv4IfStatsHCPacketGroup, ipSystemStatsInAddrErrors=ipSystemStatsInAddrErrors, ipIfStatsOutForwDatagrams=ipIfStatsOutForwDatagrams, ipRoutingDiscards=ipRoutingDiscards, ipv6ScopeZoneIndexTable=ipv6ScopeZoneIndexTable, ipAdEntIfIndex=ipAdEntIfIndex, ipv6ScopeZoneIndexOrganizationLocal=ipv6ScopeZoneIndexOrganizationLocal, ipNetToPhysicalIfIndex=ipNetToPhysicalIfIndex, ipv6RouterAdvertRetransmitTime=ipv6RouterAdvertRetransmitTime, ipIfStatsInForwDatagrams=ipIfStatsInForwDatagrams, icmpOutErrors=icmpOutErrors, icmpOutSrcQuenchs=icmpOutSrcQuenchs, ipNetToPhysicalNetAddressType=ipNetToPhysicalNetAddressType, ipSystemStatsHCPacketGroup=ipSystemStatsHCPacketGroup, ipAddressPrefixEntry=ipAddressPrefixEntry, ipInDiscards=ipInDiscards, ipDefaultRouterAddressType=ipDefaultRouterAddressType, ipv6ScopeZoneIndexSiteLocal=ipv6ScopeZoneIndexSiteLocal, ipIfStatsInNoRoutes=ipIfStatsInNoRoutes, ipv6RouterAdvertGroup=ipv6RouterAdvertGroup, ipSystemStatsDiscontinuityTime=ipSystemStatsDiscontinuityTime, ipGroup=ipGroup, ipv6ScopeZoneIndex6=ipv6ScopeZoneIndex6, ipIfStatsHCInForwDatagrams=ipIfStatsHCInForwDatagrams, ipAddressPrefixAdvPreferredLifetime=ipAddressPrefixAdvPreferredLifetime, ipDefaultRouterGroup=ipDefaultRouterGroup, ipReasmFails=ipReasmFails, ip=ip, ipv6InterfaceTableLastChange=ipv6InterfaceTableLastChange, ipIfStatsHCOutMcastPkts=ipIfStatsHCOutMcastPkts, ipOutDiscards=ipOutDiscards, ipSystemStatsHCOutBcastPkts=ipSystemStatsHCOutBcastPkts, ipv6RouterAdvertReachableTime=ipv6RouterAdvertReachableTime, icmpInSrcQuenchs=icmpInSrcQuenchs, icmpOutAddrMaskReps=icmpOutAddrMaskReps, ipSystemStatsHCInBcastPkts=ipSystemStatsHCInBcastPkts, ipMIBCompliance=ipMIBCompliance, ipv6ScopeZoneIndexC=ipv6ScopeZoneIndexC, ipDefaultRouterIfIndex=ipDefaultRouterIfIndex, ipDefaultTTL=ipDefaultTTL, ipv6IpForwarding=ipv6IpForwarding, ipAddressType=ipAddressType, icmpMsgStatsInPkts=icmpMsgStatsInPkts, ipSystemStatsRefreshRate=ipSystemStatsRefreshRate, ipAddressPrefixLength=ipAddressPrefixLength, icmpOutDestUnreachs=icmpOutDestUnreachs, icmpStatsInErrors=icmpStatsInErrors, ipInDelivers=ipInDelivers, ipv4InterfaceTableLastChange=ipv4InterfaceTableLastChange, ipIfStatsHCInMcastOctets=ipIfStatsHCInMcastOctets, ipSystemStatsOutForwDatagrams=ipSystemStatsOutForwDatagrams, ipv4SystemStatsHCPacketGroup=ipv4SystemStatsHCPacketGroup, ipv6RouterAdvertRowStatus=ipv6RouterAdvertRowStatus, ipOutNoRoutes=ipOutNoRoutes, ipAddressPrefixTable=ipAddressPrefixTable, ipv6ScopeZoneIndexLinkLocal=ipv6ScopeZoneIndexLinkLocal, ipIfStatsGroup=ipIfStatsGroup, ipSystemStatsInDiscards=ipSystemStatsInDiscards, ipv6InterfaceEnableStatus=ipv6InterfaceEnableStatus, ipIfStatsHCInReceives=ipIfStatsHCInReceives, ipv6InterfaceEntry=ipv6InterfaceEntry, ipIfStatsEntry=ipIfStatsEntry, icmpStatsGroup=icmpStatsGroup, ipv6InterfaceRetransmitTime=ipv6InterfaceRetransmitTime, ipNetToPhysicalPhysAddress=ipNetToPhysicalPhysAddress, ipIfStatsOutFragFails=ipIfStatsOutFragFails, ipv6RouterAdvertLinkMTU=ipv6RouterAdvertLinkMTU, ipSystemStatsHCOutMcastOctets=ipSystemStatsHCOutMcastOctets, ipSystemStatsHCInMcastPkts=ipSystemStatsHCInMcastPkts, icmpInMsgs=icmpInMsgs, icmpOutAddrMasks=icmpOutAddrMasks, ipDefaultRouterPreference=ipDefaultRouterPreference, icmpInEchos=icmpInEchos, ipv6IpDefaultHopLimit=ipv6IpDefaultHopLimit, icmpInAddrMasks=icmpInAddrMasks, ipDefaultRouterTable=ipDefaultRouterTable, ipv6InterfaceTable=ipv6InterfaceTable, ipv6ScopeZoneIndexD=ipv6ScopeZoneIndexD, ipSystemStatsInNoRoutes=ipSystemStatsInNoRoutes, ipAddressPrefixType=ipAddressPrefixType, ipSystemStatsInDelivers=ipSystemStatsInDelivers, ipSystemStatsHCInOctets=ipSystemStatsHCInOctets, ipSystemStatsInTruncatedPkts=ipSystemStatsInTruncatedPkts, ipIfStatsTable=ipIfStatsTable, ipIfStatsHCInMcastPkts=ipIfStatsHCInMcastPkts, ipv6ScopeZoneIndex7=ipv6ScopeZoneIndex7, Ipv6AddressIfIdentifierTC=Ipv6AddressIfIdentifierTC, icmpOutTimestampReps=icmpOutTimestampReps, ipv4InterfaceTable=ipv4InterfaceTable, icmpInParmProbs=icmpInParmProbs, ipIfStatsHCInBcastPkts=ipIfStatsHCInBcastPkts, icmpInDestUnreachs=icmpInDestUnreachs, ipNetToPhysicalRowStatus=ipNetToPhysicalRowStatus, ipNetToMediaTable=ipNetToMediaTable, ipAddressTable=ipAddressTable, ipv4InterfaceEntry=ipv4InterfaceEntry, ipIfStatsHCInOctets=ipIfStatsHCInOctets, icmpOutRedirects=icmpOutRedirects, ipv6RouterAdvertMinInterval=ipv6RouterAdvertMinInterval, ipv6ScopeZoneIndexA=ipv6ScopeZoneIndexA, ipSystemStatsInHdrErrors=ipSystemStatsInHdrErrors, ipReasmOKs=ipReasmOKs, icmpGroup=icmpGroup, ipSystemStatsInMcastOctets=ipSystemStatsInMcastOctets, ipIfStatsOutRequests=ipIfStatsOutRequests, ipAddressPrefix=ipAddressPrefix, ipIfStatsOutMcastPkts=ipIfStatsOutMcastPkts, ipNetToPhysicalState=ipNetToPhysicalState, ipMIBCompliances=ipMIBCompliances, icmpInTimestamps=icmpInTimestamps, ipIfStatsIfIndex=ipIfStatsIfIndex, icmpOutMsgs=icmpOutMsgs, ipFragFails=ipFragFails, ipAddressStorageType=ipAddressStorageType, ipMIBConformance=ipMIBConformance, icmpOutParmProbs=icmpOutParmProbs, icmpMsgStatsTable=icmpMsgStatsTable, ipAddressEntry=ipAddressEntry, ipInHdrErrors=ipInHdrErrors, ipAddressStatus=ipAddressStatus, ipNetToPhysicalGroup=ipNetToPhysicalGroup, ipv6InterfaceIdentifier=ipv6InterfaceIdentifier, ipIfStatsHCOutForwDatagrams=ipIfStatsHCOutForwDatagrams, ipDefaultRouterEntry=ipDefaultRouterEntry, icmpInTimeExcds=icmpInTimeExcds, ipIfStatsRefreshRate=ipIfStatsRefreshRate, ipSystemStatsHCInForwDatagrams=ipSystemStatsHCInForwDatagrams, ipv4InterfaceIfIndex=ipv4InterfaceIfIndex, ipNetToMediaPhysAddress=ipNetToMediaPhysAddress, ipIfStatsInOctets=ipIfStatsInOctets, ipv6ScopeZoneIndex9=ipv6ScopeZoneIndex9, ipv6ScopeZoneIndexIfIndex=ipv6ScopeZoneIndexIfIndex, ipv6RouterAdvertOtherConfigFlag=ipv6RouterAdvertOtherConfigFlag, ipv6RouterAdvertCurHopLimit=ipv6RouterAdvertCurHopLimit, icmpStatsTable=icmpStatsTable, icmpStatsOutErrors=icmpStatsOutErrors, ipLastChangeGroup=ipLastChangeGroup, icmpOutEchos=icmpOutEchos, ipIfStatsIPVersion=ipIfStatsIPVersion, ipDefaultRouterAddress=ipDefaultRouterAddress, ipAddrTable=ipAddrTable, ipSystemStatsOutFragOKs=ipSystemStatsOutFragOKs, ipDefaultRouterLifetime=ipDefaultRouterLifetime, ipNetToMediaEntry=ipNetToMediaEntry, ipIfStatsOutBcastPkts=ipIfStatsOutBcastPkts, ipSystemStatsOutMcastOctets=ipSystemStatsOutMcastOctets, IpAddressOriginTC=IpAddressOriginTC, ipIfStatsInUnknownProtos=ipIfStatsInUnknownProtos, icmpMsgStatsType=icmpMsgStatsType, icmpOutEchoReps=icmpOutEchoReps, ipAddrEntry=ipAddrEntry, ipAddressLastChanged=ipAddressLastChanged, ipAddressAddrType=ipAddressAddrType, ipIfStatsHCOutMcastOctets=ipIfStatsHCOutMcastOctets, ipIfStatsHCPacketGroup=ipIfStatsHCPacketGroup, ipSystemStatsHCInDelivers=ipSystemStatsHCInDelivers, ipv6InterfaceIfIndex=ipv6InterfaceIfIndex, ipIfStatsTableLastChange=ipIfStatsTableLastChange, ipIfStatsInHdrErrors=ipIfStatsInHdrErrors, ipAddressPrefixIfIndex=ipAddressPrefixIfIndex, icmpStatsEntry=icmpStatsEntry, ipAddressPrefixAutonomousFlag=ipAddressPrefixAutonomousFlag, ipForwarding=ipForwarding, ipSystemStatsOutMcastPkts=ipSystemStatsOutMcastPkts, ipSystemStatsInBcastPkts=ipSystemStatsInBcastPkts, ipv6InterfaceForwarding=ipv6InterfaceForwarding, ipMIB=ipMIB, ipSystemStatsHCInMcastOctets=ipSystemStatsHCInMcastOctets, ipSystemStatsOutNoRoutes=ipSystemStatsOutNoRoutes, ipIfStatsHCOutRequests=ipIfStatsHCOutRequests, icmpStatsInMsgs=icmpStatsInMsgs, ipSystemStatsOutFragFails=ipSystemStatsOutFragFails, ipIfStatsOutFragOKs=ipIfStatsOutFragOKs, ipReasmReqds=ipReasmReqds, ipSystemStatsOutFragReqds=ipSystemStatsOutFragReqds, icmpOutTimeExcds=icmpOutTimeExcds, ipv6ScopeZoneIndex3=ipv6ScopeZoneIndex3, ipIfStatsOutOctets=ipIfStatsOutOctets, ipNetToPhysicalNetAddress=ipNetToPhysicalNetAddress, ipv6ScopeZoneIndexAdminLocal=ipv6ScopeZoneIndexAdminLocal, ipv4InterfaceRetransmitTime=ipv4InterfaceRetransmitTime, ipSystemStatsOutRequests=ipSystemStatsOutRequests, ipSystemStatsEntry=ipSystemStatsEntry, ipSystemStatsIPVersion=ipSystemStatsIPVersion, ipSystemStatsHCOutRequests=ipSystemStatsHCOutRequests, ipAddressOrigin=ipAddressOrigin, ipNetToPhysicalType=ipNetToPhysicalType, ipv6IfGroup=ipv6IfGroup, ipFragOKs=ipFragOKs, icmpInEchoReps=icmpInEchoReps, ipIfStatsHCOctetGroup=ipIfStatsHCOctetGroup, ipAddressSpinLock=ipAddressSpinLock, icmpInAddrMaskReps=icmpInAddrMaskReps, ipv6RouterAdvertIfIndex=ipv6RouterAdvertIfIndex, ipv6GeneralGroup2=ipv6GeneralGroup2, icmpStatsIPVersion=icmpStatsIPVersion, icmpOutTimestamps=icmpOutTimestamps, ipSystemStatsReasmOKs=ipSystemStatsReasmOKs, ipSystemStatsHCOutForwDatagrams=ipSystemStatsHCOutForwDatagrams, ipIfStatsOutDiscards=ipIfStatsOutDiscards, ipSystemStatsReasmFails=ipSystemStatsReasmFails, ipv6RouterAdvertSendAdverts=ipv6RouterAdvertSendAdverts, IpAddressStatusTC=IpAddressStatusTC, ipNetToMediaIfIndex=ipNetToMediaIfIndex, ipIfStatsDiscontinuityTime=ipIfStatsDiscontinuityTime, ipSystemStatsHCOctetGroup=ipSystemStatsHCOctetGroup, ipSystemStatsOutFragCreates=ipSystemStatsOutFragCreates, ipSystemStatsOutDiscards=ipSystemStatsOutDiscards) mibBuilder.exportSymbols("IP-MIB", ipIfStatsOutFragCreates=ipIfStatsOutFragCreates, ipSystemStatsTable=ipSystemStatsTable, ipAddressPrefixAdvValidLifetime=ipAddressPrefixAdvValidLifetime, icmpInRedirects=icmpInRedirects, ipv6RouterAdvertManagedFlag=ipv6RouterAdvertManagedFlag, ipNetToMediaType=ipNetToMediaType, ipv6RouterAdvertEntry=ipv6RouterAdvertEntry, ipv6RouterAdvertTable=ipv6RouterAdvertTable, ipv4InterfaceEnableStatus=ipv4InterfaceEnableStatus, ipv4InterfaceReasmMaxSize=ipv4InterfaceReasmMaxSize, ipSystemStatsHCOutMcastPkts=ipSystemStatsHCOutMcastPkts, ipAddressPrefixOrigin=ipAddressPrefixOrigin, ipIfStatsReasmFails=ipIfStatsReasmFails, ipv6InterfaceReachableTime=ipv6InterfaceReachableTime, icmpInErrors=icmpInErrors, ipAddressAddr=ipAddressAddr, ipv6InterfaceReasmMaxSize=ipv6InterfaceReasmMaxSize, ipSystemStatsHCInReceives=ipSystemStatsHCInReceives, ipSystemStatsInUnknownProtos=ipSystemStatsInUnknownProtos, icmpMsgStatsEntry=icmpMsgStatsEntry, ipInUnknownProtos=ipInUnknownProtos, ipSystemStatsOutTransmits=ipSystemStatsOutTransmits, ipOutRequests=ipOutRequests, ipSystemStatsInOctets=ipSystemStatsInOctets, ipAddressPrefixOnLinkFlag=ipAddressPrefixOnLinkFlag, ipAddressIfIndex=ipAddressIfIndex, ipIfStatsHCOutTransmits=ipIfStatsHCOutTransmits, ipIfStatsInMcastOctets=ipIfStatsInMcastOctets, icmpMsgStatsIPVersion=icmpMsgStatsIPVersion, ipv6ScopeZoneIndexB=ipv6ScopeZoneIndexB, ipv6RouterAdvertMaxInterval=ipv6RouterAdvertMaxInterval, ipNetToPhysicalTable=ipNetToPhysicalTable, ipSystemStatsHCOutOctets=ipSystemStatsHCOutOctets, ipNetToPhysicalEntry=ipNetToPhysicalEntry, ipMIBCompliance2=ipMIBCompliance2, ipFragCreates=ipFragCreates, PYSNMP_MODULE_ID=ipMIB, ipAdEntAddr=ipAdEntAddr, ipNetToMediaNetAddress=ipNetToMediaNetAddress, ipAddressPrefixGroup=ipAddressPrefixGroup, ipv6RouterAdvertDefaultLifetime=ipv6RouterAdvertDefaultLifetime, ipForwDatagrams=ipForwDatagrams, ipIfStatsInDiscards=ipIfStatsInDiscards, ipIfStatsOutTransmits=ipIfStatsOutTransmits)
fin = open("input_18.txt") digits = '1234567890' def end_of_operand(text): if text[0] == '(': plevel = 1 for i, char in enumerate(text[1:], 1): if char == '(': plevel += 1 elif char == ')': plevel += -1 if plevel == 0: leftop = text[1:i] parsepos = i break elif text[0] in digits: leftop=text[0] parsepos=1 # print('insert parens after', leftop, parsepos) return parsepos def insertparens(text, operator): num_operator = text.count(operator) for cur_operator in range(1,num_operator+1): tick = 0 for c_i,char in enumerate(text): if char == operator: tick += 1 if tick == cur_operator: break left = text[:c_i] left = invert(left) right = text[c_i+1:] # print('left: ',left) # print('right:',right) eol = end_of_operand(left) eor = end_of_operand(right) left = left[:eol]+')'+left[eol:] right = right[:eor]+')'+right[eor:] # print('left: ',left) # print('right:',right) text = invert(left)+operator+right # print('Parenthesis inserted:',text) return text def invert(text): text = text[::-1] text = text.replace('(', 'X') text = text.replace(')', '(') text = text.replace('X', ')') return text def prep(text): text = text.strip().replace(' ', '') # text = invert(text) text = insertparens(text,'+') return text def geval(text): # print(text) if text[0] == '(': plevel = 1 for i, char in enumerate(text[1:], 1): if char == '(': plevel += 1 elif char == ')': plevel += -1 if plevel == 0: leftop = text[1:i] parsepos = i break # print('parsepos', parsepos, len(text), leftop) if parsepos == len(text) - 1: return int(geval(leftop)) else: op = text[parsepos + 1] rightop = text[parsepos + 2:] elif text[0] in digits: if len(text) == 1: return int(text) else: leftop = text[0] op = text[1] rightop = text[2:] # print(leftop, op, rightop) if op == '+': return int(geval(leftop)) + int(geval(rightop)) elif op == '*': return int(geval(leftop)) * int(geval(rightop)) total = 0 for line in fin: pline = prep(line) print(line,end='') result = int(geval(pline)) print(pline, '=', result,'\n') total += result fin.close() print(total)
"""Constants for EQ3 Bluetooth Smart Radiator Valves.""" PRESET_PERMANENT_HOLD = "permanent_hold" PRESET_NO_HOLD = "no_hold" PRESET_OPEN = "open" PRESET_CLOSED = "closed"
""" Question: Given an array of integers nums and integer k, return the total number of continuous subarrays whose sum equals to k. nums = [1,-2,1,2,1,1] k =3 nums = [1,-2,1,2,1,1] k = 3 nums[i:j] """ def sub_array_sum(nums, k): n = len(nums) res = 0 for i in range(n-1): cum_sum = nums[i] for j in range(i+1,n): cum_sum += nums[j] if cum_sum == k: print(f"find k in subarray{i,j} ") res += 1 return res nums = [1,-2,1,2,1,1] k = 3 print(sub_array_sum(nums,k))
class DeleteDeniedException(Exception): pass class FileBrowser(object): pass
"""This problem was asked by Google. You are writing an AI for a 2D map game. You are somewhere in a 2D grid, and there are coins strewn about over the map. Given the position of all the coins and your current position, find the closest coin to you in terms of Manhattan distance. That is, you can move around up, down, left, and right, but not diagonally. If there are multiple possible closest coins, return any of them. For example, given the following map, where you are x, coins are o, and empty spaces are . (top left is 0, 0): --------------------- | . | . | x | . | o | --------------------- | o | . | . | . | . | --------------------- | o | . | . | . | o | --------------------- | . | . | o | . | . | --------------------- return (0, 4), since that coin is closest. This map would be represented in our question as: Our position: (0, 2) Coins: [(0, 4), (1, 0), (2, 0), (3, 2)] """
''' Fox and Snake String Output ''' n, m = list(map(int, input().split(' '))) for i in range(n): if i % 2 == 0: print('#'*m) elif (i+1) % 4 == 0: print('#'+'.'*(m-1)) else: print('.'*(m-1)+'#')
# # @lc app=leetcode id=119 lang=python3 # # [119] Pascal's Triangle II # # Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. # Note that the row index starts from 0. # In Pascal's triangle, each number is the sum of the two numbers directly above it. # Example: # Input: 3 # Output: [1,3,3,1] # Follow up: # Could you optimize your algorithm to use only O(k) extra space? class Solution: def getRow(self, rowIndex: int) -> List[int]: # Accepted # 34/34 cases passed (28 ms) # Your runtime beats 91.7 % of python3 submissions # Your memory usage beats 23.12 % of python3 submissions (13.4 MB) res = [1]*(rowIndex + 1) for i in range(1, rowIndex+1): for j in range((rowIndex-i)+1, rowIndex): res[j] += res[j+1] return res def getRow2(self, rowIndex: int) -> List[int]: # Accepted # 34/34 cases passed (36 ms) # Your runtime beats 55.97 % of python3 submissions # Your memory usage beats 22.95 % of python3 submissions (13.4 MB) pascal = [1]*(rowIndex + 1) for i in range(2, rowIndex+1): for j in range(i-1, 0, -1): pascal[j] += pascal[j-1] return pascal
# # PySNMP MIB module Unisphere-Data-ATM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Unisphere-Data-ATM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:23:09 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint") atmfM4VcTestObject, atmfM4VcTestType, atmfM4VpTestObject, atmfM4VpTestType, atmfM4VpTestResult, atmfM4VcTestResult, atmfM4VpTestId, atmfM4VcTestId = mibBuilder.importSymbols("ATM-FORUM-SNMP-M4-MIB", "atmfM4VcTestObject", "atmfM4VcTestType", "atmfM4VpTestObject", "atmfM4VpTestType", "atmfM4VpTestResult", "atmfM4VcTestResult", "atmfM4VpTestId", "atmfM4VcTestId") atmVplVpi, atmVclVci, atmVclVpi = mibBuilder.importSymbols("ATM-MIB", "atmVplVpi", "atmVclVci", "atmVclVpi") AtmAddr, AtmVcIdentifier, AtmVorXAdminStatus, AtmVpIdentifier = mibBuilder.importSymbols("ATM-TC-MIB", "AtmAddr", "AtmVcIdentifier", "AtmVorXAdminStatus", "AtmVpIdentifier") InterfaceIndex, ifIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifIndex", "InterfaceIndexOrZero") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") Integer32, Gauge32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, NotificationType, Bits, MibIdentifier, ObjectIdentity, Counter32, Unsigned32, IpAddress, Counter64, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "Gauge32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "NotificationType", "Bits", "MibIdentifier", "ObjectIdentity", "Counter32", "Unsigned32", "IpAddress", "Counter64", "iso") TimeStamp, TruthValue, DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "TruthValue", "DisplayString", "RowStatus", "TextualConvention") usDataMibs, = mibBuilder.importSymbols("Unisphere-Data-MIBs", "usDataMibs") UsdNextIfIndex, UsdEnable = mibBuilder.importSymbols("Unisphere-Data-TC", "UsdNextIfIndex", "UsdEnable") usdAtmMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8)) usdAtmMIB.setRevisions(('2002-08-09 13:40', '2002-01-24 14:00', '2001-12-14 18:04', '2001-11-26 16:39', '2000-11-27 19:51', '2000-08-02 00:00', '2000-05-12 00:00', '2000-01-13 00:00', '1999-08-04 00:00',)) if mibBuilder.loadTexts: usdAtmMIB.setLastUpdated('200208091340Z') if mibBuilder.loadTexts: usdAtmMIB.setOrganization('Juniper Networks, Inc.') class UsdAtmNbmaMapName(TextualConvention, OctetString): reference = 'RFC 854: NVT ASCII character set. See SNMPv2-TC.DisplayString DESCRIPTION for a summary.' status = 'current' displayHint = '32a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 32) class UsdAtmNbmaMapNameOrNull(TextualConvention, OctetString): reference = 'RFC 854: NVT ASCII character set. See SNMPv2-TC.DisplayString DESCRIPTION for a summary.' status = 'current' displayHint = '32a' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 32) usdAtmObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1)) usdAtmIfLayer = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1)) usdAtmAal5IfLayer = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2)) usdAtmSubIfLayer = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3)) usdAtmNbma = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4)) usdAtmPing = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5)) usdAtmNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 1), UsdNextIfIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmNextIfIndex.setStatus('current') usdAtmIfTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2), ) if mibBuilder.loadTexts: usdAtmIfTable.setStatus('current') usdAtmIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmIfIndex")) if mibBuilder.loadTexts: usdAtmIfEntry.setStatus('current') usdAtmIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmIfIndex.setStatus('current') usdAtmIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfRowStatus.setStatus('current') usdAtmIfLowerIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfLowerIfIndex.setStatus('current') usdAtmIfIlmiVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 4), AtmVpIdentifier()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfIlmiVpi.setStatus('current') usdAtmIfIlmiVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 5), AtmVcIdentifier().clone(16)).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfIlmiVci.setStatus('current') usdAtmIfIlmiVcd = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfIlmiVcd.setStatus('current') usdAtmIfIlmiPollFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfIlmiPollFrequency.setStatus('current') usdAtmIfIlmiAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfIlmiAdminState.setStatus('current') usdAtmIfUniVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("version3Dot0", 0), ("version3Dot1", 1), ("version4Dot0", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfUniVersion.setStatus('current') usdAtmIfOamCellRxAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("oamCellAdminStateDisabled", 0), ("oamCellAdminStateEnabled", 1))).clone('oamCellAdminStateEnabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfOamCellRxAdminState.setStatus('current') usdAtmIfInCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfInCells.setStatus('current') usdAtmIfOutCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfOutCells.setStatus('current') usdAtmIfVcCount = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 268431360))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfVcCount.setStatus('current') usdAtmIfMapGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 14), UsdAtmNbmaMapNameOrNull()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfMapGroup.setStatus('current') usdAtmIfCacAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 15), UsdEnable().clone('disable')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfCacAdminState.setStatus('current') usdAtmIfCacUbrWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfCacUbrWeight.setStatus('current') usdAtmIfCacSubscriptionBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfCacSubscriptionBandwidth.setStatus('current') usdAtmIfCacAvailableBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCacAvailableBandwidth.setStatus('current') usdAtmIfOamCellFilter = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("oamCellFilterAll", 0), ("oamCellFilterAlarm", 1))).clone('oamCellFilterAll')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmIfOamCellFilter.setStatus('current') usdAtmIfCacUsedBandwidthUpper = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 24), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCacUsedBandwidthUpper.setStatus('current') usdAtmIfCacUsedBandwidthLower = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 2, 1, 25), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCacUsedBandwidthLower.setStatus('current') usdAtmPvcStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3), ) if mibBuilder.loadTexts: usdAtmPvcStatisticsTable.setStatus('current') usdAtmPvcStatisticsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmPvcStatsIfIndex"), (0, "Unisphere-Data-ATM-MIB", "usdAtmPvcStatsVpi"), (0, "Unisphere-Data-ATM-MIB", "usdAtmPvcStatsVci")) if mibBuilder.loadTexts: usdAtmPvcStatisticsEntry.setStatus('current') usdAtmPvcStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmPvcStatsIfIndex.setStatus('current') usdAtmPvcStatsVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 2), AtmVpIdentifier()) if mibBuilder.loadTexts: usdAtmPvcStatsVpi.setStatus('current') usdAtmPvcStatsVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 3), AtmVcIdentifier()) if mibBuilder.loadTexts: usdAtmPvcStatsVci.setStatus('current') usdAtmPvcStatsInCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInCells.setStatus('current') usdAtmPvcStatsInCellOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInCellOctets.setStatus('current') usdAtmPvcStatsInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInPackets.setStatus('current') usdAtmPvcStatsInPacketOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInPacketOctets.setStatus('current') usdAtmPvcStatsOutCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutCells.setStatus('current') usdAtmPvcStatsOutCellOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutCellOctets.setStatus('current') usdAtmPvcStatsOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutPackets.setStatus('current') usdAtmPvcStatsOutPacketOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutPacketOctets.setStatus('current') usdAtmPvcStatsInCellErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInCellErrors.setStatus('current') usdAtmPvcStatsinPacketErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsinPacketErrors.setStatus('current') usdAtmPvcStatsOutCellErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutCellErrors.setStatus('current') usdAtmPvcStatsOutPacketErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsOutPacketErrors.setStatus('current') usdAtmPvcStatsInPacketDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInPacketDiscards.setStatus('current') usdAtmPvcStatsInPacketOctetDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInPacketOctetDiscards.setStatus('current') usdAtmPvcStatsInPacketUnknownProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 3, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmPvcStatsInPacketUnknownProtocol.setStatus('current') usdAtmVpTunnelTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4), ) if mibBuilder.loadTexts: usdAtmVpTunnelTable.setStatus('current') usdAtmVpTunnelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmVpTunnelIfIndex"), (0, "Unisphere-Data-ATM-MIB", "usdAtmVpTunnelVpi")) if mibBuilder.loadTexts: usdAtmVpTunnelEntry.setStatus('current') usdAtmVpTunnelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmVpTunnelIfIndex.setStatus('current') usdAtmVpTunnelVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1, 2), AtmVpIdentifier()) if mibBuilder.loadTexts: usdAtmVpTunnelVpi.setStatus('current') usdAtmVpTunnelKbps = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmVpTunnelKbps.setStatus('current') usdAtmVpTunnelRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmVpTunnelRowStatus.setStatus('current') usdAtmVpTunnelServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("nrtVbr", 1), ("cbr", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmVpTunnelServiceCategory.setStatus('current') usdAtmIfCapabilityTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5), ) if mibBuilder.loadTexts: usdAtmIfCapabilityTable.setStatus('current') usdAtmIfCapabilityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityIndex")) if mibBuilder.loadTexts: usdAtmIfCapabilityEntry.setStatus('current') usdAtmIfCapabilityIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmIfCapabilityIndex.setStatus('current') usdAtmIfCapabilityTrafficShaping = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityTrafficShaping.setStatus('current') usdAtmIfCapabilityOam = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityOam.setStatus('current') usdAtmIfCapabilityDefaultVcPerVp = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityDefaultVcPerVp.setStatus('current') usdAtmIfCapabilityNumVpiVciBits = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(8, 28))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityNumVpiVciBits.setStatus('current') usdAtmIfCapabilityMaxVcd = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityMaxVcd.setStatus('current') usdAtmIfCapabilityMaxVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 7), AtmVpIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityMaxVpi.setStatus('current') usdAtmIfCapabilityMaxVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 8), AtmVcIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityMaxVci.setStatus('current') usdAtmIfCapabilityOamCellFilter = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 5, 1, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmIfCapabilityOamCellFilter.setStatus('current') usdAtmIfSvcSignallingTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6), ) if mibBuilder.loadTexts: usdAtmIfSvcSignallingTable.setStatus('current') usdAtmIfSvcSignallingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmIfIndex")) if mibBuilder.loadTexts: usdAtmIfSvcSignallingEntry.setStatus('current') usdAtmIfSvcSignallingVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6, 1, 1), AtmVpIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmIfSvcSignallingVpi.setStatus('current') usdAtmIfSvcSignallingVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6, 1, 2), AtmVcIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmIfSvcSignallingVci.setStatus('current') usdAtmIfSvcSignallingVcd = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6, 1, 3), AtmVcIdentifier()).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmIfSvcSignallingVcd.setStatus('current') usdAtmIfSvcSignallingAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 1, 6, 1, 4), AtmVorXAdminStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmIfSvcSignallingAdminStatus.setStatus('current') usdAtmAal5NextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 1), UsdNextIfIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmAal5NextIfIndex.setStatus('current') usdAtmAal5IfTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 2), ) if mibBuilder.loadTexts: usdAtmAal5IfTable.setStatus('current') usdAtmAal5IfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 2, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmAal5IfIndex")) if mibBuilder.loadTexts: usdAtmAal5IfEntry.setStatus('current') usdAtmAal5IfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmAal5IfIndex.setStatus('current') usdAtmAal5IfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmAal5IfRowStatus.setStatus('current') usdAtmAal5IfLowerIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 2, 2, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmAal5IfLowerIfIndex.setStatus('current') usdAtmSubIfNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 1), UsdNextIfIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmSubIfNextIfIndex.setStatus('current') usdAtmSubIfTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2), ) if mibBuilder.loadTexts: usdAtmSubIfTable.setStatus('current') usdAtmSubIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmSubIfIndex")) if mibBuilder.loadTexts: usdAtmSubIfEntry.setStatus('current') usdAtmSubIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmSubIfIndex.setStatus('current') usdAtmSubIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfRowStatus.setStatus('current') usdAtmSubIfDistinguisher = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfDistinguisher.setStatus('current') usdAtmSubIfLowerIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfLowerIfIndex.setStatus('current') usdAtmSubIfNbma = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfNbma.setStatus('current') usdAtmSubIfAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 2, 1, 6), AtmAddr().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(7, 7), ValueSizeConstraint(20, 20), )).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfAddress.setStatus('current') usdAtmSubIfVccTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3), ) if mibBuilder.loadTexts: usdAtmSubIfVccTable.setStatus('current') usdAtmSubIfVccEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmSubIfIndex"), (0, "Unisphere-Data-ATM-MIB", "usdAtmSubIfVccVpi"), (0, "Unisphere-Data-ATM-MIB", "usdAtmSubIfVccVci")) if mibBuilder.loadTexts: usdAtmSubIfVccEntry.setStatus('current') usdAtmSubIfVccVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 1), AtmVpIdentifier()) if mibBuilder.loadTexts: usdAtmSubIfVccVpi.setStatus('current') usdAtmSubIfVccVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 2), AtmVcIdentifier()) if mibBuilder.loadTexts: usdAtmSubIfVccVci.setStatus('current') usdAtmSubIfVccRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccRowStatus.setStatus('current') usdAtmSubIfVccVcd = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccVcd.setStatus('current') usdAtmSubIfVccType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("rfc1483VcMux", 0), ("rfc1483Llc", 1), ("autoconfig", 2))).clone('rfc1483VcMux')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccType.setStatus('current') usdAtmSubIfVccServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("ubr", 0), ("ubrPcr", 1), ("nrtVbr", 2), ("cbr", 3), ("rtVbr", 4))).clone('ubr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccServiceCategory.setStatus('current') usdAtmSubIfVccPcr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccPcr.setStatus('current') usdAtmSubIfVccScr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccScr.setStatus('current') usdAtmSubIfVccMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('cells').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccMbs.setStatus('current') usdAtmSubIfInverseArp = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 10), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfInverseArp.setStatus('current') usdAtmSubIfInverseArpRefresh = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 3, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setUnits('minutes').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfInverseArpRefresh.setStatus('current') usdAtmCircuitOamTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4), ) if mibBuilder.loadTexts: usdAtmCircuitOamTable.setStatus('current') usdAtmCircuitOamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmCircuitOamIfIndex"), (0, "Unisphere-Data-ATM-MIB", "usdAtmCircuitOamVpi"), (0, "Unisphere-Data-ATM-MIB", "usdAtmCircuitOamVci")) if mibBuilder.loadTexts: usdAtmCircuitOamEntry.setStatus('current') usdAtmCircuitOamIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: usdAtmCircuitOamIfIndex.setStatus('current') usdAtmCircuitOamVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 2), AtmVpIdentifier()) if mibBuilder.loadTexts: usdAtmCircuitOamVpi.setStatus('current') usdAtmCircuitOamVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 3), AtmVcIdentifier()) if mibBuilder.loadTexts: usdAtmCircuitOamVci.setStatus('current') usdAtmCircuitOamAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("oamAdminStateDisabled", 1), ("oamAdminStateEnabled", 2))).clone('oamAdminStateDisabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmCircuitOamAdminStatus.setStatus('current') usdAtmCircuitOamLoopbackOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("oamOperStatusNotSupported", 0), ("oamOperStatusDisabled", 1), ("oamOperStatusSent", 2), ("oamOperStatusReceived", 3), ("oamOperStatusFailed", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitOamLoopbackOperStatus.setStatus('current') usdAtmCircuitVcOamOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("oamVcOperStateAisState", 0), ("oamVcOperStateRdiState", 1), ("oamVcOperStateDownRetry", 2), ("oamVcOperStateUpRetry", 3), ("oamVcOperStateUp", 4), ("oamVcOperStateDown", 5), ("oamVcOperStateNotManaged", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitVcOamOperStatus.setStatus('current') usdAtmCircuitOamLoopbackFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600)).clone(10)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmCircuitOamLoopbackFrequency.setStatus('current') usdAtmCircuitInOamF5Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 8), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamF5Cells.setStatus('current') usdAtmCircuitInOamCellsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 9), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamCellsDropped.setStatus('current') usdAtmCircuitOutOamF5Cells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 10), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitOutOamF5Cells.setStatus('current') usdAtmCircuitInOamF5EndToEndLoopbackCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 11), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamF5EndToEndLoopbackCells.setStatus('current') usdAtmCircuitInOamF5SegmentLoopbackCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 12), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamF5SegmentLoopbackCells.setStatus('current') usdAtmCircuitInOamF5AisCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 13), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamF5AisCells.setStatus('current') usdAtmCircuitInOamF5RdiCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 14), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitInOamF5RdiCells.setStatus('current') usdAtmCircuitOutOamF5EndToEndLoopbackCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 15), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitOutOamF5EndToEndLoopbackCells.setStatus('current') usdAtmCircuitOutOamF5SegmentLoopbackCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 16), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitOutOamF5SegmentLoopbackCells.setStatus('current') usdAtmCircuitOutOamF5RdiCells = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 4, 1, 17), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmCircuitOutOamF5RdiCells.setStatus('current') usdAtmSubIfVccTrafficShapingTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5), ) if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingTable.setStatus('current') usdAtmSubIfVccTrafficShapingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1), ) usdAtmSubIfVccEntry.registerAugmentions(("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingEntry")) usdAtmSubIfVccTrafficShapingEntry.setIndexNames(*usdAtmSubIfVccEntry.getIndexNames()) if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingEntry.setStatus('current') usdAtmSubIfVccTrafficShapingCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1, 1), Unsigned32()).setUnits('tenths of a microsecond').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingCdvt.setStatus('current') usdAtmSubIfVccTrafficShapingClp0 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1, 2), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingClp0.setStatus('current') usdAtmSubIfVccTrafficShapingTagging = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1, 3), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingTagging.setStatus('current') usdAtmSubIfVccTrafficShapingPoliceObserve = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1, 4), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingPoliceObserve.setStatus('current') usdAtmSubIfVccTrafficShapingPacketShaping = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 5, 1, 5), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfVccTrafficShapingPacketShaping.setStatus('current') usdAtmSubIfSvcConfigTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6), ) if mibBuilder.loadTexts: usdAtmSubIfSvcConfigTable.setStatus('current') usdAtmSubIfSvcConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmSubIfIndex")) if mibBuilder.loadTexts: usdAtmSubIfSvcConfigEntry.setStatus('current') usdAtmSubIfSvcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 1), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcRowStatus.setStatus('current') usdAtmSubIfSvcConfigDestAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 2), AtmAddr().subtype(subtypeSpec=ValueSizeConstraint(20, 20)).setFixedLength(20)).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigDestAtmAddress.setStatus('current') usdAtmSubIfSvcConfigCircuitType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("rfc1483VcMux", 0), ("rfc1483Llc", 1))).clone('rfc1483VcMux')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigCircuitType.setStatus('current') usdAtmSubIfSvcConfigServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("ubr", 0), ("ubrPcr", 1), ("nrtVbr", 2), ("cbr", 3), ("rtVbr", 4))).clone('ubr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigServiceCategory.setStatus('current') usdAtmSubIfSvcConfigPcr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 5), Unsigned32()).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigPcr.setStatus('current') usdAtmSubIfSvcConfigScr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 6), Unsigned32()).setUnits('kbps').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigScr.setStatus('current') usdAtmSubIfSvcConfigMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 7), Unsigned32()).setUnits('cells').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigMbs.setStatus('current') usdAtmSubIfSvcConfigCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 8), Unsigned32()).setUnits('100us').setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigCdvt.setStatus('current') usdAtmSubIfSvcConfigClp0 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 9), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigClp0.setStatus('current') usdAtmSubIfSvcConfigTagging = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 10), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigTagging.setStatus('current') usdAtmSubIfSvcConfigObserve = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 11), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigObserve.setStatus('current') usdAtmSubIfSvcConfigPacketDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 3, 6, 1, 12), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmSubIfSvcConfigPacketDiscard.setStatus('current') usdAtmNbmaMapTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1), ) if mibBuilder.loadTexts: usdAtmNbmaMapTable.setStatus('current') usdAtmNbmaMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1), ).setIndexNames((0, "Unisphere-Data-ATM-MIB", "usdAtmNbmaMapName"), (0, "Unisphere-Data-ATM-MIB", "usdAtmNbmaMapVcd")) if mibBuilder.loadTexts: usdAtmNbmaMapEntry.setStatus('current') usdAtmNbmaMapName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 1), UsdAtmNbmaMapName()) if mibBuilder.loadTexts: usdAtmNbmaMapName.setStatus('current') usdAtmNbmaMapVcd = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: usdAtmNbmaMapVcd.setStatus('current') usdAtmNbmaMapIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmNbmaMapIpAddress.setStatus('current') usdAtmNbmaMapVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 4), AtmVpIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmNbmaMapVpi.setStatus('current') usdAtmNbmaMapVci = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 5), AtmVcIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmNbmaMapVci.setStatus('current') usdAtmNbmaMapIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 6), InterfaceIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmNbmaMapIfIndex.setStatus('current') usdAtmNbmaMapBroadcast = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 7), TruthValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmNbmaMapBroadcast.setStatus('current') usdAtmNbmaMapRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 1, 1, 8), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmNbmaMapRowStatus.setStatus('current') usdAtmNbmaMapListTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 2), ) if mibBuilder.loadTexts: usdAtmNbmaMapListTable.setStatus('current') usdAtmNbmaMapListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 2, 1), ).setIndexNames((1, "Unisphere-Data-ATM-MIB", "usdAtmNbmaMapListName")) if mibBuilder.loadTexts: usdAtmNbmaMapListEntry.setStatus('current') usdAtmNbmaMapListName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 2, 1, 1), UsdAtmNbmaMapName()) if mibBuilder.loadTexts: usdAtmNbmaMapListName.setStatus('current') usdAtmNbmaMapListRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 4, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: usdAtmNbmaMapListRowStatus.setStatus('current') usdAtmPingTestTypes = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 1)) usdAtmPingTestOamSeg = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 1, 1)) if mibBuilder.loadTexts: usdAtmPingTestOamSeg.setStatus('current') usdAtmPingTestOamE2E = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 1, 2)) if mibBuilder.loadTexts: usdAtmPingTestOamE2E.setStatus('current') usdAtmVpPingTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2), ) if mibBuilder.loadTexts: usdAtmVpPingTable.setStatus('current') usdAtmVpPingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ATM-MIB", "atmVplVpi"), (0, "ATM-FORUM-SNMP-M4-MIB", "atmfM4VpTestObject")) if mibBuilder.loadTexts: usdAtmVpPingEntry.setStatus('current') usdAtmVpPingProbeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(5)).setUnits('probes').setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVpPingProbeCount.setStatus('current') usdAtmVpPingTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 5)).clone(5)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVpPingTimeOut.setStatus('current') usdAtmVpPingCtlTrapGeneration = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 3), Bits().clone(namedValues=NamedValues(("testCompletion", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVpPingCtlTrapGeneration.setStatus('current') usdAtmVpPingSentProbes = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 4), Unsigned32()).setUnits('probes').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingSentProbes.setStatus('current') usdAtmVpPingProbeResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 5), Unsigned32()).setUnits('probes').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingProbeResponses.setStatus('current') usdAtmVpPingStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 6), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingStartTime.setStatus('current') usdAtmVpPingMinRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 7), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingMinRtt.setStatus('current') usdAtmVpPingMaxRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 8), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingMaxRtt.setStatus('current') usdAtmVpPingAverageRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 2, 1, 9), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVpPingAverageRtt.setStatus('current') usdAtmVcPingTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3), ) if mibBuilder.loadTexts: usdAtmVcPingTable.setStatus('current') usdAtmVcPingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ATM-MIB", "atmVclVpi"), (0, "ATM-MIB", "atmVclVci"), (0, "ATM-FORUM-SNMP-M4-MIB", "atmfM4VcTestObject")) if mibBuilder.loadTexts: usdAtmVcPingEntry.setStatus('current') usdAtmVcPingProbeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(5)).setUnits('probes').setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVcPingProbeCount.setStatus('current') usdAtmVcPingTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 5)).clone(5)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVcPingTimeOut.setStatus('current') usdAtmVcPingCtlTrapGeneration = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 3), Bits().clone(namedValues=NamedValues(("testCompletion", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: usdAtmVcPingCtlTrapGeneration.setStatus('current') usdAtmVcPingSentProbes = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 4), Unsigned32()).setUnits('probes').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingSentProbes.setStatus('current') usdAtmVcPingProbeResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 5), Unsigned32()).setUnits('probes').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingProbeResponses.setStatus('current') usdAtmVcPingStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 6), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingStartTime.setStatus('current') usdAtmVcPingMinRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 7), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingMinRtt.setStatus('current') usdAtmVcPingMaxRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 8), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingMaxRtt.setStatus('current') usdAtmVcPingAverageRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 1, 5, 3, 1, 9), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: usdAtmVcPingAverageRtt.setStatus('current') usdAtmTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 3)) usdAtmTrapPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 3, 0)) usdAtmVpPingTestCompleted = NotificationType((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 3, 0, 1)).setObjects(("ATM-FORUM-SNMP-M4-MIB", "atmfM4VpTestId"), ("ATM-FORUM-SNMP-M4-MIB", "atmfM4VpTestType"), ("ATM-FORUM-SNMP-M4-MIB", "atmfM4VpTestResult"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingProbeCount"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingSentProbes"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingProbeResponses"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingMinRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingMaxRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingAverageRtt")) if mibBuilder.loadTexts: usdAtmVpPingTestCompleted.setStatus('current') usdAtmVcPingTestCompleted = NotificationType((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 3, 0, 2)).setObjects(("ATM-FORUM-SNMP-M4-MIB", "atmfM4VcTestId"), ("ATM-FORUM-SNMP-M4-MIB", "atmfM4VcTestType"), ("ATM-FORUM-SNMP-M4-MIB", "atmfM4VcTestResult"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingProbeCount"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingSentProbes"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingProbeResponses"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingMinRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingMaxRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingAverageRtt")) if mibBuilder.loadTexts: usdAtmVcPingTestCompleted.setStatus('current') usdAtmConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4)) usdAtmCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1)) usdAtmGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2)) usdAtmCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1, 1)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5Group"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmCompliance = usdAtmCompliance.setStatus('obsolete') usdAtmCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1, 2)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmGroup2"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5Group"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfGroup2"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmPingTrapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmCompliance2 = usdAtmCompliance2.setStatus('obsolete') usdAtmCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1, 3)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmGroup2"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5Group"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfGroup2"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmPingTrapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmTrafficShapingGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmCompliance3 = usdAtmCompliance3.setStatus('obsolete') usdAtmCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1, 4)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmGroup3"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5Group"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfGroup2"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmPingTrapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmTrafficShapingGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmCompliance4 = usdAtmCompliance4.setStatus('obsolete') usdAtmCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 1, 5)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmGroup4"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5Group"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfGroup3"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingControlGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmPingTrapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmSvcGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmTrafficShapingGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmCompliance5 = usdAtmCompliance5.setStatus('current') usdAtmGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 1)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiPollFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfUniVersion"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellRxAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfVcCount"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsinPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctetDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityTrafficShaping"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOam"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityDefaultVcPerVp"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityNumVpiVciBits"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVci")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmGroup = usdAtmGroup.setStatus('obsolete') usdAtmAal5Group = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 2)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmAal5NextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5IfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmAal5IfLowerIfIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmAal5Group = usdAtmAal5Group.setStatus('current') usdAtmSubIfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 3)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmSubIfNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfDistinguisher"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccType"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccServiceCategory"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccPcr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccScr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccMbs"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamAdminStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitVcOamOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamCellsDropped"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5AisCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5RdiCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5RdiCells")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmSubIfGroup = usdAtmSubIfGroup.setStatus('obsolete') usdAtmVpTunnelGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 4)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelKbps"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmVpTunnelServiceCategory")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmVpTunnelGroup = usdAtmVpTunnelGroup.setStatus('current') usdAtmNbmaMapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 5)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapIpAddress"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapVci"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapBroadcast"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmNbmaMapListRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmNbmaMapGroup = usdAtmNbmaMapGroup.setStatus('current') usdAtmSubIfGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 6)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmSubIfNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfDistinguisher"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfNbma"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccType"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccServiceCategory"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccPcr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccScr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccMbs"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfInverseArp"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfInverseArpRefresh"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamAdminStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitVcOamOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamCellsDropped"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5AisCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5RdiCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5RdiCells")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmSubIfGroup2 = usdAtmSubIfGroup2.setStatus('obsolete') usdAtmVpPingControlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 7)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmVpPingProbeCount"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingTimeOut"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingCtlTrapGeneration"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingSentProbes"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingProbeResponses"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingStartTime"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingMinRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingMaxRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVpPingAverageRtt")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmVpPingControlGroup = usdAtmVpPingControlGroup.setStatus('current') usdAtmVcPingControlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 8)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmVcPingProbeCount"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingTimeOut"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingCtlTrapGeneration"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingSentProbes"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingProbeResponses"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingStartTime"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingMinRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingMaxRtt"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingAverageRtt")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmVcPingControlGroup = usdAtmVcPingControlGroup.setStatus('current') usdAtmPingTrapGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 9)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmVpPingTestCompleted"), ("Unisphere-Data-ATM-MIB", "usdAtmVcPingTestCompleted")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmPingTrapGroup = usdAtmPingTrapGroup.setStatus('current') usdAtmGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 10)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiPollFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfUniVersion"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellRxAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfVcCount"), ("Unisphere-Data-ATM-MIB", "usdAtmIfMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellFilter"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsinPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctetDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketUnknownProtocol"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityTrafficShaping"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOam"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityDefaultVcPerVp"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityNumVpiVciBits"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOamCellFilter")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmGroup2 = usdAtmGroup2.setStatus('obsolete') usdAtmTrafficShapingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 11)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingCdvt"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingClp0"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingTagging"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingPoliceObserve"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccTrafficShapingPacketShaping")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmTrafficShapingGroup = usdAtmTrafficShapingGroup.setStatus('current') usdAtmGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 12)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiPollFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfUniVersion"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellRxAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfVcCount"), ("Unisphere-Data-ATM-MIB", "usdAtmIfMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacUbrWeight"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacSubscriptionBandwidth"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacAvailableBandwidth"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellFilter"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsinPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctetDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketUnknownProtocol"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityTrafficShaping"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOam"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityDefaultVcPerVp"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityNumVpiVciBits"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOamCellFilter")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmGroup3 = usdAtmGroup3.setStatus('obsolete') usdAtmGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 13)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiPollFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmIfIlmiAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfUniVersion"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellRxAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmIfVcCount"), ("Unisphere-Data-ATM-MIB", "usdAtmIfMapGroup"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacAdminState"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacUbrWeight"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacSubscriptionBandwidth"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacAvailableBandwidth"), ("Unisphere-Data-ATM-MIB", "usdAtmIfOamCellFilter"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacUsedBandwidthUpper"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCacUsedBandwidthLower"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCells"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPackets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketOctets"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsinPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutCellErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsOutPacketErrors"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketOctetDiscards"), ("Unisphere-Data-ATM-MIB", "usdAtmPvcStatsInPacketUnknownProtocol"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityTrafficShaping"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOam"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityDefaultVcPerVp"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityNumVpiVciBits"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityMaxVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfCapabilityOamCellFilter")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmGroup4 = usdAtmGroup4.setStatus('current') usdAtmSvcGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 14)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmIfSvcSignallingVpi"), ("Unisphere-Data-ATM-MIB", "usdAtmIfSvcSignallingVci"), ("Unisphere-Data-ATM-MIB", "usdAtmIfSvcSignallingVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmIfSvcSignallingAdminStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigDestAtmAddress"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigCircuitType"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigServiceCategory"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigPcr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigScr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigMbs"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigCdvt"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigClp0"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigTagging"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigObserve"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfSvcConfigPacketDiscard")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmSvcGroup = usdAtmSvcGroup.setStatus('current') usdAtmSubIfGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 8, 4, 2, 15)).setObjects(("Unisphere-Data-ATM-MIB", "usdAtmSubIfNextIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfDistinguisher"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfLowerIfIndex"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfNbma"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfAddress"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccRowStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccVcd"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccType"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccServiceCategory"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccPcr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccScr"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfVccMbs"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfInverseArp"), ("Unisphere-Data-ATM-MIB", "usdAtmSubIfInverseArpRefresh"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamAdminStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitVcOamOperStatus"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOamLoopbackFrequency"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamCellsDropped"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5Cells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5AisCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitInOamF5RdiCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5EndToEndLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5SegmentLoopbackCells"), ("Unisphere-Data-ATM-MIB", "usdAtmCircuitOutOamF5RdiCells")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdAtmSubIfGroup3 = usdAtmSubIfGroup3.setStatus('current') mibBuilder.exportSymbols("Unisphere-Data-ATM-MIB", usdAtmCircuitInOamF5SegmentLoopbackCells=usdAtmCircuitInOamF5SegmentLoopbackCells, usdAtmSubIfGroup=usdAtmSubIfGroup, usdAtmIfUniVersion=usdAtmIfUniVersion, usdAtmIfLowerIfIndex=usdAtmIfLowerIfIndex, usdAtmIfOamCellRxAdminState=usdAtmIfOamCellRxAdminState, usdAtmPingTestTypes=usdAtmPingTestTypes, usdAtmVcPingTable=usdAtmVcPingTable, usdAtmVpPingAverageRtt=usdAtmVpPingAverageRtt, usdAtmCircuitOutOamF5EndToEndLoopbackCells=usdAtmCircuitOutOamF5EndToEndLoopbackCells, usdAtmPvcStatsInCellOctets=usdAtmPvcStatsInCellOctets, usdAtmVpPingEntry=usdAtmVpPingEntry, usdAtmSvcGroup=usdAtmSvcGroup, usdAtmVcPingCtlTrapGeneration=usdAtmVcPingCtlTrapGeneration, usdAtmIfMapGroup=usdAtmIfMapGroup, usdAtmSubIfIndex=usdAtmSubIfIndex, usdAtmVcPingProbeResponses=usdAtmVcPingProbeResponses, usdAtmCompliance3=usdAtmCompliance3, usdAtmSubIfVccVci=usdAtmSubIfVccVci, usdAtmSubIfNextIfIndex=usdAtmSubIfNextIfIndex, usdAtmIfOamCellFilter=usdAtmIfOamCellFilter, usdAtmPvcStatsInCellErrors=usdAtmPvcStatsInCellErrors, usdAtmIfCapabilityTable=usdAtmIfCapabilityTable, usdAtmSubIfVccEntry=usdAtmSubIfVccEntry, usdAtmMIB=usdAtmMIB, usdAtmSubIfSvcConfigTagging=usdAtmSubIfSvcConfigTagging, usdAtmNbmaMapVcd=usdAtmNbmaMapVcd, usdAtmCircuitInOamF5RdiCells=usdAtmCircuitInOamF5RdiCells, usdAtmSubIfVccScr=usdAtmSubIfVccScr, usdAtmVpPingStartTime=usdAtmVpPingStartTime, usdAtmVcPingMinRtt=usdAtmVcPingMinRtt, usdAtmIfIlmiVpi=usdAtmIfIlmiVpi, usdAtmIfCacUsedBandwidthLower=usdAtmIfCacUsedBandwidthLower, usdAtmPvcStatsOutCells=usdAtmPvcStatsOutCells, usdAtmIfCacUbrWeight=usdAtmIfCacUbrWeight, usdAtmCircuitOamTable=usdAtmCircuitOamTable, usdAtmSubIfVccTrafficShapingTagging=usdAtmSubIfVccTrafficShapingTagging, usdAtmPingTestOamE2E=usdAtmPingTestOamE2E, usdAtmVpPingTable=usdAtmVpPingTable, usdAtmIfIlmiPollFrequency=usdAtmIfIlmiPollFrequency, usdAtmTrapPrefix=usdAtmTrapPrefix, usdAtmVpTunnelKbps=usdAtmVpTunnelKbps, usdAtmPvcStatisticsEntry=usdAtmPvcStatisticsEntry, usdAtmTraps=usdAtmTraps, usdAtmIfIlmiVcd=usdAtmIfIlmiVcd, usdAtmSubIfInverseArpRefresh=usdAtmSubIfInverseArpRefresh, UsdAtmNbmaMapName=UsdAtmNbmaMapName, usdAtmCircuitVcOamOperStatus=usdAtmCircuitVcOamOperStatus, usdAtmIfCapabilityTrafficShaping=usdAtmIfCapabilityTrafficShaping, usdAtmVpTunnelIfIndex=usdAtmVpTunnelIfIndex, usdAtmPingTrapGroup=usdAtmPingTrapGroup, usdAtmCircuitOamLoopbackFrequency=usdAtmCircuitOamLoopbackFrequency, usdAtmIfSvcSignallingVci=usdAtmIfSvcSignallingVci, usdAtmIfSvcSignallingVpi=usdAtmIfSvcSignallingVpi, usdAtmIfSvcSignallingAdminStatus=usdAtmIfSvcSignallingAdminStatus, usdAtmSubIfSvcConfigDestAtmAddress=usdAtmSubIfSvcConfigDestAtmAddress, usdAtmGroups=usdAtmGroups, usdAtmVpTunnelTable=usdAtmVpTunnelTable, usdAtmPvcStatsOutPackets=usdAtmPvcStatsOutPackets, usdAtmVpPingCtlTrapGeneration=usdAtmVpPingCtlTrapGeneration, usdAtmVcPingControlGroup=usdAtmVcPingControlGroup, usdAtmCircuitOamEntry=usdAtmCircuitOamEntry, usdAtmNbmaMapListName=usdAtmNbmaMapListName, usdAtmSubIfSvcConfigCircuitType=usdAtmSubIfSvcConfigCircuitType, usdAtmAal5IfEntry=usdAtmAal5IfEntry, usdAtmSubIfSvcConfigServiceCategory=usdAtmSubIfSvcConfigServiceCategory, usdAtmIfCapabilityMaxVci=usdAtmIfCapabilityMaxVci, usdAtmVpPingSentProbes=usdAtmVpPingSentProbes, usdAtmIfCapabilityIndex=usdAtmIfCapabilityIndex, usdAtmAal5IfLayer=usdAtmAal5IfLayer, usdAtmCircuitOamVci=usdAtmCircuitOamVci, usdAtmSubIfSvcConfigEntry=usdAtmSubIfSvcConfigEntry, usdAtmCompliance4=usdAtmCompliance4, usdAtmGroup4=usdAtmGroup4, UsdAtmNbmaMapNameOrNull=UsdAtmNbmaMapNameOrNull, usdAtmSubIfLowerIfIndex=usdAtmSubIfLowerIfIndex, usdAtmSubIfVccTrafficShapingEntry=usdAtmSubIfVccTrafficShapingEntry, usdAtmSubIfSvcConfigCdvt=usdAtmSubIfSvcConfigCdvt, usdAtmSubIfVccType=usdAtmSubIfVccType, usdAtmVpPingTimeOut=usdAtmVpPingTimeOut, usdAtmNbmaMapRowStatus=usdAtmNbmaMapRowStatus, usdAtmPing=usdAtmPing, usdAtmTrafficShapingGroup=usdAtmTrafficShapingGroup, usdAtmNextIfIndex=usdAtmNextIfIndex, usdAtmSubIfGroup2=usdAtmSubIfGroup2, usdAtmIfCapabilityOamCellFilter=usdAtmIfCapabilityOamCellFilter, usdAtmVpTunnelEntry=usdAtmVpTunnelEntry, usdAtmCircuitInOamCellsDropped=usdAtmCircuitInOamCellsDropped, usdAtmSubIfRowStatus=usdAtmSubIfRowStatus, usdAtmObjects=usdAtmObjects, usdAtmVcPingTimeOut=usdAtmVcPingTimeOut, usdAtmCompliance2=usdAtmCompliance2, usdAtmIfEntry=usdAtmIfEntry, usdAtmIfCapabilityDefaultVcPerVp=usdAtmIfCapabilityDefaultVcPerVp, usdAtmIfVcCount=usdAtmIfVcCount, usdAtmIfCapabilityMaxVcd=usdAtmIfCapabilityMaxVcd, usdAtmAal5NextIfIndex=usdAtmAal5NextIfIndex, usdAtmCircuitOamAdminStatus=usdAtmCircuitOamAdminStatus, usdAtmPvcStatsOutCellErrors=usdAtmPvcStatsOutCellErrors, usdAtmPvcStatsOutCellOctets=usdAtmPvcStatsOutCellOctets, usdAtmSubIfSvcConfigMbs=usdAtmSubIfSvcConfigMbs, usdAtmPvcStatsIfIndex=usdAtmPvcStatsIfIndex, usdAtmPvcStatsVpi=usdAtmPvcStatsVpi, usdAtmNbmaMapVpi=usdAtmNbmaMapVpi, usdAtmNbmaMapListEntry=usdAtmNbmaMapListEntry, usdAtmSubIfVccTrafficShapingPacketShaping=usdAtmSubIfVccTrafficShapingPacketShaping, usdAtmCompliance5=usdAtmCompliance5, usdAtmNbmaMapBroadcast=usdAtmNbmaMapBroadcast, usdAtmVcPingProbeCount=usdAtmVcPingProbeCount, usdAtmPvcStatsInCells=usdAtmPvcStatsInCells, usdAtmSubIfVccServiceCategory=usdAtmSubIfVccServiceCategory, usdAtmCircuitOamIfIndex=usdAtmCircuitOamIfIndex, usdAtmVpPingMaxRtt=usdAtmVpPingMaxRtt, usdAtmAal5IfLowerIfIndex=usdAtmAal5IfLowerIfIndex, usdAtmSubIfSvcConfigScr=usdAtmSubIfSvcConfigScr, usdAtmNbmaMapVci=usdAtmNbmaMapVci, usdAtmSubIfSvcConfigObserve=usdAtmSubIfSvcConfigObserve, usdAtmCircuitOamLoopbackOperStatus=usdAtmCircuitOamLoopbackOperStatus, usdAtmSubIfAddress=usdAtmSubIfAddress, usdAtmCircuitInOamF5EndToEndLoopbackCells=usdAtmCircuitInOamF5EndToEndLoopbackCells, usdAtmAal5Group=usdAtmAal5Group, usdAtmIfLayer=usdAtmIfLayer, usdAtmPvcStatsinPacketErrors=usdAtmPvcStatsinPacketErrors, usdAtmSubIfTable=usdAtmSubIfTable, usdAtmAal5IfTable=usdAtmAal5IfTable, usdAtmSubIfDistinguisher=usdAtmSubIfDistinguisher, usdAtmPvcStatsVci=usdAtmPvcStatsVci, usdAtmIfCapabilityNumVpiVciBits=usdAtmIfCapabilityNumVpiVciBits, usdAtmIfIlmiAdminState=usdAtmIfIlmiAdminState, usdAtmSubIfVccVcd=usdAtmSubIfVccVcd, usdAtmIfCapabilityOam=usdAtmIfCapabilityOam, usdAtmPvcStatsInPackets=usdAtmPvcStatsInPackets, usdAtmSubIfVccTrafficShapingCdvt=usdAtmSubIfVccTrafficShapingCdvt, usdAtmNbmaMapListRowStatus=usdAtmNbmaMapListRowStatus, usdAtmIfSvcSignallingTable=usdAtmIfSvcSignallingTable, usdAtmAal5IfIndex=usdAtmAal5IfIndex, usdAtmPvcStatsInPacketOctets=usdAtmPvcStatsInPacketOctets, PYSNMP_MODULE_ID=usdAtmMIB, usdAtmVcPingTestCompleted=usdAtmVcPingTestCompleted, usdAtmAal5IfRowStatus=usdAtmAal5IfRowStatus, usdAtmVcPingSentProbes=usdAtmVcPingSentProbes, usdAtmNbmaMapGroup=usdAtmNbmaMapGroup, usdAtmSubIfVccVpi=usdAtmSubIfVccVpi, usdAtmSubIfSvcConfigTable=usdAtmSubIfSvcConfigTable, usdAtmPvcStatisticsTable=usdAtmPvcStatisticsTable, usdAtmNbmaMapListTable=usdAtmNbmaMapListTable, usdAtmPvcStatsInPacketUnknownProtocol=usdAtmPvcStatsInPacketUnknownProtocol, usdAtmVpPingMinRtt=usdAtmVpPingMinRtt, usdAtmPvcStatsOutPacketErrors=usdAtmPvcStatsOutPacketErrors, usdAtmSubIfGroup3=usdAtmSubIfGroup3, usdAtmIfIndex=usdAtmIfIndex, usdAtmGroup=usdAtmGroup, usdAtmNbma=usdAtmNbma, usdAtmSubIfEntry=usdAtmSubIfEntry, usdAtmIfSvcSignallingEntry=usdAtmIfSvcSignallingEntry, usdAtmIfCacAdminState=usdAtmIfCacAdminState, usdAtmCircuitInOamF5AisCells=usdAtmCircuitInOamF5AisCells, usdAtmCompliances=usdAtmCompliances, usdAtmVcPingEntry=usdAtmVcPingEntry, usdAtmIfCacAvailableBandwidth=usdAtmIfCacAvailableBandwidth, usdAtmVpTunnelVpi=usdAtmVpTunnelVpi, usdAtmIfTable=usdAtmIfTable, usdAtmVpTunnelServiceCategory=usdAtmVpTunnelServiceCategory, usdAtmIfOutCells=usdAtmIfOutCells, usdAtmCompliance=usdAtmCompliance, usdAtmGroup3=usdAtmGroup3, usdAtmSubIfSvcRowStatus=usdAtmSubIfSvcRowStatus, usdAtmPingTestOamSeg=usdAtmPingTestOamSeg, usdAtmVpPingProbeCount=usdAtmVpPingProbeCount, usdAtmPvcStatsInPacketOctetDiscards=usdAtmPvcStatsInPacketOctetDiscards, usdAtmNbmaMapTable=usdAtmNbmaMapTable, usdAtmPvcStatsInPacketDiscards=usdAtmPvcStatsInPacketDiscards, usdAtmSubIfVccPcr=usdAtmSubIfVccPcr, usdAtmSubIfSvcConfigPcr=usdAtmSubIfSvcConfigPcr, usdAtmCircuitOutOamF5SegmentLoopbackCells=usdAtmCircuitOutOamF5SegmentLoopbackCells, usdAtmSubIfVccTrafficShapingPoliceObserve=usdAtmSubIfVccTrafficShapingPoliceObserve, usdAtmIfCapabilityEntry=usdAtmIfCapabilityEntry, usdAtmIfSvcSignallingVcd=usdAtmIfSvcSignallingVcd, usdAtmSubIfVccRowStatus=usdAtmSubIfVccRowStatus, usdAtmSubIfLayer=usdAtmSubIfLayer, usdAtmNbmaMapIpAddress=usdAtmNbmaMapIpAddress, usdAtmVpPingTestCompleted=usdAtmVpPingTestCompleted, usdAtmCircuitInOamF5Cells=usdAtmCircuitInOamF5Cells, usdAtmVcPingMaxRtt=usdAtmVcPingMaxRtt, usdAtmSubIfInverseArp=usdAtmSubIfInverseArp, usdAtmVcPingAverageRtt=usdAtmVcPingAverageRtt, usdAtmVpTunnelRowStatus=usdAtmVpTunnelRowStatus, usdAtmGroup2=usdAtmGroup2, usdAtmSubIfSvcConfigPacketDiscard=usdAtmSubIfSvcConfigPacketDiscard, usdAtmPvcStatsOutPacketOctets=usdAtmPvcStatsOutPacketOctets, usdAtmSubIfVccTable=usdAtmSubIfVccTable, usdAtmNbmaMapEntry=usdAtmNbmaMapEntry, usdAtmVpPingControlGroup=usdAtmVpPingControlGroup, usdAtmIfRowStatus=usdAtmIfRowStatus, usdAtmIfInCells=usdAtmIfInCells, usdAtmNbmaMapName=usdAtmNbmaMapName, usdAtmVpTunnelGroup=usdAtmVpTunnelGroup, usdAtmSubIfVccTrafficShapingClp0=usdAtmSubIfVccTrafficShapingClp0, usdAtmSubIfVccTrafficShapingTable=usdAtmSubIfVccTrafficShapingTable, usdAtmIfIlmiVci=usdAtmIfIlmiVci, usdAtmCircuitOutOamF5RdiCells=usdAtmCircuitOutOamF5RdiCells, usdAtmVpPingProbeResponses=usdAtmVpPingProbeResponses, usdAtmIfCapabilityMaxVpi=usdAtmIfCapabilityMaxVpi, usdAtmIfCacUsedBandwidthUpper=usdAtmIfCacUsedBandwidthUpper, usdAtmConformance=usdAtmConformance, usdAtmNbmaMapIfIndex=usdAtmNbmaMapIfIndex, usdAtmSubIfNbma=usdAtmSubIfNbma, usdAtmSubIfVccMbs=usdAtmSubIfVccMbs, usdAtmIfCacSubscriptionBandwidth=usdAtmIfCacSubscriptionBandwidth, usdAtmCircuitOutOamF5Cells=usdAtmCircuitOutOamF5Cells, usdAtmVcPingStartTime=usdAtmVcPingStartTime, usdAtmSubIfSvcConfigClp0=usdAtmSubIfSvcConfigClp0, usdAtmCircuitOamVpi=usdAtmCircuitOamVpi)
""" 1152. Analyze User Website Visit Pattern Medium We are given some website visits: the user with name username[i] visited the website website[i] at time timestamp[i]. A 3-sequence is a list of websites of length 3 sorted in ascending order by the time of their visits. (The websites in a 3-sequence are not necessarily distinct.) Find the 3-sequence visited by the largest number of users. If there is more than one solution, return the lexicographically smallest such 3-sequence. Example 1: Input: username = ["joe","joe","joe","james","james","james","james","mary","mary","mary"], timestamp = [1,2,3,4,5,6,7,8,9,10], website = ["home","about","career","home","cart","maps","home","home","about","career"] Output: ["home","about","career"] Explanation: The tuples in this example are: ["joe", 1, "home"] ["joe", 2, "about"] ["joe", 3, "career"] ["james", 4, "home"] ["james", 5, "cart"] ["james", 6, "maps"] ["james", 7, "home"] ["mary", 8, "home"] ["mary", 9, "about"] ["mary", 10, "career"] The 3-sequence ("home", "about", "career") was visited at least once by 2 users. The 3-sequence ("home", "cart", "maps") was visited at least once by 1 user. The 3-sequence ("home", "cart", "home") was visited at least once by 1 user. The 3-sequence ("home", "maps", "home") was visited at least once by 1 user. The 3-sequence ("cart", "maps", "home") was visited at least once by 1 user. Note: 3 <= N = username.length = timestamp.length = website.length <= 50 1 <= username[i].length <= 10 0 <= timestamp[i] <= 10^9 1 <= website[i].length <= 10 Both username[i] and website[i] contain only lowercase characters. It is guaranteed that there is at least one user who visited at least 3 websites. No user visits two websites at the same time. """ class Solution: def mostVisitedPattern(self, username: List[str], timestamp: List[int], website: List[str]) -> List[str]: dp = collections.defaultdict(list) for t, u, w in sorted(zip(timestamp, username, website)): dp[u].append(w) cnt = sum([collections.Counter(set(itertools.combinations(dp[u], 3))) for u in dp], collections.Counter()) return list(min(cnt, key = lambda k: (-cnt[k], k)))
filepath = "List of alternative rock artists - Wikipedia.html" classifiedAs = "alternative rock" file = open(filepath) outputLines = [] for line in file: if "</a></li>" in line: outputLine = line.split("</a></li>")[0].split(">").pop() + " - " + classifiedAs outputLines.append(outputLine) file.close() outputFile = open("outputDataset.txt", "w") outputFile.write("\n".join(outputLines)) outputFile.close()
def flatten_dict(nested_dict, sep=None): """ flatten_dict flattens a dictionary, The flattened keys are joined using a separater which is default to '__'. :param nested_dict: input nested dictionary to be flattened. :type nested_dict: dict :param sep: seperator for the joined keys, defaults to __ :type sep: str, optional :return: flattened dictionar :rtype: dict """ if sep is None: sep = "__" res = {} def flatten(x, name=""): if type(x) is dict: for a in x: flatten(x[a], name + a + sep) elif type(x) is list: i = 0 for a in x: flatten(a, name + str(i) + sep) i += 1 else: res[name[:-2]] = x flatten(nested_dict) return res
class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ values = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} res, prev = 0, 0 for c in reversed(s.upper()): res += +values[c] if values[c] >= prev else -values[c] prev = values[c] return res
N = int(input()) result = 0 for i in range(1, N + 1, 2): t = 0 for j in range(1, i + 1): if i % j == 0: t += 1 if t == 8: result += 1 print(result)
# -*- coding: utf-8 -*- class Optimizer(object): def __init__(self, parameters, lr=0.01): self.parameters = parameters self.lr = lr def step(self): raise NotImplementedError def zero_grad(self): for param in self.parameters: param.zero_grad()
a = rtdpy.Ncstr(tau=1, n=2, dt=.001, time_end=10) b = rtdpy.Pfr(tau=3, dt=.001, time_end=10) c = rtdpy.Elist([a, b]) plt.plot(c.time, c.exitage) plt.xlabel('Time') plt.ylabel('Exit Age Function') plt.title('Combined RTD Model')
""" Write a Python program to display the examination schedule. (extract the date from exam_st_date). exam_st_date = (11, 12, 2014) Sample Output : The examination will start from : 11 / 12 / 2014 """ exam_st_date = (11, 12, 2014) print("The examination will start from:",'{}/{}/{}'.format(exam_st_date[0],exam_st_date[1],exam_st_date[2]))
#!/usr/bin/env python # # (c) Copyright Rosetta Commons Member Institutions. # (c) This file is part of the Rosetta software suite and is made available under license. # (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. # (c) For more information, see http://www.rosettacommons.org. Questions about this can be # (c) addressed to University of Washington CoMotion, email: [email protected]. ## @file /GUIs/pyrosetta_toolkit/modules/definitions/restype_definitions.py ## @brief Container class for restypes ## @author Jared Adolf-Bryfogle ([email protected]) #This object holds data used to define certain things. CDR's, SASA, Residue types and names, etc. Hopefully, this will streamline working within python. #This seems like an ok way to do this. Keep. #All the dictionaries for residue Types in design class definitions(): def __init__(self): self.restypes = ("All", "Charged", "Positive", "Negative", "Non-Polar", "Polar-Uncharged", "Polar", "Aromatic", "Hydroxyl", "Conserved", "etc") self.restype_info= dict() self.resinfo = dict() self.set_mutation_info() self.set_residue_info() def get_residue_info(self): return self.restype_info def get_mutation_info(self): return self.resinfo def get_one_letter_from_three(self, three_letter_code): three_letter_code = three_letter_code.split("_")[0].upper(); #Fix for Rosetta designated chain endings. if three_letter_code=="CYD": three_letter_code="CYS"; #Fix for Disulfide for triplet in self.restype_info["All"]: tripletSP = triplet.split(":") if tripletSP[1]==three_letter_code: return tripletSP[2] def get_three_letter_from_one(self, one_letter_code): one_letter_code = one_letter_code.upper() for triplet in self.restype_info["All"]: tripletSP = triplet.split(":") if tripletSP[2]==one_letter_code: return tripletSP[1] def get_all_one_letter_codes(self): one_letter_codes = [] for triplet in self.restype_info["All"]: tripletSP = triplet.split(":") one_letter_codes.append(tripletSP[2]) return sorted(one_letter_codes) def set_residue_info(self): self.restype_info["Charged"]=("Lysine:LYS:K", "Arginine:ARG:R" "Glutamate:GLU:E", "Aspartate:ASP:D", "Histidine:HIS:H") self.restype_info["Positive"]=("Lysine:LYS:K", "Arginine:ARG:R", "Histidine:HIS:H") self.restype_info["Negative"]=("Glutamate:GLU:E", "Aspartate:ASP:D") self.restype_info["Non-Polar"]=("Glycine:GLY:G", "Alanine:ALA:A", "Valine:VAL:V", "Leucine:LEU:L", "Isoleucine:ILE:I", "Methionine:MET:M", "Proline:PRO:P") self.restype_info["Polar-Uncharged"]=("Serine:SER:S", "Threonine:THR:T", "Cysteine:CYS:C", "Glutamine:GLN:Q", "Asparagine:ASN:N") self.restype_info["Polar"] = ("Serine:SER:S", "Threonine:THR:T", "Cysteine:CYS:C", "Glutamine:GLN:Q", "Asparagine:ASN:N", "Lysine:LYS:K", "Arginine:ARG:R", "Glutamate:GLU:E", "Aspartate:ASP:D", "Histidine:HIS:H") self.restype_info["Aromatic"] = ("Phenylalanine:PHE:F", "Tyrosine:TYR:Y", "Tryptophan:TRP:W") self.restype_info["Hydroxyl"] = ("Serine:SER:S", "Threonine:THR:T", "Tyrosine:TYR:Y") self.restype_info["All"] = ("Alanine:ALA:A", "Arginine:ARG:R", "Asparagine:ASN:N", "Aspartate:ASP:D", "Cysteine:CYS:C", "Glutamate:GLU:E", "Glutamine:GLN:Q", "Glycine:GLY:G", "Histidine:HIS:H", "Leucine:LEU:L", "Isoleucine:ILE:I", "Lysine:LYS:K", "Methionine:MET:M", "Phenylalanine:PHE:F", "Proline:PRO:P", "Serine:SER:S", "Threonine:THR:T", "Tryptophan:TRP:W", "Tyrosine:TYR:Y", "Valine:VAL:V") self.restype_info["Conserved"] = ("All Conserved Mutations", "All Conserved Mutations+Self") self.restype_info["Conserved:ALA"]=("Serine:SER:S", "Glycine:GLY:G", "Threonine:THR:T", "Proline:PRO:P") self.restype_info["Conserved:ARG"]=("Lysine:LYS:K", "Histidine:HIS:H", "Tryptophan:TRP:W", "Glutamine:GLN:Q") self.restype_info["Conserved:ASN"]=("Apartate:ASP:D", "Serine:SER:S", "Histidine:HIS:H", "Lysine:LYS:K", "Glutamine:GLN:Q", "Glutamate:GLU:E") self.restype_info["Conserved:ASP"]=("Asparagine:ASN:N", "Glutamate:GLU:E", "Glutamine:GLN:Q", "Histidine:HIS:H", "Glycine:GLY:G") self.restype_info["Conserved:CYS"]=("Serine:SER:S") self.restype_info["Conserved:GLY"]=("Alanine:ALA:A", "Serine:SER:S") self.restype_info["Conserved:GLN"]=("Glutamate:GLU:E", "Asparagine:ASN:N", "Glutamine:GLN:Q", "Histidine:HIS:H", "Glycine:GLY:G") self.restype_info["Conserved:GLU"]=("Asparagine:ASN:N", "Glutamine:GLN:Q", "Asparagine:ASN:N", "Histidine:HIS:H") self.restype_info["Conserved:HIS"]=("Asparagine:ASN:N", "Glutamine:GLN:Q", "Aspartate:ASP:D", "Glutamate:GLU:E", "Arginine:ARG:R") self.restype_info["Conserved:ILE"]=("Valine:VAL:V", "Leucine:LEU:L", "Methionine:MET:M") self.restype_info["Conserved:LEU"]=("Methionine:MET:M", "Isoleucine:ILE:I", "Valine:VAL:V", "Phenylalanine:PHE:F") self.restype_info["Conserved:LYS"]=("Arginine:ARG:R", "Glutamine:GLN:Q", "Asparagine:ASN:N") self.restype_info["Conserved:MET"]=("Leucine:LEU:L", "Isoleucine:ILE:I", "Valine:VAL:V", "Phenylalanine:PHE:F") self.restype_info["Conserved:PHE"]=("Tyrosine:TYR:Y", "Leucine:LEU:L", "Isoleucine:ILE:I") self.restype_info["Conserved:PRO"]=("Alanine:ALA:A", "Serine:SER:S") self.restype_info["Conserved:SER"]=("Alanine:ALA:A", "Threonine:THR:T", "Asparagine:ASN:N", "Glycine:GLY:G", "Proline:PRO:P") self.restype_info["Conserved:THR"]=("Serine:SER:S", "Alanine:ALA:A", "Valine:VAL:V") self.restype_info["Conserved:TYR"]=("Phenylalanine:PHE:F", "Histidine:HIS:H", "Tryptophan:TRP:W") self.restype_info["Conserved:TRP"]=("Phenylalanine:PHE:F", "Tyrosine:TYR:Y") self.restype_info["Conserved:VAL"]=("Isoleucine:ILE:I", "Leucine:LEU:L", "Methionine:MET:M") self.restype_info["etc"] = ("NATRO", "NATAA", "ALLAA") def set_mutation_info(self): #self.resinfo = SA : Rel Mut : Surf Prob self.resinfo = dict() self.resinfo["ALA"]=("115", "100", "62") self.resinfo["ARG"]=("225", "65", "99") self.resinfo["ASN"]=("160", "134", "88") self.resinfo["ASP"]=("150", "106", "85") self.resinfo["CYS"]=("150", "106", "85") self.resinfo["ASP"]=("135", "20", "55") self.resinfo["GLU"]=("190", "102", "82") self.resinfo["GLN"]=("180", "93", "93") self.resinfo["GLY"]=("75", "49", "64") self.resinfo["HIS"]=("195", "66", "83") self.resinfo["ILE"]=("175", "96", "40") self.resinfo["LEU"]=("170", "40", "55") self.resinfo["LYS"]=("200", "56", "97") self.resinfo["MET"]=("185", "94", "60") self.resinfo["PHE"]=("210", "41", "50") self.resinfo["PRO"]=("145", "56", "82") self.resinfo["SER"]=("115", "120", "78") self.resinfo["THR"]=("140", "97", "77") self.resinfo["TRP"]=("225", "18", "73") self.resinfo["TYR"]=("230", "41", "85") self.resinfo["VAL"]=("155", "74", "46") self.resinfo["HIS_D"]=self.resinfo["HIS"]
tipos_de_classes = { (1, 'Economica'), (2, 'Executiva'), (3, 'Primeira classe') }
# # PySNMP MIB module JUNIPER-JS-IF-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-JS-IF-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:59: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) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") jnxJsIf, = mibBuilder.importSymbols("JUNIPER-JS-SMI", "jnxJsIf") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Integer32, NotificationType, IpAddress, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Counter64, ObjectIdentity, Unsigned32, MibIdentifier, Gauge32, ModuleIdentity, Counter32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "NotificationType", "IpAddress", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Counter64", "ObjectIdentity", "Unsigned32", "MibIdentifier", "Gauge32", "ModuleIdentity", "Counter32", "iso") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") jnxJsIfMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1)) jnxJsIfMIB.setRevisions(('2007-05-09 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: jnxJsIfMIB.setRevisionsDescriptions(('Creation Date',)) if mibBuilder.loadTexts: jnxJsIfMIB.setLastUpdated('200705090000Z') if mibBuilder.loadTexts: jnxJsIfMIB.setOrganization('Juniper Networks, Inc.') if mibBuilder.loadTexts: jnxJsIfMIB.setContactInfo('Juniper Technical Assistance Center Juniper Networks, Inc. 1194 N.Mathilda Avenue Sunnyvale, CA 94089 E - mail:support @ juniper.net HTTP://www.juniper.net ') if mibBuilder.loadTexts: jnxJsIfMIB.setDescription('This module defines the object that are used to monitor the entries in the interfaces pertaining to the security management of the interface.') jnxJsIfExtension = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1)) jnxJsIfMonTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1), ) if mibBuilder.loadTexts: jnxJsIfMonTable.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonTable.setDescription('The table extend the interface entries to support security related objects on a particular interface. The table is index by ifIndex.') jnxJsIfMonEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: jnxJsIfMonEntry.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonEntry.setDescription('Entry pertains to an interface.') jnxJsIfMonInIcmp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInIcmp.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInIcmp.setDescription('ICMP packets received.') jnxJsIfMonInSelf = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInSelf.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInSelf.setDescription('Packets for self received.') jnxJsIfMonInVpn = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInVpn.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInVpn.setDescription('VPN packets received.') jnxJsIfMonInPolicyPermit = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInPolicyPermit.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInPolicyPermit.setDescription('Incoming bytes permitted by policy.') jnxJsIfMonOutPolicyPermit = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonOutPolicyPermit.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonOutPolicyPermit.setDescription('Outgoing bytes permitted by policy.') jnxJsIfMonConn = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonConn.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonConn.setDescription('Incoming connections established.') jnxJsIfMonInMcast = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInMcast.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInMcast.setDescription('Multicast packets received.') jnxJsIfMonOutMcast = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonOutMcast.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonOutMcast.setDescription('Multicast packets sent.') jnxJsIfMonPolicyDeny = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonPolicyDeny.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonPolicyDeny.setDescription('Packets dropped due to policy deny.') jnxJsIfMonNoGateParent = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoGateParent.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoGateParent.setDescription('Packets dropped due to no parent for a gate.') jnxJsIfMonTcpProxyDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonTcpProxyDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonTcpProxyDrop.setDescription('Packets dropped due to syn-attack protection.') jnxJsIfMonNoDip = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoDip.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoDip.setDescription('Packets dropped due to dip errors.') jnxJsIfMonNoNspTunnel = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoNspTunnel.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoNspTunnel.setDescription('Packets dropped because no nsp tunnel found.') jnxJsIfMonNoNatCon = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoNatCon.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoNatCon.setDescription('Packets dropped due to no more sessions.') jnxJsIfMonInvalidZone = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonInvalidZone.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonInvalidZone.setDescription('Packets dropped because an invalid zone received the packet.') jnxJsIfMonIpClsFail = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonIpClsFail.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonIpClsFail.setDescription('Packets dropped due to IP classification failure.') jnxJsIfMonAuthDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonAuthDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonAuthDrop.setDescription('Packets dropped due to user auth errors.') jnxJsIfMonMultiUserAuthDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonMultiUserAuthDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonMultiUserAuthDrop.setDescription('Packets dropped due to multiple user auth in loopback sessions.') jnxJsIfMonLoopMultiDipDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonLoopMultiDipDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonLoopMultiDipDrop.setDescription('Packets dropped due to multiple DIP in loopback sessions.') jnxJsIfMonAddrSpoof = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonAddrSpoof.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonAddrSpoof.setDescription('Packets dropped due to address spoofing.') jnxJsIfMonLpDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonLpDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonLpDrop.setDescription('Packets dropped due to no loopback.') jnxJsIfMonNullZone = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNullZone.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNullZone.setDescription('Packets dropped due to no zone or null-zone binding.') jnxJsIfMonNoGate = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoGate.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoGate.setDescription('Packets dropped due to no nat gate.') jnxJsIfMonNoMinorSess = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoMinorSess.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoMinorSess.setDescription('Packets dropped due to no minor session.') jnxJsIfMonNvecErr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNvecErr.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNvecErr.setDescription('Packets dropped due to no session for gate.') jnxJsIfMonTcpSeq = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonTcpSeq.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonTcpSeq.setDescription('Packets dropped because TCP seq number out of window.') jnxJsIfMonIllegalPak = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonIllegalPak.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonIllegalPak.setDescription("Packets dropped because they didn't make any sense.") jnxJsIfMonNoRoute = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoRoute.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoRoute.setDescription('Packets dropped because no route present.') jnxJsIfMonAuthFail = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonAuthFail.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonAuthFail.setDescription('Packets dropped because auth failed.') jnxJsIfMonSaInactive = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonSaInactive.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonSaInactive.setDescription('Packets dropped because sa is not active.') jnxJsIfMonNoSa = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonNoSa.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonNoSa.setDescription('Packets dropped because no sa found for incoming spi.') jnxJsIfMonSelfPktDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 39, 1, 1, 1, 1, 1, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: jnxJsIfMonSelfPktDrop.setStatus('current') if mibBuilder.loadTexts: jnxJsIfMonSelfPktDrop.setDescription('Packets dropped because no one interested in self packets.') mibBuilder.exportSymbols("JUNIPER-JS-IF-EXT-MIB", jnxJsIfMonIpClsFail=jnxJsIfMonIpClsFail, jnxJsIfMonNoRoute=jnxJsIfMonNoRoute, jnxJsIfMonAddrSpoof=jnxJsIfMonAddrSpoof, jnxJsIfMonTcpSeq=jnxJsIfMonTcpSeq, jnxJsIfMonNoNatCon=jnxJsIfMonNoNatCon, jnxJsIfMonOutMcast=jnxJsIfMonOutMcast, jnxJsIfMonNoGateParent=jnxJsIfMonNoGateParent, jnxJsIfMonEntry=jnxJsIfMonEntry, jnxJsIfMonNoMinorSess=jnxJsIfMonNoMinorSess, jnxJsIfMonNoNspTunnel=jnxJsIfMonNoNspTunnel, jnxJsIfMonOutPolicyPermit=jnxJsIfMonOutPolicyPermit, jnxJsIfMonInVpn=jnxJsIfMonInVpn, jnxJsIfMIB=jnxJsIfMIB, jnxJsIfMonInSelf=jnxJsIfMonInSelf, jnxJsIfMonInMcast=jnxJsIfMonInMcast, jnxJsIfMonNoDip=jnxJsIfMonNoDip, jnxJsIfMonLpDrop=jnxJsIfMonLpDrop, jnxJsIfMonIllegalPak=jnxJsIfMonIllegalPak, jnxJsIfMonNoSa=jnxJsIfMonNoSa, jnxJsIfMonAuthDrop=jnxJsIfMonAuthDrop, jnxJsIfMonNoGate=jnxJsIfMonNoGate, jnxJsIfMonSelfPktDrop=jnxJsIfMonSelfPktDrop, jnxJsIfMonNvecErr=jnxJsIfMonNvecErr, jnxJsIfMonInPolicyPermit=jnxJsIfMonInPolicyPermit, PYSNMP_MODULE_ID=jnxJsIfMIB, jnxJsIfMonTcpProxyDrop=jnxJsIfMonTcpProxyDrop, jnxJsIfMonTable=jnxJsIfMonTable, jnxJsIfMonInvalidZone=jnxJsIfMonInvalidZone, jnxJsIfMonInIcmp=jnxJsIfMonInIcmp, jnxJsIfMonSaInactive=jnxJsIfMonSaInactive, jnxJsIfMonAuthFail=jnxJsIfMonAuthFail, jnxJsIfMonNullZone=jnxJsIfMonNullZone, jnxJsIfMonPolicyDeny=jnxJsIfMonPolicyDeny, jnxJsIfMonMultiUserAuthDrop=jnxJsIfMonMultiUserAuthDrop, jnxJsIfExtension=jnxJsIfExtension, jnxJsIfMonLoopMultiDipDrop=jnxJsIfMonLoopMultiDipDrop, jnxJsIfMonConn=jnxJsIfMonConn)
#coding:utf8 class Config: caption_data_path='caption.pth'# 经过预处理后的人工描述信息 img_path='/home/cy/caption_data/' # img_path='/mnt/ht/aichallenger/raw/ai_challenger_caption_train_20170902/caption_train_images_20170902/' img_feature_path = 'results.pth' # 所有图片的features,20w*2048的向量 scale_size = 300 img_size = 224 batch_size=8 shuffle = True num_workers = 4 rnn_hidden = 256 embedding_dim = 256 num_layers = 2 share_embedding_weights=False prefix='checkpoints/caption'#模型保存前缀 env = 'caption' plot_every = 10 debug_file = '/tmp/debugc' model_ckpt = None # 模型断点保存路径 lr=1e-3 use_gpu=True epoch = 1 test_img = 'img/example.jpeg'
while True: n = int(input()) if n == 0: break arr = [] for i in range(n): word = input() arr.append(word) flag = 0 for i in range(len(arr)): for j in range(i+1, len(arr)): if arr[j].startswith(arr[i]): flag = 1 if flag == 1: print("Conjunto Ruim") else: print("Conjunto Bom")
#Make a class called Restaurant. The __init__() method for #Restaurant should store two attributes: a restaurant_name and a cuisine_type. #Make a method called describe_restaurant() that prints these two pieces of #information, and a method called open_restaurant() that prints a message indicating #that the restaurant is open. #Make an instance called restaurant from your class. Print the two attributes #individually, and then call both methods class Restaurant: #clase restaurante def __init__(self, Name, cuisine_type): #doy atributos al restaurante self.Name = Name self.cuisine_type = cuisine_type def __str__(self): #añadido extra para imprimir bonito XD return('Restaurant name: {} \nCuisine type: {}'.format(self.Name, self.cuisine_type)) def describe_restaurant(self): #metodo que imprimira la informacion Date_restaurant = self.Name + " serves " + self.cuisine_type print(Date_restaurant) def open_restaurant(self): #metodo que imprimira que el restaurante esta abierto print('"The restauran ' + self.Name + ' is it open"') Restaurant_1 = Restaurant('THE KRAKEN', 'SEAFOOD') #doy descripcion de los atributos print(Restaurant_1) print("\n") Restaurant_1.open_restaurant() #imprimo el mensaje sobre que el restaurante esta abierto print("\n") Restaurant_1.describe_restaurant() print(Restaurant_1.Name) #imprimo solo el nombre del restaurante print(Restaurant_1.cuisine_type) #imprimo solo el tipo de comida del restaurante
# # PySNMP MIB module HP-MEMPROC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-MEMPROC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:23:36 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint") hpProcurveCommon, = mibBuilder.importSymbols("HP-BASE-MIB", "hpProcurveCommon") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") Opaque, iso, ObjectIdentity, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, TimeTicks, NotificationType, Counter32, Bits, Counter64, Integer32, MibIdentifier, ModuleIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "Opaque", "iso", "ObjectIdentity", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "TimeTicks", "NotificationType", "Counter32", "Bits", "Counter64", "Integer32", "MibIdentifier", "ModuleIdentity", "Unsigned32") TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString") hpMemprocMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5)) hpMemprocMIB.setRevisions(('2005-02-01 14:55',)) if mibBuilder.loadTexts: hpMemprocMIB.setLastUpdated('200502011455Z') if mibBuilder.loadTexts: hpMemprocMIB.setOrganization('Hewlett Packard Company, ProCurve Networking Business') hpMemprocMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1)) hpMemprocNotificationsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 2)) hpMemprocMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3)) hpmpCPU = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1)) hpmpMemory = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2)) class Float(TextualConvention, Opaque): status = 'current' subtypeSpec = Opaque.subtypeSpec + ValueSizeConstraint(7, 7) fixedLength = 7 hpmpCPUTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1), ) if mibBuilder.loadTexts: hpmpCPUTable.setStatus('current') hpmpCPUEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1), ).setIndexNames((0, "HP-MEMPROC-MIB", "hpmpCPUIndex")) if mibBuilder.loadTexts: hpmpCPUEntry.setStatus('current') hpmpCPUIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: hpmpCPUIndex.setStatus('current') hpmpCPULoad1min = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpCPULoad1min.setStatus('current') hpmpCPULoad5min = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpCPULoad5min.setStatus('current') hpmpCPULoad15min = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpCPULoad15min.setStatus('current') hpmpCPUPctBusy = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 1, 1, 1, 5), Gauge32()).setUnits('percent').setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpCPUPctBusy.setStatus('current') hpmpMemTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1), ) if mibBuilder.loadTexts: hpmpMemTable.setStatus('current') hpmpMemEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1), ).setIndexNames((0, "HP-MEMPROC-MIB", "hpmpMemIndex")) if mibBuilder.loadTexts: hpmpMemEntry.setStatus('current') hpmpMemIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: hpmpMemIndex.setStatus('current') hpmpMemDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpMemDescr.setStatus('current') hpmpMemInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1, 3), Unsigned32()).setUnits('Kbytes').setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpMemInUse.setStatus('current') hpmpMemTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1, 4), Unsigned32()).setUnits('Kbytes').setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpMemTotal.setStatus('current') hpmpMemPctInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 1, 2, 1, 1, 5), Gauge32()).setUnits('percent').setMaxAccess("readonly") if mibBuilder.loadTexts: hpmpMemPctInUse.setStatus('current') hpMemprocNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 2, 0)) hpmpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3, 1)) hpmpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3, 2)) hpMemprocMIBCompliance1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3, 1, 1)).setObjects(("HP-MEMPROC-MIB", "hpmpCPUGroup"), ("HP-MEMPROC-MIB", "hpmpMemoryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpMemprocMIBCompliance1 = hpMemprocMIBCompliance1.setStatus('current') hpmpCPUGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3, 2, 1)).setObjects(("HP-MEMPROC-MIB", "hpmpCPULoad1min"), ("HP-MEMPROC-MIB", "hpmpCPULoad5min"), ("HP-MEMPROC-MIB", "hpmpCPULoad15min"), ("HP-MEMPROC-MIB", "hpmpCPUPctBusy")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpmpCPUGroup = hpmpCPUGroup.setStatus('current') hpmpMemoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 3, 7, 11, 17, 7, 1, 5, 3, 2, 2)).setObjects(("HP-MEMPROC-MIB", "hpmpMemDescr"), ("HP-MEMPROC-MIB", "hpmpMemInUse"), ("HP-MEMPROC-MIB", "hpmpMemTotal"), ("HP-MEMPROC-MIB", "hpmpMemPctInUse")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpmpMemoryGroup = hpmpMemoryGroup.setStatus('current') mibBuilder.exportSymbols("HP-MEMPROC-MIB", hpmpMemory=hpmpMemory, hpMemprocMIBObjects=hpMemprocMIBObjects, hpmpMemIndex=hpmpMemIndex, hpMemprocMIB=hpMemprocMIB, hpMemprocMIBConformance=hpMemprocMIBConformance, hpmpCPUTable=hpmpCPUTable, hpmpCPUGroup=hpmpCPUGroup, hpmpMemTable=hpmpMemTable, hpmpCPU=hpmpCPU, hpmpMemoryGroup=hpmpMemoryGroup, hpMemprocMIBCompliance1=hpMemprocMIBCompliance1, hpmpCPUIndex=hpmpCPUIndex, hpmpMemTotal=hpmpMemTotal, PYSNMP_MODULE_ID=hpMemprocMIB, hpmpGroups=hpmpGroups, hpmpMemDescr=hpmpMemDescr, hpmpCPULoad15min=hpmpCPULoad15min, hpmpMemInUse=hpmpMemInUse, hpmpMemEntry=hpmpMemEntry, Float=Float, hpmpCPULoad5min=hpmpCPULoad5min, hpmpCPULoad1min=hpmpCPULoad1min, hpMemprocNotificationsPrefix=hpMemprocNotificationsPrefix, hpmpCPUPctBusy=hpmpCPUPctBusy, hpMemprocNotifications=hpMemprocNotifications, hpmpCPUEntry=hpmpCPUEntry, hpmpMemPctInUse=hpmpMemPctInUse, hpmpCompliances=hpmpCompliances)
a = 0 # FIRST, set the initial value of the variable a to 0(zero). while a < 10: # While the value of the variable a is less than 10 do the following: a = a + 1 # Increase the value of the variable a by 1, as in: a = a + 1! print(a) # Print to screen what the present value of the variable a is. # REPEAT! until the value of the variable a is equal to 9!? See note. # NOTE: # The value of the variable a will increase by 1 # with each repeat, or loop of the 'while statement BLOCK'. # e.g. a = 1 then a = 2 then a = 3 etc. until a = 9 then... # the code will finish adding 1 to a (now a = 10), printing the # result, and then exiting the 'while statement BLOCK'. # -- # While a < 10: | # a = a + 1 |<--[ The while statement BLOCK ] # print (a) | # --
'''Fdb Genie Ops Object Outputs for IOSXE.''' class FdbOutput(object): ShowMacAddressTable = { "mac_table": { "vlans": { '100': { "mac_addresses": { "ecbd.1d09.5689": { "drop": { "drop": True, "entry_type": "dynamic" }, "mac_address": "ecbd.1d09.5689" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" }, "58bf.eab6.2f51": { "interfaces": { "Vlan100": { "interface": "Vlan100", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f51" } }, "vlan": 100 }, "all": { "mac_addresses": { "0100.0ccc.cccc": { "interfaces": { "CPU": { "interface": "CPU", "entry_type": "static" } }, "mac_address": "0100.0ccc.cccc" }, "0100.0ccc.cccd": { "interfaces": { "CPU": { "interface": "CPU", "entry_type": "static" } }, "mac_address": "0100.0ccc.cccd" } }, "vlan": "all" }, '20': { "mac_addresses": { "aaaa.bbbb.cccc": { "drop": { "drop": True, "entry_type": "static" }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 20 }, '10': { "mac_addresses": { "aaaa.bbbb.cccc": { "interfaces": { "GigabitEthernet1/0/8": { "interface": "GigabitEthernet1/0/8", "entry_type": "static" }, "GigabitEthernet1/0/9": { "interface": "GigabitEthernet1/0/9", "entry_type": "static" } }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 10 }, '101': { "mac_addresses": { "58bf.eab6.2f41": { "interfaces": { "Vlan101": { "interface": "Vlan101", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f41" }, "3820.5672.fc41": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc41" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" } }, "vlan": 101 } } }, "total_mac_addresses": 10 } ShowMacAddressTableAgingTime = { 'mac_aging_time': 0, 'vlans': { '10': { 'mac_aging_time': 10, 'vlan': 10 } } } ShowMacAddressTableLearning = { "vlans": { '10': { "vlan": 10, "mac_learning": False }, '105': { "vlan": 105, "mac_learning": False }, '101': { "vlan": 101, "mac_learning": False }, '102': { "vlan": 102, "mac_learning": False }, '103': { "vlan": 103, "mac_learning": False } } } Fdb_info = { "mac_aging_time": 0, "total_mac_addresses": 10, "mac_table": { "vlans": { '100': { "mac_addresses": { "ecbd.1d09.5689": { "drop": { "drop": True, "entry_type": "dynamic" }, "mac_address": "ecbd.1d09.5689" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" }, "58bf.eab6.2f51": { "interfaces": { "Vlan100": { "interface": "Vlan100", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f51" } }, "vlan": 100 }, '20': { "mac_addresses": { "aaaa.bbbb.cccc": { "drop": { "drop": True, "entry_type": "static" }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 20 }, '10': { "mac_addresses": { "aaaa.bbbb.cccc": { "interfaces": { "GigabitEthernet1/0/8": { "interface": "GigabitEthernet1/0/8", "entry_type": "static" }, "GigabitEthernet1/0/9": { "interface": "GigabitEthernet1/0/9", "entry_type": "static" } }, "mac_address": "aaaa.bbbb.cccc" } }, "vlan": 10, "mac_aging_time": 10, "mac_learning": False }, '101': { "mac_addresses": { "58bf.eab6.2f41": { "interfaces": { "Vlan101": { "interface": "Vlan101", "entry_type": "static" } }, "mac_address": "58bf.eab6.2f41" }, "3820.5672.fc41": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc41" }, "3820.5672.fc03": { "interfaces": { "Port-channel12": { "interface": "Port-channel12", "entry_type": "dynamic" } }, "mac_address": "3820.5672.fc03" } }, "vlan": 101, "mac_learning": False }, '102': { "mac_learning": False }, '103': { "mac_learning": False }, '105': { "mac_learning": False } } }, }
config = { 'SECRET_CAPTCHA_KEY': 'CHANGEME - 40 or 50 character long key here', 'METHOD': 'pbkdf2:sha256:100', 'CAPTCHA_LENGTH': 5, 'CAPTCHA_DIGITS': False }
class Node: def __init__(self, data=None, next_node=None): self.data = data self.next_node = next_node def __str__(self): return Node.pretty_string(self) @staticmethod def list_to_LL(L): """ Converts the given Python list into a linked list. """ head = None for i in range(len(L) - 1, -1, -1): head = Node(L[i], head) return head @staticmethod def pretty_string(head): data_list = [] while head: data_list.append(str(head.data)) head = head.next_node return "[" + ", ".join(data_list) + "]" def is_palindrome(head): #--------------------------------------------------------------------------- # Method 1: Iterative approach with stack. n/2 space, 2n time. #--------------------------------------------------------------------------- # slow, fast = head, head # stack = [] # while fast and fast.next_node: # stack.append(slow.data) # slow, fast = slow.next_node, fast.next_node.next_node # # All data before slow is now stored in the stack. # # If LL is [1, 2, 3, 4, 5], then slow -> 3 and fast -> 5. # # If LL is [1, 2, 3, 4], then slow -> 3 and fast -> None. # if fast: # slow = slow.next_node # Skip the middle node for odd linked lists. # while slow: # if slow.data != stack.pop(): # return False # slow = slow.next_node # return True #--------------------------------------------------------------------------- # Method 2: Modify the LL, then fix afterwards. O(1) space, O(n) time. #--------------------------------------------------------------------------- # Find the second half. slow, fast = head, head while fast and fast.next_node: slow, fast = slow.next_node, fast.next_node.next_node if fast: slow = slow.next_node # Reverse the second half and compare with the first half. slow = reverse(slow) curr = slow is_pal = True while curr and is_pal: if curr.data != head.data: is_pal = False curr, head = curr.next_node, head.next_node # Undo the reversal and return the result. reverse(slow) return is_pal def reverse(head): prev = None while head: head.next_node, prev, head = prev, head, head.next_node return prev def main(): test_lists = [ [], [1], [2, 2], [1, 2], [1, 2, 3, 4, 5, 4, 3, 2, 1], [1, 2, 3, 4, 4, 3, 2, 1], [1, 2, 3, 4, 4, 3, 7, 1], [1, 2, 3, 6, 5, 4, 3, 2, 1] ] for i, test_list in enumerate(test_lists): linked_list = Node.list_to_LL(test_list) before = str(linked_list) is_pal = is_palindrome(linked_list) after = str(linked_list) result = "Palindrome!" if is_pal else "Not a palindrome." print("Test Case #{}: {}".format(i + 1, result)) print(" BEFORE: {}".format(before)) print(" AFTER: {}".format(after)) if __name__ == "__main__": main()