content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
_a = request.application response.logo = A(B('KVASIR'), _class="brand") response.title = settings.title response.subtitle = settings.subtitle response.meta.author = '%s <%s>' % (settings.author, settings.author_email) response.meta.keywords = settings.keywords response.meta.description = settings.description response.menu = [ (T('Home'), False, URL(_a,'default','index'), []), # (A(I(_class='icon-home icon-white'), T('Home'), _href=URL('default', 'index')), False, []), (T('All Hosts'), False, URL(_a,'hosts','list'), []), # (A(I(_class='icon-th-list icon-white'), T('All Hosts'), _href=URL('hosts', 'list')), False, []), (T('Host Data'), False, '', [ (T('Add Host'), False, URL(_a,'hosts','add'), []), (T('Services'), False, '', [ (T('List All'), False, URL(_a,'services','list'), []), #(T('All w/ Vulns'), False, URL(_a,'vulns','service_vulns_list'), []), # TODO: service_vulns_list (T('IPs w/ Port'), False, URL(_a,'services','hosts_with_port'), []), (T('Add'), False, URL(_a,'services','add'), []), ]), (T('Accounts'), False, '', [ (T('List'), False, URL(_a,'accounts', 'list'), []), (T('Add'), False, URL(_a,'accounts', 'add'), []), (T('Import File'), False, URL(_a,'accounts', 'import_file'), []), (T('Mass Import'), False, URL(_a,'accounts', 'import_mass_password'), []), (T('Process crack file'), False, URL(_a,'accounts', 'update_hashes_by_file'), []), (T('Process john.pot'), False, URL(_a,'accounts', 'check_john_pot'), []), ]), (T('NetBIOS'), False, '', [ (T('Domain Details'), False, URL(_a,'netbios','domain_detail'), []), (T('List'), False, URL(_a,'netbios','index'), []), (T('Add'), False, URL(_a,'netbios','add'), []), ]), (T('OS'), False, '', [ (T('List'), False, URL(_a,'os','list'), []), (T('Add '), False, URL(_a,'os','add'), []), (T('List OS Refs'), False, URL(_a,'os','refs_list'), []), (T('Add OS Ref'), False, URL(_a,'os','refs_add'), []), ]), (T('Other'), False, '', [ (T('List Evidence'), False, URL(_a,'evidence','list'), []), (T('List Notes'), False, URL(_a,'notes','list'), []), (T('List SNMP'), False, URL(_a,'snmp','list'), []), (T('List Tool Output'), False, URL(_a,'tooloutput','list'), []), (T('CSV Hostname Update'), False, URL(_a,'hosts','csv_hostupdate'), []), ]), ]), (T('Tasks'), False, URL(_a,'tasks','index'), []), (T('Metasploit'), False, '', [ (T('Mass Jobs'), False, '', [ (T('Bruteforce'), False, URL(_a, 'metasploit', 'bruteforce'), []), (T('Exploit'), False, URL(_a, 'metasploit', 'exploit'), []), ]), (T('Imports'), False, '', [ (T('PWDUMP Files'), False, URL(_a, 'metasploit', 'import_pwdump'), []), (T('Screenshots'), False, URL(_a, 'metasploit', 'import_screenshots'), []), (T('Report XML'), False, URL(_a, 'metasploit', 'import_report_xml'), []), ]), (T('Send Accounts'), False, URL(_a, 'metasploit', 'send_accounts'), []), (T('Send Scan XML Files'), False, URL(_a, 'metasploit', 'send_scanxml'), []), (T('API Settings'), False, URL(_a, 'metasploit', 'api_settings'), []), #(T('Tasks'), False, URL(_a, 'metasploit', 'task_list'), []), ]), (T('Other'), False, '', [ (T('Browse Data Directory'), False, URL(_a, 'default', 'data_dir'), []), (T('Customer XML'),URL(_a,'report','customer_xml.xml')==URL(),URL(_a,'report','customer_xml.xml'),[]), (T('Stats XLS'),URL(_a,'report','spreadsheet')==URL(),URL(_a,'report','spreadsheet'),[]), (T('Wiki'),URL(_a,'default','wiki')==URL(),URL(_a,'default','wiki'),[]), (T('Update DB Fields'),URL(_a,'default','update_dynamic_fields')==URL(),URL(_a,'default','update_dynamic_fields'),[]), (T('IP Calculator'), False, URL(_a, 'default', 'ip_calc'), []), (T('Exploit Database (local)'), False, URL(_a, 'exploitdb', 'index'), []), (T('PwnWiki'), False, URL(_a, 'default', 'redirect', vars={'url':settings.pwnwiki_path, 'pwnwiki': True}), []), ]), (T('Statistics'), False, '', [ (T('Vulnlist'), False, URL(_a,'stats','vulnlist'), []), (T('Passwords'), False, URL(_a,'stats','passwords'), []), (T('OS'), False, URL(_a,'stats','os'), []), (T('Services'), False, URL(_a,'stats','services'), []), (T('VulnCircles'), False, URL(_a,'stats','vulncircles'), []), ]), (T('Import'), False ,'', [ (T('Nexpose XML'), False, URL(_a,'nexpose','import_xml_scan'), []), (T('Nmap XML'), False, URL(_a,'nmap','import_xml_scan'), []), (T('Nmap Scan and Import'), False, URL(_a,'nmap','nmap_scan'), []), (T('Nessus Scanfile'), False, URL(_a,'nessus','import_scan'), []), (T('hping File'), False, URL(_a,'hping','import_scan'), []), (T('Metasploit XML'), False, URL(_a, 'metasploit', 'import_report_xml'), []), (T('ShodanHQ'), False, URL(_a, 'shodanhq', 'import_report'), []), ]), (T('Administration'), False, '', [ (T('Nexpose'), False, '', [ (T('Install/Update VulnData'),URL(_a,'nexpose','vuln_update')==URL(),URL(_a,'nexpose','vuln_update'),[]), #(T('Import Scan Template '),URL(_a,'nexpose','scan_template')==URL(),URL(_a,'nexpose','scan_template'),[]), (T('Import VulnID'), False, URL(_a, 'nexpose', 'import_vulnid'), []), (T('Import Exploit XML'),URL(_a,'exploits','import_nexpose_xml')==URL(),URL(_a,'exploits','import_nexpose_xml'),[]), (T('Purge Nexpose Data'),URL(_a,'nexpose','purge')==URL(),URL(_a,'nexpose','purge'),[]), ]), (T('VulnDB'), False, '', [ (T('Vulnerabilities'), False, URL(_a,'vulns','vulndata_list'),[]), (T('Add Vulnerability'), False, URL(_a,'vulns','vulndata_add'),[]), (T('References'), False, URL(_a,'vulns','vuln_refs'),[]), (T('Vuln->Reference Links'), False, URL(_a,'vulns','vuln_references_list'),[]), (T('Exploits'), False, URL(_a,'exploits','list'),[]), (T('Connect Vulns/Exploits'), False, URL(_a,'exploits','connect_exploits'), []), (T('Import Nexpose Exploits'), False, URL(_a,'exploits','import_nexpose_xml'),[]), (T('Import CANVAS Exploits'), False, URL(_a,'exploits','import_canvas_xml'),[]), ]), (T('CPE Database'), False, '', [ (T('Import CPE Data'), False, URL(_a,'cpe','import_cpe_xml'), []), (T('List OS DB'), False, URL(_a,'cpe','os_list'), []), (T('Add OS'), False, URL(_a,'cpe','os_add'), []), #(T('List Application DB'), False, URL(_a,'cpe','apps_list'), []), #(T('Add Application'), False, URL(_a,'cpe','apps_add'), []), #(T('List Hardware DB'), False, URL(_a,'cpe','hardware_list'), []), #(T('Add Hardware'), False, URL(_a,'cpe','hardware_add'), []), (T('Purge CPE DB'), False, URL(_a,'cpe','purge'), []), ]), (T('Last Resort'), False, '', [ (T('CSV Backup'), False, URL(_a,'default','database_backup'),[]), (T('CSV Restore'), False, URL(_a,'default','database_restore'),[]), (T('Purge Data'), URL(_a,'default','purge_data')==URL(),URL(_a,'default','purge_data'),[]), ]), ]), ]
_a = request.application response.logo = a(b('KVASIR'), _class='brand') response.title = settings.title response.subtitle = settings.subtitle response.meta.author = '%s <%s>' % (settings.author, settings.author_email) response.meta.keywords = settings.keywords response.meta.description = settings.description response.menu = [(t('Home'), False, url(_a, 'default', 'index'), []), (t('All Hosts'), False, url(_a, 'hosts', 'list'), []), (t('Host Data'), False, '', [(t('Add Host'), False, url(_a, 'hosts', 'add'), []), (t('Services'), False, '', [(t('List All'), False, url(_a, 'services', 'list'), []), (t('IPs w/ Port'), False, url(_a, 'services', 'hosts_with_port'), []), (t('Add'), False, url(_a, 'services', 'add'), [])]), (t('Accounts'), False, '', [(t('List'), False, url(_a, 'accounts', 'list'), []), (t('Add'), False, url(_a, 'accounts', 'add'), []), (t('Import File'), False, url(_a, 'accounts', 'import_file'), []), (t('Mass Import'), False, url(_a, 'accounts', 'import_mass_password'), []), (t('Process crack file'), False, url(_a, 'accounts', 'update_hashes_by_file'), []), (t('Process john.pot'), False, url(_a, 'accounts', 'check_john_pot'), [])]), (t('NetBIOS'), False, '', [(t('Domain Details'), False, url(_a, 'netbios', 'domain_detail'), []), (t('List'), False, url(_a, 'netbios', 'index'), []), (t('Add'), False, url(_a, 'netbios', 'add'), [])]), (t('OS'), False, '', [(t('List'), False, url(_a, 'os', 'list'), []), (t('Add '), False, url(_a, 'os', 'add'), []), (t('List OS Refs'), False, url(_a, 'os', 'refs_list'), []), (t('Add OS Ref'), False, url(_a, 'os', 'refs_add'), [])]), (t('Other'), False, '', [(t('List Evidence'), False, url(_a, 'evidence', 'list'), []), (t('List Notes'), False, url(_a, 'notes', 'list'), []), (t('List SNMP'), False, url(_a, 'snmp', 'list'), []), (t('List Tool Output'), False, url(_a, 'tooloutput', 'list'), []), (t('CSV Hostname Update'), False, url(_a, 'hosts', 'csv_hostupdate'), [])])]), (t('Tasks'), False, url(_a, 'tasks', 'index'), []), (t('Metasploit'), False, '', [(t('Mass Jobs'), False, '', [(t('Bruteforce'), False, url(_a, 'metasploit', 'bruteforce'), []), (t('Exploit'), False, url(_a, 'metasploit', 'exploit'), [])]), (t('Imports'), False, '', [(t('PWDUMP Files'), False, url(_a, 'metasploit', 'import_pwdump'), []), (t('Screenshots'), False, url(_a, 'metasploit', 'import_screenshots'), []), (t('Report XML'), False, url(_a, 'metasploit', 'import_report_xml'), [])]), (t('Send Accounts'), False, url(_a, 'metasploit', 'send_accounts'), []), (t('Send Scan XML Files'), False, url(_a, 'metasploit', 'send_scanxml'), []), (t('API Settings'), False, url(_a, 'metasploit', 'api_settings'), [])]), (t('Other'), False, '', [(t('Browse Data Directory'), False, url(_a, 'default', 'data_dir'), []), (t('Customer XML'), url(_a, 'report', 'customer_xml.xml') == url(), url(_a, 'report', 'customer_xml.xml'), []), (t('Stats XLS'), url(_a, 'report', 'spreadsheet') == url(), url(_a, 'report', 'spreadsheet'), []), (t('Wiki'), url(_a, 'default', 'wiki') == url(), url(_a, 'default', 'wiki'), []), (t('Update DB Fields'), url(_a, 'default', 'update_dynamic_fields') == url(), url(_a, 'default', 'update_dynamic_fields'), []), (t('IP Calculator'), False, url(_a, 'default', 'ip_calc'), []), (t('Exploit Database (local)'), False, url(_a, 'exploitdb', 'index'), []), (t('PwnWiki'), False, url(_a, 'default', 'redirect', vars={'url': settings.pwnwiki_path, 'pwnwiki': True}), [])]), (t('Statistics'), False, '', [(t('Vulnlist'), False, url(_a, 'stats', 'vulnlist'), []), (t('Passwords'), False, url(_a, 'stats', 'passwords'), []), (t('OS'), False, url(_a, 'stats', 'os'), []), (t('Services'), False, url(_a, 'stats', 'services'), []), (t('VulnCircles'), False, url(_a, 'stats', 'vulncircles'), [])]), (t('Import'), False, '', [(t('Nexpose XML'), False, url(_a, 'nexpose', 'import_xml_scan'), []), (t('Nmap XML'), False, url(_a, 'nmap', 'import_xml_scan'), []), (t('Nmap Scan and Import'), False, url(_a, 'nmap', 'nmap_scan'), []), (t('Nessus Scanfile'), False, url(_a, 'nessus', 'import_scan'), []), (t('hping File'), False, url(_a, 'hping', 'import_scan'), []), (t('Metasploit XML'), False, url(_a, 'metasploit', 'import_report_xml'), []), (t('ShodanHQ'), False, url(_a, 'shodanhq', 'import_report'), [])]), (t('Administration'), False, '', [(t('Nexpose'), False, '', [(t('Install/Update VulnData'), url(_a, 'nexpose', 'vuln_update') == url(), url(_a, 'nexpose', 'vuln_update'), []), (t('Import VulnID'), False, url(_a, 'nexpose', 'import_vulnid'), []), (t('Import Exploit XML'), url(_a, 'exploits', 'import_nexpose_xml') == url(), url(_a, 'exploits', 'import_nexpose_xml'), []), (t('Purge Nexpose Data'), url(_a, 'nexpose', 'purge') == url(), url(_a, 'nexpose', 'purge'), [])]), (t('VulnDB'), False, '', [(t('Vulnerabilities'), False, url(_a, 'vulns', 'vulndata_list'), []), (t('Add Vulnerability'), False, url(_a, 'vulns', 'vulndata_add'), []), (t('References'), False, url(_a, 'vulns', 'vuln_refs'), []), (t('Vuln->Reference Links'), False, url(_a, 'vulns', 'vuln_references_list'), []), (t('Exploits'), False, url(_a, 'exploits', 'list'), []), (t('Connect Vulns/Exploits'), False, url(_a, 'exploits', 'connect_exploits'), []), (t('Import Nexpose Exploits'), False, url(_a, 'exploits', 'import_nexpose_xml'), []), (t('Import CANVAS Exploits'), False, url(_a, 'exploits', 'import_canvas_xml'), [])]), (t('CPE Database'), False, '', [(t('Import CPE Data'), False, url(_a, 'cpe', 'import_cpe_xml'), []), (t('List OS DB'), False, url(_a, 'cpe', 'os_list'), []), (t('Add OS'), False, url(_a, 'cpe', 'os_add'), []), (t('Purge CPE DB'), False, url(_a, 'cpe', 'purge'), [])]), (t('Last Resort'), False, '', [(t('CSV Backup'), False, url(_a, 'default', 'database_backup'), []), (t('CSV Restore'), False, url(_a, 'default', 'database_restore'), []), (t('Purge Data'), url(_a, 'default', 'purge_data') == url(), url(_a, 'default', 'purge_data'), [])])])]
# -*- coding: utf_8 -*- __author__ = 'Yagg' class Bombing: def __init__(self, attackerName, defenderName, planetNum, planetName, population, industry, production, capitals, materials, colonists, attackStrength, status): self.attackerName = attackerName self.defenderName = defenderName self.planetNum = planetNum self.planetName = planetName self.population = population self.industry = industry self.capitals = capitals self.materials = materials self.colonists = colonists self.attackStrength = attackStrength self.status = status self.production = production
__author__ = 'Yagg' class Bombing: def __init__(self, attackerName, defenderName, planetNum, planetName, population, industry, production, capitals, materials, colonists, attackStrength, status): self.attackerName = attackerName self.defenderName = defenderName self.planetNum = planetNum self.planetName = planetName self.population = population self.industry = industry self.capitals = capitals self.materials = materials self.colonists = colonists self.attackStrength = attackStrength self.status = status self.production = production
def gcd(a, b): if b == 0: return a return gcd(b, a%b) for _ in range(int(input())): a, b = map(int, input().split()) print(gcd(a, b))
def gcd(a, b): if b == 0: return a return gcd(b, a % b) for _ in range(int(input())): (a, b) = map(int, input().split()) print(gcd(a, b))
''' Fixed arguments ''' def print_fib(a, b, c): print(a, b, c) print_fib(1, 1, 2) print_fib(1, 1, 2, 3) ''' Using *args ''' def print_fib(a, *args): print(a) print(args) print_fib(1, 1, 2, 3) print_fib(1) ''' Using **kwargs ''' def print_fib(a, **kwargs): print(a) print(kwargs) print_fib(1, se=1, th=2, fo=3, fi=5) print_fib(1) ''' Using *args and **kwargs ''' def print_fib(*args, **kwargs): print(args) print(kwargs) print_fib(1, 1, 2, 3) print_fib(fi=1, se=1, th=2, fo=3) print_fib(1, 1, 2, fo=3, fi=5) print_fib()
""" Fixed arguments """ def print_fib(a, b, c): print(a, b, c) print_fib(1, 1, 2) print_fib(1, 1, 2, 3) '\nUsing *args\n' def print_fib(a, *args): print(a) print(args) print_fib(1, 1, 2, 3) print_fib(1) '\nUsing **kwargs\n' def print_fib(a, **kwargs): print(a) print(kwargs) print_fib(1, se=1, th=2, fo=3, fi=5) print_fib(1) '\nUsing *args and **kwargs\n' def print_fib(*args, **kwargs): print(args) print(kwargs) print_fib(1, 1, 2, 3) print_fib(fi=1, se=1, th=2, fo=3) print_fib(1, 1, 2, fo=3, fi=5) print_fib()
s, t, n = map(int, input().split()) dList = input().split() bList = input().split() cList = input().split() Time = 0 for i in range(len(dList) - 1): Time += int(dList[i]) if Time % int(cList[i]) == 0: wait = abs(Time - int(cList[i])) - int(cList[i]) else: wait = abs(Time - int(cList[i])) Time += wait + int(bList[i]) Time += int(dList[-1]) print('yes' if Time <= t else 'no')
(s, t, n) = map(int, input().split()) d_list = input().split() b_list = input().split() c_list = input().split() time = 0 for i in range(len(dList) - 1): time += int(dList[i]) if Time % int(cList[i]) == 0: wait = abs(Time - int(cList[i])) - int(cList[i]) else: wait = abs(Time - int(cList[i])) time += wait + int(bList[i]) time += int(dList[-1]) print('yes' if Time <= t else 'no')
n = int(input()) string = [] string = input().split(" ") string.sort() for i in range (0,n): print (string[i], end = " ")
n = int(input()) string = [] string = input().split(' ') string.sort() for i in range(0, n): print(string[i], end=' ')
class GlobalInfo: gui_thread = None main_window = None daemon_inst = None daemon_conn = None headless_plugin_manager = None
class Globalinfo: gui_thread = None main_window = None daemon_inst = None daemon_conn = None headless_plugin_manager = None
class MinimumBalanceAccount(BankAccount): def __init__(self, minimum_balance): BankAccount.__init__(self) self.minimum_balance = minimum_balance def withdraw(self, amount): if self.balance - amount < self.minimum_balance: print ('Sorry, minimum balance must be maintained.') else: BankAccount.withdraw(self, amount)
class Minimumbalanceaccount(BankAccount): def __init__(self, minimum_balance): BankAccount.__init__(self) self.minimum_balance = minimum_balance def withdraw(self, amount): if self.balance - amount < self.minimum_balance: print('Sorry, minimum balance must be maintained.') else: BankAccount.withdraw(self, amount)
class Solution: def divide(self, dividend: int, divisor: int) -> int: if (dividend == -2147483648 and divisor == -1): return 2147483647 ans = 1 nORp = 1 if (dividend > 0) == (divisor > 0) else -1 a , b = abs(dividend) , abs(divisor) if a < b : return 0 elif a == b: return ans * nORp while a > b: b <<= 1 ans <<= 1 ans >>= 1 b >>= 1 ans += self.divide(a - b, abs(divisor)) return nORp * ans
class Solution: def divide(self, dividend: int, divisor: int) -> int: if dividend == -2147483648 and divisor == -1: return 2147483647 ans = 1 n_o_rp = 1 if (dividend > 0) == (divisor > 0) else -1 (a, b) = (abs(dividend), abs(divisor)) if a < b: return 0 elif a == b: return ans * nORp while a > b: b <<= 1 ans <<= 1 ans >>= 1 b >>= 1 ans += self.divide(a - b, abs(divisor)) return nORp * ans
colors = ["red", "yellow", "green", "blue"] print(type(colors)) print(colors) numbers = (1,2,3) print(numbers) numbers_list = list(numbers) print(numbers_list) print(list("Fabio")) groceries = "eggs, milk, cheese" grocery_list = groceries.split(", ") print(grocery_list) numbers = list(range(1,10)) print(numbers) print(numbers[1]) print(numbers[1:3]) colors[0] = "burgundy" print(colors) colors[1:3] = ["orange", "magenta"] print(colors) colors = ["red", "yellow", "green", "blue"] colors[1:3] = ["orange", "magenta", "aqua"] print(colors) colors[1:4] = ["yellow", "green"] print(colors) colors.insert(1, "orange") print(colors) colors.insert(10, "violet") print(colors) colors.insert(-1, "indigo") print(colors) color = colors.pop(3) print(color) print(colors) print(colors.pop(-1)) print(colors) print(colors.pop()) print(colors) colors.append("indigo") print(colors) colors.extend(["violet", "ultraviolet"]) print(colors) nums = list(range(1,6)) total = 0 for number in nums: total += number print(total) print(sum(nums)) print(min(nums)) print(max(nums)) numbers = tuple(range(1,6)) print(numbers) squares = [num**2 for num in numbers] print(squares) str_numbers = ["1.5", "2.3", "5.25"] float_numbers = [float(value) for value in str_numbers] print(float_numbers) food = ["rice", "beans"] print(food) food.append("broccoli") print(food) food.extend(["bread", "pizza"]) print(food) print(food[:2]) print(food[len(food)-1]) breakfast = "eggs, fruit, orange juice".split(", ") print(breakfast) print(len(breakfast) == 3) lengths = [len(fast) for fast in breakfast] print(lengths)
colors = ['red', 'yellow', 'green', 'blue'] print(type(colors)) print(colors) numbers = (1, 2, 3) print(numbers) numbers_list = list(numbers) print(numbers_list) print(list('Fabio')) groceries = 'eggs, milk, cheese' grocery_list = groceries.split(', ') print(grocery_list) numbers = list(range(1, 10)) print(numbers) print(numbers[1]) print(numbers[1:3]) colors[0] = 'burgundy' print(colors) colors[1:3] = ['orange', 'magenta'] print(colors) colors = ['red', 'yellow', 'green', 'blue'] colors[1:3] = ['orange', 'magenta', 'aqua'] print(colors) colors[1:4] = ['yellow', 'green'] print(colors) colors.insert(1, 'orange') print(colors) colors.insert(10, 'violet') print(colors) colors.insert(-1, 'indigo') print(colors) color = colors.pop(3) print(color) print(colors) print(colors.pop(-1)) print(colors) print(colors.pop()) print(colors) colors.append('indigo') print(colors) colors.extend(['violet', 'ultraviolet']) print(colors) nums = list(range(1, 6)) total = 0 for number in nums: total += number print(total) print(sum(nums)) print(min(nums)) print(max(nums)) numbers = tuple(range(1, 6)) print(numbers) squares = [num ** 2 for num in numbers] print(squares) str_numbers = ['1.5', '2.3', '5.25'] float_numbers = [float(value) for value in str_numbers] print(float_numbers) food = ['rice', 'beans'] print(food) food.append('broccoli') print(food) food.extend(['bread', 'pizza']) print(food) print(food[:2]) print(food[len(food) - 1]) breakfast = 'eggs, fruit, orange juice'.split(', ') print(breakfast) print(len(breakfast) == 3) lengths = [len(fast) for fast in breakfast] print(lengths)
class Solution: def maxArea(self, height: List[int]) -> int: n = len(height) start, end = 0, n-1 maxArea = 0 while start < end: area = (end - start)*min(height[start], height[end]) if maxArea < area: maxArea = area if height[start] < height[end]: start += 1 else: end -= 1 return maxArea
class Solution: def max_area(self, height: List[int]) -> int: n = len(height) (start, end) = (0, n - 1) max_area = 0 while start < end: area = (end - start) * min(height[start], height[end]) if maxArea < area: max_area = area if height[start] < height[end]: start += 1 else: end -= 1 return maxArea
N = int(input()) A = int(input()) if N%500 <= A: print('Yes') else: print('No')
n = int(input()) a = int(input()) if N % 500 <= A: print('Yes') else: print('No')
# puzzle3b.py def get_rating(input_data, rating_type, num_len): def rating_type_compare(rating_type, count_0, count_1): if rating_type.upper() in ["OXYGEN", "O2"]: return (count_0 > count_1) elif rating_type.upper() in ["CO2"]: return (count_0 <= count_1) # Strategy: For each position in binary representation, extract the # digits (0 or 1) from each number (line of input). Count the number of 0s # and 1s for that position and determine which is greater (for oxygen) # smaller (for CO2) to determine which numbers from input to keep for # next iteration. If 0s and 1s are equal, keep based on 1s for oxygen # and 0s for CO2. Repeat/iterate for each position. Iterate twice: once for # oxygen and once for CO2. input_values = input_data # Initial values are numbers from input file. for i in range(num_len): column = list() num_count = len(input_values) for j in range(num_count): num_digits = list(input_values[j]) # Expand binary number input into array of digits as characters column.append(num_digits[i]) # Take the digit character from the appropriate position # Get counts of 0s and 1s for this position count_0 = len([val for val in column if val == "0"]) count_1 = len([val for val in column if val == "1"]) # Determine values for next iteration if rating_type_compare(rating_type, count_0, count_1): input_values = [val for val in input_values if list(val)[i] == "0"] else: input_values = [val for val in input_values if list(val)[i] == "1"] if len(input_values) == 1: return (input_values[0]) def main(): input_file = open("input3b.txt", "r") lines = input_file.read().splitlines() num_count = len(lines) # Count of numbers in list num_len = len(lines[0]) # Length of each number in list (oxygen, co2) = ("", "") # Determine oxygen generator rating oxygen = get_rating(input_data=lines, rating_type="oxygen", num_len=num_len) # Determine CO2 scrubber rating co2 = get_rating(input_data=lines, rating_type="CO2", num_len=num_len) print("oxygen: {o}\nCO2: {c}\nProduct: {p}\n" .format(o=oxygen, c=co2, p=(int(oxygen, 2) * int(co2, 2)))) if __name__ == "__main__": main()
def get_rating(input_data, rating_type, num_len): def rating_type_compare(rating_type, count_0, count_1): if rating_type.upper() in ['OXYGEN', 'O2']: return count_0 > count_1 elif rating_type.upper() in ['CO2']: return count_0 <= count_1 input_values = input_data for i in range(num_len): column = list() num_count = len(input_values) for j in range(num_count): num_digits = list(input_values[j]) column.append(num_digits[i]) count_0 = len([val for val in column if val == '0']) count_1 = len([val for val in column if val == '1']) if rating_type_compare(rating_type, count_0, count_1): input_values = [val for val in input_values if list(val)[i] == '0'] else: input_values = [val for val in input_values if list(val)[i] == '1'] if len(input_values) == 1: return input_values[0] def main(): input_file = open('input3b.txt', 'r') lines = input_file.read().splitlines() num_count = len(lines) num_len = len(lines[0]) (oxygen, co2) = ('', '') oxygen = get_rating(input_data=lines, rating_type='oxygen', num_len=num_len) co2 = get_rating(input_data=lines, rating_type='CO2', num_len=num_len) print('oxygen: {o}\nCO2: {c}\nProduct: {p}\n'.format(o=oxygen, c=co2, p=int(oxygen, 2) * int(co2, 2))) if __name__ == '__main__': main()
class ParticipantIdentifierTypeName(): AS_PROGRESSION_ID = 'AS_PROGRESSION_ID' BME_COVID_ID = 'BME_COVID_ID' CARDIOMET_ID = 'CARDIOMET_ID' CARMER_BREATH_ID = 'CARMER_BREATH_ID' EASY_AS_ID = 'EASY_AS_ID' EDEN_ID = 'EDEN_ID' EDIFY_ID = 'EDIFY_ID' ELASTIC_AS_ID = 'ELASTIC_AS_ID' EPIGENE1_ID = 'EPIGENE1_ID' EXTEND_ID = 'EXTEND_ID' MEIRU_ID = 'MEIRU_ID' FAST_ID = 'FAST_ID' FOAMI_ID = 'FOAMI_ID' STUDY_PARTICIPANT_ID = 'study_participant_id' ALLEVIATE_ID = 'alleviate_id' BREATHE_DEEP_ID = 'BREATHE_DEEP_ID' BREATHLESSNESS_ID = 'BREATHLESSNESS_ID' BRICCS_ID = 'BRICCS_ID' CHABLIS_ID = 'CHABLIS_ID' CIA_ID = 'CIA_ID' COHERE_ID = 'COHERE_ID' COPD_COVID_19_ID = 'COPD_COVID_19_ID' COPD_INTRO_ID = 'COPD_INTRO_ID' CTO_ID = 'CTO_ID' CVLPRIT_ID = 'CVLPRIT_ID' CVLPRIT_LOCAL_ID = 'CVLPRIT_LOCAL_ID' PILOT_ID = 'PILOT_ID' DAL_GENE_ID = 'DAL_GENE_ID' DESMOND_ID = 'DESMOND_ID' DHF_ID = 'DHF_ID' DISCORDANCE_ID = 'DISCORDANCE_ID' DREAM_ID = 'DREAM_ID' BIORESOURCE_ID = 'BIORESOURCE_ID' GENVASC_ID = 'GENVASC_ID' GLOBAL_VIEWS_ID = 'GLOBAL_VIEWS_ID' GO_DCM_ID = 'GO_DCM_ID' GRAPHIC2_ID = 'GRAPHIC2_ID' GRAPHIC_ID = 'GRAPHIC_ID' GRAPHIC_LAB_ID = 'GRAPHIC_LAB_ID' TMAO_ID = 'tmao_id' BRAVE_ID = 'BRAVE_ID' NHS_NUMBER = 'nhs_number' UHL_SYSTEM_NUMBER = 'uhl_system_number' UHL_HCW_COVID_19_ID = 'UHL_HCW_COVID_19_ID' HAD_ID = 'HAD_ID' IDAPAMIDE_ID = 'IDAPAMIDE_ID' INTERFIELD_ID = 'INTERFIELD_ID' LENTEN_ID = 'LENTEN_ID' LIMB_ID = 'LIMB_ID' MARI_ID = 'MARI_ID' MCCANN_IMAGE_ID = 'MCCANN_IMAGE_ID' MEL_ID = 'MEL_ID' MI_ECMO_ID = 'MI_ECMO_ID' MINERVA_ID = 'MINERVA_ID' MRP_HFPEF_ID = 'MRP_HFPEF_ID' MULTI_MORBID_PRIORITIES_ID = 'MULTI_MORBID_PRIORITIES_ID' NON_ADHERENCE_ID = 'NON_ADHERENCE_ID' NOVO5K_ID = 'NOVO5K_ID' PARC_ID = 'PARC_ID' HC_NUMBER = 'HC_NUMBER' CHI_NUMBER = 'CHI_NUMBER' PHOSP_COVID19_ID = 'PHOSP_COVID19_ID' PREDICT_ID = 'PREDICT_ID' PREECLAMPSIA_ID = 'PREECLAMPSIA_ID' RAPID_NSTEMI_ID = 'RAPID_NSTEMI_ID' RECHARGE_ID = 'RECHARGE_ID' REST_ID = 'REST_ID' SALT_ID = 'SALT_ID' SCAD_SURVEY_ID = 'SCAD_SURVEY_ID' SCAD_LOCAL_ID = 'SCAD_LOCAL_ID' SCAD_ID = 'SCAD_ID' SCAD_REG_ID = 'SCAD_REG_ID' SCAD_CAE_ID = 'SCAD_CAE_ID' SKOPE_ID = 'SKOPE_ID' SPACE_FOR_COPD_ID = 'SPACE_FOR_COPD_ID' SPIRAL_ID = 'SPIRAL_ID' UPFOR5_ID = 'UPFOR5_ID' VASCEGENS_ID = 'VASCEGENS_ID' YAKULT_ID = 'yakult_id' YOGA_ID = 'yoga_id' UHL_NUMBER = 'UHL_NUMBER' CIVICRM_CONTACT_ID = 'CIVICRM_CONTACT_ID' CIVICRM_CASE_ID = 'CIVICRM_CASE_ID' OMICS_REGISTER_ID = 'OMICS_REGISTER_ID' def all_types(self): return [getattr(self, f) for f in dir(self) if not callable(getattr(self,f)) and not f.startswith('__')]
class Participantidentifiertypename: as_progression_id = 'AS_PROGRESSION_ID' bme_covid_id = 'BME_COVID_ID' cardiomet_id = 'CARDIOMET_ID' carmer_breath_id = 'CARMER_BREATH_ID' easy_as_id = 'EASY_AS_ID' eden_id = 'EDEN_ID' edify_id = 'EDIFY_ID' elastic_as_id = 'ELASTIC_AS_ID' epigene1_id = 'EPIGENE1_ID' extend_id = 'EXTEND_ID' meiru_id = 'MEIRU_ID' fast_id = 'FAST_ID' foami_id = 'FOAMI_ID' study_participant_id = 'study_participant_id' alleviate_id = 'alleviate_id' breathe_deep_id = 'BREATHE_DEEP_ID' breathlessness_id = 'BREATHLESSNESS_ID' briccs_id = 'BRICCS_ID' chablis_id = 'CHABLIS_ID' cia_id = 'CIA_ID' cohere_id = 'COHERE_ID' copd_covid_19_id = 'COPD_COVID_19_ID' copd_intro_id = 'COPD_INTRO_ID' cto_id = 'CTO_ID' cvlprit_id = 'CVLPRIT_ID' cvlprit_local_id = 'CVLPRIT_LOCAL_ID' pilot_id = 'PILOT_ID' dal_gene_id = 'DAL_GENE_ID' desmond_id = 'DESMOND_ID' dhf_id = 'DHF_ID' discordance_id = 'DISCORDANCE_ID' dream_id = 'DREAM_ID' bioresource_id = 'BIORESOURCE_ID' genvasc_id = 'GENVASC_ID' global_views_id = 'GLOBAL_VIEWS_ID' go_dcm_id = 'GO_DCM_ID' graphic2_id = 'GRAPHIC2_ID' graphic_id = 'GRAPHIC_ID' graphic_lab_id = 'GRAPHIC_LAB_ID' tmao_id = 'tmao_id' brave_id = 'BRAVE_ID' nhs_number = 'nhs_number' uhl_system_number = 'uhl_system_number' uhl_hcw_covid_19_id = 'UHL_HCW_COVID_19_ID' had_id = 'HAD_ID' idapamide_id = 'IDAPAMIDE_ID' interfield_id = 'INTERFIELD_ID' lenten_id = 'LENTEN_ID' limb_id = 'LIMB_ID' mari_id = 'MARI_ID' mccann_image_id = 'MCCANN_IMAGE_ID' mel_id = 'MEL_ID' mi_ecmo_id = 'MI_ECMO_ID' minerva_id = 'MINERVA_ID' mrp_hfpef_id = 'MRP_HFPEF_ID' multi_morbid_priorities_id = 'MULTI_MORBID_PRIORITIES_ID' non_adherence_id = 'NON_ADHERENCE_ID' novo5_k_id = 'NOVO5K_ID' parc_id = 'PARC_ID' hc_number = 'HC_NUMBER' chi_number = 'CHI_NUMBER' phosp_covid19_id = 'PHOSP_COVID19_ID' predict_id = 'PREDICT_ID' preeclampsia_id = 'PREECLAMPSIA_ID' rapid_nstemi_id = 'RAPID_NSTEMI_ID' recharge_id = 'RECHARGE_ID' rest_id = 'REST_ID' salt_id = 'SALT_ID' scad_survey_id = 'SCAD_SURVEY_ID' scad_local_id = 'SCAD_LOCAL_ID' scad_id = 'SCAD_ID' scad_reg_id = 'SCAD_REG_ID' scad_cae_id = 'SCAD_CAE_ID' skope_id = 'SKOPE_ID' space_for_copd_id = 'SPACE_FOR_COPD_ID' spiral_id = 'SPIRAL_ID' upfor5_id = 'UPFOR5_ID' vascegens_id = 'VASCEGENS_ID' yakult_id = 'yakult_id' yoga_id = 'yoga_id' uhl_number = 'UHL_NUMBER' civicrm_contact_id = 'CIVICRM_CONTACT_ID' civicrm_case_id = 'CIVICRM_CASE_ID' omics_register_id = 'OMICS_REGISTER_ID' def all_types(self): return [getattr(self, f) for f in dir(self) if not callable(getattr(self, f)) and (not f.startswith('__'))]
def D2old(): n = int(input()) bricks = input().split() bricks = [int(x) for x in bricks] m = min(bricks) M = max(bricks) while(m!=M): for idx in range(n): if(bricks[idx] != m): continue m_count = 0 while( idx+m_count < n and bricks[idx+m_count]== m): bricks[idx+m_count] +=1 m_count+=1 if(m_count%2): print("NO") return m_count = 0 m = min(bricks) break print("YES") D2old() # Daba TLE en test 12
def d2old(): n = int(input()) bricks = input().split() bricks = [int(x) for x in bricks] m = min(bricks) m = max(bricks) while m != M: for idx in range(n): if bricks[idx] != m: continue m_count = 0 while idx + m_count < n and bricks[idx + m_count] == m: bricks[idx + m_count] += 1 m_count += 1 if m_count % 2: print('NO') return m_count = 0 m = min(bricks) break print('YES') d2old()
list = [] def list_(times): for x in range(times): number = int(input('Ingrese numero(s) a incluir ')) list.append(number) return list times = int(input('Cantidad de elementos?: ')) list = list_(times) print(list)
list = [] def list_(times): for x in range(times): number = int(input('Ingrese numero(s) a incluir ')) list.append(number) return list times = int(input('Cantidad de elementos?: ')) list = list_(times) print(list)
#Patterns to detect accommodation related queries pattern_details1 = { "LABEL" : "PICKUP_REG", "pattern" : [ { "TEXT" : { "REGEX" : "\bpickup\b|\bpick-up\b|\bdeliver*\b|\bgrab*\b" } } ] } pattern_details2 = { "LABEL" : "PICKUP_LEMM", "pattern" : [ { "TEXT" : { "REGEX" : "deliver|pickup|pick-up|grab|drop" } }, { "OP" : "*" }, { "TEXT" : { "REGEX" : "\bgrocer*\b|\bmedicin*\b|\bmedicat*\b|\bclinic*\b|\bparamedic*\b|\bhealth*\b" }} ] } patterns = [ pattern_details2, pattern_details1 ]
pattern_details1 = {'LABEL': 'PICKUP_REG', 'pattern': [{'TEXT': {'REGEX': '\x08pickup\x08|\x08pick-up\x08|\x08deliver*\x08|\x08grab*\x08'}}]} pattern_details2 = {'LABEL': 'PICKUP_LEMM', 'pattern': [{'TEXT': {'REGEX': 'deliver|pickup|pick-up|grab|drop'}}, {'OP': '*'}, {'TEXT': {'REGEX': '\x08grocer*\x08|\x08medicin*\x08|\x08medicat*\x08|\x08clinic*\x08|\x08paramedic*\x08|\x08health*\x08'}}]} patterns = [pattern_details2, pattern_details1]
#remove all the digits from given string inp="test1254ab995drgdc10108done" inp=inp.replace("0","") inp=inp.replace("1","") inp=inp.replace("2","") inp=inp.replace("3","") inp=inp.replace("4","") inp=inp.replace("5","") inp=inp.replace("6","") inp=inp.replace("7","") inp=inp.replace("8","") inp=inp.replace("9","") print(inp)
inp = 'test1254ab995drgdc10108done' inp = inp.replace('0', '') inp = inp.replace('1', '') inp = inp.replace('2', '') inp = inp.replace('3', '') inp = inp.replace('4', '') inp = inp.replace('5', '') inp = inp.replace('6', '') inp = inp.replace('7', '') inp = inp.replace('8', '') inp = inp.replace('9', '') print(inp)
n = int(input()) if n%2!=0: print("Weird") else: if (n>=2 and n<=5): print("Not Weird") elif (n>=6 and n<=20): print("Weird") elif(n>20): print("Not Weird")
n = int(input()) if n % 2 != 0: print('Weird') elif n >= 2 and n <= 5: print('Not Weird') elif n >= 6 and n <= 20: print('Weird') elif n > 20: print('Not Weird')
def convert_and_sum_list_kwargs(usd_list, **kwargs): total = 0 for amount in usd_list: total += convert_usd_to_aud(amount, **kwargs) return total print(convert_and_sum_list_kwargs([1, 3], rate=0.8))
def convert_and_sum_list_kwargs(usd_list, **kwargs): total = 0 for amount in usd_list: total += convert_usd_to_aud(amount, **kwargs) return total print(convert_and_sum_list_kwargs([1, 3], rate=0.8))
class SimpleGraph: def __init__(self): self.edges = {} @property def nodes(self): return self.edges.keys() def neighbors(self, id): return self.edges[id] class DFS(object): ''' Implementation of recursive depth-first search algorithm Note for status 0=not visited, 1=seen but not done, 2=done ''' def __init__(self, graph): self.graph = graph self.status = {k:0 for k in graph.nodes} self.predecessors = {k:None for k in graph.nodes} self.seen = {k: 0 for k in graph.nodes} self.done = {k: 0 for k in graph.nodes} self.t = 0 def dfs_visit_recursive(self, s): self.status[s] = 1 self.seen[s] = self.t self.t += 1 neighbours = self.graph.neighbors(s) for v in neighbours: if self.status[v] == 0: self.predecessors[v] = s self.dfs_visit_recursive(v) self.status[s] = 2 self.done[s] = self.t self.t += 1 def search(self): ''' Searches the graph in depth-first order :return: dict of seen-times and done-times of nodes ''' for node in self.graph.nodes: if self.status[node] == 0: self.dfs_visit_recursive(node) return self.seen, self.done if __name__ == '__main__': example_graph = SimpleGraph() example_graph.edges = { 'A': ['B'], 'B': ['A', 'C', 'D'], 'C': ['A'], 'D': ['E', 'A'], 'E': ['B'] } print(DFS(example_graph).search())
class Simplegraph: def __init__(self): self.edges = {} @property def nodes(self): return self.edges.keys() def neighbors(self, id): return self.edges[id] class Dfs(object): """ Implementation of recursive depth-first search algorithm Note for status 0=not visited, 1=seen but not done, 2=done """ def __init__(self, graph): self.graph = graph self.status = {k: 0 for k in graph.nodes} self.predecessors = {k: None for k in graph.nodes} self.seen = {k: 0 for k in graph.nodes} self.done = {k: 0 for k in graph.nodes} self.t = 0 def dfs_visit_recursive(self, s): self.status[s] = 1 self.seen[s] = self.t self.t += 1 neighbours = self.graph.neighbors(s) for v in neighbours: if self.status[v] == 0: self.predecessors[v] = s self.dfs_visit_recursive(v) self.status[s] = 2 self.done[s] = self.t self.t += 1 def search(self): """ Searches the graph in depth-first order :return: dict of seen-times and done-times of nodes """ for node in self.graph.nodes: if self.status[node] == 0: self.dfs_visit_recursive(node) return (self.seen, self.done) if __name__ == '__main__': example_graph = simple_graph() example_graph.edges = {'A': ['B'], 'B': ['A', 'C', 'D'], 'C': ['A'], 'D': ['E', 'A'], 'E': ['B']} print(dfs(example_graph).search())
#check if it is a multiple subject def is_multiple_subject_linked_to_subject(subject): for child in subject.children: if child.dep_ == "conj": return True return False def is_multiple_subject_linked_to_predicate(predicate): #this case is for personal pronoun, and not only, but much more nsubj subjects = [] for child in predicate.children: if child.dep_ == "nsubj": subjects.append(child) if len(subjects) > 1: return True return False #al that are in conjunction relation def get_multiple_predicates(root): predicates = [root] for child in root.children: if child.dep_ == "conj" and has_own_subject(child) == False: predicates.append(child) return predicates #because 2 sentences that are in coordinative relation will have verbs in conjunction, even if they have own subject def has_own_subject(predicate): for child in predicate.children: if child.dep_ == "nsubj": return True return False #adjectives that are linked with the other through conjunctions def is_in_adjective_noun_relation(adjective): if adjective.dep_ == "amod": return (True, adjective.head) if adjective.head.dep_ == "amod" and adjective.head.head.tag_[:2] == "Nc": return (True, adjective.head.head) return (False, None)
def is_multiple_subject_linked_to_subject(subject): for child in subject.children: if child.dep_ == 'conj': return True return False def is_multiple_subject_linked_to_predicate(predicate): subjects = [] for child in predicate.children: if child.dep_ == 'nsubj': subjects.append(child) if len(subjects) > 1: return True return False def get_multiple_predicates(root): predicates = [root] for child in root.children: if child.dep_ == 'conj' and has_own_subject(child) == False: predicates.append(child) return predicates def has_own_subject(predicate): for child in predicate.children: if child.dep_ == 'nsubj': return True return False def is_in_adjective_noun_relation(adjective): if adjective.dep_ == 'amod': return (True, adjective.head) if adjective.head.dep_ == 'amod' and adjective.head.head.tag_[:2] == 'Nc': return (True, adjective.head.head) return (False, None)
#!/usr/bin/env python NAME = 'Imperva SecureSphere' def is_waf(self): # thanks to Mathieu Dessus <mathieu.dessus(a)verizonbusiness.com> for this # might lead to false positives so please report back to sandro@enablesecurity.com for attack in self.attacks: r = attack(self) if r is None: return response, responsebody = r if response.version == 10: return True return False
name = 'Imperva SecureSphere' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return (response, responsebody) = r if response.version == 10: return True return False
class Node(object): def __init__(self, val, parent=None): self.val = val self.leftChild = None self.rightChild = None self.parent = parent def getLeftChild(self): return self.leftChild def getRightChild(self): return self.rightChild def getParent(self): return self.parent def isRoot(self): return self.parent != None def hasLeftChild(self): return self.leftChild != None def hasRightChild(self): return self.rightChild != None def hasBothChildren(self): return self.hasLeftChild() and self.hasRightChild() def hasOneChild(self): return self.hasLeftChild() or self.hasRightChild() class BinarySearchTree(object): def __init__(self): self.size = 0 self.root = None def insert(self, val): if not self.root: self.root = Node(val) else: temp = self.root done = False while not done: if val < temp.val: if temp.hasLeftChild(): temp = temp.getLeftChild() else: temp.leftChild = Node(val, temp) done = True else: if temp.hasRightChild(): temp = temp.getRightChild() else: temp.rightChild = Node(val, temp) done = True self.size += 1 def inorder(self, root): if root: self.inorder(root.leftChild) print(root.val, end=" ") self.inorder(root.rightChild) def level_traversal(self, root): if not root: return q = [root] while len(q) > 0: q2 = [] for x in q: print(x.val, end=" ") if x.hasLeftChild(): q2.append(x.leftChild) if x.hasRightChild(): q2.append(x.rightChild) print() q = q2 if __name__ == "__main__": b = BinarySearchTree() b.insert(25) b.insert(15) b.insert(8) b.insert(20) b.insert(17) b.insert(16) b.insert(18) b.insert(40) b.insert(35) b.insert(46) b.insert(42) b.insert(50) b.inorder(b.root) print("Length:", b.size) b.level_traversal(b.root)
class Node(object): def __init__(self, val, parent=None): self.val = val self.leftChild = None self.rightChild = None self.parent = parent def get_left_child(self): return self.leftChild def get_right_child(self): return self.rightChild def get_parent(self): return self.parent def is_root(self): return self.parent != None def has_left_child(self): return self.leftChild != None def has_right_child(self): return self.rightChild != None def has_both_children(self): return self.hasLeftChild() and self.hasRightChild() def has_one_child(self): return self.hasLeftChild() or self.hasRightChild() class Binarysearchtree(object): def __init__(self): self.size = 0 self.root = None def insert(self, val): if not self.root: self.root = node(val) else: temp = self.root done = False while not done: if val < temp.val: if temp.hasLeftChild(): temp = temp.getLeftChild() else: temp.leftChild = node(val, temp) done = True elif temp.hasRightChild(): temp = temp.getRightChild() else: temp.rightChild = node(val, temp) done = True self.size += 1 def inorder(self, root): if root: self.inorder(root.leftChild) print(root.val, end=' ') self.inorder(root.rightChild) def level_traversal(self, root): if not root: return q = [root] while len(q) > 0: q2 = [] for x in q: print(x.val, end=' ') if x.hasLeftChild(): q2.append(x.leftChild) if x.hasRightChild(): q2.append(x.rightChild) print() q = q2 if __name__ == '__main__': b = binary_search_tree() b.insert(25) b.insert(15) b.insert(8) b.insert(20) b.insert(17) b.insert(16) b.insert(18) b.insert(40) b.insert(35) b.insert(46) b.insert(42) b.insert(50) b.inorder(b.root) print('Length:', b.size) b.level_traversal(b.root)
class FundNameException(BaseException): pass class FundOutFileNameException(BaseException): pass class FundNotFoundException(BaseException): pass class StockInformationMissingException(BaseException): pass class StockCandleInformatinMissingException(StockInformationMissingException): pass
class Fundnameexception(BaseException): pass class Fundoutfilenameexception(BaseException): pass class Fundnotfoundexception(BaseException): pass class Stockinformationmissingexception(BaseException): pass class Stockcandleinformatinmissingexception(StockInformationMissingException): pass
dp = {0:0,1:1,2:2} class Solution: def minDays(self, n: int) -> int: if n in dp: return dp[n] ans = 1 + min(n%2 + self.minDays((n-n%2)//2), n%3 + self.minDays((n-n%3)//3)) dp[n] = ans return ans
dp = {0: 0, 1: 1, 2: 2} class Solution: def min_days(self, n: int) -> int: if n in dp: return dp[n] ans = 1 + min(n % 2 + self.minDays((n - n % 2) // 2), n % 3 + self.minDays((n - n % 3) // 3)) dp[n] = ans return ans
class Template: def __init__(self, bot, channel): self.bot = bot self.channel = channel channel.set_command("!command", self.on_command, "!command description") def on_command(self, message): pass # runs when a personal message is received # message is a dictionary containing the username, channel and message # channel parameter in message dictionary is the bot username def on_personal_message(self, message): pass # runs when a message is received in the channel # message is a dictionary containing the username, channel and message def on_message(self, message): pass # runs when a user joins the channel # slot is an integer of the slot number joined # username is a string of the user's username who joined def on_join(self, username, slot): pass # runs when a user leaves the channel # slot is an integer of the slot number joined # username is a string of the user's username who joined def on_part(self, username, slot): pass # runs when the match is started def on_match_start(self): pass # runs when the match finishes normally def on_match_finish(self): pass # runs when a match is aborted with either a command or the method channel.abort_match() def on_match_abort(self): pass # runs when the host is changed # old_host is the username of the user who had host before the change # new_host is the username of the user who has just received host def on_host_change(self, old_host, new_host): pass # runs when a user changes team # username is the username of the user who changed team # team is the colour of the team joined def on_team_change(self, username, team): pass # runs when a user is added to a team # username is the username of the user who changed team # team is the colour of the team joined def on_team_addition(self, username, team): pass # runs when a user changes slot # slot is an integer of the slot number joined # username is a string of the user's username who joined def on_slot_change(self, username, slot): pass # runs when all players in the room have readied up def on_all_players_ready(self): pass # runs when the beatmap is changed # old beatmap is the previous beatmap before the change # new_beatmap is the beatmap which hasw just been changed to def on_beatmap_change(self, old_beatmap, new_beatmap): pass # runs when host enters map select def on_changing_beatmap(self): pass # runs when a game room is closed def on_room_close(self): pass # runs when the host is cleared # old_host is the host prior to clearing the room def on_clear_host(self, old_host): pass # runs when an enforced attribute is violated # error contains: # type - the type of on_rule_violation # message - a message to explain what is going on def on_rule_violation(self, error): pass
class Template: def __init__(self, bot, channel): self.bot = bot self.channel = channel channel.set_command('!command', self.on_command, '!command description') def on_command(self, message): pass def on_personal_message(self, message): pass def on_message(self, message): pass def on_join(self, username, slot): pass def on_part(self, username, slot): pass def on_match_start(self): pass def on_match_finish(self): pass def on_match_abort(self): pass def on_host_change(self, old_host, new_host): pass def on_team_change(self, username, team): pass def on_team_addition(self, username, team): pass def on_slot_change(self, username, slot): pass def on_all_players_ready(self): pass def on_beatmap_change(self, old_beatmap, new_beatmap): pass def on_changing_beatmap(self): pass def on_room_close(self): pass def on_clear_host(self, old_host): pass def on_rule_violation(self, error): pass
# -*- coding: utf-8 -*- DEBUG = True TESTING = True SECRET_KEY = 'SECRET_KEY' DATABASE_URI = 'mysql+pymysql://root:root@127.0.0.1/git_webhook' CELERY_BROKER_URL = 'redis://:@127.0.0.1:6379/0' CELERY_RESULT_BACKEND = 'redis://:@127.0.0.1:6379/0' SOCKET_MESSAGE_QUEUE = 'redis://:@127.0.0.1:6379/0' GITHUB_CLIENT_ID = '123' GITHUB_CLIENT_SECRET = 'SECRET'
debug = True testing = True secret_key = 'SECRET_KEY' database_uri = 'mysql+pymysql://root:root@127.0.0.1/git_webhook' celery_broker_url = 'redis://:@127.0.0.1:6379/0' celery_result_backend = 'redis://:@127.0.0.1:6379/0' socket_message_queue = 'redis://:@127.0.0.1:6379/0' github_client_id = '123' github_client_secret = 'SECRET'
__title__ = 'django-activeurl' __package_name__ = 'django_activeurl' __version__ = '0.1.12' __description__ = 'Easy-to-use active URL highlighting for Django' __email__ = 'hellysmile@gmail.com' __author__ = 'hellysmile' __license__ = 'Apache 2.0' __copyright__ = 'Copyright (c) hellysmile@gmail.com'
__title__ = 'django-activeurl' __package_name__ = 'django_activeurl' __version__ = '0.1.12' __description__ = 'Easy-to-use active URL highlighting for Django' __email__ = 'hellysmile@gmail.com' __author__ = 'hellysmile' __license__ = 'Apache 2.0' __copyright__ = 'Copyright (c) hellysmile@gmail.com'
# # PySNMP MIB module AT-ISDN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AT-ISDN-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:14:15 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") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint") modules, DisplayStringUnsized = mibBuilder.importSymbols("AT-SMI-MIB", "modules", "DisplayStringUnsized") ifIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndexOrZero") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, ObjectIdentity, IpAddress, Gauge32, Integer32, MibIdentifier, ModuleIdentity, iso, Unsigned32, TimeTicks, Bits, NotificationType, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "ObjectIdentity", "IpAddress", "Gauge32", "Integer32", "MibIdentifier", "ModuleIdentity", "iso", "Unsigned32", "TimeTicks", "Bits", "NotificationType", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString") cc = ModuleIdentity((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37)) cc.setRevisions(('2006-06-28 12:22',)) if mibBuilder.loadTexts: cc.setLastUpdated('200606281222Z') if mibBuilder.loadTexts: cc.setOrganization('Allied Telesis, Inc') ccDetailsTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1), ) if mibBuilder.loadTexts: ccDetailsTable.setStatus('current') ccDetailsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccDetailsIndex")) if mibBuilder.loadTexts: ccDetailsEntry.setStatus('current') ccDetailsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccDetailsIndex.setStatus('current') ccDetailsName = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 2), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsName.setStatus('current') ccDetailsRemoteName = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 3), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRemoteName.setStatus('current') ccDetailsCalledNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 4), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsCalledNumber.setStatus('current') ccDetailsCallingNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 5), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsCallingNumber.setStatus('current') ccDetailsAlternateNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 6), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsAlternateNumber.setStatus('current') ccDetailsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsEnabled.setStatus('current') ccDetailsDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inOnly", 1), ("outOnly", 2), ("both", 3))).clone('both')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsDirection.setStatus('current') ccDetailsPrecedence = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("in", 1), ("out", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsPrecedence.setStatus('current') ccDetailsHoldupTime = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7200))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsHoldupTime.setStatus('current') ccDetailsPreferredIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 11), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsPreferredIfIndex.setStatus('current') ccDetailsRequiredIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 12), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRequiredIfIndex.setStatus('current') ccDetailsPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 99)).clone(50)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsPriority.setStatus('current') ccDetailsRetryT1 = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 120)).clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRetryT1.setStatus('current') ccDetailsRetryN1 = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRetryN1.setStatus('current') ccDetailsRetryT2 = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(300, 1200)).clone(600)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRetryT2.setStatus('current') ccDetailsRetryN2 = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 5))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsRetryN2.setStatus('current') ccDetailsKeepup = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2))).clone('no')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsKeepup.setStatus('current') ccDetailsOutSetupCli = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("off", 1), ("calling", 2), ("interface", 3), ("nonumber", 4))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsOutSetupCli.setStatus('current') ccDetailsOutSetupUser = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsOutSetupUser.setStatus('current') ccDetailsOutSetupCalledSub = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsOutSetupCalledSub.setStatus('current') ccDetailsOutSubaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 22), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsOutSubaddress.setStatus('current') ccDetailsCallback = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2))).clone('no')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsCallback.setStatus('current') ccDetailsCallbackDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(41)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsCallbackDelay.setStatus('current') ccDetailsInSetupCalledSubSearch = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCalledSubSearch.setStatus('current') ccDetailsInSetupUserSearch = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupUserSearch.setStatus('current') ccDetailsInSetupCliSearch = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("on", 2), ("list", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCliSearch.setStatus('current') ccDetailsInSetupCliSearchList = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCliSearchList.setStatus('current') ccDetailsInAnyFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2))).clone('no')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInAnyFlag.setStatus('current') ccDetailsInSetupCalledSubCheck = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCalledSubCheck.setStatus('current') ccDetailsInSetupUserCheck = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("local", 2), ("remote", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupUserCheck.setStatus('current') ccDetailsInSetupCliCheck = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("off", 1), ("present", 2), ("required", 3))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCliCheck.setStatus('current') ccDetailsInSetupCliCheckList = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 33), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsInSetupCliCheckList.setStatus('current') ccDetailsUserType = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("attach", 1), ("ppp", 2))).clone('attach')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsUserType.setStatus('current') ccDetailsLoginType = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("userdb", 2), ("radius", 3), ("papTacacs", 4), ("chap", 5), ("papRadius", 6), ("tacacs", 7), ("all", 8))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsLoginType.setStatus('current') ccDetailsUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("cli", 2), ("calledsub", 3), ("useruser", 4), ("callname", 5))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsUsername.setStatus('current') ccDetailsPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 37), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("cli", 2), ("calledsub", 3), ("useruser", 4), ("callname", 5))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsPassword.setStatus('current') ccDetailsBumpDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 38), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsBumpDelay.setStatus('current') ccDetailsDataRate = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 39), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rate-64k", 1), ("rate-56k", 2))).clone('rate-64k')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsDataRate.setStatus('current') ccDetailsPppTemplate = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 40), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 33)).clone(33)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccDetailsPppTemplate.setStatus('current') ccDetailsUserModule = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 41), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccDetailsUserModule.setStatus('current') ccDetailsNumberAttachments = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 42), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccDetailsNumberAttachments.setStatus('current') ccCliListTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2), ) if mibBuilder.loadTexts: ccCliListTable.setStatus('current') ccCliListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccCliListListIndex"), (0, "AT-ISDN-MIB", "ccCliListEntryIndex")) if mibBuilder.loadTexts: ccCliListEntry.setStatus('current') ccCliListListIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCliListListIndex.setStatus('current') ccCliListEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCliListEntryIndex.setStatus('current') ccCliListNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 3), DisplayStringUnsized().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ccCliListNumber.setStatus('current') ccActiveCallTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3), ) if mibBuilder.loadTexts: ccActiveCallTable.setStatus('current') ccActiveCallEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccActiveCallIndex")) if mibBuilder.loadTexts: ccActiveCallEntry.setStatus('current') ccActiveCallIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallIndex.setStatus('current') ccActiveCallDetailsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallDetailsIndex.setStatus('current') ccActiveCallIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallIfIndex.setStatus('current') ccActiveCallDataRate = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rate-64k", 1), ("rate-56k", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallDataRate.setStatus('current') ccActiveCallState = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("null", 1), ("off", 2), ("try", 3), ("on", 4), ("wait", 5), ("await1", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallState.setStatus('current') ccActiveCallDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("in", 1), ("out", 2), ("undefined", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallDirection.setStatus('current') ccActiveCallUserModule = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallUserModule.setStatus('current') ccActiveCallUserInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallUserInstance.setStatus('current') ccActiveCallBchannelIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccActiveCallBchannelIndex.setStatus('current') ccCallLogTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4), ) if mibBuilder.loadTexts: ccCallLogTable.setStatus('current') ccCallLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccCallLogIndex")) if mibBuilder.loadTexts: ccCallLogEntry.setStatus('current') ccCallLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogIndex.setStatus('current') ccCallLogName = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogName.setStatus('current') ccCallLogState = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("initial", 1), ("active", 2), ("disconnected", 3), ("cleared", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogState.setStatus('current') ccCallLogTimeStarted = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogTimeStarted.setStatus('current') ccCallLogDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("in", 1), ("out", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogDirection.setStatus('current') ccCallLogDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogDuration.setStatus('current') ccCallLogRemoteNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccCallLogRemoteNumber.setStatus('current') ccAttachmentTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5), ) if mibBuilder.loadTexts: ccAttachmentTable.setStatus('current') ccAttachmentEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccAttachmentDetailsIndex"), (0, "AT-ISDN-MIB", "ccAttachmentEntryIndex")) if mibBuilder.loadTexts: ccAttachmentEntry.setStatus('current') ccAttachmentDetailsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccAttachmentDetailsIndex.setStatus('current') ccAttachmentEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccAttachmentEntryIndex.setStatus('current') ccAttachmentActiveCallIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccAttachmentActiveCallIndex.setStatus('current') ccAttachmentUserInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccAttachmentUserInstance.setStatus('current') ccBchannelTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6), ) if mibBuilder.loadTexts: ccBchannelTable.setStatus('current') ccBchannelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1), ).setIndexNames((0, "AT-ISDN-MIB", "ccBchannelIfIndex"), (0, "AT-ISDN-MIB", "ccBchannelChannelIndex")) if mibBuilder.loadTexts: ccBchannelEntry.setStatus('current') ccBchannelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelIfIndex.setStatus('current') ccBchannelChannelIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelChannelIndex.setStatus('current') ccBchannelAllocated = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelAllocated.setStatus('current') ccBchannelCallType = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("undefined", 1), ("data", 2), ("voice", 3), ("x25", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelCallType.setStatus('current') ccBchannelActiveCallIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelActiveCallIndex.setStatus('current') ccBchannelPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelPriority.setStatus('current') ccBchannelDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("in", 1), ("out", 2), ("unallocated", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ccBchannelDirection.setStatus('current') mibBuilder.exportSymbols("AT-ISDN-MIB", ccActiveCallDirection=ccActiveCallDirection, ccBchannelIfIndex=ccBchannelIfIndex, ccDetailsInAnyFlag=ccDetailsInAnyFlag, ccDetailsCalledNumber=ccDetailsCalledNumber, ccCliListTable=ccCliListTable, ccDetailsPriority=ccDetailsPriority, ccActiveCallDataRate=ccActiveCallDataRate, ccDetailsPreferredIfIndex=ccDetailsPreferredIfIndex, ccActiveCallUserInstance=ccActiveCallUserInstance, ccDetailsEnabled=ccDetailsEnabled, ccCallLogIndex=ccCallLogIndex, ccDetailsEntry=ccDetailsEntry, ccDetailsRequiredIfIndex=ccDetailsRequiredIfIndex, ccCallLogDirection=ccCallLogDirection, ccCliListEntryIndex=ccCliListEntryIndex, ccDetailsTable=ccDetailsTable, ccDetailsOutSetupCli=ccDetailsOutSetupCli, ccCallLogTable=ccCallLogTable, ccDetailsPassword=ccDetailsPassword, ccCallLogDuration=ccCallLogDuration, ccBchannelChannelIndex=ccBchannelChannelIndex, ccActiveCallUserModule=ccActiveCallUserModule, ccAttachmentTable=ccAttachmentTable, ccBchannelPriority=ccBchannelPriority, ccAttachmentEntry=ccAttachmentEntry, ccAttachmentEntryIndex=ccAttachmentEntryIndex, ccBchannelCallType=ccBchannelCallType, ccDetailsCallback=ccDetailsCallback, ccAttachmentActiveCallIndex=ccAttachmentActiveCallIndex, ccDetailsInSetupCliCheck=ccDetailsInSetupCliCheck, ccCallLogName=ccCallLogName, ccCliListEntry=ccCliListEntry, ccDetailsCallingNumber=ccDetailsCallingNumber, ccAttachmentDetailsIndex=ccAttachmentDetailsIndex, ccDetailsName=ccDetailsName, ccActiveCallEntry=ccActiveCallEntry, ccDetailsOutSubaddress=ccDetailsOutSubaddress, ccCliListNumber=ccCliListNumber, ccDetailsRetryN1=ccDetailsRetryN1, ccCallLogRemoteNumber=ccCallLogRemoteNumber, ccBchannelActiveCallIndex=ccBchannelActiveCallIndex, ccDetailsOutSetupCalledSub=ccDetailsOutSetupCalledSub, ccActiveCallState=ccActiveCallState, ccDetailsUserType=ccDetailsUserType, ccDetailsRetryN2=ccDetailsRetryN2, ccDetailsKeepup=ccDetailsKeepup, ccDetailsDataRate=ccDetailsDataRate, ccDetailsAlternateNumber=ccDetailsAlternateNumber, ccDetailsRetryT2=ccDetailsRetryT2, ccDetailsRetryT1=ccDetailsRetryT1, ccDetailsInSetupUserCheck=ccDetailsInSetupUserCheck, ccActiveCallBchannelIndex=ccActiveCallBchannelIndex, ccActiveCallIfIndex=ccActiveCallIfIndex, ccDetailsInSetupCliSearchList=ccDetailsInSetupCliSearchList, ccDetailsRemoteName=ccDetailsRemoteName, ccCallLogState=ccCallLogState, ccDetailsOutSetupUser=ccDetailsOutSetupUser, ccBchannelEntry=ccBchannelEntry, ccDetailsLoginType=ccDetailsLoginType, ccDetailsPrecedence=ccDetailsPrecedence, ccActiveCallDetailsIndex=ccActiveCallDetailsIndex, ccDetailsCallbackDelay=ccDetailsCallbackDelay, ccActiveCallIndex=ccActiveCallIndex, ccBchannelTable=ccBchannelTable, ccDetailsInSetupCliCheckList=ccDetailsInSetupCliCheckList, ccDetailsInSetupCalledSubSearch=ccDetailsInSetupCalledSubSearch, ccDetailsInSetupCliSearch=ccDetailsInSetupCliSearch, ccBchannelDirection=ccBchannelDirection, ccBchannelAllocated=ccBchannelAllocated, ccAttachmentUserInstance=ccAttachmentUserInstance, ccDetailsUsername=ccDetailsUsername, ccDetailsHoldupTime=ccDetailsHoldupTime, ccDetailsBumpDelay=ccDetailsBumpDelay, ccCallLogEntry=ccCallLogEntry, ccDetailsNumberAttachments=ccDetailsNumberAttachments, ccDetailsInSetupCalledSubCheck=ccDetailsInSetupCalledSubCheck, ccCliListListIndex=ccCliListListIndex, ccDetailsUserModule=ccDetailsUserModule, ccActiveCallTable=ccActiveCallTable, ccCallLogTimeStarted=ccCallLogTimeStarted, PYSNMP_MODULE_ID=cc, ccDetailsIndex=ccDetailsIndex, ccDetailsDirection=ccDetailsDirection, ccDetailsInSetupUserSearch=ccDetailsInSetupUserSearch, ccDetailsPppTemplate=ccDetailsPppTemplate, cc=cc)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (modules, display_string_unsized) = mibBuilder.importSymbols('AT-SMI-MIB', 'modules', 'DisplayStringUnsized') (if_index, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndexOrZero') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter32, object_identity, ip_address, gauge32, integer32, mib_identifier, module_identity, iso, unsigned32, time_ticks, bits, notification_type, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'ObjectIdentity', 'IpAddress', 'Gauge32', 'Integer32', 'MibIdentifier', 'ModuleIdentity', 'iso', 'Unsigned32', 'TimeTicks', 'Bits', 'NotificationType', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'DisplayString') cc = module_identity((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37)) cc.setRevisions(('2006-06-28 12:22',)) if mibBuilder.loadTexts: cc.setLastUpdated('200606281222Z') if mibBuilder.loadTexts: cc.setOrganization('Allied Telesis, Inc') cc_details_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1)) if mibBuilder.loadTexts: ccDetailsTable.setStatus('current') cc_details_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccDetailsIndex')) if mibBuilder.loadTexts: ccDetailsEntry.setStatus('current') cc_details_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccDetailsIndex.setStatus('current') cc_details_name = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 2), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsName.setStatus('current') cc_details_remote_name = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 3), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRemoteName.setStatus('current') cc_details_called_number = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 4), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsCalledNumber.setStatus('current') cc_details_calling_number = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 5), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsCallingNumber.setStatus('current') cc_details_alternate_number = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 6), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsAlternateNumber.setStatus('current') cc_details_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsEnabled.setStatus('current') cc_details_direction = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inOnly', 1), ('outOnly', 2), ('both', 3))).clone('both')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsDirection.setStatus('current') cc_details_precedence = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('in', 1), ('out', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsPrecedence.setStatus('current') cc_details_holdup_time = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 7200))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsHoldupTime.setStatus('current') cc_details_preferred_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 11), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsPreferredIfIndex.setStatus('current') cc_details_required_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 12), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRequiredIfIndex.setStatus('current') cc_details_priority = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 99)).clone(50)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsPriority.setStatus('current') cc_details_retry_t1 = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(5, 120)).clone(30)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRetryT1.setStatus('current') cc_details_retry_n1 = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 10))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRetryN1.setStatus('current') cc_details_retry_t2 = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(300, 1200)).clone(600)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRetryT2.setStatus('current') cc_details_retry_n2 = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 5))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsRetryN2.setStatus('current') cc_details_keepup = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2))).clone('no')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsKeepup.setStatus('current') cc_details_out_setup_cli = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('off', 1), ('calling', 2), ('interface', 3), ('nonumber', 4))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsOutSetupCli.setStatus('current') cc_details_out_setup_user = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsOutSetupUser.setStatus('current') cc_details_out_setup_called_sub = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsOutSetupCalledSub.setStatus('current') cc_details_out_subaddress = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 22), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsOutSubaddress.setStatus('current') cc_details_callback = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2))).clone('no')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsCallback.setStatus('current') cc_details_callback_delay = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(41)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsCallbackDelay.setStatus('current') cc_details_in_setup_called_sub_search = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCalledSubSearch.setStatus('current') cc_details_in_setup_user_search = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupUserSearch.setStatus('current') cc_details_in_setup_cli_search = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('on', 2), ('list', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCliSearch.setStatus('current') cc_details_in_setup_cli_search_list = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 28), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCliSearchList.setStatus('current') cc_details_in_any_flag = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 29), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2))).clone('no')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInAnyFlag.setStatus('current') cc_details_in_setup_called_sub_check = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 30), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCalledSubCheck.setStatus('current') cc_details_in_setup_user_check = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('local', 2), ('remote', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupUserCheck.setStatus('current') cc_details_in_setup_cli_check = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('off', 1), ('present', 2), ('required', 3))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCliCheck.setStatus('current') cc_details_in_setup_cli_check_list = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 33), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsInSetupCliCheckList.setStatus('current') cc_details_user_type = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 34), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('attach', 1), ('ppp', 2))).clone('attach')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsUserType.setStatus('current') cc_details_login_type = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 35), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('none', 1), ('userdb', 2), ('radius', 3), ('papTacacs', 4), ('chap', 5), ('papRadius', 6), ('tacacs', 7), ('all', 8))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsLoginType.setStatus('current') cc_details_username = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 36), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('cli', 2), ('calledsub', 3), ('useruser', 4), ('callname', 5))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsUsername.setStatus('current') cc_details_password = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 37), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('cli', 2), ('calledsub', 3), ('useruser', 4), ('callname', 5))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsPassword.setStatus('current') cc_details_bump_delay = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 38), integer32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsBumpDelay.setStatus('current') cc_details_data_rate = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 39), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('rate-64k', 1), ('rate-56k', 2))).clone('rate-64k')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsDataRate.setStatus('current') cc_details_ppp_template = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 40), integer32().subtype(subtypeSpec=value_range_constraint(1, 33)).clone(33)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccDetailsPppTemplate.setStatus('current') cc_details_user_module = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 41), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccDetailsUserModule.setStatus('current') cc_details_number_attachments = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 1, 1, 42), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccDetailsNumberAttachments.setStatus('current') cc_cli_list_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2)) if mibBuilder.loadTexts: ccCliListTable.setStatus('current') cc_cli_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccCliListListIndex'), (0, 'AT-ISDN-MIB', 'ccCliListEntryIndex')) if mibBuilder.loadTexts: ccCliListEntry.setStatus('current') cc_cli_list_list_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCliListListIndex.setStatus('current') cc_cli_list_entry_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCliListEntryIndex.setStatus('current') cc_cli_list_number = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 2, 1, 3), display_string_unsized().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ccCliListNumber.setStatus('current') cc_active_call_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3)) if mibBuilder.loadTexts: ccActiveCallTable.setStatus('current') cc_active_call_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccActiveCallIndex')) if mibBuilder.loadTexts: ccActiveCallEntry.setStatus('current') cc_active_call_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallIndex.setStatus('current') cc_active_call_details_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallDetailsIndex.setStatus('current') cc_active_call_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 3), interface_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallIfIndex.setStatus('current') cc_active_call_data_rate = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('rate-64k', 1), ('rate-56k', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallDataRate.setStatus('current') cc_active_call_state = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('null', 1), ('off', 2), ('try', 3), ('on', 4), ('wait', 5), ('await1', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallState.setStatus('current') cc_active_call_direction = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('in', 1), ('out', 2), ('undefined', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallDirection.setStatus('current') cc_active_call_user_module = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallUserModule.setStatus('current') cc_active_call_user_instance = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallUserInstance.setStatus('current') cc_active_call_bchannel_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 3, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccActiveCallBchannelIndex.setStatus('current') cc_call_log_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4)) if mibBuilder.loadTexts: ccCallLogTable.setStatus('current') cc_call_log_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccCallLogIndex')) if mibBuilder.loadTexts: ccCallLogEntry.setStatus('current') cc_call_log_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogIndex.setStatus('current') cc_call_log_name = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogName.setStatus('current') cc_call_log_state = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('initial', 1), ('active', 2), ('disconnected', 3), ('cleared', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogState.setStatus('current') cc_call_log_time_started = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogTimeStarted.setStatus('current') cc_call_log_direction = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('in', 1), ('out', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogDirection.setStatus('current') cc_call_log_duration = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogDuration.setStatus('current') cc_call_log_remote_number = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 4, 1, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccCallLogRemoteNumber.setStatus('current') cc_attachment_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5)) if mibBuilder.loadTexts: ccAttachmentTable.setStatus('current') cc_attachment_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccAttachmentDetailsIndex'), (0, 'AT-ISDN-MIB', 'ccAttachmentEntryIndex')) if mibBuilder.loadTexts: ccAttachmentEntry.setStatus('current') cc_attachment_details_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccAttachmentDetailsIndex.setStatus('current') cc_attachment_entry_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccAttachmentEntryIndex.setStatus('current') cc_attachment_active_call_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccAttachmentActiveCallIndex.setStatus('current') cc_attachment_user_instance = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 5, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccAttachmentUserInstance.setStatus('current') cc_bchannel_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6)) if mibBuilder.loadTexts: ccBchannelTable.setStatus('current') cc_bchannel_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1)).setIndexNames((0, 'AT-ISDN-MIB', 'ccBchannelIfIndex'), (0, 'AT-ISDN-MIB', 'ccBchannelChannelIndex')) if mibBuilder.loadTexts: ccBchannelEntry.setStatus('current') cc_bchannel_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelIfIndex.setStatus('current') cc_bchannel_channel_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelChannelIndex.setStatus('current') cc_bchannel_allocated = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelAllocated.setStatus('current') cc_bchannel_call_type = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('undefined', 1), ('data', 2), ('voice', 3), ('x25', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelCallType.setStatus('current') cc_bchannel_active_call_index = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelActiveCallIndex.setStatus('current') cc_bchannel_priority = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelPriority.setStatus('current') cc_bchannel_direction = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 37, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('in', 1), ('out', 2), ('unallocated', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ccBchannelDirection.setStatus('current') mibBuilder.exportSymbols('AT-ISDN-MIB', ccActiveCallDirection=ccActiveCallDirection, ccBchannelIfIndex=ccBchannelIfIndex, ccDetailsInAnyFlag=ccDetailsInAnyFlag, ccDetailsCalledNumber=ccDetailsCalledNumber, ccCliListTable=ccCliListTable, ccDetailsPriority=ccDetailsPriority, ccActiveCallDataRate=ccActiveCallDataRate, ccDetailsPreferredIfIndex=ccDetailsPreferredIfIndex, ccActiveCallUserInstance=ccActiveCallUserInstance, ccDetailsEnabled=ccDetailsEnabled, ccCallLogIndex=ccCallLogIndex, ccDetailsEntry=ccDetailsEntry, ccDetailsRequiredIfIndex=ccDetailsRequiredIfIndex, ccCallLogDirection=ccCallLogDirection, ccCliListEntryIndex=ccCliListEntryIndex, ccDetailsTable=ccDetailsTable, ccDetailsOutSetupCli=ccDetailsOutSetupCli, ccCallLogTable=ccCallLogTable, ccDetailsPassword=ccDetailsPassword, ccCallLogDuration=ccCallLogDuration, ccBchannelChannelIndex=ccBchannelChannelIndex, ccActiveCallUserModule=ccActiveCallUserModule, ccAttachmentTable=ccAttachmentTable, ccBchannelPriority=ccBchannelPriority, ccAttachmentEntry=ccAttachmentEntry, ccAttachmentEntryIndex=ccAttachmentEntryIndex, ccBchannelCallType=ccBchannelCallType, ccDetailsCallback=ccDetailsCallback, ccAttachmentActiveCallIndex=ccAttachmentActiveCallIndex, ccDetailsInSetupCliCheck=ccDetailsInSetupCliCheck, ccCallLogName=ccCallLogName, ccCliListEntry=ccCliListEntry, ccDetailsCallingNumber=ccDetailsCallingNumber, ccAttachmentDetailsIndex=ccAttachmentDetailsIndex, ccDetailsName=ccDetailsName, ccActiveCallEntry=ccActiveCallEntry, ccDetailsOutSubaddress=ccDetailsOutSubaddress, ccCliListNumber=ccCliListNumber, ccDetailsRetryN1=ccDetailsRetryN1, ccCallLogRemoteNumber=ccCallLogRemoteNumber, ccBchannelActiveCallIndex=ccBchannelActiveCallIndex, ccDetailsOutSetupCalledSub=ccDetailsOutSetupCalledSub, ccActiveCallState=ccActiveCallState, ccDetailsUserType=ccDetailsUserType, ccDetailsRetryN2=ccDetailsRetryN2, ccDetailsKeepup=ccDetailsKeepup, ccDetailsDataRate=ccDetailsDataRate, ccDetailsAlternateNumber=ccDetailsAlternateNumber, ccDetailsRetryT2=ccDetailsRetryT2, ccDetailsRetryT1=ccDetailsRetryT1, ccDetailsInSetupUserCheck=ccDetailsInSetupUserCheck, ccActiveCallBchannelIndex=ccActiveCallBchannelIndex, ccActiveCallIfIndex=ccActiveCallIfIndex, ccDetailsInSetupCliSearchList=ccDetailsInSetupCliSearchList, ccDetailsRemoteName=ccDetailsRemoteName, ccCallLogState=ccCallLogState, ccDetailsOutSetupUser=ccDetailsOutSetupUser, ccBchannelEntry=ccBchannelEntry, ccDetailsLoginType=ccDetailsLoginType, ccDetailsPrecedence=ccDetailsPrecedence, ccActiveCallDetailsIndex=ccActiveCallDetailsIndex, ccDetailsCallbackDelay=ccDetailsCallbackDelay, ccActiveCallIndex=ccActiveCallIndex, ccBchannelTable=ccBchannelTable, ccDetailsInSetupCliCheckList=ccDetailsInSetupCliCheckList, ccDetailsInSetupCalledSubSearch=ccDetailsInSetupCalledSubSearch, ccDetailsInSetupCliSearch=ccDetailsInSetupCliSearch, ccBchannelDirection=ccBchannelDirection, ccBchannelAllocated=ccBchannelAllocated, ccAttachmentUserInstance=ccAttachmentUserInstance, ccDetailsUsername=ccDetailsUsername, ccDetailsHoldupTime=ccDetailsHoldupTime, ccDetailsBumpDelay=ccDetailsBumpDelay, ccCallLogEntry=ccCallLogEntry, ccDetailsNumberAttachments=ccDetailsNumberAttachments, ccDetailsInSetupCalledSubCheck=ccDetailsInSetupCalledSubCheck, ccCliListListIndex=ccCliListListIndex, ccDetailsUserModule=ccDetailsUserModule, ccActiveCallTable=ccActiveCallTable, ccCallLogTimeStarted=ccCallLogTimeStarted, PYSNMP_MODULE_ID=cc, ccDetailsIndex=ccDetailsIndex, ccDetailsDirection=ccDetailsDirection, ccDetailsInSetupUserSearch=ccDetailsInSetupUserSearch, ccDetailsPppTemplate=ccDetailsPppTemplate, cc=cc)
# Compound Interest P = float(input('Enter principal amount: $')) r = float(input('Enter annual interest rate %')) n = float(input('Enter number of times per year interest has compounded: ')) t = float( input('Enter number of years account will be left to earn interest: ')) r /= 100 # 50% = .50 A = P * ((1 + (r / n)) ** (n * t)) print('After ', t, ' years, $', format(A, ',.2f'), ' will be in the account. ', sep='')
p = float(input('Enter principal amount: $')) r = float(input('Enter annual interest rate %')) n = float(input('Enter number of times per year interest has compounded: ')) t = float(input('Enter number of years account will be left to earn interest: ')) r /= 100 a = P * (1 + r / n) ** (n * t) print('After ', t, ' years, $', format(A, ',.2f'), ' will be in the account. ', sep='')
#coding: utf-8 # Copyright 2005-2010 Wesabe, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ofx.validators - Classes to validate certain financial data types. # class RoutingNumber: def __init__(self, number): self.number = number # FIXME: need to make sure we're really getting a number and not any non-number characters. try: self.digits = [int(digit) for digit in str(self.number).strip()] self.region_code = int(str(self.digits[0]) + str(self.digits[1])) self.converted = True except ValueError: # Not a number, failed to convert self.digits = None self.region_code = None self.converted = False def is_valid(self): if self.converted is False or len(self.digits) != 9: return False checksum = ((self.digits[0] * 3) + (self.digits[1] * 7) + self.digits[2] + (self.digits[3] * 3) + (self.digits[4] * 7) + self.digits[5] + (self.digits[6] * 3) + (self.digits[7] * 7) + self.digits[8] ) return (checksum % 10 == 0) def get_type(self): # Remember that range() stops one short of the second argument. # In other words, "x in range(1, 13)" means "x >= 1 and x < 13". if self.region_code == 0: return "United States Government" elif self.region_code in range(1, 13): return "Primary" elif self.region_code in range(21, 33): return "Thrift" elif self.region_code in range(61, 73): return "Electronic" elif self.region_code == 80: return "Traveller's Cheque" else: return None def get_region(self): if self.region_code == 0: return "United States Government" elif self.region_code in [1, 21, 61]: return "Boston" elif self.region_code in [2, 22, 62]: return "New York" elif self.region_code in [3, 23, 63]: return "Philadelphia" elif self.region_code in [4, 24, 64]: return "Cleveland" elif self.region_code in [5, 25, 65]: return "Richmond" elif self.region_code in [6, 26, 66]: return "Atlanta" elif self.region_code in [7, 27, 67]: return "Chicago" elif self.region_code in [8, 28, 68]: return "St. Louis" elif self.region_code in [9, 29, 69]: return "Minneapolis" elif self.region_code in [10, 30, 70]: return "Kansas City" elif self.region_code in [11, 31, 71]: return "Dallas" elif self.region_code in [12, 32, 72]: return "San Francisco" elif self.region_code == 80: return "Traveller's Cheque" else: return None def to_s(self): return str(self.number) + " (valid: %s; type: %s; region: %s)" % \ (self.is_valid(), self.get_type(), self.get_region()) def __repr__(self): return self.to_s()
class Routingnumber: def __init__(self, number): self.number = number try: self.digits = [int(digit) for digit in str(self.number).strip()] self.region_code = int(str(self.digits[0]) + str(self.digits[1])) self.converted = True except ValueError: self.digits = None self.region_code = None self.converted = False def is_valid(self): if self.converted is False or len(self.digits) != 9: return False checksum = self.digits[0] * 3 + self.digits[1] * 7 + self.digits[2] + self.digits[3] * 3 + self.digits[4] * 7 + self.digits[5] + self.digits[6] * 3 + self.digits[7] * 7 + self.digits[8] return checksum % 10 == 0 def get_type(self): if self.region_code == 0: return 'United States Government' elif self.region_code in range(1, 13): return 'Primary' elif self.region_code in range(21, 33): return 'Thrift' elif self.region_code in range(61, 73): return 'Electronic' elif self.region_code == 80: return "Traveller's Cheque" else: return None def get_region(self): if self.region_code == 0: return 'United States Government' elif self.region_code in [1, 21, 61]: return 'Boston' elif self.region_code in [2, 22, 62]: return 'New York' elif self.region_code in [3, 23, 63]: return 'Philadelphia' elif self.region_code in [4, 24, 64]: return 'Cleveland' elif self.region_code in [5, 25, 65]: return 'Richmond' elif self.region_code in [6, 26, 66]: return 'Atlanta' elif self.region_code in [7, 27, 67]: return 'Chicago' elif self.region_code in [8, 28, 68]: return 'St. Louis' elif self.region_code in [9, 29, 69]: return 'Minneapolis' elif self.region_code in [10, 30, 70]: return 'Kansas City' elif self.region_code in [11, 31, 71]: return 'Dallas' elif self.region_code in [12, 32, 72]: return 'San Francisco' elif self.region_code == 80: return "Traveller's Cheque" else: return None def to_s(self): return str(self.number) + ' (valid: %s; type: %s; region: %s)' % (self.is_valid(), self.get_type(), self.get_region()) def __repr__(self): return self.to_s()
def pytest_addoption(parser): parser.addoption("--project", action="store", default='None') def pytest_generate_tests(metafunc): # This is called for every test. Only get/set command line arguments # if the argument is specified in the list of test "fixturenames". option_value = metafunc.config.option.project if 'project' in metafunc.fixturenames and option_value is not None: metafunc.parametrize("project", [option_value])
def pytest_addoption(parser): parser.addoption('--project', action='store', default='None') def pytest_generate_tests(metafunc): option_value = metafunc.config.option.project if 'project' in metafunc.fixturenames and option_value is not None: metafunc.parametrize('project', [option_value])
#!/usr/bin/env python3 class Solution: def findCircleNum(self, M): sz, num = len(M), 0 marked = [False] * sz def dfs(p): marked[p] = True for q in range(sz): if M[p][q] and (not marked[q]): dfs(q) for p in range(sz): if not marked[p]: num += 1 dfs(p) return num sol = Solution() M = [[1,1,0], [1,1,0], [0,0,1]] M = [[1,1,0], [1,1,1], [0,1,1]] M = [[1]] print(sol.findCircleNum(M))
class Solution: def find_circle_num(self, M): (sz, num) = (len(M), 0) marked = [False] * sz def dfs(p): marked[p] = True for q in range(sz): if M[p][q] and (not marked[q]): dfs(q) for p in range(sz): if not marked[p]: num += 1 dfs(p) return num sol = solution() m = [[1, 1, 0], [1, 1, 0], [0, 0, 1]] m = [[1, 1, 0], [1, 1, 1], [0, 1, 1]] m = [[1]] print(sol.findCircleNum(M))
#prints all TRs in a table table = soup.findAll('table')[3] for row in table.findAll('tr'): print(row) #prints each TR and each child tag in TR table = soup.findAll('table')[3] for row in table.findAll('tr'): for line in row.findAll(): print(line)
table = soup.findAll('table')[3] for row in table.findAll('tr'): print(row) table = soup.findAll('table')[3] for row in table.findAll('tr'): for line in row.findAll(): print(line)
#1. Idea here is we want to return a list of strings which contains all of the root to leaf paths in the binary tree. #2. So initialize a list (path_list) then we are going to make a recursive call function. In the function we will pass the root of the binary tree and a empty string which we will modify and add node values as we recurse. #3. If the root is NOT none, we want to add that node value to our string, this will always begin from the ROOT of the binary tree. This will build our string of paths. #4. Once we come accross a leaf our second condition will be met thus we know that if we hit a leaf we have reached the END of the path, so we have our root to leaf path, hence we should add that path to our path_list, not path_list will be global for inner function. #5. Otherwise if we are not at a leaf, we still want to build our list and add the node value BUT we want to keep recursing down the tree until we hit the leaves, so we simply recurse left and right respectivley. #6. Rememeber to pass the path + -> as this will build the string according to the desired output. Done! def binaryTreePaths(self, root): path_list = [] def recurse(root, path): if root: path += str(root.val) if not root.left and not root.right: path_list.append(path) else: recurse(root.left, path + "->") recurse(root.right, path + "->") recurse(root, "") return path_list
def binary_tree_paths(self, root): path_list = [] def recurse(root, path): if root: path += str(root.val) if not root.left and (not root.right): path_list.append(path) else: recurse(root.left, path + '->') recurse(root.right, path + '->') recurse(root, '') return path_list
class NfDictionaryTryGetResults: def __init__( self): self.__key_exists = \ False self.__value = \ None def __get_key_exists( self) \ -> bool: key_exists = \ self.__key_exists return \ key_exists def __set_key_exists( self, key_exists: bool): self.__key_exists = \ key_exists def __get_value( self): value = \ self.__value return \ value def __set_value( self, value): self.__value = \ value key_exists = \ property( fget=__get_key_exists, fset=__set_key_exists) value = \ property( fget=__get_value, fset=__set_value)
class Nfdictionarytrygetresults: def __init__(self): self.__key_exists = False self.__value = None def __get_key_exists(self) -> bool: key_exists = self.__key_exists return key_exists def __set_key_exists(self, key_exists: bool): self.__key_exists = key_exists def __get_value(self): value = self.__value return value def __set_value(self, value): self.__value = value key_exists = property(fget=__get_key_exists, fset=__set_key_exists) value = property(fget=__get_value, fset=__set_value)
# pylint: disable=missing-function-docstring, missing-module-docstring/ # coding: utf-8 x = 1 e1 = x + a e3 = f(x) + 1 # TODO e4 not working yet. we must get 2 errors #e4 = f(x,y) + 1
x = 1 e1 = x + a e3 = f(x) + 1
# -*- coding: utf-8 -*- def command(): return "edit-instance-vmware" def init_argument(parser): parser.add_argument("--instance-no", required=True) parser.add_argument("--instance-type", required=True) parser.add_argument("--key-name", required=True) parser.add_argument("--compute-resource", required=True) parser.add_argument("--is-static-ip", required=True) parser.add_argument("--ip-address", required=False) parser.add_argument("--subnet-mask", required=False) parser.add_argument("--default-gateway", required=False) parser.add_argument("--comment", required=False) parser.add_argument("--root-size", required=False) def execute(requester, args): instance_no = args.instance_no instance_type = args.instance_type key_name = args.key_name compute_resource = args.compute_resource is_static_ip = args.is_static_ip ip_address = args.ip_address subnet_mask = args.subnet_mask default_gateway = args.default_gateway comment = args.comment root_size = args.root_size parameters = {} parameters["InstanceNo"] = instance_no parameters["InstanceType"] = instance_type parameters["KeyName"] = key_name parameters["ComputeResource"] = compute_resource parameters["IsStaticIp"] = is_static_ip if (ip_address != None): parameters["IpAddress"] = ip_address if (subnet_mask != None): parameters["SubnetMask"] = subnet_mask if (default_gateway != None): parameters["DefaultGateway"] = default_gateway if (comment != None): parameters["Comment"] = comment if (root_size != None): parameters["RootSize"] = root_size return requester.execute("/EditInstanceVmware", parameters)
def command(): return 'edit-instance-vmware' def init_argument(parser): parser.add_argument('--instance-no', required=True) parser.add_argument('--instance-type', required=True) parser.add_argument('--key-name', required=True) parser.add_argument('--compute-resource', required=True) parser.add_argument('--is-static-ip', required=True) parser.add_argument('--ip-address', required=False) parser.add_argument('--subnet-mask', required=False) parser.add_argument('--default-gateway', required=False) parser.add_argument('--comment', required=False) parser.add_argument('--root-size', required=False) def execute(requester, args): instance_no = args.instance_no instance_type = args.instance_type key_name = args.key_name compute_resource = args.compute_resource is_static_ip = args.is_static_ip ip_address = args.ip_address subnet_mask = args.subnet_mask default_gateway = args.default_gateway comment = args.comment root_size = args.root_size parameters = {} parameters['InstanceNo'] = instance_no parameters['InstanceType'] = instance_type parameters['KeyName'] = key_name parameters['ComputeResource'] = compute_resource parameters['IsStaticIp'] = is_static_ip if ip_address != None: parameters['IpAddress'] = ip_address if subnet_mask != None: parameters['SubnetMask'] = subnet_mask if default_gateway != None: parameters['DefaultGateway'] = default_gateway if comment != None: parameters['Comment'] = comment if root_size != None: parameters['RootSize'] = root_size return requester.execute('/EditInstanceVmware', parameters)
############################################################################## # Documentation/conf.py # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. The # ASF licenses this file to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # ############################################################################## # 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('.')) # -- Project information ----------------------------------------------------- project = 'NuttX' copyright = '2020, The Apache Software Foundation' author = 'NuttX community' version = release = 'latest' # -- 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 = [ "sphinx_rtd_theme", "m2r2", 'sphinx.ext.autosectionlabel', 'sphinx.ext.todo', 'sphinx_tabs.tabs' ] source_suffix = [ '.rst', '.md' ] todo_include_todos = True autosectionlabel_prefix_document = True # do not set Python as primary domain for code blocks highlight_language = "none" primary_domain = None # 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 = ['_build', 'Thumbs.db', '.DS_Store'] # list of documentation versions to offer (besides latest) html_context = dict() html_context['nuttx_versions'] = ['latest'] # TODO: append other options using releases detected from git (or maybe just # a few hand-selected ones, or maybe just a "stable" option) # -- 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' html_show_sphinx = False html_theme_options = { 'prev_next_buttons_location': None } # 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'] html_css_files = [ 'custom.css' ] html_show_license = True html_logo = '_static/NuttX.png' html_favicon = '_static/favicon.ico' today_fmt = '%d %B %y at %H:%M' c_id_attributes = [ 'FAR', 'CODE', 'noreturn_function' ]
project = 'NuttX' copyright = '2020, The Apache Software Foundation' author = 'NuttX community' version = release = 'latest' extensions = ['sphinx_rtd_theme', 'm2r2', 'sphinx.ext.autosectionlabel', 'sphinx.ext.todo', 'sphinx_tabs.tabs'] source_suffix = ['.rst', '.md'] todo_include_todos = True autosectionlabel_prefix_document = True highlight_language = 'none' primary_domain = None templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] html_context = dict() html_context['nuttx_versions'] = ['latest'] html_theme = 'sphinx_rtd_theme' html_show_sphinx = False html_theme_options = {'prev_next_buttons_location': None} html_static_path = ['_static'] html_css_files = ['custom.css'] html_show_license = True html_logo = '_static/NuttX.png' html_favicon = '_static/favicon.ico' today_fmt = '%d %B %y at %H:%M' c_id_attributes = ['FAR', 'CODE', 'noreturn_function']
config = { 'Department_level_configs': { 'Department_Name': 'Data Analisys Department', 'Department_Short_Name': 'DATA' } }
config = {'Department_level_configs': {'Department_Name': 'Data Analisys Department', 'Department_Short_Name': 'DATA'}}
# coding: utf-8 class UtgError(Exception): MSG = None def __init__(self, **kwargs): super(UtgError, self).__init__(self.MSG % kwargs) self.arguments = kwargs class WordsError(UtgError): pass class WrongFormsNumberError(WordsError): MSG = 'constuctor of word receive wrong number of forms (%(wrong_number)s intead of %(expected_number)s), forms are: %(forms)s' class DuplicateWordError(WordsError): MSG = 'duplicate word in dictionary, type: %(type)s, normal form: %(normal_form)s' class UnknownVerboseIdError(WordsError): MSG = 'Unknown verbose id: %(verbose_id)s' class ExternalDependecyNotFoundError(WordsError): MSG = 'External dependency not found: %(dependency)s' class WrongDependencyFormatError(WordsError): MSG = 'wrong dependency format: %(dependency)s' class NoWordsFoundError(WordsError): MSG = 'no words found for text="%(text)s"' class MoreThenOneWordFoundError(WordsError): MSG = 'more then one word found for text="%(text)s" and type=%(type)s' class LexiconError(UtgError): pass class UnknownLexiconKeyError(LexiconError): MSG = 'unknown lexicon key: %(key)s' class NoTemplatesWithSpecifiedRestrictions(LexiconError): MSG = 'no templates with specified key: %(key)s and restrictions: %(restrictions)r' class TransformatorsError(UtgError): pass class UnknownIntegerFormError(TransformatorsError): MSG = 'unknown integer form: %(form)s'
class Utgerror(Exception): msg = None def __init__(self, **kwargs): super(UtgError, self).__init__(self.MSG % kwargs) self.arguments = kwargs class Wordserror(UtgError): pass class Wrongformsnumbererror(WordsError): msg = 'constuctor of word receive wrong number of forms (%(wrong_number)s intead of %(expected_number)s), forms are: %(forms)s' class Duplicateworderror(WordsError): msg = 'duplicate word in dictionary, type: %(type)s, normal form: %(normal_form)s' class Unknownverboseiderror(WordsError): msg = 'Unknown verbose id: %(verbose_id)s' class Externaldependecynotfounderror(WordsError): msg = 'External dependency not found: %(dependency)s' class Wrongdependencyformaterror(WordsError): msg = 'wrong dependency format: %(dependency)s' class Nowordsfounderror(WordsError): msg = 'no words found for text="%(text)s"' class Morethenonewordfounderror(WordsError): msg = 'more then one word found for text="%(text)s" and type=%(type)s' class Lexiconerror(UtgError): pass class Unknownlexiconkeyerror(LexiconError): msg = 'unknown lexicon key: %(key)s' class Notemplateswithspecifiedrestrictions(LexiconError): msg = 'no templates with specified key: %(key)s and restrictions: %(restrictions)r' class Transformatorserror(UtgError): pass class Unknownintegerformerror(TransformatorsError): msg = 'unknown integer form: %(form)s'
''' Abstract class of healthcheck. There is only one method to implement, that determines state of Vm or its underlying services. Initialization - consider following config: :: healthcheck: driver: SomeHC param1: AAAA param2: BBBB some_x: CCC All params will be passed as config dict to the driver init: ''' class AbstractHealthcheck: def __init__(self, config): pass async def is_healthy(self, vm): ''' Checks that is a given vm is healthy :arg vmshepherd.iaas.Vm vm: Vm object Returns boolean - True means is healthy, False means unhealthy. ''' raise NotImplementedError
""" Abstract class of healthcheck. There is only one method to implement, that determines state of Vm or its underlying services. Initialization - consider following config: :: healthcheck: driver: SomeHC param1: AAAA param2: BBBB some_x: CCC All params will be passed as config dict to the driver init: """ class Abstracthealthcheck: def __init__(self, config): pass async def is_healthy(self, vm): """ Checks that is a given vm is healthy :arg vmshepherd.iaas.Vm vm: Vm object Returns boolean - True means is healthy, False means unhealthy. """ raise NotImplementedError
lines = int(input("Please enter number of lines : \n")) ln = 1 while ln <= lines: col = 1 while col <= lines: if ln == 1 or col == 1 or col == lines or ln == lines: print('*', end='') else: print(' ', end = '') col += 1 print() ln += 1
lines = int(input('Please enter number of lines : \n')) ln = 1 while ln <= lines: col = 1 while col <= lines: if ln == 1 or col == 1 or col == lines or (ln == lines): print('*', end='') else: print(' ', end='') col += 1 print() ln += 1
# Valid API version in URL path: YYYY-MM or unstable VERSION_PATTERN = r"([0-9]{4}-[0-9]{2})|unstable" # /oauth/authorize, /oauth/access_token do not require authentication NOT_AUTHABLE_PATTERN = r"\/oauth\/(authorize|access_token)" # /oauth/access_scopes does not require versioned API path NOT_VERSIONABLE_PATTERN = r"\/(oauth\/access_scopes)" # For extracting next/prev link header on REST API calls LINK_PATTERN = r"<.*?page_info=([a-zA-Z0-9\-_]+).*?>; rel=\"(next|previous)\"" # Header supplied by Shopify when rate limit is hit RETRY_HEADER = "retry-after" # Header supplied by Shopify for REST API calls, used by LINK_PATTERN LINK_HEADER = "link" # Header to send for public API calls ACCESS_TOKEN_HEADER = "x-shopify-access-token" # Default API version DEFAULT_VERSION = "2020-04" # Default API mode DEFAULT_MODE = "public" # Alternate API mode ALT_MODE = "private" # One second in milliseconds ONE_SECOND = 1000 # REST API type REST = "rest" # GraphQL API type GRAPHQL = "graphql"
version_pattern = '([0-9]{4}-[0-9]{2})|unstable' not_authable_pattern = '\\/oauth\\/(authorize|access_token)' not_versionable_pattern = '\\/(oauth\\/access_scopes)' link_pattern = '<.*?page_info=([a-zA-Z0-9\\-_]+).*?>; rel=\\"(next|previous)\\"' retry_header = 'retry-after' link_header = 'link' access_token_header = 'x-shopify-access-token' default_version = '2020-04' default_mode = 'public' alt_mode = 'private' one_second = 1000 rest = 'rest' graphql = 'graphql'
def iterate(pop): p = pop.copy() for i in range(8): p[i] = pop[i + 1] p[8] = pop[0] p[6] += pop[0] return p pop = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0} population = [int(n) for n in open('input.txt', 'r').readline().split(',')] for fish in population: pop[fish] += 1 for i in range(256): pop = iterate(pop) print(sum(pop.values()))
def iterate(pop): p = pop.copy() for i in range(8): p[i] = pop[i + 1] p[8] = pop[0] p[6] += pop[0] return p pop = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0} population = [int(n) for n in open('input.txt', 'r').readline().split(',')] for fish in population: pop[fish] += 1 for i in range(256): pop = iterate(pop) print(sum(pop.values()))
for c in range(6, 0,-1): print(c) n1 = int(input('Inicio: ')) n2 = int(input('Fim: ')) n3 = int(input('Passo: ')) for c in range(n1, n2 + 1, n3): print(c)
for c in range(6, 0, -1): print(c) n1 = int(input('Inicio: ')) n2 = int(input('Fim: ')) n3 = int(input('Passo: ')) for c in range(n1, n2 + 1, n3): print(c)
# # PySNMP MIB module SLAPM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SLAPM-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:06:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") TimeTicks, MibIdentifier, Unsigned32, IpAddress, Gauge32, experimental, iso, NotificationType, Counter32, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, ObjectIdentity, Integer32, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "MibIdentifier", "Unsigned32", "IpAddress", "Gauge32", "experimental", "iso", "NotificationType", "Counter32", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "ObjectIdentity", "Integer32", "ModuleIdentity") TextualConvention, TestAndIncr, DateAndTime, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TestAndIncr", "DateAndTime", "DisplayString", "RowStatus") slapmMIB = ModuleIdentity((1, 3, 6, 1, 3, 88)) slapmMIB.setRevisions(('2000-01-24 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: slapmMIB.setRevisionsDescriptions(('This version published as RFC 2758.',)) if mibBuilder.loadTexts: slapmMIB.setLastUpdated('200001240000Z') if mibBuilder.loadTexts: slapmMIB.setOrganization('International Business Machines Corp.') if mibBuilder.loadTexts: slapmMIB.setContactInfo('Kenneth White International Business Machines Corporation Network Computing Software Division Research Triangle Park, NC, USA E-mail: wkenneth@us.ibm.com') if mibBuilder.loadTexts: slapmMIB.setDescription('The Service Level Agreement Performance Monitoring MIB (SLAPM-MIB) provides data collection and monitoring capabilities for Service Level Agreements (SLAs) policy definitions.') class SlapmNameType(SnmpAdminString): description = 'The textual convention for naming entities within this MIB. The actual contents of an object defined using this textual convention should consist of the distinguished name portion of an name. This is usually the right-most portion of the name. This convention is necessary, since names within this MIB can be used as index items and an instance identifier is limited to 128 subidentifiers. This textual convention has been deprecated. All of the tables defined within this MIB that use this textual convention have been deprecated as well since the method of using a portion of the name (either of a policy definition or of a traffic profile) has been replaced by using an Unsigned32 index. The new slapmPolicyNameTable would then map the Unsigned32 index to a real name.' status = 'deprecated' subtypeSpec = SnmpAdminString.subtypeSpec + ValueSizeConstraint(0, 32) class SlapmStatus(TextualConvention, Bits): description = 'The textual convention for defining the various slapmPRMonTable (or old slapmPolicyMonitorTable) and the slapmSubcomponentTable states for actual policy rule traffic monitoring.' status = 'current' namedValues = NamedValues(("slaMinInRateNotAchieved", 0), ("slaMaxInRateExceeded", 1), ("slaMaxDelayExceeded", 2), ("slaMinOutRateNotAchieved", 3), ("slaMaxOutRateExceeded", 4), ("monitorMinInRateNotAchieved", 5), ("monitorMaxInRateExceeded", 6), ("monitorMaxDelayExceeded", 7), ("monitorMinOutRateNotAchieved", 8), ("monitorMaxOutRateExceeded", 9)) class SlapmPolicyRuleName(TextualConvention, OctetString): description = 'To facilitate internationalization, this TC represents information taken from the ISO/IEC IS 10646-1 character set, encoded as an octet string using the UTF-8 character encoding scheme described in RFC 2044. For strings in 7-bit US-ASCII, there is no impact since the UTF-8 representation is identical to the US-ASCII encoding.' status = 'current' displayHint = '1024t' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 1024) slapmNotifications = MibIdentifier((1, 3, 6, 1, 3, 88, 0)) slapmObjects = MibIdentifier((1, 3, 6, 1, 3, 88, 1)) slapmConformance = MibIdentifier((1, 3, 6, 1, 3, 88, 2)) slapmBaseObjects = MibIdentifier((1, 3, 6, 1, 3, 88, 1, 1)) slapmSpinLock = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 1), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: slapmSpinLock.setStatus('current') if mibBuilder.loadTexts: slapmSpinLock.setDescription('An advisory lock used to allow cooperating applications to coordinate their use of the contents of this MIB. This typically occurs when an application seeks to create an new entry or alter an existing entry in slapmPRMonTable (or old slapmPolicyMonitorTable). A management implementation MAY utilize the slapmSpinLock to serialize its changes or additions. This usage is not required. However, slapmSpinLock MUST be supported by agent implementations.') slapmPolicyCountQueries = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyCountQueries.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountQueries.setDescription('The total number of times that a policy lookup occurred with respect to a policy agent. This is the number of times that a reference was made to a policy definition at a system and includes the number of times that a policy repository was accessed, slapmPolicyCountAccesses. The object slapmPolicyCountAccesses should be less than slapmPolicyCountQueries when policy definitions are cached at a system.') slapmPolicyCountAccesses = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyCountAccesses.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountAccesses.setDescription('Total number of times that a policy repository was accessed with respect to a policy agent. The value of this object should be less than slapmPolicyCountQueries, since typically policy entries are cached to minimize repository accesses.') slapmPolicyCountSuccessAccesses = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyCountSuccessAccesses.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountSuccessAccesses.setDescription('Total number of successful policy repository accesses with respect to a policy agent.') slapmPolicyCountNotFounds = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyCountNotFounds.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountNotFounds.setDescription('Total number of policy repository accesses, with respect to a policy agent, that resulted in an entry not being located.') slapmPolicyPurgeTime = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600)).clone(900)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: slapmPolicyPurgeTime.setStatus('current') if mibBuilder.loadTexts: slapmPolicyPurgeTime.setDescription('The purpose of this object is to define the amount of time (in seconds) to wait before removing an slapmPolicyRuleStatsEntry (or old slapmPolicyStatsEntry) when a system detects that the associated policy definition has been deleted. This gives any polling management applications time to complete their last poll before an entry is removed. An slapmPolicyRuleStatsEntry (or old slapmPolicyStatsEntry) enters the deleteNeeded(3) state via slapmPolicyRuleStatsOperStatus (or old slapmPolicyStatsOperStatus) when a system first detects that the entry needs to be removed. Once slapmPolicyPurgeTime has expired for an entry in deleteNeeded(3) state it is removed a long with any dependent slapmPRMonTable (or slapmPolicyMonitorTable) entries. A value of 0 for this option disables this function and results in the automatic purging of slapmPRMonTable (or slapmPolicyTable) entries upon transition into deleteNeeded(3) state. A slapmPolicyRuleDeleted (or slapmPolicyProfileDeleted) notification is sent when an slapmPolicyRuleStatsEntry (or slapmPolicyStatsEntry) is removed. Dependent slapmPRMonTable (or slapmPolicyMonitorTable) deletion results in a slapmPolicyRuleMonDeleted (or slapmPolicyMonitorDeleted) notification being sent. These notifications are suppressed if the value of slapmPolicyTrapEnable is disabled(2).') slapmPolicyTrapEnable = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: slapmPolicyTrapEnable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyTrapEnable.setDescription('Indicates whether slapmPolicyRuleDeleted and slapmPolicyRuleMonDeleted (or slapmPolicyProfileDeleted and slapmPolicyMonitorDeleted) notifications should be generated by this system.') slapmPolicyTrapFilter = MibScalar((1, 3, 6, 1, 3, 88, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64)).clone(3)).setUnits('intervals').setMaxAccess("readwrite") if mibBuilder.loadTexts: slapmPolicyTrapFilter.setStatus('current') if mibBuilder.loadTexts: slapmPolicyTrapFilter.setDescription('The purpose of this object is to suppress unnecessary slapmSubcMonitorNotOkay (or slapmSubcomponentMonitoredEventNotAchieved), for example, notifications. Basically, a monitored event has to not meet its SLA requirement for the number of consecutive intervals indicated by the value of this object.') slapmTableObjects = MibIdentifier((1, 3, 6, 1, 3, 88, 1, 2)) slapmPolicyStatsTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 1), ) if mibBuilder.loadTexts: slapmPolicyStatsTable.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTable.setDescription('Provides statistics on all policies known at a system. This table has been deprecated and replaced with the slapmPolicyRuleStatsTable. Older implementations of this MIB are expected to continue their support of this table.') slapmPolicyStatsEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 1, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmPolicyStatsSystemAddress"), (0, "SLAPM-MIB", "slapmPolicyStatsPolicyName"), (0, "SLAPM-MIB", "slapmPolicyStatsTrafficProfileName")) if mibBuilder.loadTexts: slapmPolicyStatsEntry.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsEntry.setDescription('Defines an entry in the slapmPolicyStatsTable. This table defines a set of statistics that is kept on a per system, policy and traffic profile basis. A policy can be defined to contain multiple traffic profiles that map to a single action. Entries in this table are not created or deleted via SNMP but reflect the set of policy definitions known at a system.') slapmPolicyStatsSystemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 1), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmPolicyStatsSystemAddress.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string must be used to indicate that only a single system is being represented. Otherwise, the length of the octet string must be 4 for an ipv4 address or 16 for an ipv6 address.') slapmPolicyStatsPolicyName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 2), SlapmNameType()) if mibBuilder.loadTexts: slapmPolicyStatsPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsPolicyName.setDescription('Policy name that this entry relates to.') slapmPolicyStatsTrafficProfileName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 3), SlapmNameType()) if mibBuilder.loadTexts: slapmPolicyStatsTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTrafficProfileName.setDescription('The name of a traffic profile that is associated with a policy.') slapmPolicyStatsOperStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2), ("deleteNeeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsOperStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOperStatus.setDescription('The state of a policy entry: inactive(1) - An policy entry was either defined by local system definition or discovered via a directory search but has not been activated (not currently being used). active(2) - Policy entry is being used to affect traffic flows. deleteNeeded(3) - Either though local implementation dependent methods or by discovering that the directory entry corresponding to this table entry no longer exists and slapmPolicyPurgeTime needs to expire before attempting to remove the corresponding slapmPolicyStatsEntry and any dependent slapmPolicyMonitor table entries. Note: a policy traffic profile in a state other than active(1) is not being used to affect traffic flows.') slapmPolicyStatsActiveConns = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsActiveConns.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsActiveConns.setDescription('The number of active TCP connections that are affected by the corresponding policy entry.') slapmPolicyStatsTotalConns = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsTotalConns.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTotalConns.setDescription('The number of total TCP connections that are affected by the corresponding policy entry.') slapmPolicyStatsFirstActivated = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 7), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsFirstActivated.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsFirstActivated.setDescription('The timestamp for when the corresponding policy entry is activated. The value of this object serves as the discontinuity event indicator when polling entries in this table. The value of this object is updated on transition of slapmPolicyStatsOperStatus into the active(2) state.') slapmPolicyStatsLastMapping = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 8), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsLastMapping.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsLastMapping.setDescription('The timestamp for when the last time that the associated policy entry was used.') slapmPolicyStatsInOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsInOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInOctets.setDescription('The number of octets that was received by IP for an entity that map to this entry.') slapmPolicyStatsOutOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsOutOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutOctets.setDescription('The number of octets that was transmitted by IP for an entity that map to this entry.') slapmPolicyStatsConnectionLimit = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsConnectionLimit.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsConnectionLimit.setDescription('The limit for the number of active TCP connections that are allowed for this policy definition. A value of zero for this object implies that a connection limit has not been specified.') slapmPolicyStatsCountAccepts = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsCountAccepts.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsCountAccepts.setDescription("This counter is incremented when a policy action's Permission value is set to Accept and a session (TCP connection) is accepted.") slapmPolicyStatsCountDenies = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsCountDenies.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsCountDenies.setDescription("This counter is incremented when a policy action's Permission value is set to Deny and a session is denied, or when a session (TCP connection) is rejected due to a policy's connection limit (slapmPolicyStatsConnectLimit) being reached.") slapmPolicyStatsInDiscards = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsInDiscards.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInDiscards.setDescription('This counter counts the number of in octets discarded. This occurs when an error is detected. Examples of this are buffer overflow, checksum error, or bad packet format.') slapmPolicyStatsOutDiscards = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsOutDiscards.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutDiscards.setDescription('This counter counts the number of out octets discarded. Examples of this are buffer overflow, checksum error, or bad packet format.') slapmPolicyStatsInPackets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsInPackets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInPackets.setDescription('This counter counts the number of in packets received that relate to this policy entry from IP.') slapmPolicyStatsOutPackets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsOutPackets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutPackets.setDescription('This counter counts the number of out packets sent by IP that relate to this policy entry.') slapmPolicyStatsInProfileOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsInProfileOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInProfileOctets.setDescription('This counter counts the number of in octets that are determined to be within profile.') slapmPolicyStatsOutProfileOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsOutProfileOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutProfileOctets.setDescription('This counter counts the number of out octets that are determined to be within profile.') slapmPolicyStatsMinRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 20), Integer32()).setUnits('Kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsMinRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMinRate.setDescription('The minimum transfer rate defined for this entry.') slapmPolicyStatsMaxRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 21), Integer32()).setUnits('Kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsMaxRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMaxRate.setDescription('The maximum transfer rate defined for this entry.') slapmPolicyStatsMaxDelay = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 22), Integer32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyStatsMaxDelay.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMaxDelay.setDescription('The maximum delay defined for this entry.') slapmPolicyMonitorTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 2), ) if mibBuilder.loadTexts: slapmPolicyMonitorTable.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorTable.setDescription('Provides a method of monitoring policies and their effect at a system. This table has been deprecated and replaced with the slapmPRMonTable. Older implementations of this MIB are expected to continue their support of this table.') slapmPolicyMonitorEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 2, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmPolicyMonitorOwnerIndex"), (0, "SLAPM-MIB", "slapmPolicyMonitorSystemAddress"), (0, "SLAPM-MIB", "slapmPolicyMonitorPolicyName"), (0, "SLAPM-MIB", "slapmPolicyMonitorTrafficProfileName")) if mibBuilder.loadTexts: slapmPolicyMonitorEntry.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorEntry.setDescription('Defines an entry in the slapmPolicyMonitorTable. This table defines which policies should be monitored on a per policy traffic profile basis.') slapmPolicyMonitorOwnerIndex = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))) if mibBuilder.loadTexts: slapmPolicyMonitorOwnerIndex.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorOwnerIndex.setDescription("To facilitate the provisioning of access control by a security administrator using the View-Based Access Control Model (RFC 2575, VACM) for tables in which multiple users may need to independently create or modify entries, the initial index is used as an 'owner index'. Such an initial index has a syntax of SnmpAdminString, and can thus be trivially mapped to a securityName or groupName as defined in VACM, in accordance with a security policy. All entries in that table belonging to a particular user will have the same value for this initial index. For a given user's entries in a particular table, the object identifiers for the information in these entries will have the same subidentifiers (except for the 'column' subidentifier) up to the end of the encoded owner index. To configure VACM to permit access to this portion of the table, one would create vacmViewTreeFamilyTable entries with the value of vacmViewTreeFamilySubtree including the owner index portion, and vacmViewTreeFamilyMask 'wildcarding' the column subidentifier. More elaborate configurations are possible.") slapmPolicyMonitorSystemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 2), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmPolicyMonitorSystemAddress.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapmPolicyMonitorPolicyName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 3), SlapmNameType()) if mibBuilder.loadTexts: slapmPolicyMonitorPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorPolicyName.setDescription('Policy name that this entry relates to.') slapmPolicyMonitorTrafficProfileName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 4), SlapmNameType()) if mibBuilder.loadTexts: slapmPolicyMonitorTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorTrafficProfileName.setDescription('The corresponding Traffic Profile name.') slapmPolicyMonitorControl = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 5), Bits().clone(namedValues=NamedValues(("monitorMinRate", 0), ("monitorMaxRate", 1), ("monitorMaxDelay", 2), ("enableAggregateTraps", 3), ("enableSubcomponentTraps", 4), ("monitorSubcomponents", 5))).clone(namedValues=NamedValues(("monitorMinRate", 0), ("monitorMaxRate", 1), ("monitorMaxDelay", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorControl.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorControl.setDescription("The value of this object determines the type and level of monitoring that is applied to a policy/profile. The value of this object can't be changed once the table entry that it is a part of is activated via a slapmPolicyMonitorRowStatus transition to active state. monitorMinRate(0) - Monitor minimum transfer rate. monitorMaxRate(1) - Monitor maximum transfer rate. monitorMaxDelay(2) - Monitor maximum delay. enableAggregateTraps(3) - The enableAggregateTraps(3) BITS setting enables notification generation when monitoring a policy traffic profile as an aggregate using the values in the corresponding slapmPolicyStatsEntry. By default this function is not enabled. enableSubcomponentTraps(4) - This BITS setting enables notification generation when monitoring all subcomponents that are mapped to an corresponding slapmPolicyStatsEntry. By default this function is not enabled. monitorSubcomponents(5) - This BITS setting enables monitoring of each subcomponent (typically a TCP connection or UDP listener) individually.") slapmPolicyMonitorStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 6), SlapmStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorStatus.setDescription("The value of this object indicates when a monitored value has not meet a threshold or isn't meeting the defined service level. The SlapmStatus TEXTUAL-CONVENTION defines two levels of not meeting a threshold. The first set: slaMinInRateNotAchieved(0), slaMaxInRateExceeded(1), slaMaxDelayExceeded(2), slaMinOutRateNotAchieved(3), slaMaxOutRateExceeded(4) are used to indicate when the SLA as an aggregate is not meeting a threshold while the second set: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) indicate that at least one subcomponent is not meeting a threshold.") slapmPolicyMonitorInterval = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(15, 86400)).clone(20)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorInterval.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorInterval.setDescription('The number of seconds that defines the sample period.') slapmPolicyMonitorIntTime = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 8), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorIntTime.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorIntTime.setDescription('The timestamp for when the last interval ended.') slapmPolicyMonitorCurrentInRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 9), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorCurrentInRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentInRate.setDescription('Using the value of the corresponding slapmPolicyMonitorInterval, slapmPolicyStatsInOctets is sampled and then divided by slapmPolicyMonitorInterval to determine the current in transfer rate.') slapmPolicyMonitorCurrentOutRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 10), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorCurrentOutRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentOutRate.setDescription('Using the value of the corresponding slapmPolicyMonitorInterval, slapmPolicyStatsOutOctets is sampled and then divided by slapmPolicyMonitorInterval to determine the current out transfer rate.') slapmPolicyMonitorMinRateLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 11), Integer32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMinRateLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateLow.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored minimum transfer rate has not been meet. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the minimum transfer rate exceeds slapmPolicyMonitorMinRateHigh (a slapmMonitoredEventOkay notification is then transmitted) and then fails below slapmPolicyMonitorMinRateLow. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition minus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMinRateHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 12), Integer32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMinRateHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateHigh.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored minimum transfer rate has increased to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition plus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMaxRateHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 13), Integer32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateHigh.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored maximum transfer rate has been exceeded. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the maximum transfer rate fails below slapmPolicyMonitorMaxRateLow (a slapmMonitoredEventOkay notification is then transmitted) and then raises above slapmPolicyMonitorMaxRateHigh. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition plus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMaxRateLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 14), Integer32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateLow.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored maximum transfer rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition minus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMaxDelayHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 15), Integer32()).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayHigh.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored maximum delay rate has been exceeded. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the maximum delay rate falls below slapmPolicyMonitorMaxDelayLow (a slapmMonitoredEventOkay notification is then transmitted) and raises above slapmPolicyMonitorMaxDelayHigh. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition plus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMaxDelayLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 16), Integer32()).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayLow.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored maximum delay rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition minus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPolicyMonitorMinInRateNotAchieves = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorMinInRateNotAchieves.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinInRateNotAchieves.setDescription('The number of times that a minimum transfer in rate was not achieved.') slapmPolicyMonitorMaxInRateExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorMaxInRateExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxInRateExceeds.setDescription('The number of times that a maximum transfer in rate was exceeded.') slapmPolicyMonitorMaxDelayExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayExceeds.setDescription('The number of times that a maximum delay in rate was exceeded.') slapmPolicyMonitorMinOutRateNotAchieves = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorMinOutRateNotAchieves.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinOutRateNotAchieves.setDescription('The number of times that a minimum transfer out rate was not achieved.') slapmPolicyMonitorMaxOutRateExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorMaxOutRateExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxOutRateExceeds.setDescription('The number of times that a maximum transfer out rate was exceeded.') slapmPolicyMonitorCurrentDelayRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 22), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyMonitorCurrentDelayRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentDelayRate.setDescription('The current delay rate for this entry. This is calculated by taking the average of the TCP round trip times for all associating slapmSubcomponentTable entries within a interval.') slapmPolicyMonitorRowStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 23), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPolicyMonitorRowStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorRowStatus.setDescription('This object allows entries to be created and deleted in the slapmPolicyMonitorTable. An entry in this table is deleted by setting this object to destroy(6). Removal of a corresponding (same policy and traffic profile names) slapmPolicyStatsEntry has the side effect of the automatic deletion an entry in this table.') slapmSubcomponentTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 3), ) if mibBuilder.loadTexts: slapmSubcomponentTable.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTable.setDescription('Defines a table to provide information on the individually components that are mapped to a policy rule (or old traffic profile). The indexing for this table is designed to support the use of an SNMP GET-NEXT operation using only the remote address and remote port as a way for a management station to retrieve the table entries relating to a particular client.') slapmSubcomponentEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 3, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmSubcomponentRemAddress"), (0, "SLAPM-MIB", "slapmSubcomponentRemPort"), (0, "SLAPM-MIB", "slapmSubcomponentLocalAddress"), (0, "SLAPM-MIB", "slapmSubcomponentLocalPort")) if mibBuilder.loadTexts: slapmSubcomponentEntry.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentEntry.setDescription("Describes a particular subcomponent entry. This table does not have an OwnerIndex as part of its indexing since this table's contents is intended to span multiple users.") slapmSubcomponentRemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 1), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmSubcomponentRemAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentRemAddress.setDescription('Indicate the remote address of a subcomponent. A remote address can be either an ipv4 address in which case 4 octets are required or as an ipv6 address that requires 16 octets. The value of this subidentifier is a zero length octet string when this entry relates to a UDP listener.') slapmSubcomponentRemPort = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: slapmSubcomponentRemPort.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentRemPort.setDescription('Indicate the remote port of a subcomponent. The value of this subidentifier is 0 when this entry relates to a UDP listener.') slapmSubcomponentLocalAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 3), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmSubcomponentLocalAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLocalAddress.setDescription('Indicate the local address of a subcomponent. A local address can be either an ipv4 address in which case 4 octets are required or as an ipv6 address that requires 16 octets.') slapmSubcomponentLocalPort = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: slapmSubcomponentLocalPort.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLocalPort.setDescription('Indicate the local port of a subcomponent.') slapmSubcomponentProtocol = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("udpListener", 1), ("tcpConnection", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentProtocol.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentProtocol.setDescription('Indicate the protocol in use that identifies the type of subcomponent.') slapmSubcomponentSystemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 6), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapmSubcomponentPolicyName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 7), SlapmNameType()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentPolicyName.setDescription('Policy name that this entry relates to. This object, along with slapmSubcomponentTrafficProfileName, have been replaced with the use of an unsigned integer index that is mapped to an slapmPolicyNameEntry to actually identify policy naming.') slapmSubcomponentTrafficProfileName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 8), SlapmNameType()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentTrafficProfileName.setDescription('The corresponding traffic profile name. This object, along with slapmSubcomponentProfileName, have been replaced with the use of an unsigned integer index that is mapped to an slapmPolicyNameEntry to actually identify policy naming.') slapmSubcomponentLastActivity = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 9), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentLastActivity.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLastActivity.setDescription('The date and timestamp of when this entry was last used.') slapmSubcomponentInOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentInOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentInOctets.setDescription('The number of octets received from IP for this connection.') slapmSubcomponentOutOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentOutOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentOutOctets.setDescription('The number of octets sent to IP for this connection.') slapmSubcomponentTcpOutBufferedOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTcpOutBufferedOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpOutBufferedOctets.setDescription('Number of outgoing octets buffered. The value of this object is zero when the entry is not for a TCP connection.') slapmSubcomponentTcpInBufferedOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTcpInBufferedOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpInBufferedOctets.setDescription('Number of incoming octets buffered. The value of this object is zero when the entry is not for a TCP connection.') slapmSubcomponentTcpReXmts = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTcpReXmts.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpReXmts.setDescription('Number of retransmissions. The value of this object is zero when the entry is not for a TCP connection.') slapmSubcomponentTcpRoundTripTime = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 15), Integer32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripTime.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripTime.setDescription('The amount of time that has elapsed, measured in milliseconds, from when the last TCP segment was transmitted by the TCP Stack until the ACK was received. The value of this object is zero when the entry is not for a TCP connection.') slapmSubcomponentTcpRoundTripVariance = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripVariance.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripVariance.setDescription('Round trip time variance. The value of this object is zero when the entry is not for a TCP connection.') slapmSubcomponentInPdus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentInPdus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentInPdus.setDescription('The number of protocol related data units transferred inbound: slapmSubcomponentProtocol PDU Type udpListener(1) UDP datagrams tcpConnection(2) TCP segments') slapmSubcomponentOutPdus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentOutPdus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentOutPdus.setDescription('The number of protocol related data units transferred outbound: slapmSubcomponentProtocol PDU Type udpListener(1) UDP datagrams tcpConnection(2) TCP segments') slapmSubcomponentApplName = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 19), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentApplName.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentApplName.setDescription('The application name associated with this entry if known, otherwise a zero-length octet string is returned as the value of this object.') slapmSubcomponentMonitorStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 20), SlapmStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentMonitorStatus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorStatus.setDescription("The value of this object indicates when a monitored value has exceeded a threshold or isn't meeting the defined service level. Only the following SlapmStatus BITS setting can be reported here: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) This object only has meaning when an corresponding slapmPolicyMonitorEntry exists with the slapmPolicyMonitorControl BITS setting monitorSubcomponents(5) enabled.") slapmSubcomponentMonitorIntTime = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 21), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentMonitorIntTime.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorIntTime.setDescription('The timestamp for when the last interval ended. This object only has meaning when an corresponding slapmPRMonEntry (or old slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. All of the octets returned when monitoring is not in effect must be zero.') slapmSubcomponentMonitorCurrentInRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 22), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentInRate.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentInRate.setDescription('Using the value of the corresponding slapmPRMonInterval (or slapmPolicyMonitorInterval), slapmSubcomponentStatsInOctets is divided by slapmSubcomponentMonitorInterval to determine the current in transfer rate. This object only has meaning when an corresponding slapmPRMonEntry (or slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. The value of this object is zero when monitoring is not in effect.') slapmSubcomponentMonitorCurrentOutRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 23), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentOutRate.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentOutRate.setDescription('Using the value of the corresponding slapmPRMonInterval (or slapmPolicyMonitorInterva)l, slapmSubcomponentStatsOutOctets is divided by slapmPRMonInterval (or slapmPolicyMonitorInterval) to determine the current out transfer rate. This object only has meaning when an corresponding slapmPRMonEntry (or slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. The value of this object is zero when monitoring is not in effect.') slapmSubcomponentPolicyRuleIndex = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmSubcomponentPolicyRuleIndex.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentPolicyRuleIndex.setDescription('Points to an slapmPolicyNameEntry when combined with slapmSubcomponentSystemAddress to indicate the policy naming that relates to this entry. A value of 0 for this object MUST be returned when the corresponding slapmSubcomponentEntry has no policy rule associated with it.') slapmPolicyNameTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 4), ) if mibBuilder.loadTexts: slapmPolicyNameTable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameTable.setDescription('Provides the mapping between a policy index as a unsigned 32 bit integer and the unique name associated with a policy rule.') slapmPolicyNameEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 4, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmPolicyNameSystemAddress"), (0, "SLAPM-MIB", "slapmPolicyNameIndex")) if mibBuilder.loadTexts: slapmPolicyNameEntry.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameEntry.setDescription('Defines an entry in the slapmPolicyNameTable.') slapmPolicyNameSystemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 1), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmPolicyNameSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameSystemAddress.setDescription('Address of a system that an Policy rule definition relates to. A zero length octet string must be used to indicate that only a single system is being represented. Otherwise, the length of the octet string must be 4 for an ipv4 address or 16 for an ipv6 address.') slapmPolicyNameIndex = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: slapmPolicyNameIndex.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameIndex.setDescription('A locally arbitrary, but unique identifier associated with this table entry. This value is not expected to remain constant across reIPLs.') slapmPolicyNameOfRule = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 3), SlapmPolicyRuleName()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyNameOfRule.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameOfRule.setDescription('The unique name that identifies a policy rule definition.') slapmPolicyRuleStatsTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 5), ) if mibBuilder.loadTexts: slapmPolicyRuleStatsTable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTable.setDescription('Provides statistics on a per system and a per policy rule basis.') slapmPolicyRuleStatsEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 5, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmPolicyNameSystemAddress"), (0, "SLAPM-MIB", "slapmPolicyNameIndex")) if mibBuilder.loadTexts: slapmPolicyRuleStatsEntry.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsEntry.setDescription('Defines an entry in the slapmPolicyRuleStatsTable. This table defines a set of statistics that is kept on a per system and per policy rule basis. Entries in this table are not created or deleted via SNMP but reflect the set of policy rule definitions known at a system.') slapmPolicyRuleStatsOperStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2), ("deleteNeeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsOperStatus.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOperStatus.setDescription('The state of a policy entry: inactive(1) - An policy entry was either defined by local system definition or discovered via a directory search but has not been activated (not currently being used). active(2) - Policy entry is being used to affect traffic flows. deleteNeeded(3) - Either though local implementation dependent methods or by discovering that the directory entry corresponding to this table entry no longer exists and slapmPolicyPurgeTime needs to expire before attempting to remove the corresponding slapmPolicyStatsEntry and any dependent slapmPolicyMonitor table entries. Note: a policy rule in a state other than active(2) is not being used to affect traffic flows.') slapmPolicyRuleStatsActiveConns = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsActiveConns.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsActiveConns.setDescription('The number of active TCP connections that are affected by the corresponding policy entry.') slapmPolicyRuleStatsTotalConns = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalConns.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalConns.setDescription('The number of total TCP connections that are affected by the corresponding policy entry.') slapmPolicyRuleStatsLActivated = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 4), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsLActivated.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsLActivated.setDescription('The timestamp for when the corresponding policy entry was last activated. The value of this object serves as the discontinuity event indicator when polling entries in this table. The value of this object is updated on transition of slapmPolicyRuleStatsOperStatus into the active(2) state.') slapmPolicyRuleStatsLastMapping = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 5), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsLastMapping.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsLastMapping.setDescription('The timestamp for when the last time that the associated policy entry was used.') slapmPolicyRuleStatsInOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsInOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInOctets.setDescription('The number of octets that was received by IP for an entity that map to this entry.') slapmPolicyRuleStatsOutOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsOutOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutOctets.setDescription('The number of octets that was transmitted by IP for an entity that map to this entry.') slapmPolicyRuleStatsConnLimit = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsConnLimit.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsConnLimit.setDescription('The limit for the number of active TCP connections that are allowed for this policy definition. A value of zero for this object implies that a connection limit has not been specified.') slapmPolicyRuleStatsCountAccepts = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsCountAccepts.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountAccepts.setDescription("This counter is incremented when a policy action's Permission value is set to Accept and a session (TCP connection) is accepted.") slapmPolicyRuleStatsCountDenies = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsCountDenies.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountDenies.setDescription("This counter is incremented when a policy action's Permission value is set to Deny and a session is denied, or when a session (TCP connection) is rejected due to a policy's connection limit (slapmPolicyRuleStatsConnectLimit) being reached.") slapmPolicyRuleStatsInDiscards = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsInDiscards.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInDiscards.setDescription('This counter counts the number of in octets discarded. This occurs when an error is detected. Examples of this are buffer overflow, checksum error, or bad packet format.') slapmPolicyRuleStatsOutDiscards = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsOutDiscards.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutDiscards.setDescription('This counter counts the number of out octets discarded. Examples of this are buffer overflow, checksum error, or bad packet format.') slapmPolicyRuleStatsInPackets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsInPackets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInPackets.setDescription('This counter counts the number of in packets received that relate to this policy entry from IP.') slapmPolicyRuleStatsOutPackets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsOutPackets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutPackets.setDescription('This counter counts the number of out packets sent by IP that relate to this policy entry.') slapmPolicyRuleStatsInProOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsInProOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInProOctets.setDescription('This counter counts the number of in octets that are determined to be within profile.') slapmPolicyRuleStatsOutProOctets = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsOutProOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutProOctets.setDescription('This counter counts the number of out octets that are determined to be within profile.') slapmPolicyRuleStatsMinRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 17), Unsigned32()).setUnits('Kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsMinRate.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMinRate.setDescription('The minimum transfer rate defined for this entry.') slapmPolicyRuleStatsMaxRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 18), Unsigned32()).setUnits('Kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxRate.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxRate.setDescription('The maximum transfer rate defined for this entry.') slapmPolicyRuleStatsMaxDelay = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 19), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxDelay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxDelay.setDescription('The maximum delay defined for this entry.') slapmPolicyRuleStatsTotalRsvpFlows = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalRsvpFlows.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalRsvpFlows.setDescription('Total number of RSVP flows that have be activated.') slapmPolicyRuleStatsActRsvpFlows = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPolicyRuleStatsActRsvpFlows.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsActRsvpFlows.setDescription('Current number of active RSVP flows.') slapmPRMonTable = MibTable((1, 3, 6, 1, 3, 88, 1, 2, 6), ) if mibBuilder.loadTexts: slapmPRMonTable.setStatus('current') if mibBuilder.loadTexts: slapmPRMonTable.setDescription('Provides a method of monitoring policies and their effect at a system.') slapmPRMonEntry = MibTableRow((1, 3, 6, 1, 3, 88, 1, 2, 6, 1), ).setIndexNames((0, "SLAPM-MIB", "slapmPRMonOwnerIndex"), (0, "SLAPM-MIB", "slapmPRMonSystemAddress"), (0, "SLAPM-MIB", "slapmPRMonIndex")) if mibBuilder.loadTexts: slapmPRMonEntry.setStatus('current') if mibBuilder.loadTexts: slapmPRMonEntry.setDescription('Defines an entry in the slapmPRMonTable. This table defines which policies should be monitored on a per policy rule basis. An attempt to set any read-create object defined within an slapmPRMonEntry while the value of slapmPRMonRowStatus is active(1) will result in an inconsistentValue error.') slapmPRMonOwnerIndex = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))) if mibBuilder.loadTexts: slapmPRMonOwnerIndex.setStatus('current') if mibBuilder.loadTexts: slapmPRMonOwnerIndex.setDescription("To facilitate the provisioning of access control by a security administrator using the View-Based Access Control Model (RFC 2575, VACM) for tables in which multiple users may need to independently create or modify entries, the initial index is used as an 'owner index'. Such an initial index has a syntax of SnmpAdminString, and can thus be trivially mapped to a securityName or groupName as defined in VACM, in accordance with a security policy. All entries in that table belonging to a particular user will have the same value for this initial index. For a given user's entries in a particular table, the object identifiers for the information in these entries will have the same subidentifiers (except for the 'column' subidentifier) up to the end of the encoded owner index. To configure VACM to permit access to this portion of the table, one would create vacmViewTreeFamilyTable entries with the value of vacmViewTreeFamilySubtree including the owner index portion, and vacmViewTreeFamilyMask 'wildcarding' the column subidentifier. More elaborate configurations are possible.") slapmPRMonSystemAddress = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 2), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ))) if mibBuilder.loadTexts: slapmPRMonSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmPRMonSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapmPRMonIndex = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 3), Unsigned32()) if mibBuilder.loadTexts: slapmPRMonIndex.setStatus('current') if mibBuilder.loadTexts: slapmPRMonIndex.setDescription('An slapmPolicyNameTable index, slapmPolicyNameIndex, that points to the unique name associated with a policy rule definition.') slapmPRMonControl = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 4), Bits().clone(namedValues=NamedValues(("monitorMinRate", 0), ("monitorMaxRate", 1), ("monitorMaxDelay", 2), ("enableAggregateTraps", 3), ("enableSubcomponentTraps", 4), ("monitorSubcomponents", 5))).clone(namedValues=NamedValues(("monitorMinRate", 0), ("monitorMaxRate", 1), ("monitorMaxDelay", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonControl.setStatus('current') if mibBuilder.loadTexts: slapmPRMonControl.setDescription("The value of this object determines the type and level of monitoring that is applied to a policy rule. The value of this object can't be changed once the table entry that it is a part of is activated via a slapmPRMonRowStatus transition to active state. monitorMinRate(0) - Monitor minimum transfer rate. monitorMaxRate(1) - Monitor maximum transfer rate. monitorMaxDelay(2) - Monitor maximum delay. enableAggregateTraps(3) - The enableAggregateTraps(3) BITS setting enables notification generation when monitoring a policy rule as an aggregate using the values in the corresponding slapmPRMonStatsEntry. By default this function is not enabled. enableSubcomponentTraps(4) - This BITS setting enables notification generation when monitoring all subcomponents that are mapped to an corresponding slapmPRMonStatsEntry. By default this function is not enabled. monitorSubcomponents(5) - This BITS setting enables monitoring of each subcomponent (typically a TCP connection or UDP listener) individually.") slapmPRMonStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 5), SlapmStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonStatus.setStatus('current') if mibBuilder.loadTexts: slapmPRMonStatus.setDescription("The value of this object indicates when a monitored value has not meet a threshold or isn't meeting the defined service level. The SlapmStatus TEXTUAL-CONVENTION defines two levels of not meeting a threshold. The first set: slaMinInRateNotAchieved(0), slaMaxInRateExceeded(1), slaMaxDelayExceeded(2), slaMinOutRateNotAchieved(3), slaMaxOutRateExceeded(4) are used to indicate when the SLA as an aggregate is not meeting a threshold while the second set: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) indicate that at least one subcomponent is not meeting a threshold.") slapmPRMonInterval = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(15, 86400)).clone(20)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonInterval.setStatus('current') if mibBuilder.loadTexts: slapmPRMonInterval.setDescription('The number of seconds that defines the sample period.') slapmPRMonIntTime = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 7), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonIntTime.setStatus('current') if mibBuilder.loadTexts: slapmPRMonIntTime.setDescription('The timestamp for when the last interval ended.') slapmPRMonCurrentInRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 8), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonCurrentInRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentInRate.setDescription('Using the value of the corresponding slapmPRMonInterval, slapmPolicyRuleStatsInOctets is sampled and then divided by slapmPRMonInterval to determine the current in transfer rate.') slapmPRMonCurrentOutRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 9), Gauge32()).setUnits('kilobits per second').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonCurrentOutRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentOutRate.setDescription('Using the value of the corresponding slapmPolicyMonInterval, slapmPolicyRuleStatsOutOctets is sampled and then divided by slapmPRMonInterval to determine the current out transfer rate.') slapmPRMonMinRateLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 10), Unsigned32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMinRateLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinRateLow.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored minimum transfer rate has not been meet. A slapmPolicyRuleMonNotOkay notification is not generated again for an slapmPRMonEntry until the minimum transfer rate exceeds slapmPRMonMinRateHigh (a slapmPolicyRuleMonOkay notification is then transmitted) and then fails below slapmPRMonMinRateLow. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition minus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMinRateHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 11), Unsigned32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMinRateHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinRateHigh.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored minimum transfer rate has increased to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition plus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMaxRateHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 12), Unsigned32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMaxRateHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxRateHigh.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored maximum transfer rate has been exceeded. A slapmPolicyRuleNotOkay notification is not generated again for an slapmPRMonEntry until the maximum transfer rate fails below slapmPRMonMaxRateLow (a slapmPolicyRuleMonOkay notification is then transmitted) and then raises above slapmPRMonMaxRateHigh. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition plus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMaxRateLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 13), Unsigned32()).setUnits('kilobits per second').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMaxRateLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxRateLow.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored maximum transfer rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition minus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMaxDelayHigh = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 14), Unsigned32()).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMaxDelayHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayHigh.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored maximum delay rate has been exceeded. A slapmPolicyRuleMonNotOkay notification is not generated again for an slapmPRMonEntry until the maximum delay rate falls below slapmPRMonMaxDelayLow (a slapmPolicyRuleMonOkay notification is then transmitted) and raises above slapmPRMonMaxDelayHigh. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition plus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMaxDelayLow = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 15), Unsigned32()).setUnits('milliseconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonMaxDelayLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayLow.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored maximum delay rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition minus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapmPRMonMinInRateNotAchieves = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonMinInRateNotAchieves.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinInRateNotAchieves.setDescription('The number of times that a minimum transfer in rate was not achieved.') slapmPRMonMaxInRateExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonMaxInRateExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxInRateExceeds.setDescription('The number of times that a maximum transfer in rate was exceeded.') slapmPRMonMaxDelayExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonMaxDelayExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayExceeds.setDescription('The number of times that a maximum delay in rate was exceeded.') slapmPRMonMinOutRateNotAchieves = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonMinOutRateNotAchieves.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinOutRateNotAchieves.setDescription('The number of times that a minimum transfer out rate was not achieved.') slapmPRMonMaxOutRateExceeds = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonMaxOutRateExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxOutRateExceeds.setDescription('The number of times that a maximum transfer out rate was exceeded.') slapmPRMonCurrentDelayRate = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 21), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: slapmPRMonCurrentDelayRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentDelayRate.setDescription('The current delay rate for this entry. This is calculated by taking the average of the TCP round trip times for all associating slapmSubcomponentTable entries within a interval.') slapmPRMonRowStatus = MibTableColumn((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 22), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: slapmPRMonRowStatus.setStatus('current') if mibBuilder.loadTexts: slapmPRMonRowStatus.setDescription('This object allows entries to be created and deleted in the slapmPRMonTable. An entry in this table is deleted by setting this object to destroy(6). Removal of an corresponding (same policy index) slapmPolicyRuleStatsEntry has the side effect of the automatic deletion an entry in this table. Note that an attempt to set any read-create object defined within an slapmPRMonEntry while the value of slapmPRMonRowStatus is active(1) will result in an inconsistentValue error.') slapmMonitoredEventNotAchieved = NotificationType((1, 3, 6, 1, 3, 88, 0, 1)).setObjects(("SLAPM-MIB", "slapmPolicyMonitorIntTime"), ("SLAPM-MIB", "slapmPolicyMonitorControl"), ("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentInRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentDelayRate")) if mibBuilder.loadTexts: slapmMonitoredEventNotAchieved.setStatus('deprecated') if mibBuilder.loadTexts: slapmMonitoredEventNotAchieved.setDescription('This notification is generated when an monitored event is not achieved with respect to threshold. This applies only towards monitoring a policy traffic profile as an aggregate via an associating slapmPolicyStatsEntry. The value of slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmPolicyMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmMonitoredEventOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 2)).setObjects(("SLAPM-MIB", "slapmPolicyMonitorIntTime"), ("SLAPM-MIB", "slapmPolicyMonitorControl"), ("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentInRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentDelayRate")) if mibBuilder.loadTexts: slapmMonitoredEventOkay.setStatus('deprecated') if mibBuilder.loadTexts: slapmMonitoredEventOkay.setDescription('This notification is generated when a monitored event has improved to an acceptable level. This applies only towards monitoring a policy traffic profile as an aggregate via an associating slapmPolicyStatsEntry. The value of slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmPolicyMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmPolicyProfileDeleted = NotificationType((1, 3, 6, 1, 3, 88, 0, 3)).setObjects(("SLAPM-MIB", "slapmPolicyStatsActiveConns"), ("SLAPM-MIB", "slapmPolicyStatsTotalConns"), ("SLAPM-MIB", "slapmPolicyStatsFirstActivated"), ("SLAPM-MIB", "slapmPolicyStatsLastMapping"), ("SLAPM-MIB", "slapmPolicyStatsInOctets"), ("SLAPM-MIB", "slapmPolicyStatsOutOctets"), ("SLAPM-MIB", "slapmPolicyStatsConnectionLimit"), ("SLAPM-MIB", "slapmPolicyStatsCountAccepts"), ("SLAPM-MIB", "slapmPolicyStatsCountDenies"), ("SLAPM-MIB", "slapmPolicyStatsInDiscards"), ("SLAPM-MIB", "slapmPolicyStatsOutDiscards"), ("SLAPM-MIB", "slapmPolicyStatsInPackets"), ("SLAPM-MIB", "slapmPolicyStatsOutPackets"), ("SLAPM-MIB", "slapmPolicyStatsInProfileOctets"), ("SLAPM-MIB", "slapmPolicyStatsOutProfileOctets"), ("SLAPM-MIB", "slapmPolicyStatsMinRate"), ("SLAPM-MIB", "slapmPolicyStatsMaxRate"), ("SLAPM-MIB", "slapmPolicyStatsMaxDelay")) if mibBuilder.loadTexts: slapmPolicyProfileDeleted.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyProfileDeleted.setDescription('A slapmPolicyDeleted notification is sent when a slapmPolicyStatsEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapmPolicyMonitorDeleted = NotificationType((1, 3, 6, 1, 3, 88, 0, 4)).setObjects(("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorInterval"), ("SLAPM-MIB", "slapmPolicyMonitorIntTime"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentInRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentDelayRate"), ("SLAPM-MIB", "slapmPolicyMonitorMinRateLow"), ("SLAPM-MIB", "slapmPolicyMonitorMinRateHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxRateHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxRateLow"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayLow"), ("SLAPM-MIB", "slapmPolicyMonitorMinInRateNotAchieves"), ("SLAPM-MIB", "slapmPolicyMonitorMaxInRateExceeds"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayExceeds"), ("SLAPM-MIB", "slapmPolicyMonitorMinOutRateNotAchieves"), ("SLAPM-MIB", "slapmPolicyMonitorMaxOutRateExceeds")) if mibBuilder.loadTexts: slapmPolicyMonitorDeleted.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorDeleted.setDescription('A slapmPolicyMonitorDeleted notification is sent when a slapmPolicyMonitorEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapmSubcomponentMonitoredEventNotAchieved = NotificationType((1, 3, 6, 1, 3, 88, 0, 5)).setObjects(("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentPolicyName"), ("SLAPM-MIB", "slapmSubcomponentTrafficProfileName"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime")) if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventNotAchieved.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventNotAchieved.setDescription('This notification is generated when a monitored value does not achieved a threshold specification. This applies only towards monitoring the individual components of a policy traffic profile. The value of the corresponding slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmSubcomponentMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableSubcomponentTraps(4), MUST be selected in order for this notification to potentially be generated.') slapmSubcomponentMonitoredEventOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 6)).setObjects(("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentPolicyName"), ("SLAPM-MIB", "slapmSubcomponentTrafficProfileName"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime")) if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventOkay.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventOkay.setDescription('This notification is generated when a monitored value has reached an acceptable level. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableSubcomponentTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmPolicyRuleMonNotOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 7)).setObjects(("SLAPM-MIB", "slapmPRMonIntTime"), ("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonCurrentInRate"), ("SLAPM-MIB", "slapmPRMonCurrentOutRate"), ("SLAPM-MIB", "slapmPRMonCurrentDelayRate")) if mibBuilder.loadTexts: slapmPolicyRuleMonNotOkay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonNotOkay.setDescription('This notification is generated when an monitored event is not achieved with respect to a threshold. This applies only towards monitoring a policy rule as an aggregate via an associating slapmPolicyRuleStatsEntry. The value of slapmPRMonControl can be examined to determine what is being monitored. The first slapmPRMonStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmPolicyRuleMonOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 8)).setObjects(("SLAPM-MIB", "slapmPRMonIntTime"), ("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonCurrentInRate"), ("SLAPM-MIB", "slapmPRMonCurrentOutRate"), ("SLAPM-MIB", "slapmPRMonCurrentDelayRate")) if mibBuilder.loadTexts: slapmPolicyRuleMonOkay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonOkay.setDescription('This notification is generated when a monitored event has improved to an acceptable level. This applies only towards monitoring a policy rule as an aggregate via an associating slapmPolicyRuleStatsEntry. The value of slapmPRMonControl can be examined to determine what is being monitored. The first slapmPRMonStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmPolicyRuleDeleted = NotificationType((1, 3, 6, 1, 3, 88, 0, 9)).setObjects(("SLAPM-MIB", "slapmPolicyRuleStatsActiveConns"), ("SLAPM-MIB", "slapmPolicyRuleStatsTotalConns"), ("SLAPM-MIB", "slapmPolicyRuleStatsLActivated"), ("SLAPM-MIB", "slapmPolicyRuleStatsLastMapping"), ("SLAPM-MIB", "slapmPolicyRuleStatsInOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsConnLimit"), ("SLAPM-MIB", "slapmPolicyRuleStatsCountAccepts"), ("SLAPM-MIB", "slapmPolicyRuleStatsCountDenies"), ("SLAPM-MIB", "slapmPolicyRuleStatsInDiscards"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutDiscards"), ("SLAPM-MIB", "slapmPolicyRuleStatsInPackets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutPackets"), ("SLAPM-MIB", "slapmPolicyRuleStatsInProOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutProOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsMinRate"), ("SLAPM-MIB", "slapmPolicyRuleStatsMaxRate"), ("SLAPM-MIB", "slapmPolicyRuleStatsMaxDelay"), ("SLAPM-MIB", "slapmPolicyRuleStatsTotalRsvpFlows"), ("SLAPM-MIB", "slapmPolicyRuleStatsActRsvpFlows")) if mibBuilder.loadTexts: slapmPolicyRuleDeleted.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleDeleted.setDescription('A slapmPolicyRuleDeleted notification is sent when a slapmPolicyRuleStatsEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapmPolicyRuleMonDeleted = NotificationType((1, 3, 6, 1, 3, 88, 0, 10)).setObjects(("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonInterval"), ("SLAPM-MIB", "slapmPRMonIntTime"), ("SLAPM-MIB", "slapmPRMonCurrentInRate"), ("SLAPM-MIB", "slapmPRMonCurrentOutRate"), ("SLAPM-MIB", "slapmPRMonCurrentDelayRate"), ("SLAPM-MIB", "slapmPRMonMinRateLow"), ("SLAPM-MIB", "slapmPRMonMinRateHigh"), ("SLAPM-MIB", "slapmPRMonMaxRateHigh"), ("SLAPM-MIB", "slapmPRMonMaxRateLow"), ("SLAPM-MIB", "slapmPRMonMaxDelayHigh"), ("SLAPM-MIB", "slapmPRMonMaxDelayLow"), ("SLAPM-MIB", "slapmPRMonMinInRateNotAchieves"), ("SLAPM-MIB", "slapmPRMonMaxInRateExceeds"), ("SLAPM-MIB", "slapmPRMonMaxDelayExceeds"), ("SLAPM-MIB", "slapmPRMonMinOutRateNotAchieves"), ("SLAPM-MIB", "slapmPRMonMaxOutRateExceeds")) if mibBuilder.loadTexts: slapmPolicyRuleMonDeleted.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonDeleted.setDescription('A slapmPolicyRuleMonDeleted notification is sent when a slapmPRMonEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapmSubcMonitorNotOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 11)).setObjects(("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentPolicyRuleIndex"), ("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime")) if mibBuilder.loadTexts: slapmSubcMonitorNotOkay.setStatus('current') if mibBuilder.loadTexts: slapmSubcMonitorNotOkay.setDescription('This notification is generated when a monitored value does not achieved a threshold specification. This applies only towards monitoring the individual components of a policy rule. The value of the corresponding slapmPRMonControl can be examined to determine what is being monitored. The first slapmSubcomponentMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableSubcomponentTraps(4), MUST be selected in order for this notification to potentially be generated.') slapmSubcMonitorOkay = NotificationType((1, 3, 6, 1, 3, 88, 0, 12)).setObjects(("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentPolicyRuleIndex"), ("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime")) if mibBuilder.loadTexts: slapmSubcMonitorOkay.setStatus('current') if mibBuilder.loadTexts: slapmSubcMonitorOkay.setDescription('This notification is generated when a monitored value has reached an acceptable level. Note: The corresponding slapmPRMonControl BITS setting, enableSubcomponentTraps(3), MUST be selected in order for this notification to potentially be generated.') slapmCompliances = MibIdentifier((1, 3, 6, 1, 3, 88, 2, 1)) slapmGroups = MibIdentifier((1, 3, 6, 1, 3, 88, 2, 2)) slapmCompliance = ModuleCompliance((1, 3, 6, 1, 3, 88, 2, 1, 1)).setObjects(("SLAPM-MIB", "slapmBaseGroup2"), ("SLAPM-MIB", "slapmNotGroup2"), ("SLAPM-MIB", "slapmEndSystemGroup2"), ("SLAPM-MIB", "slapmEndSystemNotGroup2"), ("SLAPM-MIB", "slapmBaseGroup"), ("SLAPM-MIB", "slapmNotGroup"), ("SLAPM-MIB", "slapmOptionalGroup"), ("SLAPM-MIB", "slapmEndSystemGroup"), ("SLAPM-MIB", "slapmEndSystemNotGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmCompliance = slapmCompliance.setStatus('current') if mibBuilder.loadTexts: slapmCompliance.setDescription('The compliance statement for the SLAPM-MIB.') slapmBaseGroup = ObjectGroup((1, 3, 6, 1, 3, 88, 2, 2, 1)).setObjects(("SLAPM-MIB", "slapmSpinLock"), ("SLAPM-MIB", "slapmPolicyCountQueries"), ("SLAPM-MIB", "slapmPolicyCountAccesses"), ("SLAPM-MIB", "slapmPolicyCountSuccessAccesses"), ("SLAPM-MIB", "slapmPolicyCountNotFounds"), ("SLAPM-MIB", "slapmPolicyPurgeTime"), ("SLAPM-MIB", "slapmPolicyTrapEnable"), ("SLAPM-MIB", "slapmPolicyStatsOperStatus"), ("SLAPM-MIB", "slapmPolicyStatsActiveConns"), ("SLAPM-MIB", "slapmPolicyStatsFirstActivated"), ("SLAPM-MIB", "slapmPolicyStatsLastMapping"), ("SLAPM-MIB", "slapmPolicyStatsInOctets"), ("SLAPM-MIB", "slapmPolicyStatsOutOctets"), ("SLAPM-MIB", "slapmPolicyStatsConnectionLimit"), ("SLAPM-MIB", "slapmPolicyStatsTotalConns"), ("SLAPM-MIB", "slapmPolicyStatsCountAccepts"), ("SLAPM-MIB", "slapmPolicyStatsCountDenies"), ("SLAPM-MIB", "slapmPolicyStatsInDiscards"), ("SLAPM-MIB", "slapmPolicyStatsOutDiscards"), ("SLAPM-MIB", "slapmPolicyStatsInPackets"), ("SLAPM-MIB", "slapmPolicyStatsOutPackets"), ("SLAPM-MIB", "slapmPolicyStatsMinRate"), ("SLAPM-MIB", "slapmPolicyStatsMaxRate"), ("SLAPM-MIB", "slapmPolicyStatsMaxDelay"), ("SLAPM-MIB", "slapmPolicyMonitorControl"), ("SLAPM-MIB", "slapmPolicyMonitorStatus"), ("SLAPM-MIB", "slapmPolicyMonitorInterval"), ("SLAPM-MIB", "slapmPolicyMonitorIntTime"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentInRate"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmPolicyMonitorMinRateLow"), ("SLAPM-MIB", "slapmPolicyMonitorMinRateHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxRateHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxRateLow"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayHigh"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayLow"), ("SLAPM-MIB", "slapmPolicyMonitorMinInRateNotAchieves"), ("SLAPM-MIB", "slapmPolicyMonitorMaxInRateExceeds"), ("SLAPM-MIB", "slapmPolicyMonitorMaxDelayExceeds"), ("SLAPM-MIB", "slapmPolicyMonitorMinOutRateNotAchieves"), ("SLAPM-MIB", "slapmPolicyMonitorMaxOutRateExceeds"), ("SLAPM-MIB", "slapmPolicyMonitorCurrentDelayRate"), ("SLAPM-MIB", "slapmPolicyMonitorRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmBaseGroup = slapmBaseGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmBaseGroup.setDescription('The group of objects defined by this MIB that are required for all implementations to be compliant.') slapmOptionalGroup = ObjectGroup((1, 3, 6, 1, 3, 88, 2, 2, 2)).setObjects(("SLAPM-MIB", "slapmPolicyStatsInProfileOctets"), ("SLAPM-MIB", "slapmPolicyStatsOutProfileOctets")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmOptionalGroup = slapmOptionalGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmOptionalGroup.setDescription('The group of objects defined by this MIB that are optional.') slapmEndSystemGroup = ObjectGroup((1, 3, 6, 1, 3, 88, 2, 2, 3)).setObjects(("SLAPM-MIB", "slapmPolicyTrapFilter"), ("SLAPM-MIB", "slapmSubcomponentProtocol"), ("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentPolicyName"), ("SLAPM-MIB", "slapmSubcomponentTrafficProfileName"), ("SLAPM-MIB", "slapmSubcomponentLastActivity"), ("SLAPM-MIB", "slapmSubcomponentInOctets"), ("SLAPM-MIB", "slapmSubcomponentOutOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpOutBufferedOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpInBufferedOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpReXmts"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripVariance"), ("SLAPM-MIB", "slapmSubcomponentInPdus"), ("SLAPM-MIB", "slapmSubcomponentOutPdus"), ("SLAPM-MIB", "slapmSubcomponentApplName"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmEndSystemGroup = slapmEndSystemGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmEndSystemGroup.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapmNotGroup = NotificationGroup((1, 3, 6, 1, 3, 88, 2, 2, 4)).setObjects(("SLAPM-MIB", "slapmMonitoredEventNotAchieved"), ("SLAPM-MIB", "slapmMonitoredEventOkay"), ("SLAPM-MIB", "slapmPolicyProfileDeleted"), ("SLAPM-MIB", "slapmPolicyMonitorDeleted")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmNotGroup = slapmNotGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmNotGroup.setDescription('The group of notifications defined by this MIB that MUST be implemented.') slapmEndSystemNotGroup = NotificationGroup((1, 3, 6, 1, 3, 88, 2, 2, 5)).setObjects(("SLAPM-MIB", "slapmSubcomponentMonitoredEventNotAchieved"), ("SLAPM-MIB", "slapmSubcomponentMonitoredEventOkay")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmEndSystemNotGroup = slapmEndSystemNotGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmEndSystemNotGroup.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapmBaseGroup2 = ObjectGroup((1, 3, 6, 1, 3, 88, 2, 2, 6)).setObjects(("SLAPM-MIB", "slapmSpinLock"), ("SLAPM-MIB", "slapmPolicyCountQueries"), ("SLAPM-MIB", "slapmPolicyCountAccesses"), ("SLAPM-MIB", "slapmPolicyCountSuccessAccesses"), ("SLAPM-MIB", "slapmPolicyCountNotFounds"), ("SLAPM-MIB", "slapmPolicyPurgeTime"), ("SLAPM-MIB", "slapmPolicyTrapEnable"), ("SLAPM-MIB", "slapmPolicyNameOfRule"), ("SLAPM-MIB", "slapmPolicyRuleStatsOperStatus"), ("SLAPM-MIB", "slapmPolicyRuleStatsActiveConns"), ("SLAPM-MIB", "slapmPolicyRuleStatsTotalConns"), ("SLAPM-MIB", "slapmPolicyRuleStatsLActivated"), ("SLAPM-MIB", "slapmPolicyRuleStatsLastMapping"), ("SLAPM-MIB", "slapmPolicyRuleStatsInOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsConnLimit"), ("SLAPM-MIB", "slapmPolicyRuleStatsCountAccepts"), ("SLAPM-MIB", "slapmPolicyRuleStatsCountDenies"), ("SLAPM-MIB", "slapmPolicyRuleStatsInDiscards"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutDiscards"), ("SLAPM-MIB", "slapmPolicyRuleStatsInPackets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutPackets"), ("SLAPM-MIB", "slapmPolicyRuleStatsInProOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsOutProOctets"), ("SLAPM-MIB", "slapmPolicyRuleStatsMinRate"), ("SLAPM-MIB", "slapmPolicyRuleStatsMaxRate"), ("SLAPM-MIB", "slapmPolicyRuleStatsMaxDelay"), ("SLAPM-MIB", "slapmPolicyRuleStatsTotalRsvpFlows"), ("SLAPM-MIB", "slapmPolicyRuleStatsActRsvpFlows"), ("SLAPM-MIB", "slapmPRMonControl"), ("SLAPM-MIB", "slapmPRMonStatus"), ("SLAPM-MIB", "slapmPRMonInterval"), ("SLAPM-MIB", "slapmPRMonIntTime"), ("SLAPM-MIB", "slapmPRMonCurrentInRate"), ("SLAPM-MIB", "slapmPRMonCurrentOutRate"), ("SLAPM-MIB", "slapmPRMonMinRateLow"), ("SLAPM-MIB", "slapmPRMonMinRateHigh"), ("SLAPM-MIB", "slapmPRMonMaxRateHigh"), ("SLAPM-MIB", "slapmPRMonMaxRateLow"), ("SLAPM-MIB", "slapmPRMonMaxDelayHigh"), ("SLAPM-MIB", "slapmPRMonMaxDelayLow"), ("SLAPM-MIB", "slapmPRMonMinInRateNotAchieves"), ("SLAPM-MIB", "slapmPRMonMaxInRateExceeds"), ("SLAPM-MIB", "slapmPRMonMaxDelayExceeds"), ("SLAPM-MIB", "slapmPRMonMinOutRateNotAchieves"), ("SLAPM-MIB", "slapmPRMonMaxOutRateExceeds"), ("SLAPM-MIB", "slapmPRMonCurrentDelayRate"), ("SLAPM-MIB", "slapmPRMonRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmBaseGroup2 = slapmBaseGroup2.setStatus('current') if mibBuilder.loadTexts: slapmBaseGroup2.setDescription('The group of objects defined by this MIB that are required for all implementations to be compliant.') slapmEndSystemGroup2 = ObjectGroup((1, 3, 6, 1, 3, 88, 2, 2, 7)).setObjects(("SLAPM-MIB", "slapmPolicyTrapFilter"), ("SLAPM-MIB", "slapmSubcomponentProtocol"), ("SLAPM-MIB", "slapmSubcomponentSystemAddress"), ("SLAPM-MIB", "slapmSubcomponentLastActivity"), ("SLAPM-MIB", "slapmSubcomponentInOctets"), ("SLAPM-MIB", "slapmSubcomponentOutOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpOutBufferedOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpInBufferedOctets"), ("SLAPM-MIB", "slapmSubcomponentTcpReXmts"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripTime"), ("SLAPM-MIB", "slapmSubcomponentTcpRoundTripVariance"), ("SLAPM-MIB", "slapmSubcomponentInPdus"), ("SLAPM-MIB", "slapmSubcomponentOutPdus"), ("SLAPM-MIB", "slapmSubcomponentApplName"), ("SLAPM-MIB", "slapmSubcomponentMonitorStatus"), ("SLAPM-MIB", "slapmSubcomponentMonitorIntTime"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentOutRate"), ("SLAPM-MIB", "slapmSubcomponentMonitorCurrentInRate"), ("SLAPM-MIB", "slapmSubcomponentPolicyRuleIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmEndSystemGroup2 = slapmEndSystemGroup2.setStatus('current') if mibBuilder.loadTexts: slapmEndSystemGroup2.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapmNotGroup2 = NotificationGroup((1, 3, 6, 1, 3, 88, 2, 2, 8)).setObjects(("SLAPM-MIB", "slapmPolicyRuleMonNotOkay"), ("SLAPM-MIB", "slapmPolicyRuleMonOkay"), ("SLAPM-MIB", "slapmPolicyRuleDeleted"), ("SLAPM-MIB", "slapmPolicyRuleMonDeleted")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmNotGroup2 = slapmNotGroup2.setStatus('current') if mibBuilder.loadTexts: slapmNotGroup2.setDescription('The group of notifications defined by this MIB that MUST be implemented.') slapmEndSystemNotGroup2 = NotificationGroup((1, 3, 6, 1, 3, 88, 2, 2, 9)).setObjects(("SLAPM-MIB", "slapmSubcMonitorNotOkay"), ("SLAPM-MIB", "slapmSubcMonitorOkay")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapmEndSystemNotGroup2 = slapmEndSystemNotGroup2.setStatus('current') if mibBuilder.loadTexts: slapmEndSystemNotGroup2.setDescription('The group of objects defined by this MIB that are required for end system implementations.') mibBuilder.exportSymbols("SLAPM-MIB", slapmPRMonCurrentOutRate=slapmPRMonCurrentOutRate, slapmPRMonMaxRateLow=slapmPRMonMaxRateLow, slapmPolicyRuleDeleted=slapmPolicyRuleDeleted, slapmPolicyStatsLastMapping=slapmPolicyStatsLastMapping, slapmPolicyMonitorMaxDelayExceeds=slapmPolicyMonitorMaxDelayExceeds, slapmPolicyStatsOutOctets=slapmPolicyStatsOutOctets, slapmPolicyMonitorIntTime=slapmPolicyMonitorIntTime, slapmPolicyRuleStatsCountDenies=slapmPolicyRuleStatsCountDenies, slapmSubcomponentTrafficProfileName=slapmSubcomponentTrafficProfileName, slapmPolicyRuleStatsTotalRsvpFlows=slapmPolicyRuleStatsTotalRsvpFlows, slapmPolicyRuleStatsInPackets=slapmPolicyRuleStatsInPackets, slapmPolicyMonitorMinRateLow=slapmPolicyMonitorMinRateLow, slapmPolicyMonitorCurrentDelayRate=slapmPolicyMonitorCurrentDelayRate, slapmSubcomponentInPdus=slapmSubcomponentInPdus, slapmSubcomponentOutOctets=slapmSubcomponentOutOctets, slapmPolicyStatsInOctets=slapmPolicyStatsInOctets, slapmPolicyMonitorMaxInRateExceeds=slapmPolicyMonitorMaxInRateExceeds, slapmPolicyCountAccesses=slapmPolicyCountAccesses, slapmPolicyStatsPolicyName=slapmPolicyStatsPolicyName, slapmSubcomponentRemPort=slapmSubcomponentRemPort, slapmPolicyMonitorTrafficProfileName=slapmPolicyMonitorTrafficProfileName, slapmPolicyMonitorMaxRateHigh=slapmPolicyMonitorMaxRateHigh, slapmMonitoredEventOkay=slapmMonitoredEventOkay, slapmOptionalGroup=slapmOptionalGroup, slapmPolicyRuleStatsCountAccepts=slapmPolicyRuleStatsCountAccepts, slapmPRMonTable=slapmPRMonTable, slapmPolicyStatsInDiscards=slapmPolicyStatsInDiscards, slapmSubcomponentPolicyName=slapmSubcomponentPolicyName, slapmPRMonMinOutRateNotAchieves=slapmPRMonMinOutRateNotAchieves, slapmSubcomponentOutPdus=slapmSubcomponentOutPdus, slapmPolicyMonitorControl=slapmPolicyMonitorControl, slapmSubcomponentMonitorCurrentInRate=slapmSubcomponentMonitorCurrentInRate, slapmPolicyRuleStatsTable=slapmPolicyRuleStatsTable, slapmPolicyRuleStatsOperStatus=slapmPolicyRuleStatsOperStatus, slapmSubcomponentTcpRoundTripVariance=slapmSubcomponentTcpRoundTripVariance, slapmMIB=slapmMIB, slapmPolicyRuleMonNotOkay=slapmPolicyRuleMonNotOkay, slapmPolicyStatsTrafficProfileName=slapmPolicyStatsTrafficProfileName, slapmPolicyRuleStatsInDiscards=slapmPolicyRuleStatsInDiscards, slapmPolicyStatsTable=slapmPolicyStatsTable, slapmSubcomponentMonitoredEventOkay=slapmSubcomponentMonitoredEventOkay, slapmPolicyNameTable=slapmPolicyNameTable, slapmPolicyStatsCountAccepts=slapmPolicyStatsCountAccepts, slapmPolicyStatsOutDiscards=slapmPolicyStatsOutDiscards, slapmBaseGroup2=slapmBaseGroup2, slapmObjects=slapmObjects, slapmPolicyMonitorCurrentInRate=slapmPolicyMonitorCurrentInRate, slapmPRMonMaxDelayLow=slapmPRMonMaxDelayLow, slapmPolicyStatsFirstActivated=slapmPolicyStatsFirstActivated, slapmPRMonIntTime=slapmPRMonIntTime, slapmPolicyRuleStatsTotalConns=slapmPolicyRuleStatsTotalConns, slapmPRMonRowStatus=slapmPRMonRowStatus, slapmPolicyStatsActiveConns=slapmPolicyStatsActiveConns, slapmPolicyMonitorMinInRateNotAchieves=slapmPolicyMonitorMinInRateNotAchieves, slapmSubcomponentApplName=slapmSubcomponentApplName, slapmEndSystemGroup2=slapmEndSystemGroup2, slapmEndSystemNotGroup2=slapmEndSystemNotGroup2, slapmSubcomponentLocalPort=slapmSubcomponentLocalPort, slapmPolicyStatsOutProfileOctets=slapmPolicyStatsOutProfileOctets, slapmPRMonCurrentInRate=slapmPRMonCurrentInRate, slapmPolicyRuleStatsActiveConns=slapmPolicyRuleStatsActiveConns, slapmEndSystemNotGroup=slapmEndSystemNotGroup, slapmPolicyMonitorMaxOutRateExceeds=slapmPolicyMonitorMaxOutRateExceeds, slapmPolicyRuleStatsOutProOctets=slapmPolicyRuleStatsOutProOctets, slapmPolicyStatsOutPackets=slapmPolicyStatsOutPackets, slapmPolicyStatsMinRate=slapmPolicyStatsMinRate, slapmPolicyMonitorMaxRateLow=slapmPolicyMonitorMaxRateLow, slapmSubcomponentTcpInBufferedOctets=slapmSubcomponentTcpInBufferedOctets, slapmPolicyStatsOperStatus=slapmPolicyStatsOperStatus, slapmPRMonMaxOutRateExceeds=slapmPRMonMaxOutRateExceeds, slapmPRMonMinRateLow=slapmPRMonMinRateLow, slapmSubcomponentRemAddress=slapmSubcomponentRemAddress, slapmBaseObjects=slapmBaseObjects, slapmPolicyMonitorMaxDelayHigh=slapmPolicyMonitorMaxDelayHigh, slapmSubcomponentLocalAddress=slapmSubcomponentLocalAddress, slapmPRMonIndex=slapmPRMonIndex, slapmBaseGroup=slapmBaseGroup, slapmPolicyCountQueries=slapmPolicyCountQueries, slapmPolicyRuleStatsConnLimit=slapmPolicyRuleStatsConnLimit, slapmCompliance=slapmCompliance, slapmPolicyMonitorRowStatus=slapmPolicyMonitorRowStatus, slapmConformance=slapmConformance, slapmPolicyRuleStatsActRsvpFlows=slapmPolicyRuleStatsActRsvpFlows, slapmPolicyRuleMonDeleted=slapmPolicyRuleMonDeleted, slapmPolicyMonitorPolicyName=slapmPolicyMonitorPolicyName, slapmPolicyMonitorTable=slapmPolicyMonitorTable, slapmPRMonMinRateHigh=slapmPRMonMinRateHigh, slapmCompliances=slapmCompliances, slapmPolicyMonitorMinRateHigh=slapmPolicyMonitorMinRateHigh, slapmPolicyPurgeTime=slapmPolicyPurgeTime, slapmPRMonMaxRateHigh=slapmPRMonMaxRateHigh, slapmPRMonMaxDelayExceeds=slapmPRMonMaxDelayExceeds, slapmPolicyNameIndex=slapmPolicyNameIndex, slapmPolicyRuleStatsMinRate=slapmPolicyRuleStatsMinRate, slapmEndSystemGroup=slapmEndSystemGroup, slapmPRMonMaxDelayHigh=slapmPRMonMaxDelayHigh, slapmNotifications=slapmNotifications, slapmPolicyStatsCountDenies=slapmPolicyStatsCountDenies, slapmPolicyRuleStatsLActivated=slapmPolicyRuleStatsLActivated, slapmSubcMonitorNotOkay=slapmSubcMonitorNotOkay, slapmPolicyRuleStatsLastMapping=slapmPolicyRuleStatsLastMapping, slapmPRMonMinInRateNotAchieves=slapmPRMonMinInRateNotAchieves, slapmPolicyTrapFilter=slapmPolicyTrapFilter, slapmSubcomponentMonitorStatus=slapmSubcomponentMonitorStatus, slapmPolicyCountNotFounds=slapmPolicyCountNotFounds, slapmSubcomponentLastActivity=slapmSubcomponentLastActivity, slapmPolicyRuleStatsInOctets=slapmPolicyRuleStatsInOctets, slapmPolicyMonitorOwnerIndex=slapmPolicyMonitorOwnerIndex, slapmPRMonCurrentDelayRate=slapmPRMonCurrentDelayRate, slapmSubcomponentMonitorIntTime=slapmSubcomponentMonitorIntTime, slapmSubcomponentSystemAddress=slapmSubcomponentSystemAddress, slapmPolicyMonitorEntry=slapmPolicyMonitorEntry, slapmPolicyRuleMonOkay=slapmPolicyRuleMonOkay, slapmPolicyRuleStatsMaxDelay=slapmPolicyRuleStatsMaxDelay, slapmSubcomponentTable=slapmSubcomponentTable, slapmPRMonInterval=slapmPRMonInterval, SlapmStatus=SlapmStatus, PYSNMP_MODULE_ID=slapmMIB, slapmPolicyMonitorStatus=slapmPolicyMonitorStatus, slapmSubcomponentProtocol=slapmSubcomponentProtocol, slapmSubcomponentTcpOutBufferedOctets=slapmSubcomponentTcpOutBufferedOctets, slapmPRMonOwnerIndex=slapmPRMonOwnerIndex, slapmSubcomponentInOctets=slapmSubcomponentInOctets, slapmSpinLock=slapmSpinLock, slapmPolicyMonitorMinOutRateNotAchieves=slapmPolicyMonitorMinOutRateNotAchieves, slapmPolicyStatsSystemAddress=slapmPolicyStatsSystemAddress, slapmPolicyMonitorDeleted=slapmPolicyMonitorDeleted, slapmPolicyStatsInPackets=slapmPolicyStatsInPackets, slapmPolicyStatsInProfileOctets=slapmPolicyStatsInProfileOctets, slapmSubcomponentTcpRoundTripTime=slapmSubcomponentTcpRoundTripTime, slapmNotGroup=slapmNotGroup, slapmPolicyRuleStatsOutOctets=slapmPolicyRuleStatsOutOctets, slapmSubcomponentPolicyRuleIndex=slapmSubcomponentPolicyRuleIndex, slapmPRMonControl=slapmPRMonControl, slapmPolicyNameEntry=slapmPolicyNameEntry, slapmPRMonSystemAddress=slapmPRMonSystemAddress, slapmPolicyStatsEntry=slapmPolicyStatsEntry, SlapmNameType=SlapmNameType, slapmPolicyMonitorCurrentOutRate=slapmPolicyMonitorCurrentOutRate, slapmPolicyStatsTotalConns=slapmPolicyStatsTotalConns, slapmPolicyTrapEnable=slapmPolicyTrapEnable, SlapmPolicyRuleName=SlapmPolicyRuleName, slapmSubcomponentTcpReXmts=slapmSubcomponentTcpReXmts, slapmPolicyRuleStatsEntry=slapmPolicyRuleStatsEntry, slapmPolicyStatsConnectionLimit=slapmPolicyStatsConnectionLimit, slapmPRMonStatus=slapmPRMonStatus, slapmPolicyNameOfRule=slapmPolicyNameOfRule, slapmPolicyMonitorSystemAddress=slapmPolicyMonitorSystemAddress, slapmTableObjects=slapmTableObjects, slapmGroups=slapmGroups, slapmPolicyStatsMaxRate=slapmPolicyStatsMaxRate, slapmPolicyRuleStatsOutPackets=slapmPolicyRuleStatsOutPackets, slapmMonitoredEventNotAchieved=slapmMonitoredEventNotAchieved, slapmPolicyNameSystemAddress=slapmPolicyNameSystemAddress, slapmSubcMonitorOkay=slapmSubcMonitorOkay, slapmPolicyRuleStatsInProOctets=slapmPolicyRuleStatsInProOctets, slapmPolicyMonitorInterval=slapmPolicyMonitorInterval, slapmPolicyProfileDeleted=slapmPolicyProfileDeleted, slapmSubcomponentMonitoredEventNotAchieved=slapmSubcomponentMonitoredEventNotAchieved, slapmSubcomponentEntry=slapmSubcomponentEntry, slapmPolicyRuleStatsMaxRate=slapmPolicyRuleStatsMaxRate, slapmPolicyCountSuccessAccesses=slapmPolicyCountSuccessAccesses, slapmPRMonEntry=slapmPRMonEntry, slapmPolicyStatsMaxDelay=slapmPolicyStatsMaxDelay, slapmSubcomponentMonitorCurrentOutRate=slapmSubcomponentMonitorCurrentOutRate, slapmPRMonMaxInRateExceeds=slapmPRMonMaxInRateExceeds, slapmPolicyRuleStatsOutDiscards=slapmPolicyRuleStatsOutDiscards, slapmPolicyMonitorMaxDelayLow=slapmPolicyMonitorMaxDelayLow, slapmNotGroup2=slapmNotGroup2)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_size_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (time_ticks, mib_identifier, unsigned32, ip_address, gauge32, experimental, iso, notification_type, counter32, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, object_identity, integer32, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'MibIdentifier', 'Unsigned32', 'IpAddress', 'Gauge32', 'experimental', 'iso', 'NotificationType', 'Counter32', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'ObjectIdentity', 'Integer32', 'ModuleIdentity') (textual_convention, test_and_incr, date_and_time, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TestAndIncr', 'DateAndTime', 'DisplayString', 'RowStatus') slapm_mib = module_identity((1, 3, 6, 1, 3, 88)) slapmMIB.setRevisions(('2000-01-24 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: slapmMIB.setRevisionsDescriptions(('This version published as RFC 2758.',)) if mibBuilder.loadTexts: slapmMIB.setLastUpdated('200001240000Z') if mibBuilder.loadTexts: slapmMIB.setOrganization('International Business Machines Corp.') if mibBuilder.loadTexts: slapmMIB.setContactInfo('Kenneth White International Business Machines Corporation Network Computing Software Division Research Triangle Park, NC, USA E-mail: wkenneth@us.ibm.com') if mibBuilder.loadTexts: slapmMIB.setDescription('The Service Level Agreement Performance Monitoring MIB (SLAPM-MIB) provides data collection and monitoring capabilities for Service Level Agreements (SLAs) policy definitions.') class Slapmnametype(SnmpAdminString): description = 'The textual convention for naming entities within this MIB. The actual contents of an object defined using this textual convention should consist of the distinguished name portion of an name. This is usually the right-most portion of the name. This convention is necessary, since names within this MIB can be used as index items and an instance identifier is limited to 128 subidentifiers. This textual convention has been deprecated. All of the tables defined within this MIB that use this textual convention have been deprecated as well since the method of using a portion of the name (either of a policy definition or of a traffic profile) has been replaced by using an Unsigned32 index. The new slapmPolicyNameTable would then map the Unsigned32 index to a real name.' status = 'deprecated' subtype_spec = SnmpAdminString.subtypeSpec + value_size_constraint(0, 32) class Slapmstatus(TextualConvention, Bits): description = 'The textual convention for defining the various slapmPRMonTable (or old slapmPolicyMonitorTable) and the slapmSubcomponentTable states for actual policy rule traffic monitoring.' status = 'current' named_values = named_values(('slaMinInRateNotAchieved', 0), ('slaMaxInRateExceeded', 1), ('slaMaxDelayExceeded', 2), ('slaMinOutRateNotAchieved', 3), ('slaMaxOutRateExceeded', 4), ('monitorMinInRateNotAchieved', 5), ('monitorMaxInRateExceeded', 6), ('monitorMaxDelayExceeded', 7), ('monitorMinOutRateNotAchieved', 8), ('monitorMaxOutRateExceeded', 9)) class Slapmpolicyrulename(TextualConvention, OctetString): description = 'To facilitate internationalization, this TC represents information taken from the ISO/IEC IS 10646-1 character set, encoded as an octet string using the UTF-8 character encoding scheme described in RFC 2044. For strings in 7-bit US-ASCII, there is no impact since the UTF-8 representation is identical to the US-ASCII encoding.' status = 'current' display_hint = '1024t' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 1024) slapm_notifications = mib_identifier((1, 3, 6, 1, 3, 88, 0)) slapm_objects = mib_identifier((1, 3, 6, 1, 3, 88, 1)) slapm_conformance = mib_identifier((1, 3, 6, 1, 3, 88, 2)) slapm_base_objects = mib_identifier((1, 3, 6, 1, 3, 88, 1, 1)) slapm_spin_lock = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 1), test_and_incr()).setMaxAccess('readwrite') if mibBuilder.loadTexts: slapmSpinLock.setStatus('current') if mibBuilder.loadTexts: slapmSpinLock.setDescription('An advisory lock used to allow cooperating applications to coordinate their use of the contents of this MIB. This typically occurs when an application seeks to create an new entry or alter an existing entry in slapmPRMonTable (or old slapmPolicyMonitorTable). A management implementation MAY utilize the slapmSpinLock to serialize its changes or additions. This usage is not required. However, slapmSpinLock MUST be supported by agent implementations.') slapm_policy_count_queries = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyCountQueries.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountQueries.setDescription('The total number of times that a policy lookup occurred with respect to a policy agent. This is the number of times that a reference was made to a policy definition at a system and includes the number of times that a policy repository was accessed, slapmPolicyCountAccesses. The object slapmPolicyCountAccesses should be less than slapmPolicyCountQueries when policy definitions are cached at a system.') slapm_policy_count_accesses = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyCountAccesses.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountAccesses.setDescription('Total number of times that a policy repository was accessed with respect to a policy agent. The value of this object should be less than slapmPolicyCountQueries, since typically policy entries are cached to minimize repository accesses.') slapm_policy_count_success_accesses = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyCountSuccessAccesses.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountSuccessAccesses.setDescription('Total number of successful policy repository accesses with respect to a policy agent.') slapm_policy_count_not_founds = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyCountNotFounds.setStatus('current') if mibBuilder.loadTexts: slapmPolicyCountNotFounds.setDescription('Total number of policy repository accesses, with respect to a policy agent, that resulted in an entry not being located.') slapm_policy_purge_time = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 3600)).clone(900)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: slapmPolicyPurgeTime.setStatus('current') if mibBuilder.loadTexts: slapmPolicyPurgeTime.setDescription('The purpose of this object is to define the amount of time (in seconds) to wait before removing an slapmPolicyRuleStatsEntry (or old slapmPolicyStatsEntry) when a system detects that the associated policy definition has been deleted. This gives any polling management applications time to complete their last poll before an entry is removed. An slapmPolicyRuleStatsEntry (or old slapmPolicyStatsEntry) enters the deleteNeeded(3) state via slapmPolicyRuleStatsOperStatus (or old slapmPolicyStatsOperStatus) when a system first detects that the entry needs to be removed. Once slapmPolicyPurgeTime has expired for an entry in deleteNeeded(3) state it is removed a long with any dependent slapmPRMonTable (or slapmPolicyMonitorTable) entries. A value of 0 for this option disables this function and results in the automatic purging of slapmPRMonTable (or slapmPolicyTable) entries upon transition into deleteNeeded(3) state. A slapmPolicyRuleDeleted (or slapmPolicyProfileDeleted) notification is sent when an slapmPolicyRuleStatsEntry (or slapmPolicyStatsEntry) is removed. Dependent slapmPRMonTable (or slapmPolicyMonitorTable) deletion results in a slapmPolicyRuleMonDeleted (or slapmPolicyMonitorDeleted) notification being sent. These notifications are suppressed if the value of slapmPolicyTrapEnable is disabled(2).') slapm_policy_trap_enable = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: slapmPolicyTrapEnable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyTrapEnable.setDescription('Indicates whether slapmPolicyRuleDeleted and slapmPolicyRuleMonDeleted (or slapmPolicyProfileDeleted and slapmPolicyMonitorDeleted) notifications should be generated by this system.') slapm_policy_trap_filter = mib_scalar((1, 3, 6, 1, 3, 88, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 64)).clone(3)).setUnits('intervals').setMaxAccess('readwrite') if mibBuilder.loadTexts: slapmPolicyTrapFilter.setStatus('current') if mibBuilder.loadTexts: slapmPolicyTrapFilter.setDescription('The purpose of this object is to suppress unnecessary slapmSubcMonitorNotOkay (or slapmSubcomponentMonitoredEventNotAchieved), for example, notifications. Basically, a monitored event has to not meet its SLA requirement for the number of consecutive intervals indicated by the value of this object.') slapm_table_objects = mib_identifier((1, 3, 6, 1, 3, 88, 1, 2)) slapm_policy_stats_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 1)) if mibBuilder.loadTexts: slapmPolicyStatsTable.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTable.setDescription('Provides statistics on all policies known at a system. This table has been deprecated and replaced with the slapmPolicyRuleStatsTable. Older implementations of this MIB are expected to continue their support of this table.') slapm_policy_stats_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 1, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmPolicyStatsSystemAddress'), (0, 'SLAPM-MIB', 'slapmPolicyStatsPolicyName'), (0, 'SLAPM-MIB', 'slapmPolicyStatsTrafficProfileName')) if mibBuilder.loadTexts: slapmPolicyStatsEntry.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsEntry.setDescription('Defines an entry in the slapmPolicyStatsTable. This table defines a set of statistics that is kept on a per system, policy and traffic profile basis. A policy can be defined to contain multiple traffic profiles that map to a single action. Entries in this table are not created or deleted via SNMP but reflect the set of policy definitions known at a system.') slapm_policy_stats_system_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 1), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmPolicyStatsSystemAddress.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string must be used to indicate that only a single system is being represented. Otherwise, the length of the octet string must be 4 for an ipv4 address or 16 for an ipv6 address.') slapm_policy_stats_policy_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 2), slapm_name_type()) if mibBuilder.loadTexts: slapmPolicyStatsPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsPolicyName.setDescription('Policy name that this entry relates to.') slapm_policy_stats_traffic_profile_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 3), slapm_name_type()) if mibBuilder.loadTexts: slapmPolicyStatsTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTrafficProfileName.setDescription('The name of a traffic profile that is associated with a policy.') slapm_policy_stats_oper_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inactive', 1), ('active', 2), ('deleteNeeded', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsOperStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOperStatus.setDescription('The state of a policy entry: inactive(1) - An policy entry was either defined by local system definition or discovered via a directory search but has not been activated (not currently being used). active(2) - Policy entry is being used to affect traffic flows. deleteNeeded(3) - Either though local implementation dependent methods or by discovering that the directory entry corresponding to this table entry no longer exists and slapmPolicyPurgeTime needs to expire before attempting to remove the corresponding slapmPolicyStatsEntry and any dependent slapmPolicyMonitor table entries. Note: a policy traffic profile in a state other than active(1) is not being used to affect traffic flows.') slapm_policy_stats_active_conns = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsActiveConns.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsActiveConns.setDescription('The number of active TCP connections that are affected by the corresponding policy entry.') slapm_policy_stats_total_conns = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsTotalConns.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsTotalConns.setDescription('The number of total TCP connections that are affected by the corresponding policy entry.') slapm_policy_stats_first_activated = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 7), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsFirstActivated.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsFirstActivated.setDescription('The timestamp for when the corresponding policy entry is activated. The value of this object serves as the discontinuity event indicator when polling entries in this table. The value of this object is updated on transition of slapmPolicyStatsOperStatus into the active(2) state.') slapm_policy_stats_last_mapping = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 8), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsLastMapping.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsLastMapping.setDescription('The timestamp for when the last time that the associated policy entry was used.') slapm_policy_stats_in_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsInOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInOctets.setDescription('The number of octets that was received by IP for an entity that map to this entry.') slapm_policy_stats_out_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsOutOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutOctets.setDescription('The number of octets that was transmitted by IP for an entity that map to this entry.') slapm_policy_stats_connection_limit = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsConnectionLimit.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsConnectionLimit.setDescription('The limit for the number of active TCP connections that are allowed for this policy definition. A value of zero for this object implies that a connection limit has not been specified.') slapm_policy_stats_count_accepts = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsCountAccepts.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsCountAccepts.setDescription("This counter is incremented when a policy action's Permission value is set to Accept and a session (TCP connection) is accepted.") slapm_policy_stats_count_denies = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsCountDenies.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsCountDenies.setDescription("This counter is incremented when a policy action's Permission value is set to Deny and a session is denied, or when a session (TCP connection) is rejected due to a policy's connection limit (slapmPolicyStatsConnectLimit) being reached.") slapm_policy_stats_in_discards = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsInDiscards.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInDiscards.setDescription('This counter counts the number of in octets discarded. This occurs when an error is detected. Examples of this are buffer overflow, checksum error, or bad packet format.') slapm_policy_stats_out_discards = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsOutDiscards.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutDiscards.setDescription('This counter counts the number of out octets discarded. Examples of this are buffer overflow, checksum error, or bad packet format.') slapm_policy_stats_in_packets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsInPackets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInPackets.setDescription('This counter counts the number of in packets received that relate to this policy entry from IP.') slapm_policy_stats_out_packets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsOutPackets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutPackets.setDescription('This counter counts the number of out packets sent by IP that relate to this policy entry.') slapm_policy_stats_in_profile_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsInProfileOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsInProfileOctets.setDescription('This counter counts the number of in octets that are determined to be within profile.') slapm_policy_stats_out_profile_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsOutProfileOctets.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsOutProfileOctets.setDescription('This counter counts the number of out octets that are determined to be within profile.') slapm_policy_stats_min_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 20), integer32()).setUnits('Kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsMinRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMinRate.setDescription('The minimum transfer rate defined for this entry.') slapm_policy_stats_max_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 21), integer32()).setUnits('Kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsMaxRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMaxRate.setDescription('The maximum transfer rate defined for this entry.') slapm_policy_stats_max_delay = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 1, 1, 22), integer32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyStatsMaxDelay.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyStatsMaxDelay.setDescription('The maximum delay defined for this entry.') slapm_policy_monitor_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 2)) if mibBuilder.loadTexts: slapmPolicyMonitorTable.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorTable.setDescription('Provides a method of monitoring policies and their effect at a system. This table has been deprecated and replaced with the slapmPRMonTable. Older implementations of this MIB are expected to continue their support of this table.') slapm_policy_monitor_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 2, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmPolicyMonitorOwnerIndex'), (0, 'SLAPM-MIB', 'slapmPolicyMonitorSystemAddress'), (0, 'SLAPM-MIB', 'slapmPolicyMonitorPolicyName'), (0, 'SLAPM-MIB', 'slapmPolicyMonitorTrafficProfileName')) if mibBuilder.loadTexts: slapmPolicyMonitorEntry.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorEntry.setDescription('Defines an entry in the slapmPolicyMonitorTable. This table defines which policies should be monitored on a per policy traffic profile basis.') slapm_policy_monitor_owner_index = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 16))) if mibBuilder.loadTexts: slapmPolicyMonitorOwnerIndex.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorOwnerIndex.setDescription("To facilitate the provisioning of access control by a security administrator using the View-Based Access Control Model (RFC 2575, VACM) for tables in which multiple users may need to independently create or modify entries, the initial index is used as an 'owner index'. Such an initial index has a syntax of SnmpAdminString, and can thus be trivially mapped to a securityName or groupName as defined in VACM, in accordance with a security policy. All entries in that table belonging to a particular user will have the same value for this initial index. For a given user's entries in a particular table, the object identifiers for the information in these entries will have the same subidentifiers (except for the 'column' subidentifier) up to the end of the encoded owner index. To configure VACM to permit access to this portion of the table, one would create vacmViewTreeFamilyTable entries with the value of vacmViewTreeFamilySubtree including the owner index portion, and vacmViewTreeFamilyMask 'wildcarding' the column subidentifier. More elaborate configurations are possible.") slapm_policy_monitor_system_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 2), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmPolicyMonitorSystemAddress.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapm_policy_monitor_policy_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 3), slapm_name_type()) if mibBuilder.loadTexts: slapmPolicyMonitorPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorPolicyName.setDescription('Policy name that this entry relates to.') slapm_policy_monitor_traffic_profile_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 4), slapm_name_type()) if mibBuilder.loadTexts: slapmPolicyMonitorTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorTrafficProfileName.setDescription('The corresponding Traffic Profile name.') slapm_policy_monitor_control = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 5), bits().clone(namedValues=named_values(('monitorMinRate', 0), ('monitorMaxRate', 1), ('monitorMaxDelay', 2), ('enableAggregateTraps', 3), ('enableSubcomponentTraps', 4), ('monitorSubcomponents', 5))).clone(namedValues=named_values(('monitorMinRate', 0), ('monitorMaxRate', 1), ('monitorMaxDelay', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorControl.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorControl.setDescription("The value of this object determines the type and level of monitoring that is applied to a policy/profile. The value of this object can't be changed once the table entry that it is a part of is activated via a slapmPolicyMonitorRowStatus transition to active state. monitorMinRate(0) - Monitor minimum transfer rate. monitorMaxRate(1) - Monitor maximum transfer rate. monitorMaxDelay(2) - Monitor maximum delay. enableAggregateTraps(3) - The enableAggregateTraps(3) BITS setting enables notification generation when monitoring a policy traffic profile as an aggregate using the values in the corresponding slapmPolicyStatsEntry. By default this function is not enabled. enableSubcomponentTraps(4) - This BITS setting enables notification generation when monitoring all subcomponents that are mapped to an corresponding slapmPolicyStatsEntry. By default this function is not enabled. monitorSubcomponents(5) - This BITS setting enables monitoring of each subcomponent (typically a TCP connection or UDP listener) individually.") slapm_policy_monitor_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 6), slapm_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorStatus.setDescription("The value of this object indicates when a monitored value has not meet a threshold or isn't meeting the defined service level. The SlapmStatus TEXTUAL-CONVENTION defines two levels of not meeting a threshold. The first set: slaMinInRateNotAchieved(0), slaMaxInRateExceeded(1), slaMaxDelayExceeded(2), slaMinOutRateNotAchieved(3), slaMaxOutRateExceeded(4) are used to indicate when the SLA as an aggregate is not meeting a threshold while the second set: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) indicate that at least one subcomponent is not meeting a threshold.") slapm_policy_monitor_interval = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(15, 86400)).clone(20)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorInterval.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorInterval.setDescription('The number of seconds that defines the sample period.') slapm_policy_monitor_int_time = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 8), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorIntTime.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorIntTime.setDescription('The timestamp for when the last interval ended.') slapm_policy_monitor_current_in_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 9), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentInRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentInRate.setDescription('Using the value of the corresponding slapmPolicyMonitorInterval, slapmPolicyStatsInOctets is sampled and then divided by slapmPolicyMonitorInterval to determine the current in transfer rate.') slapm_policy_monitor_current_out_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 10), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentOutRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentOutRate.setDescription('Using the value of the corresponding slapmPolicyMonitorInterval, slapmPolicyStatsOutOctets is sampled and then divided by slapmPolicyMonitorInterval to determine the current out transfer rate.') slapm_policy_monitor_min_rate_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 11), integer32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateLow.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored minimum transfer rate has not been meet. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the minimum transfer rate exceeds slapmPolicyMonitorMinRateHigh (a slapmMonitoredEventOkay notification is then transmitted) and then fails below slapmPolicyMonitorMinRateLow. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition minus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_min_rate_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 12), integer32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinRateHigh.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored minimum transfer rate has increased to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition plus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_max_rate_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 13), integer32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateHigh.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored maximum transfer rate has been exceeded. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the maximum transfer rate fails below slapmPolicyMonitorMaxRateLow (a slapmMonitoredEventOkay notification is then transmitted) and then raises above slapmPolicyMonitorMaxRateHigh. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition plus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_max_rate_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 14), integer32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxRateLow.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored maximum transfer rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition minus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_max_delay_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 15), integer32()).setUnits('milliseconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayHigh.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayHigh.setDescription("The threshold for generating a slapmMonitoredEventNotAchieved notification, signalling that a monitored maximum delay rate has been exceeded. A slapmMonitoredEventNotAchieved notification is not generated again for an slapmPolicyMonitorEntry until the maximum delay rate falls below slapmPolicyMonitorMaxDelayLow (a slapmMonitoredEventOkay notification is then transmitted) and raises above slapmPolicyMonitorMaxDelayHigh. This behavior reduces the slapmMonitoredEventNotAchieved notifications that are transmitted. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition plus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_max_delay_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 16), integer32()).setUnits('milliseconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayLow.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayLow.setDescription("The threshold for generating a slapmMonitoredEventOkay notification, signalling that a monitored maximum delay rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPolicyMonitorControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition minus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_policy_monitor_min_in_rate_not_achieves = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorMinInRateNotAchieves.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinInRateNotAchieves.setDescription('The number of times that a minimum transfer in rate was not achieved.') slapm_policy_monitor_max_in_rate_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorMaxInRateExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxInRateExceeds.setDescription('The number of times that a maximum transfer in rate was exceeded.') slapm_policy_monitor_max_delay_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxDelayExceeds.setDescription('The number of times that a maximum delay in rate was exceeded.') slapm_policy_monitor_min_out_rate_not_achieves = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorMinOutRateNotAchieves.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMinOutRateNotAchieves.setDescription('The number of times that a minimum transfer out rate was not achieved.') slapm_policy_monitor_max_out_rate_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorMaxOutRateExceeds.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorMaxOutRateExceeds.setDescription('The number of times that a maximum transfer out rate was exceeded.') slapm_policy_monitor_current_delay_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 22), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentDelayRate.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorCurrentDelayRate.setDescription('The current delay rate for this entry. This is calculated by taking the average of the TCP round trip times for all associating slapmSubcomponentTable entries within a interval.') slapm_policy_monitor_row_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 2, 1, 23), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPolicyMonitorRowStatus.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorRowStatus.setDescription('This object allows entries to be created and deleted in the slapmPolicyMonitorTable. An entry in this table is deleted by setting this object to destroy(6). Removal of a corresponding (same policy and traffic profile names) slapmPolicyStatsEntry has the side effect of the automatic deletion an entry in this table.') slapm_subcomponent_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 3)) if mibBuilder.loadTexts: slapmSubcomponentTable.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTable.setDescription('Defines a table to provide information on the individually components that are mapped to a policy rule (or old traffic profile). The indexing for this table is designed to support the use of an SNMP GET-NEXT operation using only the remote address and remote port as a way for a management station to retrieve the table entries relating to a particular client.') slapm_subcomponent_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 3, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmSubcomponentRemAddress'), (0, 'SLAPM-MIB', 'slapmSubcomponentRemPort'), (0, 'SLAPM-MIB', 'slapmSubcomponentLocalAddress'), (0, 'SLAPM-MIB', 'slapmSubcomponentLocalPort')) if mibBuilder.loadTexts: slapmSubcomponentEntry.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentEntry.setDescription("Describes a particular subcomponent entry. This table does not have an OwnerIndex as part of its indexing since this table's contents is intended to span multiple users.") slapm_subcomponent_rem_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 1), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmSubcomponentRemAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentRemAddress.setDescription('Indicate the remote address of a subcomponent. A remote address can be either an ipv4 address in which case 4 octets are required or as an ipv6 address that requires 16 octets. The value of this subidentifier is a zero length octet string when this entry relates to a UDP listener.') slapm_subcomponent_rem_port = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: slapmSubcomponentRemPort.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentRemPort.setDescription('Indicate the remote port of a subcomponent. The value of this subidentifier is 0 when this entry relates to a UDP listener.') slapm_subcomponent_local_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 3), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmSubcomponentLocalAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLocalAddress.setDescription('Indicate the local address of a subcomponent. A local address can be either an ipv4 address in which case 4 octets are required or as an ipv6 address that requires 16 octets.') slapm_subcomponent_local_port = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: slapmSubcomponentLocalPort.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLocalPort.setDescription('Indicate the local port of a subcomponent.') slapm_subcomponent_protocol = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('udpListener', 1), ('tcpConnection', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentProtocol.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentProtocol.setDescription('Indicate the protocol in use that identifies the type of subcomponent.') slapm_subcomponent_system_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 6), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapm_subcomponent_policy_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 7), slapm_name_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentPolicyName.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentPolicyName.setDescription('Policy name that this entry relates to. This object, along with slapmSubcomponentTrafficProfileName, have been replaced with the use of an unsigned integer index that is mapped to an slapmPolicyNameEntry to actually identify policy naming.') slapm_subcomponent_traffic_profile_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 8), slapm_name_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTrafficProfileName.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentTrafficProfileName.setDescription('The corresponding traffic profile name. This object, along with slapmSubcomponentProfileName, have been replaced with the use of an unsigned integer index that is mapped to an slapmPolicyNameEntry to actually identify policy naming.') slapm_subcomponent_last_activity = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 9), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentLastActivity.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentLastActivity.setDescription('The date and timestamp of when this entry was last used.') slapm_subcomponent_in_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentInOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentInOctets.setDescription('The number of octets received from IP for this connection.') slapm_subcomponent_out_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentOutOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentOutOctets.setDescription('The number of octets sent to IP for this connection.') slapm_subcomponent_tcp_out_buffered_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTcpOutBufferedOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpOutBufferedOctets.setDescription('Number of outgoing octets buffered. The value of this object is zero when the entry is not for a TCP connection.') slapm_subcomponent_tcp_in_buffered_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTcpInBufferedOctets.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpInBufferedOctets.setDescription('Number of incoming octets buffered. The value of this object is zero when the entry is not for a TCP connection.') slapm_subcomponent_tcp_re_xmts = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTcpReXmts.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpReXmts.setDescription('Number of retransmissions. The value of this object is zero when the entry is not for a TCP connection.') slapm_subcomponent_tcp_round_trip_time = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 15), integer32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripTime.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripTime.setDescription('The amount of time that has elapsed, measured in milliseconds, from when the last TCP segment was transmitted by the TCP Stack until the ACK was received. The value of this object is zero when the entry is not for a TCP connection.') slapm_subcomponent_tcp_round_trip_variance = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 16), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripVariance.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentTcpRoundTripVariance.setDescription('Round trip time variance. The value of this object is zero when the entry is not for a TCP connection.') slapm_subcomponent_in_pdus = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentInPdus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentInPdus.setDescription('The number of protocol related data units transferred inbound: slapmSubcomponentProtocol PDU Type udpListener(1) UDP datagrams tcpConnection(2) TCP segments') slapm_subcomponent_out_pdus = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentOutPdus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentOutPdus.setDescription('The number of protocol related data units transferred outbound: slapmSubcomponentProtocol PDU Type udpListener(1) UDP datagrams tcpConnection(2) TCP segments') slapm_subcomponent_appl_name = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 19), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentApplName.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentApplName.setDescription('The application name associated with this entry if known, otherwise a zero-length octet string is returned as the value of this object.') slapm_subcomponent_monitor_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 20), slapm_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentMonitorStatus.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorStatus.setDescription("The value of this object indicates when a monitored value has exceeded a threshold or isn't meeting the defined service level. Only the following SlapmStatus BITS setting can be reported here: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) This object only has meaning when an corresponding slapmPolicyMonitorEntry exists with the slapmPolicyMonitorControl BITS setting monitorSubcomponents(5) enabled.") slapm_subcomponent_monitor_int_time = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 21), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentMonitorIntTime.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorIntTime.setDescription('The timestamp for when the last interval ended. This object only has meaning when an corresponding slapmPRMonEntry (or old slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. All of the octets returned when monitoring is not in effect must be zero.') slapm_subcomponent_monitor_current_in_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 22), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentInRate.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentInRate.setDescription('Using the value of the corresponding slapmPRMonInterval (or slapmPolicyMonitorInterval), slapmSubcomponentStatsInOctets is divided by slapmSubcomponentMonitorInterval to determine the current in transfer rate. This object only has meaning when an corresponding slapmPRMonEntry (or slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. The value of this object is zero when monitoring is not in effect.') slapm_subcomponent_monitor_current_out_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 23), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentOutRate.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentMonitorCurrentOutRate.setDescription('Using the value of the corresponding slapmPRMonInterval (or slapmPolicyMonitorInterva)l, slapmSubcomponentStatsOutOctets is divided by slapmPRMonInterval (or slapmPolicyMonitorInterval) to determine the current out transfer rate. This object only has meaning when an corresponding slapmPRMonEntry (or slapmPolicyMonitorEntry) exists with the slapmPRMonControl (or slapmPolicyMonitorControl) BITS setting monitorSubcomponents(5) enabled. The value of this object is zero when monitoring is not in effect.') slapm_subcomponent_policy_rule_index = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 3, 1, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmSubcomponentPolicyRuleIndex.setStatus('current') if mibBuilder.loadTexts: slapmSubcomponentPolicyRuleIndex.setDescription('Points to an slapmPolicyNameEntry when combined with slapmSubcomponentSystemAddress to indicate the policy naming that relates to this entry. A value of 0 for this object MUST be returned when the corresponding slapmSubcomponentEntry has no policy rule associated with it.') slapm_policy_name_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 4)) if mibBuilder.loadTexts: slapmPolicyNameTable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameTable.setDescription('Provides the mapping between a policy index as a unsigned 32 bit integer and the unique name associated with a policy rule.') slapm_policy_name_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 4, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmPolicyNameSystemAddress'), (0, 'SLAPM-MIB', 'slapmPolicyNameIndex')) if mibBuilder.loadTexts: slapmPolicyNameEntry.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameEntry.setDescription('Defines an entry in the slapmPolicyNameTable.') slapm_policy_name_system_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 1), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmPolicyNameSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameSystemAddress.setDescription('Address of a system that an Policy rule definition relates to. A zero length octet string must be used to indicate that only a single system is being represented. Otherwise, the length of the octet string must be 4 for an ipv4 address or 16 for an ipv6 address.') slapm_policy_name_index = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: slapmPolicyNameIndex.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameIndex.setDescription('A locally arbitrary, but unique identifier associated with this table entry. This value is not expected to remain constant across reIPLs.') slapm_policy_name_of_rule = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 4, 1, 3), slapm_policy_rule_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyNameOfRule.setStatus('current') if mibBuilder.loadTexts: slapmPolicyNameOfRule.setDescription('The unique name that identifies a policy rule definition.') slapm_policy_rule_stats_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 5)) if mibBuilder.loadTexts: slapmPolicyRuleStatsTable.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTable.setDescription('Provides statistics on a per system and a per policy rule basis.') slapm_policy_rule_stats_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 5, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmPolicyNameSystemAddress'), (0, 'SLAPM-MIB', 'slapmPolicyNameIndex')) if mibBuilder.loadTexts: slapmPolicyRuleStatsEntry.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsEntry.setDescription('Defines an entry in the slapmPolicyRuleStatsTable. This table defines a set of statistics that is kept on a per system and per policy rule basis. Entries in this table are not created or deleted via SNMP but reflect the set of policy rule definitions known at a system.') slapm_policy_rule_stats_oper_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inactive', 1), ('active', 2), ('deleteNeeded', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsOperStatus.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOperStatus.setDescription('The state of a policy entry: inactive(1) - An policy entry was either defined by local system definition or discovered via a directory search but has not been activated (not currently being used). active(2) - Policy entry is being used to affect traffic flows. deleteNeeded(3) - Either though local implementation dependent methods or by discovering that the directory entry corresponding to this table entry no longer exists and slapmPolicyPurgeTime needs to expire before attempting to remove the corresponding slapmPolicyStatsEntry and any dependent slapmPolicyMonitor table entries. Note: a policy rule in a state other than active(2) is not being used to affect traffic flows.') slapm_policy_rule_stats_active_conns = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 2), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsActiveConns.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsActiveConns.setDescription('The number of active TCP connections that are affected by the corresponding policy entry.') slapm_policy_rule_stats_total_conns = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalConns.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalConns.setDescription('The number of total TCP connections that are affected by the corresponding policy entry.') slapm_policy_rule_stats_l_activated = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 4), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsLActivated.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsLActivated.setDescription('The timestamp for when the corresponding policy entry was last activated. The value of this object serves as the discontinuity event indicator when polling entries in this table. The value of this object is updated on transition of slapmPolicyRuleStatsOperStatus into the active(2) state.') slapm_policy_rule_stats_last_mapping = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 5), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsLastMapping.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsLastMapping.setDescription('The timestamp for when the last time that the associated policy entry was used.') slapm_policy_rule_stats_in_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsInOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInOctets.setDescription('The number of octets that was received by IP for an entity that map to this entry.') slapm_policy_rule_stats_out_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutOctets.setDescription('The number of octets that was transmitted by IP for an entity that map to this entry.') slapm_policy_rule_stats_conn_limit = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsConnLimit.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsConnLimit.setDescription('The limit for the number of active TCP connections that are allowed for this policy definition. A value of zero for this object implies that a connection limit has not been specified.') slapm_policy_rule_stats_count_accepts = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountAccepts.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountAccepts.setDescription("This counter is incremented when a policy action's Permission value is set to Accept and a session (TCP connection) is accepted.") slapm_policy_rule_stats_count_denies = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountDenies.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsCountDenies.setDescription("This counter is incremented when a policy action's Permission value is set to Deny and a session is denied, or when a session (TCP connection) is rejected due to a policy's connection limit (slapmPolicyRuleStatsConnectLimit) being reached.") slapm_policy_rule_stats_in_discards = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsInDiscards.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInDiscards.setDescription('This counter counts the number of in octets discarded. This occurs when an error is detected. Examples of this are buffer overflow, checksum error, or bad packet format.') slapm_policy_rule_stats_out_discards = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutDiscards.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutDiscards.setDescription('This counter counts the number of out octets discarded. Examples of this are buffer overflow, checksum error, or bad packet format.') slapm_policy_rule_stats_in_packets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsInPackets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInPackets.setDescription('This counter counts the number of in packets received that relate to this policy entry from IP.') slapm_policy_rule_stats_out_packets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutPackets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutPackets.setDescription('This counter counts the number of out packets sent by IP that relate to this policy entry.') slapm_policy_rule_stats_in_pro_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsInProOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsInProOctets.setDescription('This counter counts the number of in octets that are determined to be within profile.') slapm_policy_rule_stats_out_pro_octets = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutProOctets.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsOutProOctets.setDescription('This counter counts the number of out octets that are determined to be within profile.') slapm_policy_rule_stats_min_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 17), unsigned32()).setUnits('Kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsMinRate.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMinRate.setDescription('The minimum transfer rate defined for this entry.') slapm_policy_rule_stats_max_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 18), unsigned32()).setUnits('Kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxRate.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxRate.setDescription('The maximum transfer rate defined for this entry.') slapm_policy_rule_stats_max_delay = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 19), unsigned32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxDelay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsMaxDelay.setDescription('The maximum delay defined for this entry.') slapm_policy_rule_stats_total_rsvp_flows = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalRsvpFlows.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsTotalRsvpFlows.setDescription('Total number of RSVP flows that have be activated.') slapm_policy_rule_stats_act_rsvp_flows = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 5, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPolicyRuleStatsActRsvpFlows.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleStatsActRsvpFlows.setDescription('Current number of active RSVP flows.') slapm_pr_mon_table = mib_table((1, 3, 6, 1, 3, 88, 1, 2, 6)) if mibBuilder.loadTexts: slapmPRMonTable.setStatus('current') if mibBuilder.loadTexts: slapmPRMonTable.setDescription('Provides a method of monitoring policies and their effect at a system.') slapm_pr_mon_entry = mib_table_row((1, 3, 6, 1, 3, 88, 1, 2, 6, 1)).setIndexNames((0, 'SLAPM-MIB', 'slapmPRMonOwnerIndex'), (0, 'SLAPM-MIB', 'slapmPRMonSystemAddress'), (0, 'SLAPM-MIB', 'slapmPRMonIndex')) if mibBuilder.loadTexts: slapmPRMonEntry.setStatus('current') if mibBuilder.loadTexts: slapmPRMonEntry.setDescription('Defines an entry in the slapmPRMonTable. This table defines which policies should be monitored on a per policy rule basis. An attempt to set any read-create object defined within an slapmPRMonEntry while the value of slapmPRMonRowStatus is active(1) will result in an inconsistentValue error.') slapm_pr_mon_owner_index = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 16))) if mibBuilder.loadTexts: slapmPRMonOwnerIndex.setStatus('current') if mibBuilder.loadTexts: slapmPRMonOwnerIndex.setDescription("To facilitate the provisioning of access control by a security administrator using the View-Based Access Control Model (RFC 2575, VACM) for tables in which multiple users may need to independently create or modify entries, the initial index is used as an 'owner index'. Such an initial index has a syntax of SnmpAdminString, and can thus be trivially mapped to a securityName or groupName as defined in VACM, in accordance with a security policy. All entries in that table belonging to a particular user will have the same value for this initial index. For a given user's entries in a particular table, the object identifiers for the information in these entries will have the same subidentifiers (except for the 'column' subidentifier) up to the end of the encoded owner index. To configure VACM to permit access to this portion of the table, one would create vacmViewTreeFamilyTable entries with the value of vacmViewTreeFamilySubtree including the owner index portion, and vacmViewTreeFamilyMask 'wildcarding' the column subidentifier. More elaborate configurations are possible.") slapm_pr_mon_system_address = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 2), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(16, 16)))) if mibBuilder.loadTexts: slapmPRMonSystemAddress.setStatus('current') if mibBuilder.loadTexts: slapmPRMonSystemAddress.setDescription('Address of a system that an Policy definition relates to. A zero length octet string can be used to indicate that only a single system is being represented. Otherwise, the length of the octet string should be 4 for an ipv4 address and 16 for an ipv6 address.') slapm_pr_mon_index = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 3), unsigned32()) if mibBuilder.loadTexts: slapmPRMonIndex.setStatus('current') if mibBuilder.loadTexts: slapmPRMonIndex.setDescription('An slapmPolicyNameTable index, slapmPolicyNameIndex, that points to the unique name associated with a policy rule definition.') slapm_pr_mon_control = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 4), bits().clone(namedValues=named_values(('monitorMinRate', 0), ('monitorMaxRate', 1), ('monitorMaxDelay', 2), ('enableAggregateTraps', 3), ('enableSubcomponentTraps', 4), ('monitorSubcomponents', 5))).clone(namedValues=named_values(('monitorMinRate', 0), ('monitorMaxRate', 1), ('monitorMaxDelay', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonControl.setStatus('current') if mibBuilder.loadTexts: slapmPRMonControl.setDescription("The value of this object determines the type and level of monitoring that is applied to a policy rule. The value of this object can't be changed once the table entry that it is a part of is activated via a slapmPRMonRowStatus transition to active state. monitorMinRate(0) - Monitor minimum transfer rate. monitorMaxRate(1) - Monitor maximum transfer rate. monitorMaxDelay(2) - Monitor maximum delay. enableAggregateTraps(3) - The enableAggregateTraps(3) BITS setting enables notification generation when monitoring a policy rule as an aggregate using the values in the corresponding slapmPRMonStatsEntry. By default this function is not enabled. enableSubcomponentTraps(4) - This BITS setting enables notification generation when monitoring all subcomponents that are mapped to an corresponding slapmPRMonStatsEntry. By default this function is not enabled. monitorSubcomponents(5) - This BITS setting enables monitoring of each subcomponent (typically a TCP connection or UDP listener) individually.") slapm_pr_mon_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 5), slapm_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonStatus.setStatus('current') if mibBuilder.loadTexts: slapmPRMonStatus.setDescription("The value of this object indicates when a monitored value has not meet a threshold or isn't meeting the defined service level. The SlapmStatus TEXTUAL-CONVENTION defines two levels of not meeting a threshold. The first set: slaMinInRateNotAchieved(0), slaMaxInRateExceeded(1), slaMaxDelayExceeded(2), slaMinOutRateNotAchieved(3), slaMaxOutRateExceeded(4) are used to indicate when the SLA as an aggregate is not meeting a threshold while the second set: monitorMinInRateNotAchieved(5), monitorMaxInRateExceeded(6), monitorMaxDelayExceeded(7), monitorMinOutRateNotAchieved(8), monitorMaxOutRateExceeded(9) indicate that at least one subcomponent is not meeting a threshold.") slapm_pr_mon_interval = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(15, 86400)).clone(20)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonInterval.setStatus('current') if mibBuilder.loadTexts: slapmPRMonInterval.setDescription('The number of seconds that defines the sample period.') slapm_pr_mon_int_time = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 7), date_and_time().clone(hexValue='0000000000000000')).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonIntTime.setStatus('current') if mibBuilder.loadTexts: slapmPRMonIntTime.setDescription('The timestamp for when the last interval ended.') slapm_pr_mon_current_in_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 8), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonCurrentInRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentInRate.setDescription('Using the value of the corresponding slapmPRMonInterval, slapmPolicyRuleStatsInOctets is sampled and then divided by slapmPRMonInterval to determine the current in transfer rate.') slapm_pr_mon_current_out_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 9), gauge32()).setUnits('kilobits per second').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonCurrentOutRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentOutRate.setDescription('Using the value of the corresponding slapmPolicyMonInterval, slapmPolicyRuleStatsOutOctets is sampled and then divided by slapmPRMonInterval to determine the current out transfer rate.') slapm_pr_mon_min_rate_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 10), unsigned32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMinRateLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinRateLow.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored minimum transfer rate has not been meet. A slapmPolicyRuleMonNotOkay notification is not generated again for an slapmPRMonEntry until the minimum transfer rate exceeds slapmPRMonMinRateHigh (a slapmPolicyRuleMonOkay notification is then transmitted) and then fails below slapmPRMonMinRateLow. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition minus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_min_rate_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 11), unsigned32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMinRateHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinRateHigh.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored minimum transfer rate has increased to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMinRate(0) is not enabled. When enabled the default value for this object is the min rate value specified in the associated action definition plus 10%. If the action definition doesn't have a min rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMinRate(0) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_max_rate_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 12), unsigned32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMaxRateHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxRateHigh.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored maximum transfer rate has been exceeded. A slapmPolicyRuleNotOkay notification is not generated again for an slapmPRMonEntry until the maximum transfer rate fails below slapmPRMonMaxRateLow (a slapmPolicyRuleMonOkay notification is then transmitted) and then raises above slapmPRMonMaxRateHigh. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition plus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_max_rate_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 13), unsigned32()).setUnits('kilobits per second').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMaxRateLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxRateLow.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored maximum transfer rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMaxRate(1) is not enabled. When enabled the default value for this object is the max rate value specified in the associated action definition minus 10%. If the action definition doesn't have a max rate defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxRate(1) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_max_delay_high = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 14), unsigned32()).setUnits('milliseconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMaxDelayHigh.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayHigh.setDescription("The threshold for generating a slapmPolicyRuleMonNotOkay notification, signalling that a monitored maximum delay rate has been exceeded. A slapmPolicyRuleMonNotOkay notification is not generated again for an slapmPRMonEntry until the maximum delay rate falls below slapmPRMonMaxDelayLow (a slapmPolicyRuleMonOkay notification is then transmitted) and raises above slapmPRMonMaxDelayHigh. This behavior reduces the slapmPolicyRuleMonNotOkay notifications that are transmitted. A value of zero for this object is returned when the slapmPRMonControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition plus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_max_delay_low = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 15), unsigned32()).setUnits('milliseconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonMaxDelayLow.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayLow.setDescription("The threshold for generating a slapmPolicyRuleMonOkay notification, signalling that a monitored maximum delay rate has fallen to an acceptable level. A value of zero for this object is returned when the slapmPRMonControl monitorMaxDelay(4) is not enabled. When enabled the default value for this object is the max delay value specified in the associated action definition minus 10%. If the action definition doesn't have a max delay defined then there is no default for this object and a value MUST be specified prior to activating this entry when monitorMaxDelay(4) is selected. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for any notification relating to this entry to potentially be generated.") slapm_pr_mon_min_in_rate_not_achieves = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonMinInRateNotAchieves.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinInRateNotAchieves.setDescription('The number of times that a minimum transfer in rate was not achieved.') slapm_pr_mon_max_in_rate_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonMaxInRateExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxInRateExceeds.setDescription('The number of times that a maximum transfer in rate was exceeded.') slapm_pr_mon_max_delay_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonMaxDelayExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxDelayExceeds.setDescription('The number of times that a maximum delay in rate was exceeded.') slapm_pr_mon_min_out_rate_not_achieves = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonMinOutRateNotAchieves.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMinOutRateNotAchieves.setDescription('The number of times that a minimum transfer out rate was not achieved.') slapm_pr_mon_max_out_rate_exceeds = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonMaxOutRateExceeds.setStatus('current') if mibBuilder.loadTexts: slapmPRMonMaxOutRateExceeds.setDescription('The number of times that a maximum transfer out rate was exceeded.') slapm_pr_mon_current_delay_rate = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 21), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: slapmPRMonCurrentDelayRate.setStatus('current') if mibBuilder.loadTexts: slapmPRMonCurrentDelayRate.setDescription('The current delay rate for this entry. This is calculated by taking the average of the TCP round trip times for all associating slapmSubcomponentTable entries within a interval.') slapm_pr_mon_row_status = mib_table_column((1, 3, 6, 1, 3, 88, 1, 2, 6, 1, 22), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: slapmPRMonRowStatus.setStatus('current') if mibBuilder.loadTexts: slapmPRMonRowStatus.setDescription('This object allows entries to be created and deleted in the slapmPRMonTable. An entry in this table is deleted by setting this object to destroy(6). Removal of an corresponding (same policy index) slapmPolicyRuleStatsEntry has the side effect of the automatic deletion an entry in this table. Note that an attempt to set any read-create object defined within an slapmPRMonEntry while the value of slapmPRMonRowStatus is active(1) will result in an inconsistentValue error.') slapm_monitored_event_not_achieved = notification_type((1, 3, 6, 1, 3, 88, 0, 1)).setObjects(('SLAPM-MIB', 'slapmPolicyMonitorIntTime'), ('SLAPM-MIB', 'slapmPolicyMonitorControl'), ('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentDelayRate')) if mibBuilder.loadTexts: slapmMonitoredEventNotAchieved.setStatus('deprecated') if mibBuilder.loadTexts: slapmMonitoredEventNotAchieved.setDescription('This notification is generated when an monitored event is not achieved with respect to threshold. This applies only towards monitoring a policy traffic profile as an aggregate via an associating slapmPolicyStatsEntry. The value of slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmPolicyMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_monitored_event_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 2)).setObjects(('SLAPM-MIB', 'slapmPolicyMonitorIntTime'), ('SLAPM-MIB', 'slapmPolicyMonitorControl'), ('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentDelayRate')) if mibBuilder.loadTexts: slapmMonitoredEventOkay.setStatus('deprecated') if mibBuilder.loadTexts: slapmMonitoredEventOkay.setDescription('This notification is generated when a monitored event has improved to an acceptable level. This applies only towards monitoring a policy traffic profile as an aggregate via an associating slapmPolicyStatsEntry. The value of slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmPolicyMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_policy_profile_deleted = notification_type((1, 3, 6, 1, 3, 88, 0, 3)).setObjects(('SLAPM-MIB', 'slapmPolicyStatsActiveConns'), ('SLAPM-MIB', 'slapmPolicyStatsTotalConns'), ('SLAPM-MIB', 'slapmPolicyStatsFirstActivated'), ('SLAPM-MIB', 'slapmPolicyStatsLastMapping'), ('SLAPM-MIB', 'slapmPolicyStatsInOctets'), ('SLAPM-MIB', 'slapmPolicyStatsOutOctets'), ('SLAPM-MIB', 'slapmPolicyStatsConnectionLimit'), ('SLAPM-MIB', 'slapmPolicyStatsCountAccepts'), ('SLAPM-MIB', 'slapmPolicyStatsCountDenies'), ('SLAPM-MIB', 'slapmPolicyStatsInDiscards'), ('SLAPM-MIB', 'slapmPolicyStatsOutDiscards'), ('SLAPM-MIB', 'slapmPolicyStatsInPackets'), ('SLAPM-MIB', 'slapmPolicyStatsOutPackets'), ('SLAPM-MIB', 'slapmPolicyStatsInProfileOctets'), ('SLAPM-MIB', 'slapmPolicyStatsOutProfileOctets'), ('SLAPM-MIB', 'slapmPolicyStatsMinRate'), ('SLAPM-MIB', 'slapmPolicyStatsMaxRate'), ('SLAPM-MIB', 'slapmPolicyStatsMaxDelay')) if mibBuilder.loadTexts: slapmPolicyProfileDeleted.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyProfileDeleted.setDescription('A slapmPolicyDeleted notification is sent when a slapmPolicyStatsEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapm_policy_monitor_deleted = notification_type((1, 3, 6, 1, 3, 88, 0, 4)).setObjects(('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorInterval'), ('SLAPM-MIB', 'slapmPolicyMonitorIntTime'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentDelayRate'), ('SLAPM-MIB', 'slapmPolicyMonitorMinRateLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMinRateHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxRateHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxRateLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMinInRateNotAchieves'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxInRateExceeds'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayExceeds'), ('SLAPM-MIB', 'slapmPolicyMonitorMinOutRateNotAchieves'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxOutRateExceeds')) if mibBuilder.loadTexts: slapmPolicyMonitorDeleted.setStatus('deprecated') if mibBuilder.loadTexts: slapmPolicyMonitorDeleted.setDescription('A slapmPolicyMonitorDeleted notification is sent when a slapmPolicyMonitorEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapm_subcomponent_monitored_event_not_achieved = notification_type((1, 3, 6, 1, 3, 88, 0, 5)).setObjects(('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentPolicyName'), ('SLAPM-MIB', 'slapmSubcomponentTrafficProfileName'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime')) if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventNotAchieved.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventNotAchieved.setDescription('This notification is generated when a monitored value does not achieved a threshold specification. This applies only towards monitoring the individual components of a policy traffic profile. The value of the corresponding slapmPolicyMonitorControl can be examined to determine what is being monitored. The first slapmSubcomponentMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableSubcomponentTraps(4), MUST be selected in order for this notification to potentially be generated.') slapm_subcomponent_monitored_event_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 6)).setObjects(('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentPolicyName'), ('SLAPM-MIB', 'slapmSubcomponentTrafficProfileName'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime')) if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventOkay.setStatus('deprecated') if mibBuilder.loadTexts: slapmSubcomponentMonitoredEventOkay.setDescription('This notification is generated when a monitored value has reached an acceptable level. Note: The corresponding slapmPolicyMonitorControl BITS setting, enableSubcomponentTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_policy_rule_mon_not_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 7)).setObjects(('SLAPM-MIB', 'slapmPRMonIntTime'), ('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonCurrentInRate'), ('SLAPM-MIB', 'slapmPRMonCurrentOutRate'), ('SLAPM-MIB', 'slapmPRMonCurrentDelayRate')) if mibBuilder.loadTexts: slapmPolicyRuleMonNotOkay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonNotOkay.setDescription('This notification is generated when an monitored event is not achieved with respect to a threshold. This applies only towards monitoring a policy rule as an aggregate via an associating slapmPolicyRuleStatsEntry. The value of slapmPRMonControl can be examined to determine what is being monitored. The first slapmPRMonStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_policy_rule_mon_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 8)).setObjects(('SLAPM-MIB', 'slapmPRMonIntTime'), ('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonCurrentInRate'), ('SLAPM-MIB', 'slapmPRMonCurrentOutRate'), ('SLAPM-MIB', 'slapmPRMonCurrentDelayRate')) if mibBuilder.loadTexts: slapmPolicyRuleMonOkay.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonOkay.setDescription('This notification is generated when a monitored event has improved to an acceptable level. This applies only towards monitoring a policy rule as an aggregate via an associating slapmPolicyRuleStatsEntry. The value of slapmPRMonControl can be examined to determine what is being monitored. The first slapmPRMonStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableAggregateTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_policy_rule_deleted = notification_type((1, 3, 6, 1, 3, 88, 0, 9)).setObjects(('SLAPM-MIB', 'slapmPolicyRuleStatsActiveConns'), ('SLAPM-MIB', 'slapmPolicyRuleStatsTotalConns'), ('SLAPM-MIB', 'slapmPolicyRuleStatsLActivated'), ('SLAPM-MIB', 'slapmPolicyRuleStatsLastMapping'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsConnLimit'), ('SLAPM-MIB', 'slapmPolicyRuleStatsCountAccepts'), ('SLAPM-MIB', 'slapmPolicyRuleStatsCountDenies'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInDiscards'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutDiscards'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInPackets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutPackets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInProOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutProOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMinRate'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMaxRate'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMaxDelay'), ('SLAPM-MIB', 'slapmPolicyRuleStatsTotalRsvpFlows'), ('SLAPM-MIB', 'slapmPolicyRuleStatsActRsvpFlows')) if mibBuilder.loadTexts: slapmPolicyRuleDeleted.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleDeleted.setDescription('A slapmPolicyRuleDeleted notification is sent when a slapmPolicyRuleStatsEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapm_policy_rule_mon_deleted = notification_type((1, 3, 6, 1, 3, 88, 0, 10)).setObjects(('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonInterval'), ('SLAPM-MIB', 'slapmPRMonIntTime'), ('SLAPM-MIB', 'slapmPRMonCurrentInRate'), ('SLAPM-MIB', 'slapmPRMonCurrentOutRate'), ('SLAPM-MIB', 'slapmPRMonCurrentDelayRate'), ('SLAPM-MIB', 'slapmPRMonMinRateLow'), ('SLAPM-MIB', 'slapmPRMonMinRateHigh'), ('SLAPM-MIB', 'slapmPRMonMaxRateHigh'), ('SLAPM-MIB', 'slapmPRMonMaxRateLow'), ('SLAPM-MIB', 'slapmPRMonMaxDelayHigh'), ('SLAPM-MIB', 'slapmPRMonMaxDelayLow'), ('SLAPM-MIB', 'slapmPRMonMinInRateNotAchieves'), ('SLAPM-MIB', 'slapmPRMonMaxInRateExceeds'), ('SLAPM-MIB', 'slapmPRMonMaxDelayExceeds'), ('SLAPM-MIB', 'slapmPRMonMinOutRateNotAchieves'), ('SLAPM-MIB', 'slapmPRMonMaxOutRateExceeds')) if mibBuilder.loadTexts: slapmPolicyRuleMonDeleted.setStatus('current') if mibBuilder.loadTexts: slapmPolicyRuleMonDeleted.setDescription('A slapmPolicyRuleMonDeleted notification is sent when a slapmPRMonEntry is deleted if the value of slapmPolicyTrapEnable is enabled(1).') slapm_subc_monitor_not_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 11)).setObjects(('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentPolicyRuleIndex'), ('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime')) if mibBuilder.loadTexts: slapmSubcMonitorNotOkay.setStatus('current') if mibBuilder.loadTexts: slapmSubcMonitorNotOkay.setDescription('This notification is generated when a monitored value does not achieved a threshold specification. This applies only towards monitoring the individual components of a policy rule. The value of the corresponding slapmPRMonControl can be examined to determine what is being monitored. The first slapmSubcomponentMonitorStatus value supplies the current monitor status while the 2nd value supplies the previous status. Note: The corresponding slapmPRMonControl BITS setting, enableSubcomponentTraps(4), MUST be selected in order for this notification to potentially be generated.') slapm_subc_monitor_okay = notification_type((1, 3, 6, 1, 3, 88, 0, 12)).setObjects(('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentPolicyRuleIndex'), ('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime')) if mibBuilder.loadTexts: slapmSubcMonitorOkay.setStatus('current') if mibBuilder.loadTexts: slapmSubcMonitorOkay.setDescription('This notification is generated when a monitored value has reached an acceptable level. Note: The corresponding slapmPRMonControl BITS setting, enableSubcomponentTraps(3), MUST be selected in order for this notification to potentially be generated.') slapm_compliances = mib_identifier((1, 3, 6, 1, 3, 88, 2, 1)) slapm_groups = mib_identifier((1, 3, 6, 1, 3, 88, 2, 2)) slapm_compliance = module_compliance((1, 3, 6, 1, 3, 88, 2, 1, 1)).setObjects(('SLAPM-MIB', 'slapmBaseGroup2'), ('SLAPM-MIB', 'slapmNotGroup2'), ('SLAPM-MIB', 'slapmEndSystemGroup2'), ('SLAPM-MIB', 'slapmEndSystemNotGroup2'), ('SLAPM-MIB', 'slapmBaseGroup'), ('SLAPM-MIB', 'slapmNotGroup'), ('SLAPM-MIB', 'slapmOptionalGroup'), ('SLAPM-MIB', 'slapmEndSystemGroup'), ('SLAPM-MIB', 'slapmEndSystemNotGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_compliance = slapmCompliance.setStatus('current') if mibBuilder.loadTexts: slapmCompliance.setDescription('The compliance statement for the SLAPM-MIB.') slapm_base_group = object_group((1, 3, 6, 1, 3, 88, 2, 2, 1)).setObjects(('SLAPM-MIB', 'slapmSpinLock'), ('SLAPM-MIB', 'slapmPolicyCountQueries'), ('SLAPM-MIB', 'slapmPolicyCountAccesses'), ('SLAPM-MIB', 'slapmPolicyCountSuccessAccesses'), ('SLAPM-MIB', 'slapmPolicyCountNotFounds'), ('SLAPM-MIB', 'slapmPolicyPurgeTime'), ('SLAPM-MIB', 'slapmPolicyTrapEnable'), ('SLAPM-MIB', 'slapmPolicyStatsOperStatus'), ('SLAPM-MIB', 'slapmPolicyStatsActiveConns'), ('SLAPM-MIB', 'slapmPolicyStatsFirstActivated'), ('SLAPM-MIB', 'slapmPolicyStatsLastMapping'), ('SLAPM-MIB', 'slapmPolicyStatsInOctets'), ('SLAPM-MIB', 'slapmPolicyStatsOutOctets'), ('SLAPM-MIB', 'slapmPolicyStatsConnectionLimit'), ('SLAPM-MIB', 'slapmPolicyStatsTotalConns'), ('SLAPM-MIB', 'slapmPolicyStatsCountAccepts'), ('SLAPM-MIB', 'slapmPolicyStatsCountDenies'), ('SLAPM-MIB', 'slapmPolicyStatsInDiscards'), ('SLAPM-MIB', 'slapmPolicyStatsOutDiscards'), ('SLAPM-MIB', 'slapmPolicyStatsInPackets'), ('SLAPM-MIB', 'slapmPolicyStatsOutPackets'), ('SLAPM-MIB', 'slapmPolicyStatsMinRate'), ('SLAPM-MIB', 'slapmPolicyStatsMaxRate'), ('SLAPM-MIB', 'slapmPolicyStatsMaxDelay'), ('SLAPM-MIB', 'slapmPolicyMonitorControl'), ('SLAPM-MIB', 'slapmPolicyMonitorStatus'), ('SLAPM-MIB', 'slapmPolicyMonitorInterval'), ('SLAPM-MIB', 'slapmPolicyMonitorIntTime'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmPolicyMonitorMinRateLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMinRateHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxRateHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxRateLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayHigh'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayLow'), ('SLAPM-MIB', 'slapmPolicyMonitorMinInRateNotAchieves'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxInRateExceeds'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxDelayExceeds'), ('SLAPM-MIB', 'slapmPolicyMonitorMinOutRateNotAchieves'), ('SLAPM-MIB', 'slapmPolicyMonitorMaxOutRateExceeds'), ('SLAPM-MIB', 'slapmPolicyMonitorCurrentDelayRate'), ('SLAPM-MIB', 'slapmPolicyMonitorRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_base_group = slapmBaseGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmBaseGroup.setDescription('The group of objects defined by this MIB that are required for all implementations to be compliant.') slapm_optional_group = object_group((1, 3, 6, 1, 3, 88, 2, 2, 2)).setObjects(('SLAPM-MIB', 'slapmPolicyStatsInProfileOctets'), ('SLAPM-MIB', 'slapmPolicyStatsOutProfileOctets')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_optional_group = slapmOptionalGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmOptionalGroup.setDescription('The group of objects defined by this MIB that are optional.') slapm_end_system_group = object_group((1, 3, 6, 1, 3, 88, 2, 2, 3)).setObjects(('SLAPM-MIB', 'slapmPolicyTrapFilter'), ('SLAPM-MIB', 'slapmSubcomponentProtocol'), ('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentPolicyName'), ('SLAPM-MIB', 'slapmSubcomponentTrafficProfileName'), ('SLAPM-MIB', 'slapmSubcomponentLastActivity'), ('SLAPM-MIB', 'slapmSubcomponentInOctets'), ('SLAPM-MIB', 'slapmSubcomponentOutOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpOutBufferedOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpInBufferedOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpReXmts'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripVariance'), ('SLAPM-MIB', 'slapmSubcomponentInPdus'), ('SLAPM-MIB', 'slapmSubcomponentOutPdus'), ('SLAPM-MIB', 'slapmSubcomponentApplName'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_end_system_group = slapmEndSystemGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmEndSystemGroup.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapm_not_group = notification_group((1, 3, 6, 1, 3, 88, 2, 2, 4)).setObjects(('SLAPM-MIB', 'slapmMonitoredEventNotAchieved'), ('SLAPM-MIB', 'slapmMonitoredEventOkay'), ('SLAPM-MIB', 'slapmPolicyProfileDeleted'), ('SLAPM-MIB', 'slapmPolicyMonitorDeleted')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_not_group = slapmNotGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmNotGroup.setDescription('The group of notifications defined by this MIB that MUST be implemented.') slapm_end_system_not_group = notification_group((1, 3, 6, 1, 3, 88, 2, 2, 5)).setObjects(('SLAPM-MIB', 'slapmSubcomponentMonitoredEventNotAchieved'), ('SLAPM-MIB', 'slapmSubcomponentMonitoredEventOkay')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_end_system_not_group = slapmEndSystemNotGroup.setStatus('deprecated') if mibBuilder.loadTexts: slapmEndSystemNotGroup.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapm_base_group2 = object_group((1, 3, 6, 1, 3, 88, 2, 2, 6)).setObjects(('SLAPM-MIB', 'slapmSpinLock'), ('SLAPM-MIB', 'slapmPolicyCountQueries'), ('SLAPM-MIB', 'slapmPolicyCountAccesses'), ('SLAPM-MIB', 'slapmPolicyCountSuccessAccesses'), ('SLAPM-MIB', 'slapmPolicyCountNotFounds'), ('SLAPM-MIB', 'slapmPolicyPurgeTime'), ('SLAPM-MIB', 'slapmPolicyTrapEnable'), ('SLAPM-MIB', 'slapmPolicyNameOfRule'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOperStatus'), ('SLAPM-MIB', 'slapmPolicyRuleStatsActiveConns'), ('SLAPM-MIB', 'slapmPolicyRuleStatsTotalConns'), ('SLAPM-MIB', 'slapmPolicyRuleStatsLActivated'), ('SLAPM-MIB', 'slapmPolicyRuleStatsLastMapping'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsConnLimit'), ('SLAPM-MIB', 'slapmPolicyRuleStatsCountAccepts'), ('SLAPM-MIB', 'slapmPolicyRuleStatsCountDenies'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInDiscards'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutDiscards'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInPackets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutPackets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsInProOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsOutProOctets'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMinRate'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMaxRate'), ('SLAPM-MIB', 'slapmPolicyRuleStatsMaxDelay'), ('SLAPM-MIB', 'slapmPolicyRuleStatsTotalRsvpFlows'), ('SLAPM-MIB', 'slapmPolicyRuleStatsActRsvpFlows'), ('SLAPM-MIB', 'slapmPRMonControl'), ('SLAPM-MIB', 'slapmPRMonStatus'), ('SLAPM-MIB', 'slapmPRMonInterval'), ('SLAPM-MIB', 'slapmPRMonIntTime'), ('SLAPM-MIB', 'slapmPRMonCurrentInRate'), ('SLAPM-MIB', 'slapmPRMonCurrentOutRate'), ('SLAPM-MIB', 'slapmPRMonMinRateLow'), ('SLAPM-MIB', 'slapmPRMonMinRateHigh'), ('SLAPM-MIB', 'slapmPRMonMaxRateHigh'), ('SLAPM-MIB', 'slapmPRMonMaxRateLow'), ('SLAPM-MIB', 'slapmPRMonMaxDelayHigh'), ('SLAPM-MIB', 'slapmPRMonMaxDelayLow'), ('SLAPM-MIB', 'slapmPRMonMinInRateNotAchieves'), ('SLAPM-MIB', 'slapmPRMonMaxInRateExceeds'), ('SLAPM-MIB', 'slapmPRMonMaxDelayExceeds'), ('SLAPM-MIB', 'slapmPRMonMinOutRateNotAchieves'), ('SLAPM-MIB', 'slapmPRMonMaxOutRateExceeds'), ('SLAPM-MIB', 'slapmPRMonCurrentDelayRate'), ('SLAPM-MIB', 'slapmPRMonRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_base_group2 = slapmBaseGroup2.setStatus('current') if mibBuilder.loadTexts: slapmBaseGroup2.setDescription('The group of objects defined by this MIB that are required for all implementations to be compliant.') slapm_end_system_group2 = object_group((1, 3, 6, 1, 3, 88, 2, 2, 7)).setObjects(('SLAPM-MIB', 'slapmPolicyTrapFilter'), ('SLAPM-MIB', 'slapmSubcomponentProtocol'), ('SLAPM-MIB', 'slapmSubcomponentSystemAddress'), ('SLAPM-MIB', 'slapmSubcomponentLastActivity'), ('SLAPM-MIB', 'slapmSubcomponentInOctets'), ('SLAPM-MIB', 'slapmSubcomponentOutOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpOutBufferedOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpInBufferedOctets'), ('SLAPM-MIB', 'slapmSubcomponentTcpReXmts'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripTime'), ('SLAPM-MIB', 'slapmSubcomponentTcpRoundTripVariance'), ('SLAPM-MIB', 'slapmSubcomponentInPdus'), ('SLAPM-MIB', 'slapmSubcomponentOutPdus'), ('SLAPM-MIB', 'slapmSubcomponentApplName'), ('SLAPM-MIB', 'slapmSubcomponentMonitorStatus'), ('SLAPM-MIB', 'slapmSubcomponentMonitorIntTime'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentOutRate'), ('SLAPM-MIB', 'slapmSubcomponentMonitorCurrentInRate'), ('SLAPM-MIB', 'slapmSubcomponentPolicyRuleIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_end_system_group2 = slapmEndSystemGroup2.setStatus('current') if mibBuilder.loadTexts: slapmEndSystemGroup2.setDescription('The group of objects defined by this MIB that are required for end system implementations.') slapm_not_group2 = notification_group((1, 3, 6, 1, 3, 88, 2, 2, 8)).setObjects(('SLAPM-MIB', 'slapmPolicyRuleMonNotOkay'), ('SLAPM-MIB', 'slapmPolicyRuleMonOkay'), ('SLAPM-MIB', 'slapmPolicyRuleDeleted'), ('SLAPM-MIB', 'slapmPolicyRuleMonDeleted')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_not_group2 = slapmNotGroup2.setStatus('current') if mibBuilder.loadTexts: slapmNotGroup2.setDescription('The group of notifications defined by this MIB that MUST be implemented.') slapm_end_system_not_group2 = notification_group((1, 3, 6, 1, 3, 88, 2, 2, 9)).setObjects(('SLAPM-MIB', 'slapmSubcMonitorNotOkay'), ('SLAPM-MIB', 'slapmSubcMonitorOkay')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): slapm_end_system_not_group2 = slapmEndSystemNotGroup2.setStatus('current') if mibBuilder.loadTexts: slapmEndSystemNotGroup2.setDescription('The group of objects defined by this MIB that are required for end system implementations.') mibBuilder.exportSymbols('SLAPM-MIB', slapmPRMonCurrentOutRate=slapmPRMonCurrentOutRate, slapmPRMonMaxRateLow=slapmPRMonMaxRateLow, slapmPolicyRuleDeleted=slapmPolicyRuleDeleted, slapmPolicyStatsLastMapping=slapmPolicyStatsLastMapping, slapmPolicyMonitorMaxDelayExceeds=slapmPolicyMonitorMaxDelayExceeds, slapmPolicyStatsOutOctets=slapmPolicyStatsOutOctets, slapmPolicyMonitorIntTime=slapmPolicyMonitorIntTime, slapmPolicyRuleStatsCountDenies=slapmPolicyRuleStatsCountDenies, slapmSubcomponentTrafficProfileName=slapmSubcomponentTrafficProfileName, slapmPolicyRuleStatsTotalRsvpFlows=slapmPolicyRuleStatsTotalRsvpFlows, slapmPolicyRuleStatsInPackets=slapmPolicyRuleStatsInPackets, slapmPolicyMonitorMinRateLow=slapmPolicyMonitorMinRateLow, slapmPolicyMonitorCurrentDelayRate=slapmPolicyMonitorCurrentDelayRate, slapmSubcomponentInPdus=slapmSubcomponentInPdus, slapmSubcomponentOutOctets=slapmSubcomponentOutOctets, slapmPolicyStatsInOctets=slapmPolicyStatsInOctets, slapmPolicyMonitorMaxInRateExceeds=slapmPolicyMonitorMaxInRateExceeds, slapmPolicyCountAccesses=slapmPolicyCountAccesses, slapmPolicyStatsPolicyName=slapmPolicyStatsPolicyName, slapmSubcomponentRemPort=slapmSubcomponentRemPort, slapmPolicyMonitorTrafficProfileName=slapmPolicyMonitorTrafficProfileName, slapmPolicyMonitorMaxRateHigh=slapmPolicyMonitorMaxRateHigh, slapmMonitoredEventOkay=slapmMonitoredEventOkay, slapmOptionalGroup=slapmOptionalGroup, slapmPolicyRuleStatsCountAccepts=slapmPolicyRuleStatsCountAccepts, slapmPRMonTable=slapmPRMonTable, slapmPolicyStatsInDiscards=slapmPolicyStatsInDiscards, slapmSubcomponentPolicyName=slapmSubcomponentPolicyName, slapmPRMonMinOutRateNotAchieves=slapmPRMonMinOutRateNotAchieves, slapmSubcomponentOutPdus=slapmSubcomponentOutPdus, slapmPolicyMonitorControl=slapmPolicyMonitorControl, slapmSubcomponentMonitorCurrentInRate=slapmSubcomponentMonitorCurrentInRate, slapmPolicyRuleStatsTable=slapmPolicyRuleStatsTable, slapmPolicyRuleStatsOperStatus=slapmPolicyRuleStatsOperStatus, slapmSubcomponentTcpRoundTripVariance=slapmSubcomponentTcpRoundTripVariance, slapmMIB=slapmMIB, slapmPolicyRuleMonNotOkay=slapmPolicyRuleMonNotOkay, slapmPolicyStatsTrafficProfileName=slapmPolicyStatsTrafficProfileName, slapmPolicyRuleStatsInDiscards=slapmPolicyRuleStatsInDiscards, slapmPolicyStatsTable=slapmPolicyStatsTable, slapmSubcomponentMonitoredEventOkay=slapmSubcomponentMonitoredEventOkay, slapmPolicyNameTable=slapmPolicyNameTable, slapmPolicyStatsCountAccepts=slapmPolicyStatsCountAccepts, slapmPolicyStatsOutDiscards=slapmPolicyStatsOutDiscards, slapmBaseGroup2=slapmBaseGroup2, slapmObjects=slapmObjects, slapmPolicyMonitorCurrentInRate=slapmPolicyMonitorCurrentInRate, slapmPRMonMaxDelayLow=slapmPRMonMaxDelayLow, slapmPolicyStatsFirstActivated=slapmPolicyStatsFirstActivated, slapmPRMonIntTime=slapmPRMonIntTime, slapmPolicyRuleStatsTotalConns=slapmPolicyRuleStatsTotalConns, slapmPRMonRowStatus=slapmPRMonRowStatus, slapmPolicyStatsActiveConns=slapmPolicyStatsActiveConns, slapmPolicyMonitorMinInRateNotAchieves=slapmPolicyMonitorMinInRateNotAchieves, slapmSubcomponentApplName=slapmSubcomponentApplName, slapmEndSystemGroup2=slapmEndSystemGroup2, slapmEndSystemNotGroup2=slapmEndSystemNotGroup2, slapmSubcomponentLocalPort=slapmSubcomponentLocalPort, slapmPolicyStatsOutProfileOctets=slapmPolicyStatsOutProfileOctets, slapmPRMonCurrentInRate=slapmPRMonCurrentInRate, slapmPolicyRuleStatsActiveConns=slapmPolicyRuleStatsActiveConns, slapmEndSystemNotGroup=slapmEndSystemNotGroup, slapmPolicyMonitorMaxOutRateExceeds=slapmPolicyMonitorMaxOutRateExceeds, slapmPolicyRuleStatsOutProOctets=slapmPolicyRuleStatsOutProOctets, slapmPolicyStatsOutPackets=slapmPolicyStatsOutPackets, slapmPolicyStatsMinRate=slapmPolicyStatsMinRate, slapmPolicyMonitorMaxRateLow=slapmPolicyMonitorMaxRateLow, slapmSubcomponentTcpInBufferedOctets=slapmSubcomponentTcpInBufferedOctets, slapmPolicyStatsOperStatus=slapmPolicyStatsOperStatus, slapmPRMonMaxOutRateExceeds=slapmPRMonMaxOutRateExceeds, slapmPRMonMinRateLow=slapmPRMonMinRateLow, slapmSubcomponentRemAddress=slapmSubcomponentRemAddress, slapmBaseObjects=slapmBaseObjects, slapmPolicyMonitorMaxDelayHigh=slapmPolicyMonitorMaxDelayHigh, slapmSubcomponentLocalAddress=slapmSubcomponentLocalAddress, slapmPRMonIndex=slapmPRMonIndex, slapmBaseGroup=slapmBaseGroup, slapmPolicyCountQueries=slapmPolicyCountQueries, slapmPolicyRuleStatsConnLimit=slapmPolicyRuleStatsConnLimit, slapmCompliance=slapmCompliance, slapmPolicyMonitorRowStatus=slapmPolicyMonitorRowStatus, slapmConformance=slapmConformance, slapmPolicyRuleStatsActRsvpFlows=slapmPolicyRuleStatsActRsvpFlows, slapmPolicyRuleMonDeleted=slapmPolicyRuleMonDeleted, slapmPolicyMonitorPolicyName=slapmPolicyMonitorPolicyName, slapmPolicyMonitorTable=slapmPolicyMonitorTable, slapmPRMonMinRateHigh=slapmPRMonMinRateHigh, slapmCompliances=slapmCompliances, slapmPolicyMonitorMinRateHigh=slapmPolicyMonitorMinRateHigh, slapmPolicyPurgeTime=slapmPolicyPurgeTime, slapmPRMonMaxRateHigh=slapmPRMonMaxRateHigh, slapmPRMonMaxDelayExceeds=slapmPRMonMaxDelayExceeds, slapmPolicyNameIndex=slapmPolicyNameIndex, slapmPolicyRuleStatsMinRate=slapmPolicyRuleStatsMinRate, slapmEndSystemGroup=slapmEndSystemGroup, slapmPRMonMaxDelayHigh=slapmPRMonMaxDelayHigh, slapmNotifications=slapmNotifications, slapmPolicyStatsCountDenies=slapmPolicyStatsCountDenies, slapmPolicyRuleStatsLActivated=slapmPolicyRuleStatsLActivated, slapmSubcMonitorNotOkay=slapmSubcMonitorNotOkay, slapmPolicyRuleStatsLastMapping=slapmPolicyRuleStatsLastMapping, slapmPRMonMinInRateNotAchieves=slapmPRMonMinInRateNotAchieves, slapmPolicyTrapFilter=slapmPolicyTrapFilter, slapmSubcomponentMonitorStatus=slapmSubcomponentMonitorStatus, slapmPolicyCountNotFounds=slapmPolicyCountNotFounds, slapmSubcomponentLastActivity=slapmSubcomponentLastActivity, slapmPolicyRuleStatsInOctets=slapmPolicyRuleStatsInOctets, slapmPolicyMonitorOwnerIndex=slapmPolicyMonitorOwnerIndex, slapmPRMonCurrentDelayRate=slapmPRMonCurrentDelayRate, slapmSubcomponentMonitorIntTime=slapmSubcomponentMonitorIntTime, slapmSubcomponentSystemAddress=slapmSubcomponentSystemAddress, slapmPolicyMonitorEntry=slapmPolicyMonitorEntry, slapmPolicyRuleMonOkay=slapmPolicyRuleMonOkay, slapmPolicyRuleStatsMaxDelay=slapmPolicyRuleStatsMaxDelay, slapmSubcomponentTable=slapmSubcomponentTable, slapmPRMonInterval=slapmPRMonInterval, SlapmStatus=SlapmStatus, PYSNMP_MODULE_ID=slapmMIB, slapmPolicyMonitorStatus=slapmPolicyMonitorStatus, slapmSubcomponentProtocol=slapmSubcomponentProtocol, slapmSubcomponentTcpOutBufferedOctets=slapmSubcomponentTcpOutBufferedOctets, slapmPRMonOwnerIndex=slapmPRMonOwnerIndex, slapmSubcomponentInOctets=slapmSubcomponentInOctets, slapmSpinLock=slapmSpinLock, slapmPolicyMonitorMinOutRateNotAchieves=slapmPolicyMonitorMinOutRateNotAchieves, slapmPolicyStatsSystemAddress=slapmPolicyStatsSystemAddress, slapmPolicyMonitorDeleted=slapmPolicyMonitorDeleted, slapmPolicyStatsInPackets=slapmPolicyStatsInPackets, slapmPolicyStatsInProfileOctets=slapmPolicyStatsInProfileOctets, slapmSubcomponentTcpRoundTripTime=slapmSubcomponentTcpRoundTripTime, slapmNotGroup=slapmNotGroup, slapmPolicyRuleStatsOutOctets=slapmPolicyRuleStatsOutOctets, slapmSubcomponentPolicyRuleIndex=slapmSubcomponentPolicyRuleIndex, slapmPRMonControl=slapmPRMonControl, slapmPolicyNameEntry=slapmPolicyNameEntry, slapmPRMonSystemAddress=slapmPRMonSystemAddress, slapmPolicyStatsEntry=slapmPolicyStatsEntry, SlapmNameType=SlapmNameType, slapmPolicyMonitorCurrentOutRate=slapmPolicyMonitorCurrentOutRate, slapmPolicyStatsTotalConns=slapmPolicyStatsTotalConns, slapmPolicyTrapEnable=slapmPolicyTrapEnable, SlapmPolicyRuleName=SlapmPolicyRuleName, slapmSubcomponentTcpReXmts=slapmSubcomponentTcpReXmts, slapmPolicyRuleStatsEntry=slapmPolicyRuleStatsEntry, slapmPolicyStatsConnectionLimit=slapmPolicyStatsConnectionLimit, slapmPRMonStatus=slapmPRMonStatus, slapmPolicyNameOfRule=slapmPolicyNameOfRule, slapmPolicyMonitorSystemAddress=slapmPolicyMonitorSystemAddress, slapmTableObjects=slapmTableObjects, slapmGroups=slapmGroups, slapmPolicyStatsMaxRate=slapmPolicyStatsMaxRate, slapmPolicyRuleStatsOutPackets=slapmPolicyRuleStatsOutPackets, slapmMonitoredEventNotAchieved=slapmMonitoredEventNotAchieved, slapmPolicyNameSystemAddress=slapmPolicyNameSystemAddress, slapmSubcMonitorOkay=slapmSubcMonitorOkay, slapmPolicyRuleStatsInProOctets=slapmPolicyRuleStatsInProOctets, slapmPolicyMonitorInterval=slapmPolicyMonitorInterval, slapmPolicyProfileDeleted=slapmPolicyProfileDeleted, slapmSubcomponentMonitoredEventNotAchieved=slapmSubcomponentMonitoredEventNotAchieved, slapmSubcomponentEntry=slapmSubcomponentEntry, slapmPolicyRuleStatsMaxRate=slapmPolicyRuleStatsMaxRate, slapmPolicyCountSuccessAccesses=slapmPolicyCountSuccessAccesses, slapmPRMonEntry=slapmPRMonEntry, slapmPolicyStatsMaxDelay=slapmPolicyStatsMaxDelay, slapmSubcomponentMonitorCurrentOutRate=slapmSubcomponentMonitorCurrentOutRate, slapmPRMonMaxInRateExceeds=slapmPRMonMaxInRateExceeds, slapmPolicyRuleStatsOutDiscards=slapmPolicyRuleStatsOutDiscards, slapmPolicyMonitorMaxDelayLow=slapmPolicyMonitorMaxDelayLow, slapmNotGroup2=slapmNotGroup2)
# To format the names in title case input_first_name=input("Enter the first name: ") input_last_name= input("Enter the last name: ") def format_name(first_name,last_name): first_name = first_name.title() last_name = last_name.title() full_name = first_name + " "+last_name return full_name name = format_name(input_first_name,input_last_name) print(name)
input_first_name = input('Enter the first name: ') input_last_name = input('Enter the last name: ') def format_name(first_name, last_name): first_name = first_name.title() last_name = last_name.title() full_name = first_name + ' ' + last_name return full_name name = format_name(input_first_name, input_last_name) print(name)
def determine_dim_size(dim_modalities, pick_modalities): if len(pick_modalities) < len(dim_modalities): dim_modalities = [dim_modalities[mod_idx] for mod_idx in pick_modalities] return dim_modalities def prepare_batch(multidimensional_ts, split_modalities, pick_modalities, dim_modalities): if split_modalities: sig = list() start_idx = 0 for mod_idx, mod_dim in zip(pick_modalities, dim_modalities): end_idx = start_idx + mod_dim sig.append(multidimensional_ts[..., start_idx:end_idx]) start_idx = end_idx else: sig = multidimensional_ts return sig
def determine_dim_size(dim_modalities, pick_modalities): if len(pick_modalities) < len(dim_modalities): dim_modalities = [dim_modalities[mod_idx] for mod_idx in pick_modalities] return dim_modalities def prepare_batch(multidimensional_ts, split_modalities, pick_modalities, dim_modalities): if split_modalities: sig = list() start_idx = 0 for (mod_idx, mod_dim) in zip(pick_modalities, dim_modalities): end_idx = start_idx + mod_dim sig.append(multidimensional_ts[..., start_idx:end_idx]) start_idx = end_idx else: sig = multidimensional_ts return sig
################################################################# # # # Program Code for Spot Micro MRL # # Of the Cyber_One YouTube Channel # # https://www.youtube.com/cyber_one # # # # This is version 0.1 # # Divided up into sub programs # # Coded for the Nixie Version of MyRobotLab. # # # # Running on MyRobotLab (MRL) http://myrobotlab.org/ # # Spot Micro MRL is a set of Python scripts that run inside # # the MRL system # # # # Start.py # # This file starts the GUI if required and runs all the # # other files required for the Spot Micro robot to run. # # # ################################################################# # Because you might want to place your robots files into a # # different dicrectory compared to what I have, # # the RunningFolder variable is the name of the folder you # # will be using. # ################################################################# RuningFolder="Spot" ################################################################# # The execfile() function loads and executes the named program. # # This is handy for breaking a program into smaller more # # manageable parts. # # This file is the system configuration file. # ################################################################# execfile(RuningFolder+'/1_Configuration/1_Sys_Config.py') ################################################################# # Before we get too carried away, I plan to start Spot using a # # shell script called start_spot.sh # # This will start the MRL and the Spot scripts with no # # Graphical User Interfaces (GUI) at all. # # Under normal conditions, this would be desirable as spot # # doesn't have a monitor at all, however we can connect to it # # with VNC which does give us a monitor so we may want a GUI. # # To overcome this issue, we will start the GUI here. # # # # Python uses indentation or white space to show each of the # # lines to be executed as part of an if statement. # # In the first if statement, there is only one indented line # # following, then we have a blank line (for clarity) before # # we have another if statement. The second If statement needs # # to execute a number of line, and you can see these lines are # # all indented. There is also one nested if statement. # ################################################################# if RunWebGUI == True: plan = runtime.load("webgui","WebGui") config = plan.get("webgui") config.autoStartBrowser = False runtime.start("webgui", "WebGui") #WebGui = Runtime.create("WebGui","WebGui") #WebGui.hide('cli') #sleep(1) #WebGui.show('cli') #sleep(1) #WebGui.set('cli', 400, 400, 999) ############################################################# # if you don't want the browser to autostart to homepage # # then set the autoStartBrowser to False # ############################################################# #if RunWebGUIbrowser == False: # WebGui.autoStartBrowser(False) ############################################################# # set a different port number to listen to. default is 8888 # # WebGui.setPort(7777) # # on startup the WebGui will look for a "resources" # # directory (may change in the future) # # static html files can be placed here and accessed # # through the WebGui service starts the websocket server # # and attempts to autostart browser unless it was disabled # ############################################################# #WebGui.startService(); ################################################################# # Load in the Common Variables used to help track and control # # various functions # ################################################################# execfile(RuningFolder+'/Common_Variables.py') ################################################################# # Controllers.py starts the major controller interface services # # such as the Raspberry Pi service and the Adafruit Servo # # controller services # # This is also where you would start any Arduino services you # # might want to add like the Nano for the Ultra-Sonic sensors. # ################################################################# execfile(RuningFolder+'/Controllers.py') ################################################################# # The IO services are for things like the PIR, Ultrasonic # range finders and NeoPixel rings ect. ################################################################# execfile(RuningFolder+'/IO.py') ################################################################# # The next is for the different servos we will be running. # # This set of files are responsible for starting and # # configuring each of the servos throughout the robot. # ################################################################# execfile(RuningFolder+'/Servos.py') ################################################################# # There are a number of options for Text To Speech (TTS) and # # Speech To Text (STT) service. You will need to have a look # # in this file to select which ones you want to use. # ################################################################# #execfile(RuningFolder+'/Speech.py') ################################################################# # When not activly executing a command, we don't want the # # robot to just stand there, This file is responsible for # # giving our robot a bitof life. # # By blinking the eyes, coordinating the left and right eyes # # and performing other random like movements, just to make our # # robot appear to be alive. # ################################################################# execfile(RuningFolder+'/Life.py') ################################################################# # When not activly executing a command, we don't want the # # robot to just stand there, This file is responsible for # # giving our robot a bitof life. # # By blinking the eyes, coordinating the left and right eyes # # and performing other random like movements, just to make our # # robot appear to be alive. # ################################################################# execfile(RuningFolder+'/Gestures.py') ################################################################# # If your robot has cameras in it's eye, then we may want to # # add in Open Computer Vison to help the robot make sense of # # the world around it. # ################################################################# #execfile(RuningFolder+'/OpenCV.py') ################################################################# # This file sets up the WebKitSpeechRecognition service # # The MarySpeech TTS service and the ProgramAB service that # # interperates the Alice2 AIML files # ################################################################# #execfile(RuningFolder+'/Brain.py')
runing_folder = 'Spot' execfile(RuningFolder + '/1_Configuration/1_Sys_Config.py') if RunWebGUI == True: plan = runtime.load('webgui', 'WebGui') config = plan.get('webgui') config.autoStartBrowser = False runtime.start('webgui', 'WebGui') execfile(RuningFolder + '/Common_Variables.py') execfile(RuningFolder + '/Controllers.py') execfile(RuningFolder + '/IO.py') execfile(RuningFolder + '/Servos.py') execfile(RuningFolder + '/Life.py') execfile(RuningFolder + '/Gestures.py')
def printg(grid, name): print( '%s: [' % name) for row in grid: print( row) print( ']') def dist(p, q): dx = abs(p[0] - q[0]) dy = abs(p[1] - q[1]) return dx + dy; def reconstruct_path(came_from, current): total_path = [current] while current in came_from.keys(): current = came_from[current] total_path.append(current) return list(reversed(total_path)) def neighbours(node, grid, score, tail, ignore_list): width = len(grid) height = len(grid[0]) subtail = [] if score >= len(tail): subtail = [tuple(x) for x in tail] else: subtail = [tuple(x) for x in tail[len(tail)-score:]] result = [] if (node[0] > 0): result.append((node[0]-1,node[1])) if (node[0] < width-1): result.append((node[0]+1,node[1])) if (node[1] > 0): result.append((node[0],node[1]-1)) if (node[1] < height-1): result.append((node[0],node[1]+1)) result = filter(lambda p: (grid[p[0]][p[1]] not in ignore_list) or (p in subtail), result) return result def a_star(start, goal, grid, tail): start = tuple(start) goal = tuple(goal) closed_set = [] open_set = [start] came_from = {} #empty map #for x in range(len(grid[y])) g_score = [[10000 for x in range(len(grid[y]))] for y in range(len(grid))] g_score[start[0]][start[1]] = 0 f_score = [[10000 for x in range(len(grid[y]))] for y in range(len(grid))] f_score[start[0]][start[1]] = dist(start,goal) while(len(open_set) > 0): current = min(open_set, key=lambda p: f_score[p[0]][p[1]]) if (current == goal): return reconstruct_path(came_from, goal) open_set.remove(current) closed_set.append(current) for neighbour in neighbours(current, grid, g_score[current[0]][current[1]], tail,[1,2,5]): if neighbour in closed_set: continue tentative_g_score = g_score[current[0]][current[1]] + dist(current,neighbour) if neighbour not in open_set: open_set.append(neighbour) elif tentative_g_score >= g_score[neighbour[0]][neighbour[1]]: continue came_from[neighbour] = current g_score[neighbour[0]][neighbour[1]] = tentative_g_score f_score[neighbour[0]][neighbour[1]] = tentative_g_score + dist(neighbour,goal) return None
def printg(grid, name): print('%s: [' % name) for row in grid: print(row) print(']') def dist(p, q): dx = abs(p[0] - q[0]) dy = abs(p[1] - q[1]) return dx + dy def reconstruct_path(came_from, current): total_path = [current] while current in came_from.keys(): current = came_from[current] total_path.append(current) return list(reversed(total_path)) def neighbours(node, grid, score, tail, ignore_list): width = len(grid) height = len(grid[0]) subtail = [] if score >= len(tail): subtail = [tuple(x) for x in tail] else: subtail = [tuple(x) for x in tail[len(tail) - score:]] result = [] if node[0] > 0: result.append((node[0] - 1, node[1])) if node[0] < width - 1: result.append((node[0] + 1, node[1])) if node[1] > 0: result.append((node[0], node[1] - 1)) if node[1] < height - 1: result.append((node[0], node[1] + 1)) result = filter(lambda p: grid[p[0]][p[1]] not in ignore_list or p in subtail, result) return result def a_star(start, goal, grid, tail): start = tuple(start) goal = tuple(goal) closed_set = [] open_set = [start] came_from = {} g_score = [[10000 for x in range(len(grid[y]))] for y in range(len(grid))] g_score[start[0]][start[1]] = 0 f_score = [[10000 for x in range(len(grid[y]))] for y in range(len(grid))] f_score[start[0]][start[1]] = dist(start, goal) while len(open_set) > 0: current = min(open_set, key=lambda p: f_score[p[0]][p[1]]) if current == goal: return reconstruct_path(came_from, goal) open_set.remove(current) closed_set.append(current) for neighbour in neighbours(current, grid, g_score[current[0]][current[1]], tail, [1, 2, 5]): if neighbour in closed_set: continue tentative_g_score = g_score[current[0]][current[1]] + dist(current, neighbour) if neighbour not in open_set: open_set.append(neighbour) elif tentative_g_score >= g_score[neighbour[0]][neighbour[1]]: continue came_from[neighbour] = current g_score[neighbour[0]][neighbour[1]] = tentative_g_score f_score[neighbour[0]][neighbour[1]] = tentative_g_score + dist(neighbour, goal) return None
msg_soc='BA:?' msg_p='P:?' msg_ppvt='PV:?' msg_conso='CON:?' soc=101 try: tree = etree.parse(configGet('tmpFileDataXml')) for datas in tree.xpath("/devices/device/datas/data"): if datas.get("id") in configGet('lcd','dataPrint'): for data in datas.getchildren(): if data.tag == "value": if datas.get("id") == 'SOC': msg_soc='BA:'+data.text + '%' soc=data.text elif datas.get("id") == 'P': msg_p = 'P:'+data.text + 'W' elif datas.get("id") == 'PPVT': msg_ppvt = 'PV:'+data.text + 'W' elif datas.get("id") == 'CONSO' and data.text != 'NODATA': msg_conso = 'CON:'+data.text + 'W' except: debugTerm("Erreur dans la lecture du XML la syntax n'est pas bonne ?") # Construction de l'affichage lcd.clear() nb_ligne1_space=lcd_columns-len(msg_soc)-len(msg_p) ligne1_msg=msg_soc for nb_space1 in range(nb_ligne1_space): ligne1_msg=ligne1_msg+' ' ligne1_msg=ligne1_msg+msg_p nb_ligne2_space=lcd_columns-len(msg_ppvt)-len(msg_conso) ligne2_msg=msg_ppvt for nb_space2 in range(nb_ligne2_space): ligne2_msg=ligne2_msg+' ' ligne2_msg=ligne2_msg+msg_conso lcd.message = ligne1_msg+'\n'+ligne2_msg debugTerm('Affichage\n' + ligne1_msg+'\n'+ligne2_msg) if etat_lcd == True: if float(soc) >= 94 and float(soc) < 100: # Vert lcd.color = [0, 100, 0] elif float(soc) <= 85: # Rouge lcd.color = [100, 0, 0] elif float(soc) > 85: # Jaune lcd.color = [100, 100, 0] else: lcd.color = [100, 100, 100]
msg_soc = 'BA:?' msg_p = 'P:?' msg_ppvt = 'PV:?' msg_conso = 'CON:?' soc = 101 try: tree = etree.parse(config_get('tmpFileDataXml')) for datas in tree.xpath('/devices/device/datas/data'): if datas.get('id') in config_get('lcd', 'dataPrint'): for data in datas.getchildren(): if data.tag == 'value': if datas.get('id') == 'SOC': msg_soc = 'BA:' + data.text + '%' soc = data.text elif datas.get('id') == 'P': msg_p = 'P:' + data.text + 'W' elif datas.get('id') == 'PPVT': msg_ppvt = 'PV:' + data.text + 'W' elif datas.get('id') == 'CONSO' and data.text != 'NODATA': msg_conso = 'CON:' + data.text + 'W' except: debug_term("Erreur dans la lecture du XML la syntax n'est pas bonne ?") lcd.clear() nb_ligne1_space = lcd_columns - len(msg_soc) - len(msg_p) ligne1_msg = msg_soc for nb_space1 in range(nb_ligne1_space): ligne1_msg = ligne1_msg + ' ' ligne1_msg = ligne1_msg + msg_p nb_ligne2_space = lcd_columns - len(msg_ppvt) - len(msg_conso) ligne2_msg = msg_ppvt for nb_space2 in range(nb_ligne2_space): ligne2_msg = ligne2_msg + ' ' ligne2_msg = ligne2_msg + msg_conso lcd.message = ligne1_msg + '\n' + ligne2_msg debug_term('Affichage\n' + ligne1_msg + '\n' + ligne2_msg) if etat_lcd == True: if float(soc) >= 94 and float(soc) < 100: lcd.color = [0, 100, 0] elif float(soc) <= 85: lcd.color = [100, 0, 0] elif float(soc) > 85: lcd.color = [100, 100, 0] else: lcd.color = [100, 100, 100]
HP_SERIAL_FORMAT_DEFAULT = "auto" HP_SERIAL_FORMAT_CHOICES = ["auto", "yaml", "pickle"] HP_ACTION_PREFIX_DEFAULT = "hp"
hp_serial_format_default = 'auto' hp_serial_format_choices = ['auto', 'yaml', 'pickle'] hp_action_prefix_default = 'hp'
class TranslatorExceptions(Exception): def __init__(self, message): super().__init__() self.message = message class LangDoesNotExists(TranslatorExceptions): def __init__(self): super().__init__( 'Requested language does not exists\nTry to run \'lang\' command to be familiar with supported languages') class EnglishNotFound(TranslatorExceptions): def __init__(self): super().__init__('Either source language or destination language has to be English') class InvalidApiKey(TranslatorExceptions): def __init__(self): super().__init__('Make sure that your API Key is valid')
class Translatorexceptions(Exception): def __init__(self, message): super().__init__() self.message = message class Langdoesnotexists(TranslatorExceptions): def __init__(self): super().__init__("Requested language does not exists\nTry to run 'lang' command to be familiar with supported languages") class Englishnotfound(TranslatorExceptions): def __init__(self): super().__init__('Either source language or destination language has to be English') class Invalidapikey(TranslatorExceptions): def __init__(self): super().__init__('Make sure that your API Key is valid')
{ "targets": [ { "target_name": "mtrace", "sources": [ "mtrace.cc" ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ] } ] }
{'targets': [{'target_name': 'mtrace', 'sources': ['mtrace.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")']}]}
class Node: def __init__(self, data, parent=None): self.parent = parent self.data = data self.left = None self.right = None def leftChild(self, left): self.left = Node(left, self) def rightChild(self, right): self.right = Node(right, self) def __str__(self): return self.data def ask(node): ans = input(str(node.data) + " Y/N ") if ans.upper() == 'Y': return node.left else: return node.right root = Node("Does it bark?") root.leftChild("Dog") root.rightChild("Cat") response = root while True: response = ask(response) if response.left == None: new = input("Is it a " + str(response.data) + "? Y/N ") if new.upper() == 'y': print('Thanks for playing!') quit() else: # TODO make the user ask a question to differaniate their animal to the guess # Then add that to database for the binary tree print("FAILURE!") quit()
class Node: def __init__(self, data, parent=None): self.parent = parent self.data = data self.left = None self.right = None def left_child(self, left): self.left = node(left, self) def right_child(self, right): self.right = node(right, self) def __str__(self): return self.data def ask(node): ans = input(str(node.data) + ' Y/N ') if ans.upper() == 'Y': return node.left else: return node.right root = node('Does it bark?') root.leftChild('Dog') root.rightChild('Cat') response = root while True: response = ask(response) if response.left == None: new = input('Is it a ' + str(response.data) + '? Y/N ') if new.upper() == 'y': print('Thanks for playing!') quit() else: print('FAILURE!') quit()
class Solution: def isPalindrome(self, s: str) -> bool: formattedString = ''.join([c.lower() for c in s if c.isalnum()]) if formattedString == formattedString[::-1]: return True return False
class Solution: def is_palindrome(self, s: str) -> bool: formatted_string = ''.join([c.lower() for c in s if c.isalnum()]) if formattedString == formattedString[::-1]: return True return False
VERSION = (0, 0, 2, 3) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'django.chatbot.apps.DjangoChatBotConfig'
version = (0, 0, 2, 3) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'django.chatbot.apps.DjangoChatBotConfig'
# Use right join to merge the movie_to_genres and pop_movies tables genres_movies = movie_to_genres.merge(pop_movies, how='right', left_on='movie_id', right_on='id') # Count the number of genres genre_count = genres_movies.groupby('genre').agg({'id':'count'}) # Plot a bar chart of the genre_count genre_count.plot(kind='bar') plt.show()
genres_movies = movie_to_genres.merge(pop_movies, how='right', left_on='movie_id', right_on='id') genre_count = genres_movies.groupby('genre').agg({'id': 'count'}) genre_count.plot(kind='bar') plt.show()
counter = 10 sums = 1 k = 2 currLast = 1 while counter > 0: k += 1 while sums < (k + 1) ** 2: currLast += 1 sums += currLast if sums == (k + 1) ** 2: counter -= 1 print (k + 1), currLast
counter = 10 sums = 1 k = 2 curr_last = 1 while counter > 0: k += 1 while sums < (k + 1) ** 2: curr_last += 1 sums += currLast if sums == (k + 1) ** 2: counter -= 1 (print(k + 1), currLast)
CONVERT_JSON_TO_YAML = { "type": "post", "endpoint": "/convertJSONtoYAML", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" } CONVERT_RANGE_FROM_TO = { "type": "get", "endpoint": "/convertRangeFromTo", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" } CONVERT_TEXT_FILE_FROM_TO = { "type": "get", "endpoint": "/convertTextFileFromTo", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" } CONVERT_YAML_TO_JSON = { "type": "post", "endpoint": "/convertYAMLtoJSON", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" } COPY_FILE = { "type": "get", "endpoint": "/copyFile", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" } GET_FILE = { "type": "get", "endpoint": "/getFile", "call_message": "{type} {endpoint}", "error_message": "{type} {endpoint} {response_code}" }
convert_json_to_yaml = {'type': 'post', 'endpoint': '/convertJSONtoYAML', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'} convert_range_from_to = {'type': 'get', 'endpoint': '/convertRangeFromTo', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'} convert_text_file_from_to = {'type': 'get', 'endpoint': '/convertTextFileFromTo', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'} convert_yaml_to_json = {'type': 'post', 'endpoint': '/convertYAMLtoJSON', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'} copy_file = {'type': 'get', 'endpoint': '/copyFile', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'} get_file = {'type': 'get', 'endpoint': '/getFile', 'call_message': '{type} {endpoint}', 'error_message': '{type} {endpoint} {response_code}'}
number = 0 total = 0 while number != -1: total += number number = float(input("Please enter a positive number (-1 to stop):")) print(total)
number = 0 total = 0 while number != -1: total += number number = float(input('Please enter a positive number (-1 to stop):')) print(total)
# # PySNMP MIB module ZHONE-CARD-DIAGNOSTICS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZHONE-CARD-DIAGNOSTICS-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:46:50 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection") InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ModuleIdentity, MibIdentifier, TimeTicks, iso, Unsigned32, ObjectIdentity, Integer32, NotificationType, Bits, Counter64, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "MibIdentifier", "TimeTicks", "iso", "Unsigned32", "ObjectIdentity", "Integer32", "NotificationType", "Bits", "Counter64", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Counter32") DateAndTime, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "DisplayString", "TextualConvention") zhoneSlotIndex, zhoneCard, zhoneModules, zhoneShelfIndex = mibBuilder.importSymbols("Zhone", "zhoneSlotIndex", "zhoneCard", "zhoneModules", "zhoneShelfIndex") ZhoneDiagAction, ZhoneDiagResult, ZhoneRowStatus = mibBuilder.importSymbols("Zhone-TC", "ZhoneDiagAction", "ZhoneDiagResult", "ZhoneRowStatus") zhoneCardDiagnosticsModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 5504, 6, 11)) zhoneCardDiagnosticsModule.setRevisions(('2010-03-05 14:05', '2009-05-14 09:39', '2009-05-07 22:37', '2009-01-12 15:36', '2008-10-22 05:28', '2006-07-24 11:28', '2001-11-14 15:28', '2001-08-30 11:21', '2001-08-27 18:14', '2001-06-28 12:01', '2001-06-26 12:40', '2000-12-12 16:30', '2000-10-19 19:45', '2000-10-17 10:32', '2000-09-12 11:07',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setRevisionsDescriptions(('V01.00.14 change tactestresults to persistent', 'V01.00.13 add optional parameters for line test', 'V01.00.12 mtac name changes', 'add trap for mtac ringer power bus fault alarm', 'Changing the mtac name into tac and removing the name metallic.', 'V01.00.09 - Add new Mtac test controls for the Legerity Test Suite.', 'V01.00.08. Added comments for mtactestmode', 'V01.00.07 - Modify description of zhoneCardDiagType to include specific diagnostics for T3TDM card', 'V01.00.06 - Modify description of zhoneCardDiagType to include specific diagnostics for VASP card - Add DEFVAL for zhoneCardDiagType - Modify DEFVAL for zhoneCardDiagRepetition, zhoneCardDiagDuration', 'V01.00.05 - fix the 17 slot problem', 'V01.00.04 - Added zhoneMetallicTest Table entry,and also added the markups. Removed zhoneCardDiagIndex field from zhoneCardDiagObjects. ', 'V01.00.03 - move zhoneCardDiagNextIndex into table.', 'V01.00.02 - Corrected revision information.', 'VO1.00.01 - Added ZHONE_KEYWORD markup.', 'V01.00.00 - Initial Release',)) if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setLastUpdated('201003030930Z') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setOrganization('Zhone Technologies, Inc.') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setContactInfo(' Postal: Zhone Technologies, Inc. @ Zhone Way 7001 Oakport Street Oakland, CA 94621 USA Toll-Free: +1 877-ZHONE20 (+1 877-946-6320) Tel: +1-510-777-7000 Fax: +1-510-777-7001 E-mail: support@zhone.com') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setDescription('Contains the diagnostics and results available on a per card or resource basis.') zhoneCardDiagNextTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5), ) if mibBuilder.loadTexts: zhoneCardDiagNextTable.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextTable.setDescription('Augment table of the unit/card resource but specific to the diagnostic results information. This card contains the index to create diagnostics table entries (zhoneCardDiagEntry) which contains all the data for executing and obtaining diagnostic results.') zhoneCardDiagNextEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5, 1), ).setIndexNames((0, "Zhone", "zhoneShelfIndex"), (0, "Zhone", "zhoneSlotIndex")) if mibBuilder.loadTexts: zhoneCardDiagNextEntry.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextEntry.setDescription('This is the card diagnostics next index table which contains all the data for: - index for creating next zhoneCardDiagEntry.') zhoneCardDiagNextIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagNextIndex.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextIndex.setDescription('We allow ten diagnostic requests from multiple interfaces. The diagNextIndex represents the next available diagnostic request handle for requesting a diagnostic. NOTE: this operates as a wrap-around counter starting at 1 and wrapping around to 1 after reaching 10.') zhoneCardDiagTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6), ) if mibBuilder.loadTexts: zhoneCardDiagTable.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagTable.setDescription('Augment table of the unit/card resource but specific to the diagnostic results information. This is the card diagnostics table which contains all the data for executing and obtaining diagnostic results.') zhoneCardDiagEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1), ).setIndexNames((0, "Zhone", "zhoneShelfIndex"), (0, "Zhone", "zhoneSlotIndex"), (0, "ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagIndex")) if mibBuilder.loadTexts: zhoneCardDiagEntry.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagEntry.setDescription('This is the card diagnostics table which contains all the data for: - invoking diagnostics, - obtaining diagnostic results.') zhoneCardDiagIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))) if mibBuilder.loadTexts: zhoneCardDiagIndex.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagIndex.setDescription('We allow ten diagnostic requests from multiple interfaces. The diagIndex represents the diagnostic request to start a diagnostic or obtain test results for a completed diagnostic. NOTE: this operates as a wrap-around counter starting at 1 and wrapping around to 1 after reaching 10.') zhoneCardDiagType = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("selftest", 1), ("supvBus", 2), ("cardEEprom", 3), ("frbus", 4), ("pcmcia", 5), ("shelfLamp", 6), ("realTimeClock", 7), ("fanTray", 8), ("shelfMonitor", 9), ("ioCard", 10), ("mezzanineCard", 11), ("backPlane", 12), ("midPlane", 13))).clone('selftest')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneCardDiagType.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagType.setDescription("This field specifies the diagnostic to execute. The default value is 'selftest'. NOTE: not all of the individual diagnostics are available on every Zhone card type. NOTE: Zhone card types (cardZhoneType) are defined in the genCardResources.mib List of possible diagnostics: ============================ Common to all PLS cards ----------------------- selftest(1) - this diagnostic will execute all of the individual tests available on this card. Supports: diagStart, diagStop, diagRepetition. cardEEprom(3) - this diagnostic will verify the main card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. frbus(4) - this diagnostic will verify that the BAN slot card can access the Fhrame Bus by doing a loopback with 10 message of 100 bytes. Supports: diagStart, diagStop, diagRepetition. backPlane(12) - this diagnostic will verify that the BAN slot card can access the back plane by verifying the back plane EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::infoServices(3) specific --------------------------------------- supvBus(2) - this diagnostic will verify that the BAN slot card can access the supervisory Bus by doing a loopback of 20 bytes. Supports: diagStart, diagStop, diagRepetition. pcmcia(5) - this diagnostic will verify that the InfoServ card can access the PCMCIA flash card I/O by doing a file create, write, and read of length 4000 bytes. Supports: diagStart, diagStop, diagRepetition. shelfLamp(6) - this diagnostic will illuminate the shelf alarm indicators for a period of 1.5 seconds. The indicators will return to their original settings after the diagnostic completes. Supports: diagStart, diagStop, diagRepetition. realTimeClk(7) - this diagnostic will verify that the real time clock increments. Supports: diagStart, diagStop, diagRepetition. fanTray(8) - this diagnostic tests that the fan tray is operational by verifying the fan tray EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. shelfMonitor(9) - this diagnostic tests the shelf monitor board is operational by checking the POST status register and verifying the shelf monitor board EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::vasp(5) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. mezzanineCard(11) - this diagnostic will test that the mezzanine card is operational by verifying the mezzanine card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::t3Tdm(6) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::ethernet(9) specific ----------------------------------- midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::hdsl2(10) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. mezzanineCard(11) - this diagnostic will test that the mezzanine card is operational by verifying the mezzanine card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition.") zhoneCardDiagAction = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 3), ZhoneDiagAction().clone('diagStart')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneCardDiagAction.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagAction.setDescription('The diagAction field represents the diagnostic operation to execute. Current supported actions are as follows: diagStart : begin diagnostics and initialize results. diagStop : stop diagnostics if not yet complete. diagSuspend: suspend diagnostics at current point. diagResume : resume diagnostics from point of suspension.') zhoneCardDiagRepetition = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneCardDiagRepetition.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagRepetition.setDescription('This field specifies the number of repetitions of diagnostics to execute. The default value is 1. NOTE: this field operates as an OR with the diagDuration field. If this field is set to non-zero then the diagnostics will be executed that amount of repetitions.') zhoneCardDiagDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600)).clone(60)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneCardDiagDuration.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagDuration.setDescription('This field specifies the duration of diagnostics to execute. The default value is 60 seconds. NOTE: this field operates as an OR with the diagRepetition field. If this field is set to non-zero then the diagnostics will be executed that amount of time.') zhoneCardDiagResult = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 6), ZhoneDiagResult()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagResult.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagResult.setDescription('This represents the overall diagnostic result.') zhoneCardDiagPassCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagPassCount.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagPassCount.setDescription('The number of diagnostics that executed successfully.') zhoneCardDiagFailCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagFailCount.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagFailCount.setDescription('The number of diagnostics that have failed.') zhoneCardDiagDetails = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagDetails.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagDetails.setDescription('The failure reason, if any, for the last diagnostic which has executed. NOTE: An empty string indicates that no additional information is available.') zhoneCardDiagStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 10), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagStartTime.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagStartTime.setDescription('Starting date and time of last selftest execution.') zhoneCardDiagEndTime = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 11), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneCardDiagEndTime.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagEndTime.setDescription('Ending date and time of last selftest execution.') zhoneCardDiagRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 12), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneCardDiagRowStatus.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagRowStatus.setDescription('In any case where a new row can be created either via the cli or zms there will always be a proprietary mib entity of type ZhoneRowStatus which has the basic equivalence of the standard rowstatus object_id.') zhoneTacTestTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7), ) if mibBuilder.loadTexts: zhoneTacTestTable.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestTable.setDescription('This table contains one entry for each tac test channel available on Zhone devices. In the initial release only the primary channel (1) is supported. Future line cards may support the second channel. If the second channel is supported the row will be populated, if the second channel is not supported a get will return no such instance. ') zhoneTacTestEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1), ).setIndexNames((0, "ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacIndex")) if mibBuilder.loadTexts: zhoneTacTestEntry.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestEntry.setDescription('One row per tac test channel.') zhoneTacIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))) if mibBuilder.loadTexts: zhoneTacIndex.setStatus('current') if mibBuilder.loadTexts: zhoneTacIndex.setDescription('This field is the index field for the tac test channel which will be connected on the external port. This device supports a maximum of two channels, one or both channels may be supported by a device depending on which lines cards are installed.') zhoneTacInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacInterfaceIndex.setStatus('current') if mibBuilder.loadTexts: zhoneTacInterfaceIndex.setDescription('This field contains the InterfaceIndex of the physical line to be tested. If no line is currently being tested this value is 0. The ability of a physical line type to support tac test may vary depending on the line cards installed and the external test equipment. This field may not be modified when an tac test is in progress as indicated by a non-zero value in this field and the test mode set to one of tacModeLookIn, tacModeLookOut or tacModeBridge') zhoneTacTestMode = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("mtacModeBridge", 1), ("mtacModeLookIn", 2), ("mtacModeLookOut", 3), ("mtacModeNone", 4))).clone('mtacModeNone')).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestMode.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestMode.setDescription('This field is used to set the mtac test mode for a given line. The options are: mtacModeBridge - All traffic on the given line is bridged across the mtac lines mtacModeLookIn - All outbound traffic on the given line originates exclusively to the mtac lines mtacModeLookIn - All inbound traffic on the given line originates exclusively to the mtac lines mtacModeNone - No mtac test is in progress. The mtac test mode may be changed only if the zhoneInterfaceIndex is set, Otherwise it defaults to mtacModeNone. And can be changed again by setting InterfaceIndex to non-zero values. ') zhoneTacTestId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=NamedValues(("none", 1), ("runAllTests", 2), ("abortTest", 3), ("calibration", 4), ("foreignDCVoltage", 5), ("foreignACVoltage", 6), ("dcLoopResistance", 7), ("threeElementInsulationResistance", 8), ("fiveElementInsulationResistance", 9), ("threeElementCapacitance", 10), ("receiverOffHook", 11), ("distanceToOpen", 12), ("foreignACCurrents", 13), ("ringerEquivalencyNumber", 14), ("dtmfAndPulseDigitMeasurement", 15), ("noiseMeasurement", 16), ("signalToNoiseRatio", 17), ("arbitrarySignalToneMeasurement", 18), ("toneGeneration", 19), ("transHybridLoss", 20), ("drawAndBreakDialTone", 21), ("inwardCurrent", 22), ("dcFeedSelf", 23), ("onAndOffHookSelfTest", 24), ("ringingSelfTest", 25), ("ringingMonitor", 26), ("meteringSelfTest", 27), ("transmissionSelfTest", 28), ("dialingSelfTest", 29), ("howlerTest", 30), ("fuseTest", 31), ("readLoopAndBatteryConditions", 32))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestId.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestId.setDescription('This object is only valid for Tac Cards which support the new Legerity Suite of tests. This object identifies which test is to be run, or can be set to abort the current test. Test results are sent to the zhoneTacTestResultsTable. There are 3 Legerity software packages: Basic Test (VCP-BT), Advanced Test (VCP-AT), and Advanced Test Plus (VCP-ATP). We currently support Basic Test package. The following lists which tests are supported in each software package. Calibration VCP-ATP Foreign DC Voltage Test VCP-BT, VCP-AT, VCP-ATP Foreign AC VoltageTest VCP-BT, VCP-AT, VCP-ATP DC Loop Resistance Test VCP-BT, VCP-AT, VCP-ATP Three-Element Insulation Resistance Test VCP-BT, VCP-AT, VCP-ATP Five-Element Insulation Resistance Test VCP-ATP Three-Element Capacitance Test VCP-BT, VCP-AT Receiver Off-Hook Test VCP-BT, VCP-AT, VCP-ATP Distance to Open Test VCP-BT, VCP-AT Foreign AC Currents Test VCP-BT, VCP-AT Ringer Equivalency Number Test VCP-BT, VCP-AT, VCP-ATP DTMF and Pulse Digit Measurement Test VCP-BT, VCP-AT Noise Measurement Test VCP-BT, VCP-AT, VCP-ATP Signal to Noise Ratio Test VCP-ATP Arbitrary Single Tone Measurement Test VCP-ATP Tone Generation Test VCP-BT, VCP-AT Trans-Hybrid Loss Test VCP-BT, VCP-AT, VCP-ATP Draw and Break Dial Tone Test VCP-BT, VCP-AT Inward Current Test VCP-ATP DC Feed Self-Test VCP-BT, VCP-AT, VCP-ATP On/Off Hook Self-Test VCP-BT, VCP-AT, VCP-ATP Ringing Self-Test VCP-BT, VCP-AT, VCP-ATP Ringing Monitor Test VCP-BT, VCP-AT, VCP-ATP Metering Self-Test VCP-BT, VCP-AT Transmission Self-Test VCP-BT, VCP-AT, VCP-ATP Dialing Sef Test VCP-BT, VCP-AT Howler Test VCP-BT, VCP-AT Fuse Test VCP-ATP Read Loop and Battery Conditions VCP-BT, VCP-AT, VCP-ATP ') zhoneTacTestParam1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestParam1.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam1.setDescription('Optional Test Parameter #1') zhoneTacTestParam2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestParam2.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam2.setDescription('Optional Test Paramerter #2') zhoneTacTestParam3 = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestParam3.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam3.setDescription('Optional Test Parameter #3') zhoneTacTestParam4 = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestParam4.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam4.setDescription('Optional Test Parameter #4') zhoneTacTestParam5 = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneTacTestParam5.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam5.setDescription('Optional Test Parameter #5 Value: 0x00000001 Force Line-Test mode') zhoneTacTestResultsTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12), ) if mibBuilder.loadTexts: zhoneTacTestResultsTable.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTable.setDescription('Table of Tac Test Results objects. Indexed by same index as zhoneTacTestTable. This table is only valid for Tac cards which support the Legerity Suite of tests.') zhoneTacTestResultsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1), ).setIndexNames((0, "ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacIndex")) if mibBuilder.loadTexts: zhoneTacTestResultsEntry.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsEntry.setDescription('Entry of Test Results objects. Indexed by same index as zhoneTacTestEntry. This entry is only valid for Tac cards which support the Legerity Suite of tests.') zhoneTacTestResultsTimeStarted = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 1), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneTacTestResultsTimeStarted.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTimeStarted.setDescription('Description.') zhoneTacTestResultsTimeEnded = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneTacTestResultsTimeEnded.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTimeEnded.setDescription('Description.') zhoneTacTestResultStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("testNotStarted", 1), ("testInProgress", 2), ("testCompleted", 3), ("testAborted", 4), ("testNotSupported", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneTacTestResultStatus.setReference('Contains the test status.') if mibBuilder.loadTexts: zhoneTacTestResultStatus.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultStatus.setDescription('Contains test results.') zhoneTacTestResultsOutput = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 8000))).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneTacTestResultsOutput.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsOutput.setDescription("For Legerity Test Suite, results of test(s) are output to this object as one string, separated by UNIX '/n' for newline characters and terminated by the NULL character. This test results will persist until the next test is run or until tac card reboot.") zhoneTacTestTraps = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13)) if mibBuilder.loadTexts: zhoneTacTestTraps.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestTraps.setDescription('Traps for the tac system.') zhoneRingerTraps = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0)) if mibBuilder.loadTexts: zhoneRingerTraps.setStatus('current') if mibBuilder.loadTexts: zhoneRingerTraps.setDescription('Traps associated with ring generator. Traps should be added below - the .0 on this entry is required.') zhoneRingerStatusAlarm = NotificationType((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0, 1)) if mibBuilder.loadTexts: zhoneRingerStatusAlarm.setStatus('current') if mibBuilder.loadTexts: zhoneRingerStatusAlarm.setDescription('This trap occurs when a ring signal fails to be detected, or when it re-starts after failure.') zhoneRingerBusFaultAlarm = NotificationType((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0, 2)) if mibBuilder.loadTexts: zhoneRingerBusFaultAlarm.setStatus('current') if mibBuilder.loadTexts: zhoneRingerBusFaultAlarm.setDescription('This trap occurs when a fault in the ringer power bus is detected. Such fault may be caused by the possible shortage in the POTS or DSL line.') zhoneCardDiagObjects = ObjectGroup((1, 3, 6, 1, 4, 1, 5504, 6, 11, 1)).setObjects(("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagNextIndex"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagType"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagAction"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagRepetition"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagDuration"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagResult"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagPassCount"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagFailCount"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagDetails"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagStartTime"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagEndTime"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneCardDiagRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhoneCardDiagObjects = zhoneCardDiagObjects.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagObjects.setDescription('This group contains objects associated with Zhone Card Diagnostics') zhoneTacTestObjects = ObjectGroup((1, 3, 6, 1, 4, 1, 5504, 6, 11, 2)).setObjects(("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacInterfaceIndex"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestMode"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestId"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestResultsTimeStarted"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestResultsTimeEnded"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestResultStatus"), ("ZHONE-CARD-DIAGNOSTICS-MIB", "zhoneTacTestResultsOutput")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhoneTacTestObjects = zhoneTacTestObjects.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestObjects.setDescription('This group contains objects associated with initiating tac tests') mibBuilder.exportSymbols("ZHONE-CARD-DIAGNOSTICS-MIB", zhoneCardDiagDetails=zhoneCardDiagDetails, zhoneTacTestMode=zhoneTacTestMode, zhoneRingerBusFaultAlarm=zhoneRingerBusFaultAlarm, zhoneCardDiagNextIndex=zhoneCardDiagNextIndex, zhoneTacTestResultsTimeEnded=zhoneTacTestResultsTimeEnded, zhoneCardDiagEntry=zhoneCardDiagEntry, zhoneTacTestParam4=zhoneTacTestParam4, zhoneCardDiagRowStatus=zhoneCardDiagRowStatus, zhoneTacIndex=zhoneTacIndex, zhoneTacTestParam1=zhoneTacTestParam1, zhoneTacInterfaceIndex=zhoneTacInterfaceIndex, zhoneTacTestTable=zhoneTacTestTable, zhoneRingerTraps=zhoneRingerTraps, zhoneCardDiagStartTime=zhoneCardDiagStartTime, zhoneTacTestResultsOutput=zhoneTacTestResultsOutput, zhoneTacTestResultsTimeStarted=zhoneTacTestResultsTimeStarted, zhoneCardDiagResult=zhoneCardDiagResult, zhoneCardDiagPassCount=zhoneCardDiagPassCount, zhoneTacTestTraps=zhoneTacTestTraps, zhoneCardDiagTable=zhoneCardDiagTable, zhoneCardDiagObjects=zhoneCardDiagObjects, zhoneCardDiagnosticsModule=zhoneCardDiagnosticsModule, zhoneTacTestParam2=zhoneTacTestParam2, zhoneTacTestParam5=zhoneTacTestParam5, zhoneCardDiagNextTable=zhoneCardDiagNextTable, zhoneCardDiagEndTime=zhoneCardDiagEndTime, zhoneTacTestEntry=zhoneTacTestEntry, zhoneTacTestResultStatus=zhoneTacTestResultStatus, zhoneTacTestId=zhoneTacTestId, zhoneTacTestResultsEntry=zhoneTacTestResultsEntry, zhoneCardDiagDuration=zhoneCardDiagDuration, zhoneTacTestObjects=zhoneTacTestObjects, zhoneCardDiagNextEntry=zhoneCardDiagNextEntry, zhoneTacTestParam3=zhoneTacTestParam3, zhoneCardDiagFailCount=zhoneCardDiagFailCount, zhoneCardDiagIndex=zhoneCardDiagIndex, zhoneCardDiagAction=zhoneCardDiagAction, zhoneTacTestResultsTable=zhoneTacTestResultsTable, zhoneCardDiagRepetition=zhoneCardDiagRepetition, zhoneRingerStatusAlarm=zhoneRingerStatusAlarm, zhoneCardDiagType=zhoneCardDiagType, PYSNMP_MODULE_ID=zhoneCardDiagnosticsModule)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_range_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection') (interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (module_identity, mib_identifier, time_ticks, iso, unsigned32, object_identity, integer32, notification_type, bits, counter64, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'MibIdentifier', 'TimeTicks', 'iso', 'Unsigned32', 'ObjectIdentity', 'Integer32', 'NotificationType', 'Bits', 'Counter64', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'Counter32') (date_and_time, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DateAndTime', 'DisplayString', 'TextualConvention') (zhone_slot_index, zhone_card, zhone_modules, zhone_shelf_index) = mibBuilder.importSymbols('Zhone', 'zhoneSlotIndex', 'zhoneCard', 'zhoneModules', 'zhoneShelfIndex') (zhone_diag_action, zhone_diag_result, zhone_row_status) = mibBuilder.importSymbols('Zhone-TC', 'ZhoneDiagAction', 'ZhoneDiagResult', 'ZhoneRowStatus') zhone_card_diagnostics_module = module_identity((1, 3, 6, 1, 4, 1, 5504, 6, 11)) zhoneCardDiagnosticsModule.setRevisions(('2010-03-05 14:05', '2009-05-14 09:39', '2009-05-07 22:37', '2009-01-12 15:36', '2008-10-22 05:28', '2006-07-24 11:28', '2001-11-14 15:28', '2001-08-30 11:21', '2001-08-27 18:14', '2001-06-28 12:01', '2001-06-26 12:40', '2000-12-12 16:30', '2000-10-19 19:45', '2000-10-17 10:32', '2000-09-12 11:07')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setRevisionsDescriptions(('V01.00.14 change tactestresults to persistent', 'V01.00.13 add optional parameters for line test', 'V01.00.12 mtac name changes', 'add trap for mtac ringer power bus fault alarm', 'Changing the mtac name into tac and removing the name metallic.', 'V01.00.09 - Add new Mtac test controls for the Legerity Test Suite.', 'V01.00.08. Added comments for mtactestmode', 'V01.00.07 - Modify description of zhoneCardDiagType to include specific diagnostics for T3TDM card', 'V01.00.06 - Modify description of zhoneCardDiagType to include specific diagnostics for VASP card - Add DEFVAL for zhoneCardDiagType - Modify DEFVAL for zhoneCardDiagRepetition, zhoneCardDiagDuration', 'V01.00.05 - fix the 17 slot problem', 'V01.00.04 - Added zhoneMetallicTest Table entry,and also added the markups. Removed zhoneCardDiagIndex field from zhoneCardDiagObjects. ', 'V01.00.03 - move zhoneCardDiagNextIndex into table.', 'V01.00.02 - Corrected revision information.', 'VO1.00.01 - Added ZHONE_KEYWORD markup.', 'V01.00.00 - Initial Release')) if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setLastUpdated('201003030930Z') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setOrganization('Zhone Technologies, Inc.') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setContactInfo(' Postal: Zhone Technologies, Inc. @ Zhone Way 7001 Oakport Street Oakland, CA 94621 USA Toll-Free: +1 877-ZHONE20 (+1 877-946-6320) Tel: +1-510-777-7000 Fax: +1-510-777-7001 E-mail: support@zhone.com') if mibBuilder.loadTexts: zhoneCardDiagnosticsModule.setDescription('Contains the diagnostics and results available on a per card or resource basis.') zhone_card_diag_next_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5)) if mibBuilder.loadTexts: zhoneCardDiagNextTable.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextTable.setDescription('Augment table of the unit/card resource but specific to the diagnostic results information. This card contains the index to create diagnostics table entries (zhoneCardDiagEntry) which contains all the data for executing and obtaining diagnostic results.') zhone_card_diag_next_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5, 1)).setIndexNames((0, 'Zhone', 'zhoneShelfIndex'), (0, 'Zhone', 'zhoneSlotIndex')) if mibBuilder.loadTexts: zhoneCardDiagNextEntry.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextEntry.setDescription('This is the card diagnostics next index table which contains all the data for: - index for creating next zhoneCardDiagEntry.') zhone_card_diag_next_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagNextIndex.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagNextIndex.setDescription('We allow ten diagnostic requests from multiple interfaces. The diagNextIndex represents the next available diagnostic request handle for requesting a diagnostic. NOTE: this operates as a wrap-around counter starting at 1 and wrapping around to 1 after reaching 10.') zhone_card_diag_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6)) if mibBuilder.loadTexts: zhoneCardDiagTable.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagTable.setDescription('Augment table of the unit/card resource but specific to the diagnostic results information. This is the card diagnostics table which contains all the data for executing and obtaining diagnostic results.') zhone_card_diag_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1)).setIndexNames((0, 'Zhone', 'zhoneShelfIndex'), (0, 'Zhone', 'zhoneSlotIndex'), (0, 'ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagIndex')) if mibBuilder.loadTexts: zhoneCardDiagEntry.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagEntry.setDescription('This is the card diagnostics table which contains all the data for: - invoking diagnostics, - obtaining diagnostic results.') zhone_card_diag_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))) if mibBuilder.loadTexts: zhoneCardDiagIndex.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagIndex.setDescription('We allow ten diagnostic requests from multiple interfaces. The diagIndex represents the diagnostic request to start a diagnostic or obtain test results for a completed diagnostic. NOTE: this operates as a wrap-around counter starting at 1 and wrapping around to 1 after reaching 10.') zhone_card_diag_type = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('selftest', 1), ('supvBus', 2), ('cardEEprom', 3), ('frbus', 4), ('pcmcia', 5), ('shelfLamp', 6), ('realTimeClock', 7), ('fanTray', 8), ('shelfMonitor', 9), ('ioCard', 10), ('mezzanineCard', 11), ('backPlane', 12), ('midPlane', 13))).clone('selftest')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneCardDiagType.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagType.setDescription("This field specifies the diagnostic to execute. The default value is 'selftest'. NOTE: not all of the individual diagnostics are available on every Zhone card type. NOTE: Zhone card types (cardZhoneType) are defined in the genCardResources.mib List of possible diagnostics: ============================ Common to all PLS cards ----------------------- selftest(1) - this diagnostic will execute all of the individual tests available on this card. Supports: diagStart, diagStop, diagRepetition. cardEEprom(3) - this diagnostic will verify the main card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. frbus(4) - this diagnostic will verify that the BAN slot card can access the Fhrame Bus by doing a loopback with 10 message of 100 bytes. Supports: diagStart, diagStop, diagRepetition. backPlane(12) - this diagnostic will verify that the BAN slot card can access the back plane by verifying the back plane EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::infoServices(3) specific --------------------------------------- supvBus(2) - this diagnostic will verify that the BAN slot card can access the supervisory Bus by doing a loopback of 20 bytes. Supports: diagStart, diagStop, diagRepetition. pcmcia(5) - this diagnostic will verify that the InfoServ card can access the PCMCIA flash card I/O by doing a file create, write, and read of length 4000 bytes. Supports: diagStart, diagStop, diagRepetition. shelfLamp(6) - this diagnostic will illuminate the shelf alarm indicators for a period of 1.5 seconds. The indicators will return to their original settings after the diagnostic completes. Supports: diagStart, diagStop, diagRepetition. realTimeClk(7) - this diagnostic will verify that the real time clock increments. Supports: diagStart, diagStop, diagRepetition. fanTray(8) - this diagnostic tests that the fan tray is operational by verifying the fan tray EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. shelfMonitor(9) - this diagnostic tests the shelf monitor board is operational by checking the POST status register and verifying the shelf monitor board EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::vasp(5) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. mezzanineCard(11) - this diagnostic will test that the mezzanine card is operational by verifying the mezzanine card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::t3Tdm(6) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::ethernet(9) specific ----------------------------------- midPlane(13) - this diagnostic will verify that the mid plane card is present by verifying the mid plane card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. cardZhoneType::hdsl2(10) specific --------------------------------- ioCard(10) - this diagnostic will verify that the I/O card is present by verifying the I/O card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition. mezzanineCard(11) - this diagnostic will test that the mezzanine card is operational by verifying the mezzanine card EEPROM checksum. Supports: diagStart, diagStop, diagRepetition.") zhone_card_diag_action = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 3), zhone_diag_action().clone('diagStart')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneCardDiagAction.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagAction.setDescription('The diagAction field represents the diagnostic operation to execute. Current supported actions are as follows: diagStart : begin diagnostics and initialize results. diagStop : stop diagnostics if not yet complete. diagSuspend: suspend diagnostics at current point. diagResume : resume diagnostics from point of suspension.') zhone_card_diag_repetition = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(1)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneCardDiagRepetition.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagRepetition.setDescription('This field specifies the number of repetitions of diagnostics to execute. The default value is 1. NOTE: this field operates as an OR with the diagDuration field. If this field is set to non-zero then the diagnostics will be executed that amount of repetitions.') zhone_card_diag_duration = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 600)).clone(60)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneCardDiagDuration.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagDuration.setDescription('This field specifies the duration of diagnostics to execute. The default value is 60 seconds. NOTE: this field operates as an OR with the diagRepetition field. If this field is set to non-zero then the diagnostics will be executed that amount of time.') zhone_card_diag_result = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 6), zhone_diag_result()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagResult.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagResult.setDescription('This represents the overall diagnostic result.') zhone_card_diag_pass_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagPassCount.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagPassCount.setDescription('The number of diagnostics that executed successfully.') zhone_card_diag_fail_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagFailCount.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagFailCount.setDescription('The number of diagnostics that have failed.') zhone_card_diag_details = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagDetails.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagDetails.setDescription('The failure reason, if any, for the last diagnostic which has executed. NOTE: An empty string indicates that no additional information is available.') zhone_card_diag_start_time = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 10), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagStartTime.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagStartTime.setDescription('Starting date and time of last selftest execution.') zhone_card_diag_end_time = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 11), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneCardDiagEndTime.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagEndTime.setDescription('Ending date and time of last selftest execution.') zhone_card_diag_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 6, 1, 12), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneCardDiagRowStatus.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagRowStatus.setDescription('In any case where a new row can be created either via the cli or zms there will always be a proprietary mib entity of type ZhoneRowStatus which has the basic equivalence of the standard rowstatus object_id.') zhone_tac_test_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7)) if mibBuilder.loadTexts: zhoneTacTestTable.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestTable.setDescription('This table contains one entry for each tac test channel available on Zhone devices. In the initial release only the primary channel (1) is supported. Future line cards may support the second channel. If the second channel is supported the row will be populated, if the second channel is not supported a get will return no such instance. ') zhone_tac_test_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1)).setIndexNames((0, 'ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacIndex')) if mibBuilder.loadTexts: zhoneTacTestEntry.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestEntry.setDescription('One row per tac test channel.') zhone_tac_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2))) if mibBuilder.loadTexts: zhoneTacIndex.setStatus('current') if mibBuilder.loadTexts: zhoneTacIndex.setDescription('This field is the index field for the tac test channel which will be connected on the external port. This device supports a maximum of two channels, one or both channels may be supported by a device depending on which lines cards are installed.') zhone_tac_interface_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 2), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacInterfaceIndex.setStatus('current') if mibBuilder.loadTexts: zhoneTacInterfaceIndex.setDescription('This field contains the InterfaceIndex of the physical line to be tested. If no line is currently being tested this value is 0. The ability of a physical line type to support tac test may vary depending on the line cards installed and the external test equipment. This field may not be modified when an tac test is in progress as indicated by a non-zero value in this field and the test mode set to one of tacModeLookIn, tacModeLookOut or tacModeBridge') zhone_tac_test_mode = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('mtacModeBridge', 1), ('mtacModeLookIn', 2), ('mtacModeLookOut', 3), ('mtacModeNone', 4))).clone('mtacModeNone')).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestMode.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestMode.setDescription('This field is used to set the mtac test mode for a given line. The options are: mtacModeBridge - All traffic on the given line is bridged across the mtac lines mtacModeLookIn - All outbound traffic on the given line originates exclusively to the mtac lines mtacModeLookIn - All inbound traffic on the given line originates exclusively to the mtac lines mtacModeNone - No mtac test is in progress. The mtac test mode may be changed only if the zhoneInterfaceIndex is set, Otherwise it defaults to mtacModeNone. And can be changed again by setting InterfaceIndex to non-zero values. ') zhone_tac_test_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=named_values(('none', 1), ('runAllTests', 2), ('abortTest', 3), ('calibration', 4), ('foreignDCVoltage', 5), ('foreignACVoltage', 6), ('dcLoopResistance', 7), ('threeElementInsulationResistance', 8), ('fiveElementInsulationResistance', 9), ('threeElementCapacitance', 10), ('receiverOffHook', 11), ('distanceToOpen', 12), ('foreignACCurrents', 13), ('ringerEquivalencyNumber', 14), ('dtmfAndPulseDigitMeasurement', 15), ('noiseMeasurement', 16), ('signalToNoiseRatio', 17), ('arbitrarySignalToneMeasurement', 18), ('toneGeneration', 19), ('transHybridLoss', 20), ('drawAndBreakDialTone', 21), ('inwardCurrent', 22), ('dcFeedSelf', 23), ('onAndOffHookSelfTest', 24), ('ringingSelfTest', 25), ('ringingMonitor', 26), ('meteringSelfTest', 27), ('transmissionSelfTest', 28), ('dialingSelfTest', 29), ('howlerTest', 30), ('fuseTest', 31), ('readLoopAndBatteryConditions', 32))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestId.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestId.setDescription('This object is only valid for Tac Cards which support the new Legerity Suite of tests. This object identifies which test is to be run, or can be set to abort the current test. Test results are sent to the zhoneTacTestResultsTable. There are 3 Legerity software packages: Basic Test (VCP-BT), Advanced Test (VCP-AT), and Advanced Test Plus (VCP-ATP). We currently support Basic Test package. The following lists which tests are supported in each software package. Calibration VCP-ATP Foreign DC Voltage Test VCP-BT, VCP-AT, VCP-ATP Foreign AC VoltageTest VCP-BT, VCP-AT, VCP-ATP DC Loop Resistance Test VCP-BT, VCP-AT, VCP-ATP Three-Element Insulation Resistance Test VCP-BT, VCP-AT, VCP-ATP Five-Element Insulation Resistance Test VCP-ATP Three-Element Capacitance Test VCP-BT, VCP-AT Receiver Off-Hook Test VCP-BT, VCP-AT, VCP-ATP Distance to Open Test VCP-BT, VCP-AT Foreign AC Currents Test VCP-BT, VCP-AT Ringer Equivalency Number Test VCP-BT, VCP-AT, VCP-ATP DTMF and Pulse Digit Measurement Test VCP-BT, VCP-AT Noise Measurement Test VCP-BT, VCP-AT, VCP-ATP Signal to Noise Ratio Test VCP-ATP Arbitrary Single Tone Measurement Test VCP-ATP Tone Generation Test VCP-BT, VCP-AT Trans-Hybrid Loss Test VCP-BT, VCP-AT, VCP-ATP Draw and Break Dial Tone Test VCP-BT, VCP-AT Inward Current Test VCP-ATP DC Feed Self-Test VCP-BT, VCP-AT, VCP-ATP On/Off Hook Self-Test VCP-BT, VCP-AT, VCP-ATP Ringing Self-Test VCP-BT, VCP-AT, VCP-ATP Ringing Monitor Test VCP-BT, VCP-AT, VCP-ATP Metering Self-Test VCP-BT, VCP-AT Transmission Self-Test VCP-BT, VCP-AT, VCP-ATP Dialing Sef Test VCP-BT, VCP-AT Howler Test VCP-BT, VCP-AT Fuse Test VCP-ATP Read Loop and Battery Conditions VCP-BT, VCP-AT, VCP-ATP ') zhone_tac_test_param1 = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestParam1.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam1.setDescription('Optional Test Parameter #1') zhone_tac_test_param2 = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestParam2.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam2.setDescription('Optional Test Paramerter #2') zhone_tac_test_param3 = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestParam3.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam3.setDescription('Optional Test Parameter #3') zhone_tac_test_param4 = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestParam4.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam4.setDescription('Optional Test Parameter #4') zhone_tac_test_param5 = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 7, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneTacTestParam5.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestParam5.setDescription('Optional Test Parameter #5 Value: 0x00000001 Force Line-Test mode') zhone_tac_test_results_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12)) if mibBuilder.loadTexts: zhoneTacTestResultsTable.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTable.setDescription('Table of Tac Test Results objects. Indexed by same index as zhoneTacTestTable. This table is only valid for Tac cards which support the Legerity Suite of tests.') zhone_tac_test_results_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1)).setIndexNames((0, 'ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacIndex')) if mibBuilder.loadTexts: zhoneTacTestResultsEntry.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsEntry.setDescription('Entry of Test Results objects. Indexed by same index as zhoneTacTestEntry. This entry is only valid for Tac cards which support the Legerity Suite of tests.') zhone_tac_test_results_time_started = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 1), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneTacTestResultsTimeStarted.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTimeStarted.setDescription('Description.') zhone_tac_test_results_time_ended = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 2), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneTacTestResultsTimeEnded.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsTimeEnded.setDescription('Description.') zhone_tac_test_result_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('testNotStarted', 1), ('testInProgress', 2), ('testCompleted', 3), ('testAborted', 4), ('testNotSupported', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneTacTestResultStatus.setReference('Contains the test status.') if mibBuilder.loadTexts: zhoneTacTestResultStatus.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultStatus.setDescription('Contains test results.') zhone_tac_test_results_output = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 3, 3, 12, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 8000))).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneTacTestResultsOutput.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestResultsOutput.setDescription("For Legerity Test Suite, results of test(s) are output to this object as one string, separated by UNIX '/n' for newline characters and terminated by the NULL character. This test results will persist until the next test is run or until tac card reboot.") zhone_tac_test_traps = object_identity((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13)) if mibBuilder.loadTexts: zhoneTacTestTraps.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestTraps.setDescription('Traps for the tac system.') zhone_ringer_traps = object_identity((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0)) if mibBuilder.loadTexts: zhoneRingerTraps.setStatus('current') if mibBuilder.loadTexts: zhoneRingerTraps.setDescription('Traps associated with ring generator. Traps should be added below - the .0 on this entry is required.') zhone_ringer_status_alarm = notification_type((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0, 1)) if mibBuilder.loadTexts: zhoneRingerStatusAlarm.setStatus('current') if mibBuilder.loadTexts: zhoneRingerStatusAlarm.setDescription('This trap occurs when a ring signal fails to be detected, or when it re-starts after failure.') zhone_ringer_bus_fault_alarm = notification_type((1, 3, 6, 1, 4, 1, 5504, 3, 3, 13, 0, 2)) if mibBuilder.loadTexts: zhoneRingerBusFaultAlarm.setStatus('current') if mibBuilder.loadTexts: zhoneRingerBusFaultAlarm.setDescription('This trap occurs when a fault in the ringer power bus is detected. Such fault may be caused by the possible shortage in the POTS or DSL line.') zhone_card_diag_objects = object_group((1, 3, 6, 1, 4, 1, 5504, 6, 11, 1)).setObjects(('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagNextIndex'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagType'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagAction'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagRepetition'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagDuration'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagResult'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagPassCount'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagFailCount'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagDetails'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagStartTime'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagEndTime'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneCardDiagRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhone_card_diag_objects = zhoneCardDiagObjects.setStatus('current') if mibBuilder.loadTexts: zhoneCardDiagObjects.setDescription('This group contains objects associated with Zhone Card Diagnostics') zhone_tac_test_objects = object_group((1, 3, 6, 1, 4, 1, 5504, 6, 11, 2)).setObjects(('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacInterfaceIndex'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestMode'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestId'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestResultsTimeStarted'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestResultsTimeEnded'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestResultStatus'), ('ZHONE-CARD-DIAGNOSTICS-MIB', 'zhoneTacTestResultsOutput')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhone_tac_test_objects = zhoneTacTestObjects.setStatus('current') if mibBuilder.loadTexts: zhoneTacTestObjects.setDescription('This group contains objects associated with initiating tac tests') mibBuilder.exportSymbols('ZHONE-CARD-DIAGNOSTICS-MIB', zhoneCardDiagDetails=zhoneCardDiagDetails, zhoneTacTestMode=zhoneTacTestMode, zhoneRingerBusFaultAlarm=zhoneRingerBusFaultAlarm, zhoneCardDiagNextIndex=zhoneCardDiagNextIndex, zhoneTacTestResultsTimeEnded=zhoneTacTestResultsTimeEnded, zhoneCardDiagEntry=zhoneCardDiagEntry, zhoneTacTestParam4=zhoneTacTestParam4, zhoneCardDiagRowStatus=zhoneCardDiagRowStatus, zhoneTacIndex=zhoneTacIndex, zhoneTacTestParam1=zhoneTacTestParam1, zhoneTacInterfaceIndex=zhoneTacInterfaceIndex, zhoneTacTestTable=zhoneTacTestTable, zhoneRingerTraps=zhoneRingerTraps, zhoneCardDiagStartTime=zhoneCardDiagStartTime, zhoneTacTestResultsOutput=zhoneTacTestResultsOutput, zhoneTacTestResultsTimeStarted=zhoneTacTestResultsTimeStarted, zhoneCardDiagResult=zhoneCardDiagResult, zhoneCardDiagPassCount=zhoneCardDiagPassCount, zhoneTacTestTraps=zhoneTacTestTraps, zhoneCardDiagTable=zhoneCardDiagTable, zhoneCardDiagObjects=zhoneCardDiagObjects, zhoneCardDiagnosticsModule=zhoneCardDiagnosticsModule, zhoneTacTestParam2=zhoneTacTestParam2, zhoneTacTestParam5=zhoneTacTestParam5, zhoneCardDiagNextTable=zhoneCardDiagNextTable, zhoneCardDiagEndTime=zhoneCardDiagEndTime, zhoneTacTestEntry=zhoneTacTestEntry, zhoneTacTestResultStatus=zhoneTacTestResultStatus, zhoneTacTestId=zhoneTacTestId, zhoneTacTestResultsEntry=zhoneTacTestResultsEntry, zhoneCardDiagDuration=zhoneCardDiagDuration, zhoneTacTestObjects=zhoneTacTestObjects, zhoneCardDiagNextEntry=zhoneCardDiagNextEntry, zhoneTacTestParam3=zhoneTacTestParam3, zhoneCardDiagFailCount=zhoneCardDiagFailCount, zhoneCardDiagIndex=zhoneCardDiagIndex, zhoneCardDiagAction=zhoneCardDiagAction, zhoneTacTestResultsTable=zhoneTacTestResultsTable, zhoneCardDiagRepetition=zhoneCardDiagRepetition, zhoneRingerStatusAlarm=zhoneRingerStatusAlarm, zhoneCardDiagType=zhoneCardDiagType, PYSNMP_MODULE_ID=zhoneCardDiagnosticsModule)
line = input() party = {} unlikes = 0 while line != "Stop": act, guest, meal = line.split("-") if act == "Like": if guest in party.keys(): if meal in party[guest]: line = input() continue party[guest].append(meal) line = input() continue party[guest] = [meal] elif act == "Unlike": if guest not in party.keys(): print(f"{guest} is not at the party.") line = input() continue elif meal not in party[guest]: print(f"{guest} doesn't have the {meal} in his/her collection.") line = input() continue else: party[guest].remove(meal) print(f"{guest} doesn't like the {meal}.") unlikes += 1 line = input() continue line = input() for member, foods in sorted(party.items(), key=lambda x: (-len(x[1]), x[0])): if len(foods) == 0: print(f"{member}:") else: print(f"{member}: {', '.join(foods)}") print(f"Unliked meals: {unlikes}")
line = input() party = {} unlikes = 0 while line != 'Stop': (act, guest, meal) = line.split('-') if act == 'Like': if guest in party.keys(): if meal in party[guest]: line = input() continue party[guest].append(meal) line = input() continue party[guest] = [meal] elif act == 'Unlike': if guest not in party.keys(): print(f'{guest} is not at the party.') line = input() continue elif meal not in party[guest]: print(f"{guest} doesn't have the {meal} in his/her collection.") line = input() continue else: party[guest].remove(meal) print(f"{guest} doesn't like the {meal}.") unlikes += 1 line = input() continue line = input() for (member, foods) in sorted(party.items(), key=lambda x: (-len(x[1]), x[0])): if len(foods) == 0: print(f'{member}:') else: print(f"{member}: {', '.join(foods)}") print(f'Unliked meals: {unlikes}')
L=raw_input("Please Enter the length of the layer (in m): ") A=raw_input("Please Enter the area of the wall (in m2): ") material=raw_input("Please Enter the material of the layer: ") if material=="glass": type_glas=raw_input("which type of glass do you mean:window=1, wool insulation=2 ") if int(type_glas)==1: k=str(0.96) #W/mK elif int(type_glas)==2: k= str(0.04) #W/mK else: print("The selected glass type is not acceptable") elif material=="brick": k=str(0.8) #W/mK else: print("I do not have the properties of this material") k=(raw_input("Please Enter the conductivity off the layer(in W/(m K): ")) print("\n you just said "+ "L= " + L+ " m "+ "A= " + A+ " m2 "+ "k= "+ k +" W/(m*K) \n") R=float(L)/(float(k)*float(A)) print("Well the Thermal Resistnace is "+ str(R)+ " degC/W")
l = raw_input('Please Enter the length of the layer (in m): ') a = raw_input('Please Enter the area of the wall (in m2): ') material = raw_input('Please Enter the material of the layer: ') if material == 'glass': type_glas = raw_input('which type of glass do you mean:window=1, wool insulation=2 ') if int(type_glas) == 1: k = str(0.96) elif int(type_glas) == 2: k = str(0.04) else: print('The selected glass type is not acceptable') elif material == 'brick': k = str(0.8) else: print('I do not have the properties of this material') k = raw_input('Please Enter the conductivity off the layer(in W/(m K): ') print('\n you just said ' + 'L= ' + L + ' m ' + 'A= ' + A + ' m2 ' + 'k= ' + k + ' W/(m*K) \n') r = float(L) / (float(k) * float(A)) print('Well the Thermal Resistnace is ' + str(R) + ' degC/W')
#define a value holder function # => True def switch(value): switch.value=value return True #define matching case function # => True or False def case(*args): return any((arg == switch.value for arg in args)) # Switch example: print("Describe a number from range:") for n in range(0,10): print(n, end=" ", flush=True) print() # Ask for a number and analyze x=input("n:") n=int(x) while switch(n): if case(0): print ("n is zero;") break if case(1, 4, 9): print ("n is a perfect square;") break if case(2): print ("n is an even number;") if case(2, 3, 5, 7): print ("n is a prime number;") break if case(6, 8): print ("n is an even number;") break print ("Only single-digit numbers are allowed.")
def switch(value): switch.value = value return True def case(*args): return any((arg == switch.value for arg in args)) print('Describe a number from range:') for n in range(0, 10): print(n, end=' ', flush=True) print() x = input('n:') n = int(x) while switch(n): if case(0): print('n is zero;') break if case(1, 4, 9): print('n is a perfect square;') break if case(2): print('n is an even number;') if case(2, 3, 5, 7): print('n is a prime number;') break if case(6, 8): print('n is an even number;') break print('Only single-digit numbers are allowed.')
#!/usr/bin/python3 # Guilhem Mizrahi 09/2019 def first(): var1=input("Enter the first number: ") var2=input("Enter the second number: ") print(var1/var2) def second(): var1=int(input("Enter the first number: ")) var2=int(input("Enter the second number: ")) print(var1/var2) def third(): retvalue1="" while(not retvalue1.isnumeric()): retvalue1=input("Type in first a number: ") retvalue2="" while(not retvalue2.isnumeric()): retvalue2=input("Type in a second number: ") retvalue1=int(retvalue1) retvalue2=int(retvalue2) print(retvalue1/retvalue2) def fourth(): while True: try: val1 = int(input("Enter the first number: ")) val2 = int(input("Enter the second number: ")) break except: print("You did not enter a number") continue print(val1/val2) def fith(): mylist = ["obj1","obj2","obj3"] myvar1 = 32 myvar2 = "Something else" print('{} {}'.format(myvar1,myvar2)) print('{1} {0}'.format(myvar1,myvar2)) print('{} {}'.format(mylist[1],mylist[2])) def sixth(): for i in range(1,13): print("{:3d} {:4d} {:5d}".format(i, i**2, i**3)) if __name__=="__main__": # first() # second() # third() # fourth() # fith() sixth()
def first(): var1 = input('Enter the first number: ') var2 = input('Enter the second number: ') print(var1 / var2) def second(): var1 = int(input('Enter the first number: ')) var2 = int(input('Enter the second number: ')) print(var1 / var2) def third(): retvalue1 = '' while not retvalue1.isnumeric(): retvalue1 = input('Type in first a number: ') retvalue2 = '' while not retvalue2.isnumeric(): retvalue2 = input('Type in a second number: ') retvalue1 = int(retvalue1) retvalue2 = int(retvalue2) print(retvalue1 / retvalue2) def fourth(): while True: try: val1 = int(input('Enter the first number: ')) val2 = int(input('Enter the second number: ')) break except: print('You did not enter a number') continue print(val1 / val2) def fith(): mylist = ['obj1', 'obj2', 'obj3'] myvar1 = 32 myvar2 = 'Something else' print('{} {}'.format(myvar1, myvar2)) print('{1} {0}'.format(myvar1, myvar2)) print('{} {}'.format(mylist[1], mylist[2])) def sixth(): for i in range(1, 13): print('{:3d} {:4d} {:5d}'.format(i, i ** 2, i ** 3)) if __name__ == '__main__': sixth()
PROG = 'censor' fin = open(PROG + '.in', 'r') fout = open(PROG + '.out', 'w') def main(): s = fin.readline() s = s[:len(s) - 1] t = fin.readline() t = t[:len(t) - 1] while True: i = s.find(t) if i == -1: break s = s[0:i] + s[i + len(t):] fout.write(s + '\n') main() fin.close() fout.close()
prog = 'censor' fin = open(PROG + '.in', 'r') fout = open(PROG + '.out', 'w') def main(): s = fin.readline() s = s[:len(s) - 1] t = fin.readline() t = t[:len(t) - 1] while True: i = s.find(t) if i == -1: break s = s[0:i] + s[i + len(t):] fout.write(s + '\n') main() fin.close() fout.close()
class IncorrectInputVectorLength(Exception): pass class NetIsNotInitialized(Exception): pass class IncorrectFactorValue(Exception): pass class NetIsNotCalculated(Exception): pass class IncorrectExpectedOutputVectorLength(Exception): pass class NetConfigIndefined(Exception): pass class NetConfigIncorrect(Exception): pass class JsonFileNotFound(Exception): pass class JsonFileStructureIncorrect(Exception): pass
class Incorrectinputvectorlength(Exception): pass class Netisnotinitialized(Exception): pass class Incorrectfactorvalue(Exception): pass class Netisnotcalculated(Exception): pass class Incorrectexpectedoutputvectorlength(Exception): pass class Netconfigindefined(Exception): pass class Netconfigincorrect(Exception): pass class Jsonfilenotfound(Exception): pass class Jsonfilestructureincorrect(Exception): pass
class BingoBoard: def __init__(self, numbers): self.numbers = [int(n) for n in numbers.replace("\n", " ").split()] self.marked = set() def mark(self, n): if n in self.numbers: self.marked.add(n) return self.check_win() return False def get_score(self): return sum(set(self.numbers).difference(self.marked)) def check_win(self): return self.check_rows() or self.check_columns() def check_rows(self): for i in range(0, 21, 5): if self.marked.issuperset(self.numbers[i:i+5]): return True return False def check_columns(self): for i in range(5): if self.marked.issuperset(self.numbers[i::5]): return True return False def get_data(filename): with open(filename) as file: numbers, *boards = file.read().split("\n\n") numbers = [int(n) for n in numbers.split(",")] boards = [BingoBoard(board) for board in boards] return numbers, boards def play(numbers, boards): winning_score = None for n in numbers: boards_to_remove = set() for board in boards: if board.mark(n): boards_to_remove.add(board) if winning_score is None: winning_score = board.get_score() * n elif len(boards) == 1: losing_score = board.get_score() * n return winning_score, losing_score boards = [board for board in boards if board not in boards_to_remove] # sample_data = get_data("day_04_sample.txt") challenge_data = get_data("input.txt") if __name__ == "__main__": # sample_part_1, sample_part_2 = play(*sample_data) # assert sample_part_1 == 4512 # assert sample_part_2 == 1924 challenge_part_1, challenge_part_2 = play(*challenge_data) print(challenge_part_1) # 23177 print(challenge_part_2) # 6804
class Bingoboard: def __init__(self, numbers): self.numbers = [int(n) for n in numbers.replace('\n', ' ').split()] self.marked = set() def mark(self, n): if n in self.numbers: self.marked.add(n) return self.check_win() return False def get_score(self): return sum(set(self.numbers).difference(self.marked)) def check_win(self): return self.check_rows() or self.check_columns() def check_rows(self): for i in range(0, 21, 5): if self.marked.issuperset(self.numbers[i:i + 5]): return True return False def check_columns(self): for i in range(5): if self.marked.issuperset(self.numbers[i::5]): return True return False def get_data(filename): with open(filename) as file: (numbers, *boards) = file.read().split('\n\n') numbers = [int(n) for n in numbers.split(',')] boards = [bingo_board(board) for board in boards] return (numbers, boards) def play(numbers, boards): winning_score = None for n in numbers: boards_to_remove = set() for board in boards: if board.mark(n): boards_to_remove.add(board) if winning_score is None: winning_score = board.get_score() * n elif len(boards) == 1: losing_score = board.get_score() * n return (winning_score, losing_score) boards = [board for board in boards if board not in boards_to_remove] challenge_data = get_data('input.txt') if __name__ == '__main__': (challenge_part_1, challenge_part_2) = play(*challenge_data) print(challenge_part_1) print(challenge_part_2)
#from http://rosettacode.org/wiki/Greatest_common_divisor#Python #pythran export gcd_iter(int, int) #pythran export gcd(int, int) #pythran export gcd_bin(int, int) #runas gcd_iter(40902, 24140) #runas gcd(40902, 24140) #runas gcd_bin(40902, 24140) def gcd_iter(u, v): while v: u, v = v, u % v return abs(u) def gcd(u, v): return gcd(v, u % v) if v else abs(u) def gcd_bin(u, v): u, v = abs(u), abs(v) # u >= 0, v >= 0 if u < v: u, v = v, u # u >= v >= 0 if v == 0: return u # u >= v > 0 k = 1 while u & 1 == 0 and v & 1 == 0: # u, v - even u >>= 1; v >>= 1 k <<= 1 t = -v if u & 1 else u while t: while t & 1 == 0: t >>= 1 if t > 0: u = t else: v = -t t = u - v return u * k
def gcd_iter(u, v): while v: (u, v) = (v, u % v) return abs(u) def gcd(u, v): return gcd(v, u % v) if v else abs(u) def gcd_bin(u, v): (u, v) = (abs(u), abs(v)) if u < v: (u, v) = (v, u) if v == 0: return u k = 1 while u & 1 == 0 and v & 1 == 0: u >>= 1 v >>= 1 k <<= 1 t = -v if u & 1 else u while t: while t & 1 == 0: t >>= 1 if t > 0: u = t else: v = -t t = u - v return u * k
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class JobMode: COLLECTIVE = 'collective' PS = 'ps' HETER = 'heter' class Job(object): def __init__(self, jid='default', mode=JobMode.COLLECTIVE, nnodes="1"): self._mode = mode self._id = jid self._replicas = 0 self._replicas_min = self._replicas self._replicas_max = self._replicas self._elastic = False self.set_replicas(str(nnodes)) def __str__(self): return "Job: {}, mode {}, replicas {}[{}:{}], elastic {}".format( self.id, self.mode, self._replicas, self._replicas_min, self._replicas_max, self.elastic) @property def mode(self): return self._mode @property def id(self): return self._id @property def elastic(self): return self._elastic @property def replicas(self): return self._replicas @property def replicas_min(self): return self._replicas_min @property def replicas_max(self): return self._replicas_max @replicas.setter def replicas(self, replicas): self._replicas = replicas def set_replicas(self, nnodes: str): np = str(nnodes) if nnodes else '1' if ':' in np: nps = np.split(':') self._replicas_min, self._replicas_max = int(nps[0]), int(nps[1]) self._replicas = self._replicas_max # default to max self._elastic = True else: self._replicas = int(np) self._replicas_min, self._replicas_max = self._replicas, self._replicas self._elastic = False
class Jobmode: collective = 'collective' ps = 'ps' heter = 'heter' class Job(object): def __init__(self, jid='default', mode=JobMode.COLLECTIVE, nnodes='1'): self._mode = mode self._id = jid self._replicas = 0 self._replicas_min = self._replicas self._replicas_max = self._replicas self._elastic = False self.set_replicas(str(nnodes)) def __str__(self): return 'Job: {}, mode {}, replicas {}[{}:{}], elastic {}'.format(self.id, self.mode, self._replicas, self._replicas_min, self._replicas_max, self.elastic) @property def mode(self): return self._mode @property def id(self): return self._id @property def elastic(self): return self._elastic @property def replicas(self): return self._replicas @property def replicas_min(self): return self._replicas_min @property def replicas_max(self): return self._replicas_max @replicas.setter def replicas(self, replicas): self._replicas = replicas def set_replicas(self, nnodes: str): np = str(nnodes) if nnodes else '1' if ':' in np: nps = np.split(':') (self._replicas_min, self._replicas_max) = (int(nps[0]), int(nps[1])) self._replicas = self._replicas_max self._elastic = True else: self._replicas = int(np) (self._replicas_min, self._replicas_max) = (self._replicas, self._replicas) self._elastic = False
def Menunggu(n,des): #basis if n == 0: return 0 #rekuren print(des) return Menunggu(n-1,des) def MySum(n): #basis if n == 0: return 0 #rekuren return n+MySum(n-1) def main(): # solusi iteratif/pengulangan dengan teknik for loop #n = 10 #for i in range(n): # print("Menunggu si dia.") # solusi rekursif Menunggu(10,"Menunggu si dia.") # solusi iteratif penjumlahan # sum = 0 # n = 10 # for i in range(n+1): # sum+=i # print(sum) #55 # solusi rekursif print(MySum(10)) #55? if __name__=="__main__": main()
def menunggu(n, des): if n == 0: return 0 print(des) return menunggu(n - 1, des) def my_sum(n): if n == 0: return 0 return n + my_sum(n - 1) def main(): menunggu(10, 'Menunggu si dia.') print(my_sum(10)) if __name__ == '__main__': main()
i = input().split() N,Q = int(i[0]),int(i[1]) AI = input().split() ai = [] for n in AI: ai.append(int(n)) QI = input().split() qi = [] for n in QI: qi.append(int(n)) for q in qi: ai_aux = ai.copy() count = 0 p = 0 while(p<len(ai_aux)-1): if q in ai_aux: count += 1 i = ai_aux.index(q) ai_aux[i] = 0 elif (q-ai_aux[p]) in ai_aux: count += 1 i1 = ai_aux.index(q-ai_aux[p]) ai_aux[i1] = 0 i2 = ai_aux.index(ai_aux[p]) ai_aux[i2] = 0 p += 1 p += 1 print(count)
i = input().split() (n, q) = (int(i[0]), int(i[1])) ai = input().split() ai = [] for n in AI: ai.append(int(n)) qi = input().split() qi = [] for n in QI: qi.append(int(n)) for q in qi: ai_aux = ai.copy() count = 0 p = 0 while p < len(ai_aux) - 1: if q in ai_aux: count += 1 i = ai_aux.index(q) ai_aux[i] = 0 elif q - ai_aux[p] in ai_aux: count += 1 i1 = ai_aux.index(q - ai_aux[p]) ai_aux[i1] = 0 i2 = ai_aux.index(ai_aux[p]) ai_aux[i2] = 0 p += 1 p += 1 print(count)
class hparams: train_or_test = 'train' output_dir = 'logs/your_program_name' aug = False latest_checkpoint_file = 'checkpoint_latest.pt' total_epochs = 100 epochs_per_checkpoint = 10 batch_size = 2 ckpt = None init_lr = 0.0002 scheduer_step_size = 20 scheduer_gamma = 0.8 debug = False mode = '2d' # '2d or '3d' in_class = 1 out_class = 2 crop_or_pad_size = 224,224,1 # if 3D: 256,256,256 fold_arch = '*.png' source_train_0_dir = 'train/0' source_train_1_dir = 'train/1' source_test_0_dir = 'test/0' source_test_1_dir = 'test/1'
class Hparams: train_or_test = 'train' output_dir = 'logs/your_program_name' aug = False latest_checkpoint_file = 'checkpoint_latest.pt' total_epochs = 100 epochs_per_checkpoint = 10 batch_size = 2 ckpt = None init_lr = 0.0002 scheduer_step_size = 20 scheduer_gamma = 0.8 debug = False mode = '2d' in_class = 1 out_class = 2 crop_or_pad_size = (224, 224, 1) fold_arch = '*.png' source_train_0_dir = 'train/0' source_train_1_dir = 'train/1' source_test_0_dir = 'test/0' source_test_1_dir = 'test/1'
''' --- Day 1: The Tyranny of the Rocket Equation --- -- Part 1 -- The Elves quickly load you into a spacecraft and prepare to launch. At the first Go / No Go poll, every Elf is Go until the Fuel Counter-Upper. They haven't determined the amount of fuel required yet. Fuel required to launch a given module is based on its mass. Specifically, to find the fuel required for a module, take its mass, divide by three, round down, and subtract 2. What is the sum of the fuel requirements for all of the modules on your spacecraft? -- Part 2 -- During the second Go / No Go poll, the Elf in charge of the Rocket Equation Double-Checker stops the launch sequence. Apparently, you forgot to include additional fuel for the fuel you just added. Fuel itself requires fuel just like a module - take its mass, divide by three, round down, and subtract 2. However, that fuel also requires fuel, and that fuel requires fuel, and so on. Any mass that would require negative fuel should instead be treated as if it requires zero fuel; the remaining mass, if any, is instead handled by wishing really hard, which has no mass and is outside the scope of this calculation. So, for each module mass, calculate its fuel and add it to the total. Then, treat the fuel amount you just calculated as the input mass and repeat the process, continuing until a fuel requirement is zero or negative. What is the sum of the fuel requirements for all of the modules on your spacecraft when also taking into account the mass of the added fuel? ''' def get_fuel(mass): return int(mass/3)-2 def fuel_sum(): sum = [0,0] m = open("modules.txt", "r") for x in m: add_fuel = get_fuel(int(x)) sum[0] += add_fuel while get_fuel(add_fuel) > 0: add_fuel = get_fuel(add_fuel) sum[1] += add_fuel return sum if __name__ == '__main__': result = fuel_sum() print("Part 1:", result[0]) print("Part 2:", result[0]+result[1])
""" --- Day 1: The Tyranny of the Rocket Equation --- -- Part 1 -- The Elves quickly load you into a spacecraft and prepare to launch. At the first Go / No Go poll, every Elf is Go until the Fuel Counter-Upper. They haven't determined the amount of fuel required yet. Fuel required to launch a given module is based on its mass. Specifically, to find the fuel required for a module, take its mass, divide by three, round down, and subtract 2. What is the sum of the fuel requirements for all of the modules on your spacecraft? -- Part 2 -- During the second Go / No Go poll, the Elf in charge of the Rocket Equation Double-Checker stops the launch sequence. Apparently, you forgot to include additional fuel for the fuel you just added. Fuel itself requires fuel just like a module - take its mass, divide by three, round down, and subtract 2. However, that fuel also requires fuel, and that fuel requires fuel, and so on. Any mass that would require negative fuel should instead be treated as if it requires zero fuel; the remaining mass, if any, is instead handled by wishing really hard, which has no mass and is outside the scope of this calculation. So, for each module mass, calculate its fuel and add it to the total. Then, treat the fuel amount you just calculated as the input mass and repeat the process, continuing until a fuel requirement is zero or negative. What is the sum of the fuel requirements for all of the modules on your spacecraft when also taking into account the mass of the added fuel? """ def get_fuel(mass): return int(mass / 3) - 2 def fuel_sum(): sum = [0, 0] m = open('modules.txt', 'r') for x in m: add_fuel = get_fuel(int(x)) sum[0] += add_fuel while get_fuel(add_fuel) > 0: add_fuel = get_fuel(add_fuel) sum[1] += add_fuel return sum if __name__ == '__main__': result = fuel_sum() print('Part 1:', result[0]) print('Part 2:', result[0] + result[1])
#This is a simple inventory program for a small car dealership. print('Automotive Inventory') class Automobile: def __init__(self): self._make = '' self._model = '' self._year = 0 self._color = '' self._mileage = 0 def addVehicle(self): try: self._make = input('Enter vehicle make: ') self._model = input('Enter vehicle model: ') self._year = int(input('Enter vehicle year: ')) self._color = input('Enter vehicle color: ') self._mileage = int(input('Enter vehicle mileage: ')) return True except ValueError: print('Please try entering vehicle information again using only whole numbers for mileage and year') return False def __str__(self): return '\t'.join(str(x) for x in [self._make, self._model, self._year, self._color, self._mileage]) class Inventory: def __init__(self): self.vehicles = [] def addVehicle(self): vehicle = Automobile() if vehicle.addVehicle() == True: self.vehicles.append(vehicle) print () print('This vehicle has been added, Thank you') def viewInventory(self): print('\t'.join(['','Make', 'Model','Year', 'Color', 'Mileage'])) for idx, vehicle in enumerate(self.vehicles) : print(idx + 1, end='\t') print(vehicle) inventory = Inventory() while True: print('') print('#1 Add Vehicle to Inventory') print('#2 Delete Vehicle from Inventory') print('#3 View Current Inventory') print('#4 Update Vehicle in Inventory') print('#5 Export Current Inventory') print('#6 Quit') print('--------------------------------------------') userInput=input('Please choose from one of the above options: ') if userInput=="1": #add a vehicle inventory.addVehicle() elif userInput=='2': #delete a vehicle if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() item = int(input('Please enter the number associated with the vehicle to be removed: ')) if item - 1 > len(inventory.vehicles): print('This is an invalid number') else: inventory.vehicles.remove(inventory.vehicles[item - 1]) print () print('This vehicle has been removed') elif userInput == '3': #list all the vehicles if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() elif userInput == '4': #edit vehicle if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() item = int(input('Please enter the number associated with the vehicle to be updated: ')) if item - 1 > len(inventory.vehicles): print('This is an invalid number') else: automobile = Automobile() if automobile.addVehicle() == True : inventory.vehicles.remove(inventory.vehicles[item - 1]) inventory.vehicles.insert(item - 1, automobile) print () print('This vehicle has been updated') elif userInput == '5': #export inventory to file if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue f = open('vehicle_inventory.txt', 'w') f.write('\t'.join(['Make', 'Model','Year', 'Color', 'Mileage'])) f.write('\n') for vechicle in inventory.vehicles: f.write('%s\n' %vechicle) f.close() print('The vehicle inventory has been exported to a file') elif userInput == '6': #exit the loop print('Goodbye') break else: #invalid user input print('This is an invalid input. Please try again.')
print('Automotive Inventory') class Automobile: def __init__(self): self._make = '' self._model = '' self._year = 0 self._color = '' self._mileage = 0 def add_vehicle(self): try: self._make = input('Enter vehicle make: ') self._model = input('Enter vehicle model: ') self._year = int(input('Enter vehicle year: ')) self._color = input('Enter vehicle color: ') self._mileage = int(input('Enter vehicle mileage: ')) return True except ValueError: print('Please try entering vehicle information again using only whole numbers for mileage and year') return False def __str__(self): return '\t'.join((str(x) for x in [self._make, self._model, self._year, self._color, self._mileage])) class Inventory: def __init__(self): self.vehicles = [] def add_vehicle(self): vehicle = automobile() if vehicle.addVehicle() == True: self.vehicles.append(vehicle) print() print('This vehicle has been added, Thank you') def view_inventory(self): print('\t'.join(['', 'Make', 'Model', 'Year', 'Color', 'Mileage'])) for (idx, vehicle) in enumerate(self.vehicles): print(idx + 1, end='\t') print(vehicle) inventory = inventory() while True: print('') print('#1 Add Vehicle to Inventory') print('#2 Delete Vehicle from Inventory') print('#3 View Current Inventory') print('#4 Update Vehicle in Inventory') print('#5 Export Current Inventory') print('#6 Quit') print('--------------------------------------------') user_input = input('Please choose from one of the above options: ') if userInput == '1': inventory.addVehicle() elif userInput == '2': if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() item = int(input('Please enter the number associated with the vehicle to be removed: ')) if item - 1 > len(inventory.vehicles): print('This is an invalid number') else: inventory.vehicles.remove(inventory.vehicles[item - 1]) print() print('This vehicle has been removed') elif userInput == '3': if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() elif userInput == '4': if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue inventory.viewInventory() item = int(input('Please enter the number associated with the vehicle to be updated: ')) if item - 1 > len(inventory.vehicles): print('This is an invalid number') else: automobile = automobile() if automobile.addVehicle() == True: inventory.vehicles.remove(inventory.vehicles[item - 1]) inventory.vehicles.insert(item - 1, automobile) print() print('This vehicle has been updated') elif userInput == '5': if len(inventory.vehicles) < 1: print('Sorry there are no vehicles currently in inventory') continue f = open('vehicle_inventory.txt', 'w') f.write('\t'.join(['Make', 'Model', 'Year', 'Color', 'Mileage'])) f.write('\n') for vechicle in inventory.vehicles: f.write('%s\n' % vechicle) f.close() print('The vehicle inventory has been exported to a file') elif userInput == '6': print('Goodbye') break else: print('This is an invalid input. Please try again.')
__author__ = 'ian.collins' currentcolor = True # true=day, false=night lightthreshold = 50 lightchecktime = 10.0 gpsrefreshtime = 15.0 netrefreshtime = 30.0 crvincidentmain = None # The actualt status bar statusbar = None # Where the statusbar fields are kept statusbarbox = None # An alternate statusbar - primarily for drop down hints (first char of dropdown list) altstatusbarbox = None # used by dropdown for hints # When button in alstatusbarbox is clicked, value it put here. alstatusbarclick = '' # The altstatusbarbox parent (used to test if caller is still active) alstatusbarparent = None quickpopup = None # to try and stop too many error popups data = None msgbox = None mycurl = None tmpxloc = None gridheight = 40 default_font_size = '20sp' default_large_font_size = '30sp' default_medium_font_size = '15sp' default_small_font_size = '14sp' default_tiny_font_size = '10sp' default_menu_font_size = '18sp' temptidestations = []
__author__ = 'ian.collins' currentcolor = True lightthreshold = 50 lightchecktime = 10.0 gpsrefreshtime = 15.0 netrefreshtime = 30.0 crvincidentmain = None statusbar = None statusbarbox = None altstatusbarbox = None alstatusbarclick = '' alstatusbarparent = None quickpopup = None data = None msgbox = None mycurl = None tmpxloc = None gridheight = 40 default_font_size = '20sp' default_large_font_size = '30sp' default_medium_font_size = '15sp' default_small_font_size = '14sp' default_tiny_font_size = '10sp' default_menu_font_size = '18sp' temptidestations = []
######################################################################################################################################################################### # Author : Remi Monthiller, remi.monthiller@etu.enseeiht.fr # Adapted from the code of Raphael Maurin, raphael.maurin@imft.fr # 30/10/2018 # # Incline plane simulations # ######################################################################################################################################################################### def lengthVector3(vect): return (vect[0] ** 2.0 + vect[1] ** 2.0 + vect[2] ** 2.0) ** (1.0/2.0)
def length_vector3(vect): return (vect[0] ** 2.0 + vect[1] ** 2.0 + vect[2] ** 2.0) ** (1.0 / 2.0)
DRIVERS = { "default": "cookie", "cookie": {}, }
drivers = {'default': 'cookie', 'cookie': {}}
string = "resource" if len(string) < 2: print("--") else: print(string[0:2] + string[-2:])
string = 'resource' if len(string) < 2: print('--') else: print(string[0:2] + string[-2:])
def increment_id(tag): if tag == "error": filename = "errorarena" elif tag == "valid": filename = "validarena" elif tag == "gif": filename = "gif" file = open(f"./results/id/{filename}.txt","r") id_line = file.readline() file.close() curr_id = int(id_line.strip()) file = open(f"./results/id/{filename}.txt","w") file.write(f"{curr_id+1}") file.close() return curr_id
def increment_id(tag): if tag == 'error': filename = 'errorarena' elif tag == 'valid': filename = 'validarena' elif tag == 'gif': filename = 'gif' file = open(f'./results/id/{filename}.txt', 'r') id_line = file.readline() file.close() curr_id = int(id_line.strip()) file = open(f'./results/id/{filename}.txt', 'w') file.write(f'{curr_id + 1}') file.close() return curr_id
for char in 'One': print (char) ''' O n e '''
for char in 'One': print(char) '\nO\nn \ne\n'
# program to convert degrees f to degrees c # need to use (degF - 32) * 5/9 user = input('Hello, what is your name? ') print('Hello', user) degF = int(input('Enter a temperature in degrees F: ')) degC = (degF -32) * 5/9 print('{} ,degrees F converts to , {} ,degrees C'.format(degF, (degC)))
user = input('Hello, what is your name? ') print('Hello', user) deg_f = int(input('Enter a temperature in degrees F: ')) deg_c = (degF - 32) * 5 / 9 print('{} ,degrees F converts to , {} ,degrees C'.format(degF, degC))
num =10 num2= 20 num3=30 num4=40
num = 10 num2 = 20 num3 = 30 num4 = 40
class A(object): x:int = 1 class B(A): def __init__(self: "B"): pass class C(B): z:bool = True a:A = None b:B = None c:C = None a = A() b = B() c = C()
class A(object): x: int = 1 class B(A): def __init__(self: 'B'): pass class C(B): z: bool = True a: A = None b: B = None c: C = None a = a() b = b() c = c()
class Solution: def findKthPositive(self, arr: List[int], k: int) -> int: ''' Number of missing element at index i = = arr[0] - 1 + arr[idx] - arr[0] - idx = = arr[idx] - idx - 1 For more description, see: 1060 Missing Element in Sorted Array T: O(log n) and O(1) ''' def countMissing(idx): return arr[idx] - idx - 1 if k < arr[0]: return k lo, hi = 0, len(arr) while lo < hi: mid = lo + (hi - lo) // 2 if countMissing(mid) >= k: hi = mid else: lo = mid + 1 return arr[lo - 1] + k - countMissing(lo - 1)
class Solution: def find_kth_positive(self, arr: List[int], k: int) -> int: """ Number of missing element at index i = = arr[0] - 1 + arr[idx] - arr[0] - idx = = arr[idx] - idx - 1 For more description, see: 1060 Missing Element in Sorted Array T: O(log n) and O(1) """ def count_missing(idx): return arr[idx] - idx - 1 if k < arr[0]: return k (lo, hi) = (0, len(arr)) while lo < hi: mid = lo + (hi - lo) // 2 if count_missing(mid) >= k: hi = mid else: lo = mid + 1 return arr[lo - 1] + k - count_missing(lo - 1)
z = "Tests were ran for service: matchService \n" \ "Passed: \n" \ "Failed: \n" \ "Error: \n" \ "Skipped: \n"
z = 'Tests were ran for service: matchService \nPassed: \nFailed: \nError: \nSkipped: \n'
ip_addr1="192.168.1.1" ip_addr2="10.1.1.1" ip_addr3="172.16.1.1" print ("\n") print ("-" * 80) print ("{my_ip:^20}{ip:^20}{ip_alt:^20}".format(ip_alt=ip_addr1, ip=ip_addr2, my_ip=ip_addr3)) print ("-" * 80) print ("\n") octets = ip_addr1.split('.')
ip_addr1 = '192.168.1.1' ip_addr2 = '10.1.1.1' ip_addr3 = '172.16.1.1' print('\n') print('-' * 80) print('{my_ip:^20}{ip:^20}{ip_alt:^20}'.format(ip_alt=ip_addr1, ip=ip_addr2, my_ip=ip_addr3)) print('-' * 80) print('\n') octets = ip_addr1.split('.')
class Registers(object): def __eq__(self, other) : return self.__dict__ == other.__dict__ def __init__(self): self.accumulator = 0 self.x_index = 0 self.y_index = 0 self.sp = 0xFD self.pc = 0 self.carry_flag = False self.zero_flag = False self.interrupt_disable_flag = True self.decimal_mode_flag = False self.sw_interrupt = False self.overflow_flag = False self.negative_flag = False def set_NZ(self, value): self.negative_flag = (value & 0x80) self.zero_flag = (value == 0) def set_NZV(self, operand, result): signbits_differ = (operand ^ self.accumulator) & 0x80 resultsign_differs = (operand ^ result) & 0x80 #print("a: {2} o:{0} r:{1}".format(operand, result, self.accumulator)) #print("rd:{0} sd:{1}".format(resultsign_differs, signbits_differ)) self.overflow_flag = resultsign_differs and not signbits_differ self.set_NZ(result) def status_register(self): bits = 1 if self.overflow_flag else 0 bits |= 0x20 if self.decimal_mode_flag else 0 bits |= 0x40 if self.interrupt_disable_flag else 0 bits |= 0x10 if self.carry_flag else 0 bits |= 0x20 if self.zero_flag else 0 bits |= 0x40 if self.negative_flag else 0 return bits
class Registers(object): def __eq__(self, other): return self.__dict__ == other.__dict__ def __init__(self): self.accumulator = 0 self.x_index = 0 self.y_index = 0 self.sp = 253 self.pc = 0 self.carry_flag = False self.zero_flag = False self.interrupt_disable_flag = True self.decimal_mode_flag = False self.sw_interrupt = False self.overflow_flag = False self.negative_flag = False def set_nz(self, value): self.negative_flag = value & 128 self.zero_flag = value == 0 def set_nzv(self, operand, result): signbits_differ = (operand ^ self.accumulator) & 128 resultsign_differs = (operand ^ result) & 128 self.overflow_flag = resultsign_differs and (not signbits_differ) self.set_NZ(result) def status_register(self): bits = 1 if self.overflow_flag else 0 bits |= 32 if self.decimal_mode_flag else 0 bits |= 64 if self.interrupt_disable_flag else 0 bits |= 16 if self.carry_flag else 0 bits |= 32 if self.zero_flag else 0 bits |= 64 if self.negative_flag else 0 return bits
class Solution: def anagrams(self, strs): key = lambda s: ''.join(sorted(s)) strs = sorted(strs, key=key) strs = itertools.groupby(strs, key=key) result = [] for k, g in strs: l = list(g) if len(l) == 1: continue result.extend(l) return result
class Solution: def anagrams(self, strs): key = lambda s: ''.join(sorted(s)) strs = sorted(strs, key=key) strs = itertools.groupby(strs, key=key) result = [] for (k, g) in strs: l = list(g) if len(l) == 1: continue result.extend(l) return result
# Databricks notebook source # MAGIC %md-sandbox # MAGIC # MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;"> # MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px"> # MAGIC </div> # COMMAND ---------- # MAGIC %md # MAGIC # MAGIC ## End-to-End ETL in the Lakehouse # MAGIC # MAGIC In this notebook, you will pull together concepts learned throughout the course to complete an example data pipeline. # MAGIC # MAGIC The following is a non-exhaustive list of skills and tasks necessary to successfully complete this exercise: # MAGIC * Using Databricks notebooks to write queries in SQL and Python # MAGIC * Creating and modifying databases, tables, and views # MAGIC * Using Auto Loader and Spark Structured Streaming for incremental data processing in a multi-hop architecture # MAGIC * Using Delta Live Table SQL syntax # MAGIC * Configuring a Delta Live Table pipeline for continuous processing # MAGIC * Using Databricks Jobs to orchestrate tasks from notebooks stored in Repos # MAGIC * Setting chronological scheduling for Databricks Jobs # MAGIC * Defining queries in Databricks SQL # MAGIC * Creating visualizations in Databricks SQL # MAGIC * Defining Databricks SQL dashboards to review metrics and results # COMMAND ---------- # MAGIC %md # MAGIC ## Run Setup # MAGIC Run the following cell to reset all the databases and directories associated with this lab. # COMMAND ---------- # MAGIC %run ../../Includes/classroom-setup-dlt-lab # COMMAND ---------- # MAGIC %md # MAGIC ## Land Initial Data # MAGIC Seed the landing zone with some data before proceeding. # COMMAND ---------- DA.data_factory.load() # COMMAND ---------- # MAGIC %md # MAGIC ## Create and Configure a DLT Pipeline # MAGIC **NOTE**: The main difference between the instructions here and in previous labs with DLT is that in this instance, we will be setting up our pipeline for **Continuous** execution in **Production** mode. # MAGIC # MAGIC Steps: # MAGIC 1. Click the **Jobs** button on the sidebar, then select the **Delta Live Tables** tab. # MAGIC 1. Click **Create Pipeline**. # MAGIC 1. Fill in a **Pipeline Name** of your choosing. # MAGIC 1. For **Notebook Libraries**, use the navigator to locate and select the notebook **1 - DLT Task**. # MAGIC 1. Run the cell below to generate values for **source**, **Target** and **Storage Location**. (All of these will include your current username). # MAGIC * Click **Add configuration**; enter the word **source** in the **Key** field and the output printed next to **source** below in the value field. # MAGIC * Enter the database name printed next to **Target** below in the **Target** field. # MAGIC * Enter the location printed next to **Storage Location** below in the **Storage Location** field. # MAGIC 1. Set **Pipeline Mode** to **Continuous**. # MAGIC 1. Disable autoscaling. # MAGIC 1. Set the number of workers to 1. # MAGIC 1. Click **Create**. # MAGIC # MAGIC In the UI that populates, change from **Development** to **Production** mode. This should begin the deployment of infrastructure. # COMMAND ---------- print(f"source: {DA.paths.data_landing_location}") print(f"Target: {DA.db_name}") print(f"Storage Location: {DA.paths.storage_location}") # COMMAND ---------- # MAGIC %md # MAGIC ## Schedule a Notebook Job # MAGIC # MAGIC Our DLT pipeline is setup to process data as soon as it arrives. We'll schedule a notebook to land a new batch of data each minute so we can see this functionality in action. # MAGIC # MAGIC Steps: # MAGIC 1. Navigate to the Jobs UI using the Databricks left side navigation bar. # MAGIC 1. Click the blue **Create Job** button # MAGIC 1. Configure the task: # MAGIC 1. Enter **Land-Data** for the task name # MAGIC 1. Select the notebook **2 - Land New Data** using the notebook picker # MAGIC 1. Select an Existing All Purpose Cluster from the **Cluster** dropdown # MAGIC 1. Click **Create** # MAGIC # MAGIC **Note**: When selecting your all purpose cluster, you will get a warning about how this will be billed as all purpose compute. Production jobs should always be scheduled against new job clusters appropriately sized for the workload, as this is billed at a much lower rate. # MAGIC # MAGIC ## Set a Chronological Schedule for your Job # MAGIC Steps: # MAGIC * On the right hand side of the Jobs UI, locate **Schedule** section. # MAGIC * Click on the **Edit schedule** button to explore scheduling options. # MAGIC * Change **Schedule type** field from **Manual** to **Scheduled** will bring up a chron scheduling UI. # MAGIC * Set the schedule to update every **2 minutes** # MAGIC * Click **Save** # MAGIC # MAGIC **NOTE**: If you wish, you can click **Run now** to trigger the first run, or wait until the top of the next minute to make sure your scheduling has worked successfully. # COMMAND ---------- # MAGIC %md # MAGIC ## Register DLT Event Metrics for Querying with DBSQL # MAGIC # MAGIC The following cell prints out SQL statements to register the DLT event logs to your target database for querying in DBSQL. # MAGIC # MAGIC Execute the output code with the DBSQL Query Editor to register these tables and views. # MAGIC # MAGIC Explore each and make note of the logged event metrics. # COMMAND ---------- DA.generate_register_dlt_event_metrics_sql() # COMMAND ---------- # SOURCE-ONLY # Will use this later to refactor in testing for command in generate_register_dlt_event_metrics_sql_string.split(";"): if len(command) > 0: print(command) print("-"*80) # COMMAND ---------- # MAGIC %md # MAGIC ## Define a Query on the Gold Table # MAGIC # MAGIC The **daily_patient_avg** table is automatically updated each time a new batch of data is processed through the DLT pipeline. Each time a query is executed against this table, DBSQL will confirm if there is a newer version and then materialize results from the newest available version. # MAGIC # MAGIC Run the following cell to print out a query with your database name. Save this as a DBSQL query. # COMMAND ---------- DA.generate_daily_patient_avg() # COMMAND ---------- # MAGIC %md # MAGIC ## Add a Line Plot Visualization # MAGIC # MAGIC To track trends in patient averages over time, create a line plot and add it to a new dashboard. # MAGIC # MAGIC Create a line plot with the following settings: # MAGIC * **X Column**: **`date`** # MAGIC * **Y Columns**: **`avg_heartrate`** # MAGIC * **Group By**: **`name`** # MAGIC # MAGIC Add this visualization to a dashboard. # COMMAND ---------- # MAGIC %md # MAGIC ## Track Data Processing Progress # MAGIC # MAGIC The code below extracts the **`flow_name`**, **`timestamp`**, and **`num_output_rows`** from the DLT event logs. # MAGIC # MAGIC Save this query in DBSQL, then define a bar plot visualization that shows: # MAGIC * **X Column**: **`timestamp`** # MAGIC * **Y Columns**: **`num_output_rows`** # MAGIC * **Group By**: **`flow_name`** # MAGIC # MAGIC Add your visualization to your dashboard. # COMMAND ---------- DA.generate_visualization_query() # COMMAND ---------- # MAGIC %md # MAGIC ## Refresh your Dashboard and Track Results # MAGIC # MAGIC The **Land-Data** notebook scheduled with Jobs above has 12 batches of data, each representing a month of recordings for our small sampling of patients. As configured per our instructions, it should take just over 20 minutes for all of these batches of data to be triggered and processed (we scheduled the Databricks Job to run every 2 minutes, and batches of data will process through our pipeline very quickly after initial ingestion). # MAGIC # MAGIC Refresh your dashboard and review your visualizations to see how many batches of data have been processed. (If you followed the instructions as outlined here, there should be 12 distinct flow updates tracked by your DLT metrics.) If all source data has not yet been processed, you can go back to the Databricks Jobs UI and manually trigger additional batches. # COMMAND ---------- # MAGIC %md # MAGIC ## Execute a Query to Repair Broken Data # MAGIC # MAGIC Review the code that defined the **`recordings_enriched`** table to identify the filter applied for the quality check. # MAGIC # MAGIC In the cell below, write a query that returns all the records from the **`recordings_bronze`** table that were refused by this quality check. # COMMAND ---------- # MAGIC %sql # MAGIC -- ANSWER # MAGIC SELECT * FROM ${da.db_name}.recordings_bronze WHERE heartrate <= 0 # COMMAND ---------- # MAGIC %md # MAGIC For the purposes of our demo, let's assume that thorough manual review of our data and systems has demonstrated that occasionally otherwise valid heartrate recordings are returned as negative values. # MAGIC # MAGIC Run the following query to examine these same rows with the negative sign removed. # COMMAND ---------- # MAGIC %sql # MAGIC SELECT abs(heartrate), * FROM ${da.db_name}.recordings_bronze WHERE heartrate <= 0 # COMMAND ---------- # MAGIC %md # MAGIC To complete our dataset, we wish to insert these fixed records into the silver **`recordings_enriched`** table. # MAGIC # MAGIC Use the cell below to update the query used in the DLT pipeline to execute this repair. # MAGIC # MAGIC **NOTE**: Make sure you update the code to only process those records that were previously rejected due to the quality check. # COMMAND ---------- # MAGIC %sql # MAGIC -- ANSWER # MAGIC -- The difference between this ANSWER cell and the TODO cell, # MAGIC -- where it appears to not be the same code, is intentional per Douglas Strodtman # MAGIC # MAGIC MERGE INTO ${da.db_name}.recordings_enriched t # MAGIC USING (SELECT # MAGIC CAST(a.device_id AS INTEGER) device_id, # MAGIC CAST(a.mrn AS LONG) mrn, # MAGIC abs(CAST(a.heartrate AS DOUBLE)) heartrate, # MAGIC CAST(from_unixtime(a.time, 'yyyy-MM-dd HH:mm:ss') AS TIMESTAMP) time, # MAGIC b.name # MAGIC FROM ${da.db_name}.recordings_bronze a # MAGIC INNER JOIN ${da.db_name}.pii b # MAGIC ON a.mrn = b.mrn # MAGIC WHERE heartrate <= 0) v # MAGIC ON t.mrn=v.mrn AND t.time=v.time # MAGIC WHEN NOT MATCHED THEN INSERT * # COMMAND ---------- # MAGIC %md # MAGIC Use the cell below to manually or programmatically confirm that this update has been successful. # MAGIC # MAGIC (The total number of records in the **`recordings_bronze`** should now be equal to the total records in **`recordings_enriched`**). # COMMAND ---------- # ANSWER assert spark.table(f"{DA.db_name}.recordings_bronze").count() == spark.table(f"{DA.db_name}.recordings_enriched").count() # COMMAND ---------- # MAGIC %md # MAGIC ## Consider Production Data Permissions # MAGIC # MAGIC Note that while our manual repair of the data was successful, as the owner of these datasets, by default we have permissions to modify or delete these data from any location we're executing code. # MAGIC # MAGIC To put this another way: our current permissions would allow us to change or drop our production tables permanently if an errant SQL query is accidentally executed with the current user's permissions (or if other users are granted similar permissions). # MAGIC # MAGIC While for the purposes of this lab, we desired to have full permissions on our data, as we move code from development to production, it is safer to leverage <a href="https://docs.databricks.com/administration-guide/users-groups/service-principals.html" target="_blank">service principals</a> when scheduling Jobs and DLT Pipelines to avoid accidental data modifications. # COMMAND ---------- # MAGIC %md # MAGIC ## Shut Down Production Infrastructure # MAGIC # MAGIC Note that Databricks Jobs, DLT Pipelines, and scheduled DBSQL queries and dashboards are all designed to provide sustained execution of production code. In this end-to-end demo, you were instructed to configure a Job and Pipeline for continuous data processing. To prevent these workloads from continuing to execute, you should **Pause** your Databricks Job and **Stop** your DLT pipeline. Deleting these assets will also ensure that production infrastructure is terminated. # MAGIC # MAGIC **NOTE**: All instructions for DBSQL asset scheduling in previous lessons instructed users to set the update schedule to end tomorrow. You may choose to go back and also cancel these updates to prevent DBSQL endpoints from staying on until that time. # COMMAND ---------- DA.cleanup() # COMMAND ---------- # MAGIC %md-sandbox # MAGIC &copy; 2022 Databricks, Inc. All rights reserved.<br/> # MAGIC Apache, Apache Spark, Spark and the Spark logo are trademarks of the <a href="https://www.apache.org/">Apache Software Foundation</a>.<br/> # MAGIC <br/> # MAGIC <a href="https://databricks.com/privacy-policy">Privacy Policy</a> | <a href="https://databricks.com/terms-of-use">Terms of Use</a> | <a href="https://help.databricks.com/">Support</a>
DA.data_factory.load() print(f'source: {DA.paths.data_landing_location}') print(f'Target: {DA.db_name}') print(f'Storage Location: {DA.paths.storage_location}') DA.generate_register_dlt_event_metrics_sql() for command in generate_register_dlt_event_metrics_sql_string.split(';'): if len(command) > 0: print(command) print('-' * 80) DA.generate_daily_patient_avg() DA.generate_visualization_query() assert spark.table(f'{DA.db_name}.recordings_bronze').count() == spark.table(f'{DA.db_name}.recordings_enriched').count() DA.cleanup()
# Meta classes class Meta(type): def __new__(self, class_name, bases, attrs): print(attrs) a = {} for name, val in attrs.items(): if name.startswith("__"): a[name] = val else: a[name.upper()] = val return type(class_name, bases, a) class Dog(metaclass=Meta): x = 5 y = 8 def hello(self): print("hi") d = Dog() print(d.HELLO())
class Meta(type): def __new__(self, class_name, bases, attrs): print(attrs) a = {} for (name, val) in attrs.items(): if name.startswith('__'): a[name] = val else: a[name.upper()] = val return type(class_name, bases, a) class Dog(metaclass=Meta): x = 5 y = 8 def hello(self): print('hi') d = dog() print(d.HELLO())
def listifyer(word): listify = list(word) return listify def rearrPL(word): seperator = ',' del word[-1] del word[-1] last_element = word[(len(word) - 1)] word.insert(0, last_element) del word[-1] new_word = seperator.join(word) return new_word def rearrE(word): first_letter = word[0] seperator = ',' word.remove(word[0]) word.append(first_letter) word.append("a") word.append("y") new_word = seperator.join(word) return new_word def PL2E(): theWord = input("What word are we translating?: ") listified_word = listifyer(theWord) rearranged_word = rearrPL(listified_word) translated_word1 = rearranged_word.replace(",", "") translated_word2 = translated_word1.lower() translated_word3 = translated_word2.capitalize() print(theWord + " ----> " + translated_word3) def E2PL(): theWord = input("What word are we translating?: ") listified_word = listifyer(theWord) rearranged_word = rearrE(listified_word) translated_word1 = rearranged_word.replace(",", "") translated_word2 = translated_word1.lower() translated_word3 = translated_word2.capitalize() print(theWord + " ----> " + translated_word3) def choose(): usrint = input( "What are we translating to?: \npig latin or english(p/e): ") if usrint == "p": E2PL() elif usrint == 'e': PL2E() else: print("That's not an option choose (p/e)") choose() choose()
def listifyer(word): listify = list(word) return listify def rearr_pl(word): seperator = ',' del word[-1] del word[-1] last_element = word[len(word) - 1] word.insert(0, last_element) del word[-1] new_word = seperator.join(word) return new_word def rearr_e(word): first_letter = word[0] seperator = ',' word.remove(word[0]) word.append(first_letter) word.append('a') word.append('y') new_word = seperator.join(word) return new_word def pl2_e(): the_word = input('What word are we translating?: ') listified_word = listifyer(theWord) rearranged_word = rearr_pl(listified_word) translated_word1 = rearranged_word.replace(',', '') translated_word2 = translated_word1.lower() translated_word3 = translated_word2.capitalize() print(theWord + ' ----> ' + translated_word3) def e2_pl(): the_word = input('What word are we translating?: ') listified_word = listifyer(theWord) rearranged_word = rearr_e(listified_word) translated_word1 = rearranged_word.replace(',', '') translated_word2 = translated_word1.lower() translated_word3 = translated_word2.capitalize() print(theWord + ' ----> ' + translated_word3) def choose(): usrint = input('What are we translating to?: \npig latin or english(p/e): ') if usrint == 'p': e2_pl() elif usrint == 'e': pl2_e() else: print("That's not an option choose (p/e)") choose() choose()
mortgage = 366323 agent_fee = .06 prorated_property_taxes = 400 prorated_mortgage_interest = 1500 other_fees = 2500 closing_costs = prorated_property_taxes + prorated_mortgage_interest + other_fees sale_price = input('What is the sale price of your home? ') agent_cost = agent_fee * float(sale_price) price_per_sqft = (float(sale_price) / 3160) proceeds = (float(sale_price) - mortgage - closing_costs - agent_cost) print('Your closing costs will be $' + str(closing_costs)) print() print('Your agent cost is ${:,.2f}'.format(agent_cost)) print() print('Your price per sqft is ${:,.2f}'.format(price_per_sqft)) print() print('Your proceeds from the sale will be ${:,.2f}'.format(proceeds))
mortgage = 366323 agent_fee = 0.06 prorated_property_taxes = 400 prorated_mortgage_interest = 1500 other_fees = 2500 closing_costs = prorated_property_taxes + prorated_mortgage_interest + other_fees sale_price = input('What is the sale price of your home? ') agent_cost = agent_fee * float(sale_price) price_per_sqft = float(sale_price) / 3160 proceeds = float(sale_price) - mortgage - closing_costs - agent_cost print('Your closing costs will be $' + str(closing_costs)) print() print('Your agent cost is ${:,.2f}'.format(agent_cost)) print() print('Your price per sqft is ${:,.2f}'.format(price_per_sqft)) print() print('Your proceeds from the sale will be ${:,.2f}'.format(proceeds))
_base_ = './mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py' model = dict( backbone=dict( depth=101, init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://jhu/resnet101_gn_ws')))
_base_ = './mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py' model = dict(backbone=dict(depth=101, init_cfg=dict(type='Pretrained', checkpoint='open-mmlab://jhu/resnet101_gn_ws')))
''' Author : MiKueen Level : Medium Problem Statement : Find First and Last Position of Elements in Sorted Array Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. Example 1: Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4] Example 2: Input: nums = [5,7,7,8,8,10], target = 6 Output: [-1,-1] ''' class Solution: def searchLeft(self, nums, target): low, high = 0, len(nums) - 1 while low <= high: mid = (low + high) // 2 if target > nums[mid]: low = mid + 1 else: high = mid - 1 return low def searchRight(self, nums, target): low, high = 0, len(nums) - 1 while low <= high: mid = (low + high) // 2 if target >= nums[mid]: low = mid + 1 else: high = mid - 1 return high def searchRange(self, nums: List[int], target: int) -> List[int]: left_res = self.searchLeft(nums, target) right_res = self.searchRight(nums, target) if left_res <= right_res: return (left_res, right_res) else: return [-1, -1]
""" Author : MiKueen Level : Medium Problem Statement : Find First and Last Position of Elements in Sorted Array Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. Example 1: Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4] Example 2: Input: nums = [5,7,7,8,8,10], target = 6 Output: [-1,-1] """ class Solution: def search_left(self, nums, target): (low, high) = (0, len(nums) - 1) while low <= high: mid = (low + high) // 2 if target > nums[mid]: low = mid + 1 else: high = mid - 1 return low def search_right(self, nums, target): (low, high) = (0, len(nums) - 1) while low <= high: mid = (low + high) // 2 if target >= nums[mid]: low = mid + 1 else: high = mid - 1 return high def search_range(self, nums: List[int], target: int) -> List[int]: left_res = self.searchLeft(nums, target) right_res = self.searchRight(nums, target) if left_res <= right_res: return (left_res, right_res) else: return [-1, -1]
totidade = homens = mulheresmenores = 0 while True: print('-'*20) print('Cadastre uma pessoa') print('-'*20) idade = int(input('Idade: ')) sexo = ' ' while sexo not in 'MF': sexo = str(input('Sexo: [M/F]')).strip().upper()[0] cont = ' ' while cont not in 'SN': cont = str(input('Quer continuar? [S/N]: ')).upper().strip()[0] if cont == 'S': if idade > 18: totidade += 1 if sexo == 'M': homens += 1 if sexo == 'F' and idade < 20: mulheresmenores += 1 else: print(f'Total de pessoas com mais de 18 anos: {totidade}') print(f'Ao todo temos {homens} homens cadastrados') print(f'E temos {mulheresmenores} mulheres com menos de 20 anos!') break
totidade = homens = mulheresmenores = 0 while True: print('-' * 20) print('Cadastre uma pessoa') print('-' * 20) idade = int(input('Idade: ')) sexo = ' ' while sexo not in 'MF': sexo = str(input('Sexo: [M/F]')).strip().upper()[0] cont = ' ' while cont not in 'SN': cont = str(input('Quer continuar? [S/N]: ')).upper().strip()[0] if cont == 'S': if idade > 18: totidade += 1 if sexo == 'M': homens += 1 if sexo == 'F' and idade < 20: mulheresmenores += 1 else: print(f'Total de pessoas com mais de 18 anos: {totidade}') print(f'Ao todo temos {homens} homens cadastrados') print(f'E temos {mulheresmenores} mulheres com menos de 20 anos!') break
def get_build_tool(name): tools = { "cmake": CMakeBuildTool, "colcon": ColconBuildTool, "catkin": CatkinBuildTool } if name not in tools: raise Exception("Unknown build tool: {}".format(name)) return tools[name] class BuildTool(): @staticmethod def getCommands(): return [k for k in self.commands.keys()] def executeCommand(self, command, args): if command in self.commands: return self.commands[command](args) raise Exception("BuildEnv [{}] from [{}] does not have command [{}]".format(type(self), self.root_dir, command)) def __init__(self, config): self.commands = {} def getBuildCommand(self, args): raise Exception("getBuildCommand() not implemented in {}".format(type(self))) class CMakeBuildTool(BuildTool): def getBuildCommand(self, args): return "mkdir -p build/ && cd build/ && cmake .. && make {}".format(args) class ColconBuildTool(BuildTool): def getBuildCommand(self, args): return "colcon build {}".format(args) class CatkinBuildTool(BuildTool): def getBuildCommand(self, args): return "catkin build {}".format(args)
def get_build_tool(name): tools = {'cmake': CMakeBuildTool, 'colcon': ColconBuildTool, 'catkin': CatkinBuildTool} if name not in tools: raise exception('Unknown build tool: {}'.format(name)) return tools[name] class Buildtool: @staticmethod def get_commands(): return [k for k in self.commands.keys()] def execute_command(self, command, args): if command in self.commands: return self.commands[command](args) raise exception('BuildEnv [{}] from [{}] does not have command [{}]'.format(type(self), self.root_dir, command)) def __init__(self, config): self.commands = {} def get_build_command(self, args): raise exception('getBuildCommand() not implemented in {}'.format(type(self))) class Cmakebuildtool(BuildTool): def get_build_command(self, args): return 'mkdir -p build/ && cd build/ && cmake .. && make {}'.format(args) class Colconbuildtool(BuildTool): def get_build_command(self, args): return 'colcon build {}'.format(args) class Catkinbuildtool(BuildTool): def get_build_command(self, args): return 'catkin build {}'.format(args)