content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
""" CS241 Checkpoint 02B Written by Chad Macbeth """ ### Get file name from the user def get_filename(): filename = input("Enter file: ") return filename ### Open the file and analyze words and lines ### Returns a tuple (word count, line count) def read_file(filename): file_in = open(filename, "r") line_count = 0 word_count = 0 for line in file_in: # Loop through each line of the file line_count += 1 words = line.split() # Create a list of words from the line (default is spaces) word_count += len(words) # Count the number of words in the list file_in.close() return (word_count, line_count) ### Driver to test funtions def main(): filename = get_filename() (word_count, line_count) = read_file(filename) print("The file contains {} lines and {} words." .format(line_count, word_count)) if __name__ == "__main__": main()
""" CS241 Checkpoint 02B Written by Chad Macbeth """ def get_filename(): filename = input('Enter file: ') return filename def read_file(filename): file_in = open(filename, 'r') line_count = 0 word_count = 0 for line in file_in: line_count += 1 words = line.split() word_count += len(words) file_in.close() return (word_count, line_count) def main(): filename = get_filename() (word_count, line_count) = read_file(filename) print('The file contains {} lines and {} words.'.format(line_count, word_count)) if __name__ == '__main__': main()
REDIS_URL = 'redis://redis/0' ERROR_NO_IMAGE = 'Please provide an image' ERROR_NO_TEXT = 'Please provide some text' MAX_SIZE = (512, 512) # Where to store the models weights # (except for Keras' that are stored in ~/.keras) WEIGHT_PATH = './weights' # Original model source: https://drive.google.com/drive/folders/0B_rootXHuswsZ0E4Mjh1ZU5xZVU DEEPLAB_URL = 'http://eliot.andres.free.fr/models/deeplab_resnet.ckpt' DEEPLAB_FILENAME = 'deeplab_resnet.ckpt' SSD_INCEPTION_URL = 'http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_11_06_2017.tar.gz' SSD_INCEPTION_FILENAME = 'ssd_inception_v2_coco_11_06_2017.tar.gz'
redis_url = 'redis://redis/0' error_no_image = 'Please provide an image' error_no_text = 'Please provide some text' max_size = (512, 512) weight_path = './weights' deeplab_url = 'http://eliot.andres.free.fr/models/deeplab_resnet.ckpt' deeplab_filename = 'deeplab_resnet.ckpt' ssd_inception_url = 'http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_11_06_2017.tar.gz' ssd_inception_filename = 'ssd_inception_v2_coco_11_06_2017.tar.gz'
s = input() print(any(char.isalnum() for char in s)) print(any(char.isalpha() for char in s)) print(any(char.isdigit() for char in s)) print(any(char.islower() for char in s)) print(any(char.isupper() for char in s))
s = input() print(any((char.isalnum() for char in s))) print(any((char.isalpha() for char in s))) print(any((char.isdigit() for char in s))) print(any((char.islower() for char in s))) print(any((char.isupper() for char in s)))
"""Kata url: https://www.codewars.com/kata/544675c6f971f7399a000e79.""" def string_to_number(s: int) -> int: return int(s)
"""Kata url: https://www.codewars.com/kata/544675c6f971f7399a000e79.""" def string_to_number(s: int) -> int: return int(s)
# -*- coding: utf-8 -*- # @Author: jpch89 # @Email: jpch89@outlook.com # @Time: 2018/7/28 20:29 def convert_number(s): try: return int(s) except ValueError: return None
def convert_number(s): try: return int(s) except ValueError: return None
# This test verifies that __name__ == "__main__" works properly in Python Loader if __name__ == "__main__": print('Test: 1234567890abcd')
if __name__ == '__main__': print('Test: 1234567890abcd')
def run(): my_list = [1, 'Hi', True, 4.5] my_dict = { "first_name": "Hernan", "last_name": "Chamorro", } super_list = [ { "first_name": "Hernan", "last_name": "Chamorro",}, { "first_name": "Gustavo", "last_name": "Ramon",}, { "first_name": "Bruno", "last_name": "Facundo",}, { "first_name": "Geronimo", "last_name": "Atahualpa",}, ] super_dict = { "natural_nums": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "integer_nums": [-2, -1, 0, 1, 2, 3, 4, 5,], "floating_nums": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], } for key, value in super_dict.items(): print(key, "-", value) for dict in super_list: print(dict['first_name'], "-", dict['last_name']) if __name__ == '__main__': run()
def run(): my_list = [1, 'Hi', True, 4.5] my_dict = {'first_name': 'Hernan', 'last_name': 'Chamorro'} super_list = [{'first_name': 'Hernan', 'last_name': 'Chamorro'}, {'first_name': 'Gustavo', 'last_name': 'Ramon'}, {'first_name': 'Bruno', 'last_name': 'Facundo'}, {'first_name': 'Geronimo', 'last_name': 'Atahualpa'}] super_dict = {'natural_nums': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'integer_nums': [-2, -1, 0, 1, 2, 3, 4, 5], 'floating_nums': [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]} for (key, value) in super_dict.items(): print(key, '-', value) for dict in super_list: print(dict['first_name'], '-', dict['last_name']) if __name__ == '__main__': run()
friends = ['Mark', 'Simona', 'Paul', 'Jeremy', 'Colin', 'Sophie'] counter = 0 for counter, friend in enumerate(friends, start=1): print(counter, friend) print(list(enumerate(friends))) print(dict(enumerate(friends)))
friends = ['Mark', 'Simona', 'Paul', 'Jeremy', 'Colin', 'Sophie'] counter = 0 for (counter, friend) in enumerate(friends, start=1): print(counter, friend) print(list(enumerate(friends))) print(dict(enumerate(friends)))
def removeElement_1(nums, val): """ Brute force solution Don't preserve order """ # count the frequency of the val val_freq = 0 for num in nums: if num == val: val_freq += 1 # print(val_freq) new_len = len(nums) - val_freq # remove the element from the list i = 0 j = len(nums) - 1 while val_freq > 0 and i < new_len: if nums[i] == val: print('index:', i) while j > 0 and nums[j] == val: j -= 1 print('j:', j) # swap elements temp = nums[i] nums[i] = nums[j] nums[j] = temp val_freq -= 1 j -= 1 i += 1 return new_len def removeElement_2(nums, val): """ Using one loop and two pointers Don't preserve order """ # Remove the elment from the list i = 0 j = len(nums) - 1 count = 0 while i < j: if nums[i] == val: while j > i and nums[j] == val: j -= 1 print('i:', i, 'j:', j) # swap elements temp = nums[i] nums[i] = nums[j] nums[j] = temp count += 1 print(nums) i += 1 if count == 0: j = j + 1 return j def main(): arr = [int(j) for j in input().split()] val = int(input()) ans = removeElement_2(arr, val) print(ans) print(arr[:ans]) if __name__ == '__main__': main()
def remove_element_1(nums, val): """ Brute force solution Don't preserve order """ val_freq = 0 for num in nums: if num == val: val_freq += 1 new_len = len(nums) - val_freq i = 0 j = len(nums) - 1 while val_freq > 0 and i < new_len: if nums[i] == val: print('index:', i) while j > 0 and nums[j] == val: j -= 1 print('j:', j) temp = nums[i] nums[i] = nums[j] nums[j] = temp val_freq -= 1 j -= 1 i += 1 return new_len def remove_element_2(nums, val): """ Using one loop and two pointers Don't preserve order """ i = 0 j = len(nums) - 1 count = 0 while i < j: if nums[i] == val: while j > i and nums[j] == val: j -= 1 print('i:', i, 'j:', j) temp = nums[i] nums[i] = nums[j] nums[j] = temp count += 1 print(nums) i += 1 if count == 0: j = j + 1 return j def main(): arr = [int(j) for j in input().split()] val = int(input()) ans = remove_element_2(arr, val) print(ans) print(arr[:ans]) if __name__ == '__main__': main()
# # @lc app=leetcode id=109 lang=python3 # # [109] Convert Sorted List to Binary Search Tree # # https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/ # # algorithms # Medium (49.90%) # Likes: 2801 # Dislikes: 95 # Total Accepted: 287.7K # Total Submissions: 568.6K # Testcase Example: '[-10,-3,0,5,9]' # # Given the head of a singly linked list where elements are sorted in ascending # order, convert it to a height balanced BST. # # For this problem, a height-balanced binary tree is defined as a binary tree # in which the depth of the two subtrees of every node never differ by more # than 1. # # # Example 1: # # # Input: head = [-10,-3,0,5,9] # Output: [0,-3,9,-10,null,5] # Explanation: One possible answer is [0,-3,9,-10,null,5], which represents the # shown height balanced BST. # # # Example 2: # # # Input: head = [] # Output: [] # # # Example 3: # # # Input: head = [0] # Output: [0] # # # Example 4: # # # Input: head = [1,3] # Output: [3,1] # # # # Constraints: # # # The number of nodes in head is in the range [0, 2 * 10^4]. # -10^5 <= Node.val <= 10^5 # # # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def sortedListToBST(self, head: ListNode) -> TreeNode: return self.create_bst(head) def create_bst(self, head): if not head or not head.next: return TreeNode(head.val) if head else None # find mid treenode slow, fast = head, head.next while fast.next and fast.next.next: slow = slow.next fast = fast.next.next next_node = slow.next slow.next = None root = TreeNode(next_node.val) left = self.create_bst(head) right = self.create_bst(next_node.next) root.left = left root.right = right return root # @lc code=end
class Solution: def sorted_list_to_bst(self, head: ListNode) -> TreeNode: return self.create_bst(head) def create_bst(self, head): if not head or not head.next: return tree_node(head.val) if head else None (slow, fast) = (head, head.next) while fast.next and fast.next.next: slow = slow.next fast = fast.next.next next_node = slow.next slow.next = None root = tree_node(next_node.val) left = self.create_bst(head) right = self.create_bst(next_node.next) root.left = left root.right = right return root
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Tests for shared flocker components. """
""" Tests for shared flocker components. """
class Tree_node: def __init__(self,data): self.data = data self.parent = None self.left = None self.right = None def __repr__(self): return repr(self.data) def add_left(self, node): self.left = node if node is not None: node.parent = self def add_right(self, node): self.right = node if node is not None: node.parent = self def bst_insert(root, node): last_node = None current_node = root while current_node is not None: last_node = current_node if node.data < current_node.data: current_node = current_node.left else: current_node = current_node.right if last_node is None: root = node elif node.data < last_node.data: last_node.add_left(node) else: last_node.add_right(node) return root """ 10 / \ 5 17 / \ / \ 3 7 12 19 / \ 1 4 """ def create_bst(): root = Tree_node(10) for item in [5, 17, 3, 7, 12, 9, 1, 4]: node = Tree_node(item) root = bst_insert(root, node) return root def bst_search(node, key): while node is not None: if node.data == key: return node if key < node.data: node = node.left else: node = node.right return node if __name__ == '__main__': root = create_bst() print(root) for key in [7, 8]: print('Searching', key) print(bst_search(root, key))
class Tree_Node: def __init__(self, data): self.data = data self.parent = None self.left = None self.right = None def __repr__(self): return repr(self.data) def add_left(self, node): self.left = node if node is not None: node.parent = self def add_right(self, node): self.right = node if node is not None: node.parent = self def bst_insert(root, node): last_node = None current_node = root while current_node is not None: last_node = current_node if node.data < current_node.data: current_node = current_node.left else: current_node = current_node.right if last_node is None: root = node elif node.data < last_node.data: last_node.add_left(node) else: last_node.add_right(node) return root '\n 10\n / 5 17\n / \\ / 3 7 12 19\n / 1 4\n ' def create_bst(): root = tree_node(10) for item in [5, 17, 3, 7, 12, 9, 1, 4]: node = tree_node(item) root = bst_insert(root, node) return root def bst_search(node, key): while node is not None: if node.data == key: return node if key < node.data: node = node.left else: node = node.right return node if __name__ == '__main__': root = create_bst() print(root) for key in [7, 8]: print('Searching', key) print(bst_search(root, key))
""" Write a function that satisfies the following rules: Return true if the string in the first element of the list contains all of the letters of the string in the second element of the list. """ def mutation(input_list): short, long = sorted(map(lambda l: l.lower(), input_list), key=lambda item: len(item)) for letter in short: if letter not in long: return False return True if __name__ == "__main__": print(mutation(["hello", "Hello"])) print(mutation(["hello", "hey"])) print(mutation(["Alien", "line"])) print(mutation(["aaaaa", "aaaa"]))
""" Write a function that satisfies the following rules: Return true if the string in the first element of the list contains all of the letters of the string in the second element of the list. """ def mutation(input_list): (short, long) = sorted(map(lambda l: l.lower(), input_list), key=lambda item: len(item)) for letter in short: if letter not in long: return False return True if __name__ == '__main__': print(mutation(['hello', 'Hello'])) print(mutation(['hello', 'hey'])) print(mutation(['Alien', 'line'])) print(mutation(['aaaaa', 'aaaa']))
class Solution(object): def numberOfBeams(self, bank): """ :type bank: List[str] :rtype: int """ beams = 0 bank_len = len(bank) if bank_len == 1: return 0 else: i = 0 j = 1 while(j < bank_len): # does row i have any lasers? sum_lasers_i = sum([int(x) for x in bank[i]]) if sum_lasers_i == 0: i += 1 j = i + 1 else: # does row j have any lasers? sum_lasers_j = sum([int(x) for x in bank[j]]) if sum_lasers_j == 0: j += 1 else: beams += sum_lasers_i * sum_lasers_j i = j j += 1 return beams def main(): bank = ["011001","000000","010100","001000"] obj = Solution() return obj.numberOfBeams(bank) if __name__ == "__main__": print(main())
class Solution(object): def number_of_beams(self, bank): """ :type bank: List[str] :rtype: int """ beams = 0 bank_len = len(bank) if bank_len == 1: return 0 else: i = 0 j = 1 while j < bank_len: sum_lasers_i = sum([int(x) for x in bank[i]]) if sum_lasers_i == 0: i += 1 j = i + 1 else: sum_lasers_j = sum([int(x) for x in bank[j]]) if sum_lasers_j == 0: j += 1 else: beams += sum_lasers_i * sum_lasers_j i = j j += 1 return beams def main(): bank = ['011001', '000000', '010100', '001000'] obj = solution() return obj.numberOfBeams(bank) if __name__ == '__main__': print(main())
class RegularExpression(): def __init__(self, regexStr): self.regexStr = regexStr def __str__(self): return self.regexStr
class Regularexpression: def __init__(self, regexStr): self.regexStr = regexStr def __str__(self): return self.regexStr
def pythonic_solution(S, P, Q): I = {'A': 1, 'C': 2, 'G': 3, 'T': 4} # Obvious solution, scalable and compact. But slow for very large S # with plenty of entropy. result = [] for a, b in zip(P, Q): i = min(S[a:b+1], key=lambda x: I[x]) result.append(I[i]) return result def prefix_sum_solution(S, P, Q): I = {'A': 1, 'C': 2, 'G': 3, 'T': 4} # Faster version using prefix sums as hinted at by the lesson. But has a # pretty large space vs time trade-off. It uses both a prefix sum array and # a pigeonhole array to keep track fo the impact factor counts. n = len(S) # Create an array of n+1 pigeon holes to store counts for each impact # factor. PS = [[0, 0, 0, 0]] * (n + 1) # Use prefix sum algorithm to store occurrences of each impact factor in # its pigeon hole.. for k in range(1, n + 1): PS[k] = PS[k - 1][:] PS[k][I[S[k - 1]] - 1] += 1 result = [] for a, b in zip(P, Q): # Use prefix sum pigeon holes to count occurences of impact factor for # the slice in a, b. hits = [i - j for i, j in zip(PS[b+1], PS[a])] # This could be generalized into a loop to scan for hit counts. But # Since our set is small we can optimize into if..elif..else if hits[0]: result.append(1) elif hits[1]: result.append(2) elif hits[2]: result.append(3) else: result.append(4) return result def solution(S, P, Q): return prefix_sum_solution(S, P, Q) def test_example(): assert [2, 4, 1] == solution('CAGCCTA', [2, 5, 0], [4, 5, 6]) def test_single(): assert [1] == solution('A', [0], [0]) def test_extreme_large_last(): S = ('T' * 99999) + 'A' assert [1] == solution(S, [0], [99999])
def pythonic_solution(S, P, Q): i = {'A': 1, 'C': 2, 'G': 3, 'T': 4} result = [] for (a, b) in zip(P, Q): i = min(S[a:b + 1], key=lambda x: I[x]) result.append(I[i]) return result def prefix_sum_solution(S, P, Q): i = {'A': 1, 'C': 2, 'G': 3, 'T': 4} n = len(S) ps = [[0, 0, 0, 0]] * (n + 1) for k in range(1, n + 1): PS[k] = PS[k - 1][:] PS[k][I[S[k - 1]] - 1] += 1 result = [] for (a, b) in zip(P, Q): hits = [i - j for (i, j) in zip(PS[b + 1], PS[a])] if hits[0]: result.append(1) elif hits[1]: result.append(2) elif hits[2]: result.append(3) else: result.append(4) return result def solution(S, P, Q): return prefix_sum_solution(S, P, Q) def test_example(): assert [2, 4, 1] == solution('CAGCCTA', [2, 5, 0], [4, 5, 6]) def test_single(): assert [1] == solution('A', [0], [0]) def test_extreme_large_last(): s = 'T' * 99999 + 'A' assert [1] == solution(S, [0], [99999])
class shapeCharacter: rotationNumber = 1 def moveRight(self): self.x1 = self.x1 + 1 self.x2 = self.x2 + 1 self.x3 = self.x3 + 1 self.x4 = self.x4 + 1 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def moveDown(self): self.y1 = self.y1 + 1 self.y2+=1 self.y3+=1 self.y4+=1 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def moveLeft(self): self.x1 = self.x1 - 1 self.x2 = self.x2 - 1 self.x3 = self.x3 - 1 self.x4 = self.x4 - 1 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def updateCords(self, update): [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] = update self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] class Square(shapeCharacter): def __init__(self): self.number = 1 self.y1, self.y2, self.y3, self.y4 = 0, 0, 1, 1 self.x1, self.x2, self.x3, self.x4 = 4, 5, 4, 5 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber = 1 class LongPiece(shapeCharacter): def __init__(self): self.number = 2 self.y1, self.y2, self.y3, self.y4 = 0, 0, 0, 0 self.x1, self.x2, self.x3, self.x4 = 3, 4, 5, 6 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 2 != 0: self.rotationCordinates = [(self.y1+1,self.x1-1), (self.y2,self.x2), (self.y3-1,self.x3+1), (self.y4-2,self.x4+2)] if self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1-1,self.x1+1), (self.y2,self.x2), (self.y3+1,self.x3-1), (self.y4+2,self.x4-2)] class TeePiece(shapeCharacter): def __init__(self): self.number = 3 self.y1, self.y2, self.y3, self.y4 = 0, 1, 1, 1 self.x1, self.x2, self.x3, self.x4 = 4, 3, 4, 5 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1-1,self.x1+1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4-2)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1+1,self.x1-1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1,self.x1), (self.y2+1,self.x2+1), (self.y3,self.x3), (self.y4,self.x4)] else: self.rotationCordinates = [(self.y1,self.x1), (self.y2-1,self.x2-1), (self.y3,self.x3), (self.y4,self.x4+2)] self.rotationNumber = 1 class LeftEl(shapeCharacter): def __init__(self): self.number = 4 self.y1, self.y2, self.y3, self.y4 = 0, 1, 1, 1 self.x1, self.x2, self.x3, self.x4 = 3, 3, 4, 5 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1,self.x1-2), (self.y2+1,self.x2-1), (self.y3,self.x3), (self.y4-1,self.x4+1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1+2,self.x1), (self.y2+1,self.x2+1), (self.y3,self.x3), (self.y4-1,self.x4-1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1,self.x1+2), (self.y2-1,self.x2+1), (self.y3,self.x3), (self.y4+1,self.x4-1)] else: self.rotationCordinates = [(self.y1-2,self.x1), (self.y2-1,self.x2-1), (self.y3,self.x3), (self.y4+1,self.x4+1)] self.rotationNumber = 1 class RightEl(shapeCharacter): def __init__(self): self.number = 5 self.y1, self.y2, self.y3, self.y4 = 0, 1, 1, 1 self.x1, self.x2, self.x3, self.x4 = 5, 3, 4, 5 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1-2,self.x1), (self.y2+1,self.x2-1), (self.y3,self.x3), (self.y4-1,self.x4+1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1,self.x1-2), (self.y2+1,self.x2+1), (self.y3,self.x3), (self.y4-1,self.x4-1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1+2,self.x1), (self.y2-1,self.x2+1), (self.y3,self.x3), (self.y4+1,self.x4-1)] else: self.rotationCordinates = [(self.y1,self.x1+2), (self.y2-1,self.x2-1), (self.y3,self.x3), (self.y4+1,self.x4+1)] self.rotationNumber = 1 class ZigZagRight(shapeCharacter): def __init__(self): self.number = 6 self.y1, self.y2, self.y3, self.y4 = 0, 0, 1, 1 self.x1, self.x2, self.x3, self.x4 = 4, 5, 3, 4 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1-1,self.x1-1), (self.y2-2,self.x2), (self.y3+1,self.x3-1), (self.y4,self.x4)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1+1,self.x1-1), (self.y2,self.x2-2), (self.y3+1,self.x3+1), (self.y4,self.x4)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1+1,self.x1+1), (self.y2+2,self.x2), (self.y3-1,self.x3+1), (self.y4,self.x4)] else: self.rotationCordinates = [(self.y1-1,self.x1+1), (self.y2,self.x2+2), (self.y3-1,self.x3-1), (self.y4,self.x4)] self.rotationNumber = 1 class ZigZagLeft(shapeCharacter): def __init__(self): self.number = 7 self.y1, self.y2, self.y3, self.y4 = 0, 0, 1, 1 self.x1, self.x2, self.x3, self.x4 = 3, 4, 4, 5 self.cordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] self.rotationCordinates = [(self.y1,self.x1), (self.y2,self.x2), (self.y3,self.x3), (self.y4,self.x4)] def rotate(self): self.rotationNumber+=1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1,self.x1-2), (self.y2-1,self.x2-1), (self.y3,self.x3), (self.y4-1,self.x4+1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1+2,self.x1), (self.y2+1,self.x2-1), (self.y3,self.x3), (self.y4-1,self.x4-1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1,self.x1+2), (self.y2+1,self.x2+1), (self.y3,self.x3), (self.y4+1,self.x4-1)] else: self.rotationCordinates = [(self.y1-2,self.x1), (self.y2-1,self.x2+1), (self.y3,self.x3), (self.y4+1,self.x4+1)] self.rotationNumber = 1 #%%
class Shapecharacter: rotation_number = 1 def move_right(self): self.x1 = self.x1 + 1 self.x2 = self.x2 + 1 self.x3 = self.x3 + 1 self.x4 = self.x4 + 1 self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def move_down(self): self.y1 = self.y1 + 1 self.y2 += 1 self.y3 += 1 self.y4 += 1 self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def move_left(self): self.x1 = self.x1 - 1 self.x2 = self.x2 - 1 self.x3 = self.x3 - 1 self.x4 = self.x4 - 1 self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def update_cords(self, update): [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] = update self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] class Square(shapeCharacter): def __init__(self): self.number = 1 (self.y1, self.y2, self.y3, self.y4) = (0, 0, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (4, 5, 4, 5) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber = 1 class Longpiece(shapeCharacter): def __init__(self): self.number = 2 (self.y1, self.y2, self.y3, self.y4) = (0, 0, 0, 0) (self.x1, self.x2, self.x3, self.x4) = (3, 4, 5, 6) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 2 != 0: self.rotationCordinates = [(self.y1 + 1, self.x1 - 1), (self.y2, self.x2), (self.y3 - 1, self.x3 + 1), (self.y4 - 2, self.x4 + 2)] if self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1 - 1, self.x1 + 1), (self.y2, self.x2), (self.y3 + 1, self.x3 - 1), (self.y4 + 2, self.x4 - 2)] class Teepiece(shapeCharacter): def __init__(self): self.number = 3 (self.y1, self.y2, self.y3, self.y4) = (0, 1, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (4, 3, 4, 5) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1 - 1, self.x1 + 1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4 - 2)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1 + 1, self.x1 - 1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1, self.x1), (self.y2 + 1, self.x2 + 1), (self.y3, self.x3), (self.y4, self.x4)] else: self.rotationCordinates = [(self.y1, self.x1), (self.y2 - 1, self.x2 - 1), (self.y3, self.x3), (self.y4, self.x4 + 2)] self.rotationNumber = 1 class Leftel(shapeCharacter): def __init__(self): self.number = 4 (self.y1, self.y2, self.y3, self.y4) = (0, 1, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (3, 3, 4, 5) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1, self.x1 - 2), (self.y2 + 1, self.x2 - 1), (self.y3, self.x3), (self.y4 - 1, self.x4 + 1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1 + 2, self.x1), (self.y2 + 1, self.x2 + 1), (self.y3, self.x3), (self.y4 - 1, self.x4 - 1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1, self.x1 + 2), (self.y2 - 1, self.x2 + 1), (self.y3, self.x3), (self.y4 + 1, self.x4 - 1)] else: self.rotationCordinates = [(self.y1 - 2, self.x1), (self.y2 - 1, self.x2 - 1), (self.y3, self.x3), (self.y4 + 1, self.x4 + 1)] self.rotationNumber = 1 class Rightel(shapeCharacter): def __init__(self): self.number = 5 (self.y1, self.y2, self.y3, self.y4) = (0, 1, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (5, 3, 4, 5) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1 - 2, self.x1), (self.y2 + 1, self.x2 - 1), (self.y3, self.x3), (self.y4 - 1, self.x4 + 1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1, self.x1 - 2), (self.y2 + 1, self.x2 + 1), (self.y3, self.x3), (self.y4 - 1, self.x4 - 1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1 + 2, self.x1), (self.y2 - 1, self.x2 + 1), (self.y3, self.x3), (self.y4 + 1, self.x4 - 1)] else: self.rotationCordinates = [(self.y1, self.x1 + 2), (self.y2 - 1, self.x2 - 1), (self.y3, self.x3), (self.y4 + 1, self.x4 + 1)] self.rotationNumber = 1 class Zigzagright(shapeCharacter): def __init__(self): self.number = 6 (self.y1, self.y2, self.y3, self.y4) = (0, 0, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (4, 5, 3, 4) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1 - 1, self.x1 - 1), (self.y2 - 2, self.x2), (self.y3 + 1, self.x3 - 1), (self.y4, self.x4)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1 + 1, self.x1 - 1), (self.y2, self.x2 - 2), (self.y3 + 1, self.x3 + 1), (self.y4, self.x4)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1 + 1, self.x1 + 1), (self.y2 + 2, self.x2), (self.y3 - 1, self.x3 + 1), (self.y4, self.x4)] else: self.rotationCordinates = [(self.y1 - 1, self.x1 + 1), (self.y2, self.x2 + 2), (self.y3 - 1, self.x3 - 1), (self.y4, self.x4)] self.rotationNumber = 1 class Zigzagleft(shapeCharacter): def __init__(self): self.number = 7 (self.y1, self.y2, self.y3, self.y4) = (0, 0, 1, 1) (self.x1, self.x2, self.x3, self.x4) = (3, 4, 4, 5) self.cordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] self.rotationCordinates = [(self.y1, self.x1), (self.y2, self.x2), (self.y3, self.x3), (self.y4, self.x4)] def rotate(self): self.rotationNumber += 1 if self.rotationNumber % 4 == 0: self.rotationCordinates = [(self.y1, self.x1 - 2), (self.y2 - 1, self.x2 - 1), (self.y3, self.x3), (self.y4 - 1, self.x4 + 1)] elif self.rotationNumber % 3 == 0: self.rotationCordinates = [(self.y1 + 2, self.x1), (self.y2 + 1, self.x2 - 1), (self.y3, self.x3), (self.y4 - 1, self.x4 - 1)] elif self.rotationNumber % 2 == 0: self.rotationCordinates = [(self.y1, self.x1 + 2), (self.y2 + 1, self.x2 + 1), (self.y3, self.x3), (self.y4 + 1, self.x4 - 1)] else: self.rotationCordinates = [(self.y1 - 2, self.x1), (self.y2 - 1, self.x2 + 1), (self.y3, self.x3), (self.y4 + 1, self.x4 + 1)] self.rotationNumber = 1
""" My implementation of fizzbuzz. """ def fizzbuzz(number): if number % 3 == 0 and number % 5 == 0: print ('fizzbuzz') elif number % 3 == 0: print ('fizz') elif number % 5 != 0: print ('buzz') if __name__ == '__main__': fizzbuzz(15)
""" My implementation of fizzbuzz. """ def fizzbuzz(number): if number % 3 == 0 and number % 5 == 0: print('fizzbuzz') elif number % 3 == 0: print('fizz') elif number % 5 != 0: print('buzz') if __name__ == '__main__': fizzbuzz(15)
# class Solution(object): # def isValid(self, s): # class Solution: def isValid(self, s): stack = [] dic = {']' :'[', '}':'{', ')':'('} for c in s: if c in dic.values(): stack.append(c) elif c in dic.keys(): if stack == [] or dic[c] != stack.pop(): return False else: return False return stack == [] # def isValid(self, s): # # python replace # n = len(s) # if n == 0: # return True # # if n % 2 != 0: # return False # # while '()' in s or '{}' in s or '[]' in s: # s = s.replace('{}', '').replace('()', '').replace('[]', '') # # if s == '': # return True # else: # return False
class Solution: def is_valid(self, s): stack = [] dic = {']': '[', '}': '{', ')': '('} for c in s: if c in dic.values(): stack.append(c) elif c in dic.keys(): if stack == [] or dic[c] != stack.pop(): return False else: return False return stack == []
''' Project: SingleLinkedList File: SingleLinkedList.py Author: Sanjay Vyas Description: Implementation of a simple linked list in Python Revision History: 2018-November-17: Initial Creation Copyright (c) 2019 Sanjay Vyas License: This code is meant for learning algorithms and writing clean code Do not copy-paste it, it may not help in understanding the code You are required to understand the code and then type it yourself Disclaimer: This code may contain intentional and unintentional bugs There are no warranties of the code working correctly ''' class Node: ''' Node class represents a single node in the linked list It holds a value and pointer to next ''' def __init__(self, value): ''' Constructor ''' self.value = value self.next = None class List: ''' List represents a list of Nodes It holds head (pointing to first node) and tail (pointing to last node) ''' def __init__(self): # Create head and tail fields self.head = None self.tail = None def __del__(self): pass def push_back(self, value): ''' Create a new node and add it to the end of the list ''' node = Node(value) # Check if its the first node created # In which case, make head and tail point to it if (self.head is None): self.head = node else: # If its not the first node, then it will next of tail self.tail.next = node self.tail = node def push_front(self, value): ''' Create a new node and add it to the beginning of the list ''' node = Node(value) # Check if its the first node created # In which case, make head and tail point to it if (self.head is None): self.tail = node else: # If its not the first node, then it will be before head node.next = self.head self.head = node def print_list(self): ''' Print the entire list from head to tail ''' # Start with head node=self.head # While we don't reach the tail, keep printing the value while node is not None: print(node.value) node=node.next if __name__ == '__main__': obj = List() i=1 while i !=0: i=int(raw_input("Enter value: ")) if i != 0: obj.push_back(i) obj.print_list() i=1 while i !=0: i=int(raw_input("Enter value: ")) if i != 0: obj.push_front(i) obj.print_list()
""" Project: SingleLinkedList File: SingleLinkedList.py Author: Sanjay Vyas Description: Implementation of a simple linked list in Python Revision History: 2018-November-17: Initial Creation Copyright (c) 2019 Sanjay Vyas License: This code is meant for learning algorithms and writing clean code Do not copy-paste it, it may not help in understanding the code You are required to understand the code and then type it yourself Disclaimer: This code may contain intentional and unintentional bugs There are no warranties of the code working correctly """ class Node: """ Node class represents a single node in the linked list It holds a value and pointer to next """ def __init__(self, value): """ Constructor """ self.value = value self.next = None class List: """ List represents a list of Nodes It holds head (pointing to first node) and tail (pointing to last node) """ def __init__(self): self.head = None self.tail = None def __del__(self): pass def push_back(self, value): """ Create a new node and add it to the end of the list """ node = node(value) if self.head is None: self.head = node else: self.tail.next = node self.tail = node def push_front(self, value): """ Create a new node and add it to the beginning of the list """ node = node(value) if self.head is None: self.tail = node else: node.next = self.head self.head = node def print_list(self): """ Print the entire list from head to tail """ node = self.head while node is not None: print(node.value) node = node.next if __name__ == '__main__': obj = list() i = 1 while i != 0: i = int(raw_input('Enter value: ')) if i != 0: obj.push_back(i) obj.print_list() i = 1 while i != 0: i = int(raw_input('Enter value: ')) if i != 0: obj.push_front(i) obj.print_list()
""" [2015-12-09] Challenge #244 [Easy]er - Array language (part 3) - J Forks https://www.reddit.com/r/dailyprogrammer/comments/3wdm0w/20151209_challenge_244_easyer_array_language_part/ This challenge does not require doing the previous 2 parts. If you want something harder, the rank conjunction from Wednesday's challenge requires concentration. # Forks A fork is a function that takes 3 functions that are all "duck defined" to take 2 parameters with 2nd optional or ignorable. for 3 functions, `f(y,x= default):` , `g(y,x= default):` , `h(y,x= default):` , where the function g is a "genuine" 2 parameter function, the call `Fork(f,g,h)` executes the function composition: g(f(y,x),h(y,x)) (data1,data2) **1. Produce the string that makes the function call from string input:** sum divide count (above input are 3 function names to Fork) **2. Native to your favorite language, create an executable function from above string input** or 3. create a function that takes 3 functions as input, and returns a function. Fork(sum, divide ,count) (array data) should return the mean of that array. Where divide works similarly to add from Monday's challenge. **4. Extend above functions to work for any odd number of function parameters** for 5 parameters, Fork(a, b, c, d, e) is: b(a, Fork(c,d,e)) NB. should expand this if producing strings. # challenge input (25 functions) a b c d e f g h i j k l m n o p q r s t u v w x y """ def main(): pass if __name__ == "__main__": main()
""" [2015-12-09] Challenge #244 [Easy]er - Array language (part 3) - J Forks https://www.reddit.com/r/dailyprogrammer/comments/3wdm0w/20151209_challenge_244_easyer_array_language_part/ This challenge does not require doing the previous 2 parts. If you want something harder, the rank conjunction from Wednesday's challenge requires concentration. # Forks A fork is a function that takes 3 functions that are all "duck defined" to take 2 parameters with 2nd optional or ignorable. for 3 functions, `f(y,x= default):` , `g(y,x= default):` , `h(y,x= default):` , where the function g is a "genuine" 2 parameter function, the call `Fork(f,g,h)` executes the function composition: g(f(y,x),h(y,x)) (data1,data2) **1. Produce the string that makes the function call from string input:** sum divide count (above input are 3 function names to Fork) **2. Native to your favorite language, create an executable function from above string input** or 3. create a function that takes 3 functions as input, and returns a function. Fork(sum, divide ,count) (array data) should return the mean of that array. Where divide works similarly to add from Monday's challenge. **4. Extend above functions to work for any odd number of function parameters** for 5 parameters, Fork(a, b, c, d, e) is: b(a, Fork(c,d,e)) NB. should expand this if producing strings. # challenge input (25 functions) a b c d e f g h i j k l m n o p q r s t u v w x y """ def main(): pass if __name__ == '__main__': main()
#MODIFICANDO UMA TUPLA tpl_values = (10, 14, 16, 20) try: tpl_values[1] = 26 except (TypeError) as err: print(f"Error: {err}") #ALTERANDO LISTA DENTRO DE UMA TUPLA tpl_values = (10, 14, 16, 20, [24,26]) try: tpl_values[4].append(30) print(tpl_values) except (TypeError) as err: print(f"Error: {err}")
tpl_values = (10, 14, 16, 20) try: tpl_values[1] = 26 except TypeError as err: print(f'Error: {err}') tpl_values = (10, 14, 16, 20, [24, 26]) try: tpl_values[4].append(30) print(tpl_values) except TypeError as err: print(f'Error: {err}')
# -*- coding: utf-8 -*- def __download(core, filepath, request): request['stream'] = True with core.request.execute(core, request) as r: with open(filepath, 'wb') as f: core.shutil.copyfileobj(r.raw, f) def __extract_gzip(core, archivepath, filename): filepath = core.os.path.join(core.utils.temp_dir, filename) if core.utils.py2: with open(archivepath, 'rb') as f: gzip_file = f.read() with core.gzip.GzipFile(fileobj=core.utils.StringIO(gzip_file)) as gzip: with open(filepath, 'wb') as f: f.write(gzip.read()) f.flush() else: with core.gzip.open(archivepath, 'rb') as f_in: with open(filepath, 'wb') as f_out: core.shutil.copyfileobj(f_in, f_out) return filepath def __extract_zip(core, archivepath, filename, episodeid): sub_exts = ['.srt', '.sub'] sub_exts_secondary = ['.smi', '.ssa', '.aqt', '.jss', '.ass', '.rt', '.txt'] try: using_libvfs = False with open(archivepath, 'rb') as f: zipfile = core.zipfile.ZipFile(core.BytesIO(f.read())) namelist = core.utils.get_zipfile_namelist(zipfile) except: using_libvfs = True archivepath_ = core.utils.quote_plus(archivepath) (dirs, files) = core.kodi.xbmcvfs.listdir('archive://%s' % archivepath_) namelist = [file.decode(core.utils.default_encoding) if core.utils.py2 else file for file in files] subfile = core.utils.find_file_in_archive(core, namelist, sub_exts, episodeid) if not subfile: subfile = core.utils.find_file_in_archive(core, namelist, sub_exts_secondary, episodeid) dest = core.os.path.join(core.utils.temp_dir, filename) if not subfile: try: return __extract_gzip(core, archivepath, filename) except: try: core.os.remove(dest) except: pass try: core.os.rename(archivepath, dest) except: pass return dest if not using_libvfs: src = core.utils.extract_zipfile_member(zipfile, subfile, core.utils.temp_dir) try: core.os.remove(dest) except: pass try: core.os.rename(src, dest) except: pass else: src = 'archive://' + archivepath_ + '/' + subfile core.kodi.xbmcvfs.copy(src, dest) return dest def __insert_lang_code_in_filename(core, filename, lang_code): filename_chunks = core.utils.strip_non_ascii_and_unprintable(filename).split('.') filename_chunks.insert(-1, lang_code) return '.'.join(filename_chunks) def __postprocess(core, filepath, lang_code): try: with open(filepath, 'rb') as f: text_bytes = f.read() if core.kodi.get_bool_setting('general.use_chardet'): encoding = '' if core.utils.py3: detection = core.utils.chardet.detect(text_bytes) detected_lang_code = core.kodi.xbmc.convertLanguage(detection['language'], core.kodi.xbmc.ISO_639_2) if detection['confidence'] == 1.0 or detected_lang_code == lang_code: encoding = detection['encoding'] if not encoding: encoding = core.utils.code_pages.get(lang_code, core.utils.default_encoding) text = text_bytes.decode(encoding) else: text = text_bytes.decode(core.utils.default_encoding) try: if all(ch in text for ch in core.utils.cp1251_garbled): text = text.encode(core.utils.base_encoding).decode('cp1251') elif all(ch in text for ch in core.utils.koi8r_garbled): try: text = text.encode(core.utils.base_encoding).decode('koi8-r') except: text = text.encode(core.utils.base_encoding).decode('koi8-u') except: pass try: clean_text = core.utils.cleanup_subtitles(core, text) if len(clean_text) > len(text) / 2: text = clean_text except: pass with open(filepath, 'wb') as f: f.write(text.encode(core.utils.default_encoding)) except: pass def download(core, params): core.logger.debug(lambda: core.json.dumps(params, indent=2)) core.shutil.rmtree(core.utils.temp_dir, ignore_errors=True) core.kodi.xbmcvfs.mkdirs(core.utils.temp_dir) actions_args = params['action_args'] lang_code = core.kodi.xbmc.convertLanguage(actions_args['lang'], core.kodi.xbmc.ISO_639_2) filename = __insert_lang_code_in_filename(core, actions_args['filename'], lang_code) archivepath = core.os.path.join(core.utils.temp_dir, 'sub.zip') service_name = params['service_name'] service = core.services[service_name] request = service.build_download_request(core, service_name, actions_args) if actions_args.get('raw', False): filepath = core.os.path.join(core.utils.temp_dir, filename) __download(core, filepath, request) else: __download(core, archivepath, request) if actions_args.get('gzip', False): filepath = __extract_gzip(core, archivepath, filename) else: episodeid = actions_args.get('episodeid', '') filepath = __extract_zip(core, archivepath, filename, episodeid) __postprocess(core, filepath, lang_code) if core.api_mode_enabled: return filepath listitem = core.kodi.xbmcgui.ListItem(label=filepath, offscreen=True) core.kodi.xbmcplugin.addDirectoryItem(handle=core.handle, url=filepath, listitem=listitem, isFolder=False)
def __download(core, filepath, request): request['stream'] = True with core.request.execute(core, request) as r: with open(filepath, 'wb') as f: core.shutil.copyfileobj(r.raw, f) def __extract_gzip(core, archivepath, filename): filepath = core.os.path.join(core.utils.temp_dir, filename) if core.utils.py2: with open(archivepath, 'rb') as f: gzip_file = f.read() with core.gzip.GzipFile(fileobj=core.utils.StringIO(gzip_file)) as gzip: with open(filepath, 'wb') as f: f.write(gzip.read()) f.flush() else: with core.gzip.open(archivepath, 'rb') as f_in: with open(filepath, 'wb') as f_out: core.shutil.copyfileobj(f_in, f_out) return filepath def __extract_zip(core, archivepath, filename, episodeid): sub_exts = ['.srt', '.sub'] sub_exts_secondary = ['.smi', '.ssa', '.aqt', '.jss', '.ass', '.rt', '.txt'] try: using_libvfs = False with open(archivepath, 'rb') as f: zipfile = core.zipfile.ZipFile(core.BytesIO(f.read())) namelist = core.utils.get_zipfile_namelist(zipfile) except: using_libvfs = True archivepath_ = core.utils.quote_plus(archivepath) (dirs, files) = core.kodi.xbmcvfs.listdir('archive://%s' % archivepath_) namelist = [file.decode(core.utils.default_encoding) if core.utils.py2 else file for file in files] subfile = core.utils.find_file_in_archive(core, namelist, sub_exts, episodeid) if not subfile: subfile = core.utils.find_file_in_archive(core, namelist, sub_exts_secondary, episodeid) dest = core.os.path.join(core.utils.temp_dir, filename) if not subfile: try: return __extract_gzip(core, archivepath, filename) except: try: core.os.remove(dest) except: pass try: core.os.rename(archivepath, dest) except: pass return dest if not using_libvfs: src = core.utils.extract_zipfile_member(zipfile, subfile, core.utils.temp_dir) try: core.os.remove(dest) except: pass try: core.os.rename(src, dest) except: pass else: src = 'archive://' + archivepath_ + '/' + subfile core.kodi.xbmcvfs.copy(src, dest) return dest def __insert_lang_code_in_filename(core, filename, lang_code): filename_chunks = core.utils.strip_non_ascii_and_unprintable(filename).split('.') filename_chunks.insert(-1, lang_code) return '.'.join(filename_chunks) def __postprocess(core, filepath, lang_code): try: with open(filepath, 'rb') as f: text_bytes = f.read() if core.kodi.get_bool_setting('general.use_chardet'): encoding = '' if core.utils.py3: detection = core.utils.chardet.detect(text_bytes) detected_lang_code = core.kodi.xbmc.convertLanguage(detection['language'], core.kodi.xbmc.ISO_639_2) if detection['confidence'] == 1.0 or detected_lang_code == lang_code: encoding = detection['encoding'] if not encoding: encoding = core.utils.code_pages.get(lang_code, core.utils.default_encoding) text = text_bytes.decode(encoding) else: text = text_bytes.decode(core.utils.default_encoding) try: if all((ch in text for ch in core.utils.cp1251_garbled)): text = text.encode(core.utils.base_encoding).decode('cp1251') elif all((ch in text for ch in core.utils.koi8r_garbled)): try: text = text.encode(core.utils.base_encoding).decode('koi8-r') except: text = text.encode(core.utils.base_encoding).decode('koi8-u') except: pass try: clean_text = core.utils.cleanup_subtitles(core, text) if len(clean_text) > len(text) / 2: text = clean_text except: pass with open(filepath, 'wb') as f: f.write(text.encode(core.utils.default_encoding)) except: pass def download(core, params): core.logger.debug(lambda : core.json.dumps(params, indent=2)) core.shutil.rmtree(core.utils.temp_dir, ignore_errors=True) core.kodi.xbmcvfs.mkdirs(core.utils.temp_dir) actions_args = params['action_args'] lang_code = core.kodi.xbmc.convertLanguage(actions_args['lang'], core.kodi.xbmc.ISO_639_2) filename = __insert_lang_code_in_filename(core, actions_args['filename'], lang_code) archivepath = core.os.path.join(core.utils.temp_dir, 'sub.zip') service_name = params['service_name'] service = core.services[service_name] request = service.build_download_request(core, service_name, actions_args) if actions_args.get('raw', False): filepath = core.os.path.join(core.utils.temp_dir, filename) __download(core, filepath, request) else: __download(core, archivepath, request) if actions_args.get('gzip', False): filepath = __extract_gzip(core, archivepath, filename) else: episodeid = actions_args.get('episodeid', '') filepath = __extract_zip(core, archivepath, filename, episodeid) __postprocess(core, filepath, lang_code) if core.api_mode_enabled: return filepath listitem = core.kodi.xbmcgui.ListItem(label=filepath, offscreen=True) core.kodi.xbmcplugin.addDirectoryItem(handle=core.handle, url=filepath, listitem=listitem, isFolder=False)
if __name__ == '__main__': try: main() log.info("Script completed successfully") except Exception as e: log.critical("The script did not complete successfully") log.exception(e) sys.exit(1)
if __name__ == '__main__': try: main() log.info('Script completed successfully') except Exception as e: log.critical('The script did not complete successfully') log.exception(e) sys.exit(1)
bind = '127.0.0.1:8000' workers = 3 user = 'web' timeout = 120
bind = '127.0.0.1:8000' workers = 3 user = 'web' timeout = 120
user_input = input("Input two words separated by space to create key value pairs, or enter nothing to quit") empty_dict = {} while user_input != "": words = user_input.split(" ") if len(words) >= 2: empty_dict[words[0]] = words[1] else: print("not enough words to create an entry") user_input = input("Input two words separated by space to create key value pairs, or enter nothing to quit") print(empty_dict)
user_input = input('Input two words separated by space to create key value pairs, or enter nothing to quit') empty_dict = {} while user_input != '': words = user_input.split(' ') if len(words) >= 2: empty_dict[words[0]] = words[1] else: print('not enough words to create an entry') user_input = input('Input two words separated by space to create key value pairs, or enter nothing to quit') print(empty_dict)
class Snapshot: def __init__(self, state: any, index: int): self.state = state self.index = index class RecoverSnapshot(Snapshot): def __init__(self, data: any, index: int): super().__init__(data, index) class PersistedSnapshot(Snapshot): def __init__(self, data: any, index: int): super().__init__(data, index) class Event: def __init__(self, data: any, index: int): self.data = data self.index = index class RecoverEvent(Event): def __init__(self, data: any, index: int): super().__init__(data, index) class ReplayEvent(Event): def __init__(self, data: any, index: int): super().__init__(data, index) class PersistedEvent(Event): def __init__(self, data: any, index: int): super().__init__(data, index)
class Snapshot: def __init__(self, state: any, index: int): self.state = state self.index = index class Recoversnapshot(Snapshot): def __init__(self, data: any, index: int): super().__init__(data, index) class Persistedsnapshot(Snapshot): def __init__(self, data: any, index: int): super().__init__(data, index) class Event: def __init__(self, data: any, index: int): self.data = data self.index = index class Recoverevent(Event): def __init__(self, data: any, index: int): super().__init__(data, index) class Replayevent(Event): def __init__(self, data: any, index: int): super().__init__(data, index) class Persistedevent(Event): def __init__(self, data: any, index: int): super().__init__(data, index)
def positive_sum(arr): positive_list = [] for i in arr: if i > 0: positive_list.append(i) return(sum(positive_list)) # Best Practices def positive_sum(arr): return sum(x for x in arr if x > 0)
def positive_sum(arr): positive_list = [] for i in arr: if i > 0: positive_list.append(i) return sum(positive_list) def positive_sum(arr): return sum((x for x in arr if x > 0))
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :mod:`orion.core.cli.checks.presence` -- Presence stage for database checks =========================================================================== .. module:: presence :platform: Unix :synopsis: Checks for the presence of a configuration. """ class PresenceStage: """The presence stage of the checks.""" def __init__(self, experiment_builder, cmdargs): """Create an instance of the stage. Parameters ---------- experiment_builder: `ExperimentBuilder` An instance of `ExperimentBuilder` to fetch configs. """ self.builder = experiment_builder self.cmdargs = cmdargs self.db_config = {} def checks(self): """Return the registered checks.""" yield self.check_default_config yield self.check_environment_vars yield self.check_configuration_file def check_default_config(self): """Check for a configuration inside the default paths.""" config = self.builder.fetch_default_options() if 'database' not in config: return "Skipping", "No default configuration found for database." self.db_config = config['database'] print('\n ', self.db_config) return "Success", "" def check_environment_vars(self): """Check for a configuration inside the environment variables.""" config = self.builder.fetch_env_vars() config = config['database'] names = ['type', 'name', 'host', 'port'] if not any(name in config for name in names): return "Skipping", "No environment variables found." self.db_config.update(config) print('\n ', self.db_config) return "Success", "" def check_configuration_file(self): """Check if configuration file has valid database configuration.""" config = self.builder.fetch_file_config(self.cmdargs) if not len(config): return "Skipping", "Missing configuration file." if 'database' not in config: return "Skipping", "No database found in configuration file." config = config['database'] names = ['type', 'name', 'host', 'port'] if not any(name in config for name in names): return "Skipping", "No configuration value found inside `database`." self.db_config.update(config) print('\n ', config) return "Success", "" def post_stage(self): """Print the current config.""" print("Using configuration: {}".format(self.db_config))
""" :mod:`orion.core.cli.checks.presence` -- Presence stage for database checks =========================================================================== .. module:: presence :platform: Unix :synopsis: Checks for the presence of a configuration. """ class Presencestage: """The presence stage of the checks.""" def __init__(self, experiment_builder, cmdargs): """Create an instance of the stage. Parameters ---------- experiment_builder: `ExperimentBuilder` An instance of `ExperimentBuilder` to fetch configs. """ self.builder = experiment_builder self.cmdargs = cmdargs self.db_config = {} def checks(self): """Return the registered checks.""" yield self.check_default_config yield self.check_environment_vars yield self.check_configuration_file def check_default_config(self): """Check for a configuration inside the default paths.""" config = self.builder.fetch_default_options() if 'database' not in config: return ('Skipping', 'No default configuration found for database.') self.db_config = config['database'] print('\n ', self.db_config) return ('Success', '') def check_environment_vars(self): """Check for a configuration inside the environment variables.""" config = self.builder.fetch_env_vars() config = config['database'] names = ['type', 'name', 'host', 'port'] if not any((name in config for name in names)): return ('Skipping', 'No environment variables found.') self.db_config.update(config) print('\n ', self.db_config) return ('Success', '') def check_configuration_file(self): """Check if configuration file has valid database configuration.""" config = self.builder.fetch_file_config(self.cmdargs) if not len(config): return ('Skipping', 'Missing configuration file.') if 'database' not in config: return ('Skipping', 'No database found in configuration file.') config = config['database'] names = ['type', 'name', 'host', 'port'] if not any((name in config for name in names)): return ('Skipping', 'No configuration value found inside `database`.') self.db_config.update(config) print('\n ', config) return ('Success', '') def post_stage(self): """Print the current config.""" print('Using configuration: {}'.format(self.db_config))
''' We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, if A = 'abcde', then it will be 'bcdea' after one shift on A. Return True if and only if A can become B after some number of shifts on A. Example 1: Input: A = 'abcde', B = 'cdeab' Output: true Example 2: Input: A = 'abcde', B = 'abced' Output: false Note: A and B will have length at most 100. ''' class Solution(object): def rotateString(self, A, B): """ :type A: str :type B: str :rtype: bool """ if len(A) != len(B): return False return B in A + A return A in B + B
""" We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, if A = 'abcde', then it will be 'bcdea' after one shift on A. Return True if and only if A can become B after some number of shifts on A. Example 1: Input: A = 'abcde', B = 'cdeab' Output: true Example 2: Input: A = 'abcde', B = 'abced' Output: false Note: A and B will have length at most 100. """ class Solution(object): def rotate_string(self, A, B): """ :type A: str :type B: str :rtype: bool """ if len(A) != len(B): return False return B in A + A return A in B + B
myfile= open("running-config.cfg") def process_line(word): str=word.split() lst=str[2:] mytpl = tuple(lst) return(mytpl) def check(line): if "no ip address" in line: return elif "ip address" in line: return(process_line(line)) else: return myfinlist=[] for line in myfile: mytpl3=check(line) if mytpl3 != None: myfinlist.append(mytpl3) print(myfinlist)
myfile = open('running-config.cfg') def process_line(word): str = word.split() lst = str[2:] mytpl = tuple(lst) return mytpl def check(line): if 'no ip address' in line: return elif 'ip address' in line: return process_line(line) else: return myfinlist = [] for line in myfile: mytpl3 = check(line) if mytpl3 != None: myfinlist.append(mytpl3) print(myfinlist)
"""Config for sending email via Mailgun""" MAILGUN = { "from": "XXXX", "url": "XXXX", "api_key": "XXXX" } NOTIFICATIONS = ["XX@XX.com"]
"""Config for sending email via Mailgun""" mailgun = {'from': 'XXXX', 'url': 'XXXX', 'api_key': 'XXXX'} notifications = ['XX@XX.com']
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def postorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ ## recursive # self.res=[] # self.tra(root) # return self.res # def tra(self, root): # if not root: # return # self.tra(root.left) # self.tra(root.right) # self.res.append(root.val) ## stack # revres=[] # stack=[root] # while stack: # cur = stack.pop() # if not cur: # continue # revres.append(cur.val) # stack.append(cur.left) # stack.append(cur.right) # return revres[::-1] ## Morris + reverse revres=[] cur=root while cur: if cur.right: temp=cur.right while temp.left and temp.left != cur: temp=temp.left if not temp.left: temp.left=cur revres.append(cur.val) cur=cur.right else: temp.left=None cur=cur.left else: revres.append(cur.val) cur=cur.left return revres[::-1]
class Solution(object): def postorder_traversal(self, root): """ :type root: TreeNode :rtype: List[int] """ revres = [] cur = root while cur: if cur.right: temp = cur.right while temp.left and temp.left != cur: temp = temp.left if not temp.left: temp.left = cur revres.append(cur.val) cur = cur.right else: temp.left = None cur = cur.left else: revres.append(cur.val) cur = cur.left return revres[::-1]
# Create two lists of zeros; rows and cols. Keep incrementing count in the lists. Increment total_odd by r+c%2==1 class Solution: def oddCells(self, n: int, m: int, indices: List[List[int]]) -> int: rows, cols = [0]*n, [0]*m for i in indices: rows[i[0]] += 1 cols[i[1]] += 1 count = 0 for r in rows: for c in cols: if (r+c)%2==1: count += 1 return count
class Solution: def odd_cells(self, n: int, m: int, indices: List[List[int]]) -> int: (rows, cols) = ([0] * n, [0] * m) for i in indices: rows[i[0]] += 1 cols[i[1]] += 1 count = 0 for r in rows: for c in cols: if (r + c) % 2 == 1: count += 1 return count
I=input('Enter String: ') if I.count('4')==0 and I.count('7')==0: print('Output:',-1) else: if I.count('4')>=I.count('7'): print('Output:',4) else: print('Output:',7)
i = input('Enter String: ') if I.count('4') == 0 and I.count('7') == 0: print('Output:', -1) elif I.count('4') >= I.count('7'): print('Output:', 4) else: print('Output:', 7)
# Window-handling features of PyAutoGUI # UNDER CONSTRUCTION """ Window handling features: - pyautogui.getWindows() # returns a dict of window titles mapped to window IDs - pyautogui.getWindow(str_title_or_int_id) # returns a "Win" object - win.move(x, y) - win.resize(width, height) - win.maximize() - win.minimize() - win.restore() - win.close() - win.position() # returns (x, y) of top-left corner - win.moveRel(x=0, y=0) # moves relative to the x, y of top-left corner of the window - win.clickRel(x=0, y=0, clicks=1, interval=0.0, button='left') # click relative to the x, y of top-left corner of the window """
""" Window handling features: - pyautogui.getWindows() # returns a dict of window titles mapped to window IDs - pyautogui.getWindow(str_title_or_int_id) # returns a "Win" object - win.move(x, y) - win.resize(width, height) - win.maximize() - win.minimize() - win.restore() - win.close() - win.position() # returns (x, y) of top-left corner - win.moveRel(x=0, y=0) # moves relative to the x, y of top-left corner of the window - win.clickRel(x=0, y=0, clicks=1, interval=0.0, button='left') # click relative to the x, y of top-left corner of the window """
def can_build(env, platform): return (platform == "x11") # for futur: or platform == "windows" or platform == "osx" or platform == "android" def configure(env): pass def get_doc_classes(): return [ "Bluetooth", "NetworkedMultiplayerBt", ] def get_doc_path(): return "doc_classes"
def can_build(env, platform): return platform == 'x11' def configure(env): pass def get_doc_classes(): return ['Bluetooth', 'NetworkedMultiplayerBt'] def get_doc_path(): return 'doc_classes'
def fib(n): if(n <= 1): return n return fib(n-1) + fib(n-2) print(fib(30))
def fib(n): if n <= 1: return n return fib(n - 1) + fib(n - 2) print(fib(30))
NAME = 'Little Wolf' def extract_upper(phrase): return list(filter(str.isupper, phrase)) def extract_lower(phrase): return list(filter(str.islower, phrase))
name = 'Little Wolf' def extract_upper(phrase): return list(filter(str.isupper, phrase)) def extract_lower(phrase): return list(filter(str.islower, phrase))
def main() -> None: N, M, K = map(int, input().split()) A = [0] * M B = [0] * M for i in range(M): A[i], B[i] = map(int, input().split()) X = list(map(int, input().split())) assert 2 <= N <= 50 assert 1 <= M <= (N * (N - 1)) assert 1 <= K <= 10 assert len(X) == N assert all(1 <= A_i <= N for A_i in A) assert all(1 <= B_i <= N for B_i in B) assert all(A[i] != B[i] for i in range(M)) assert all(1 <= X_i <= 100 for X_i in X) for i in range(M): for j in range(i + 1, M): assert (A[i] != A[j]) or (B[i] != B[j]) if __name__ == '__main__': main()
def main() -> None: (n, m, k) = map(int, input().split()) a = [0] * M b = [0] * M for i in range(M): (A[i], B[i]) = map(int, input().split()) x = list(map(int, input().split())) assert 2 <= N <= 50 assert 1 <= M <= N * (N - 1) assert 1 <= K <= 10 assert len(X) == N assert all((1 <= A_i <= N for a_i in A)) assert all((1 <= B_i <= N for b_i in B)) assert all((A[i] != B[i] for i in range(M))) assert all((1 <= X_i <= 100 for x_i in X)) for i in range(M): for j in range(i + 1, M): assert A[i] != A[j] or B[i] != B[j] if __name__ == '__main__': main()
{ 'targets': [{ 'target_name': 'talib', 'sources': [ 'src/talib.cpp' ], "include_dirs": [ "<!(node -e \"require('nan')\")" ], 'conditions': [ ['OS=="linux"', { "libraries": [ "../src/lib/lib/libta_abstract_csr.a", "../src/lib/lib/libta_func_csr.a", "../src/lib/lib/libta_common_csr.a", "../src/lib/lib/libta_libc_csr.a", ] }], ['OS=="mac"', { 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': ['-std=c++11', '-stdlib=libc++'], 'OTHER_LDFLAGS': ['-stdlib=libc++'], 'MACOSX_DEPLOYMENT_TARGET': '10.7', 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' }, "libraries": [ "../src/lib/lib/libta_abstract_csr.a", "../src/lib/lib/libta_func_csr.a", "../src/lib/lib/libta_common_csr.a", "../src/lib/lib/libta_libc_csr.a", ] }], ['OS=="win"', { "libraries": [ "../src/lib/lib/ta_libc_csr.lib", "../src/lib/lib/ta_func_csr.lib", "../src/lib/lib/ta_common_csr.lib", "../src/lib/lib/ta_abstract_csr.lib" ] }], ] }] }
{'targets': [{'target_name': 'talib', 'sources': ['src/talib.cpp'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'conditions': [['OS=="linux"', {'libraries': ['../src/lib/lib/libta_abstract_csr.a', '../src/lib/lib/libta_func_csr.a', '../src/lib/lib/libta_common_csr.a', '../src/lib/lib/libta_libc_csr.a']}], ['OS=="mac"', {'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['-std=c++11', '-stdlib=libc++'], 'OTHER_LDFLAGS': ['-stdlib=libc++'], 'MACOSX_DEPLOYMENT_TARGET': '10.7', 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'}, 'libraries': ['../src/lib/lib/libta_abstract_csr.a', '../src/lib/lib/libta_func_csr.a', '../src/lib/lib/libta_common_csr.a', '../src/lib/lib/libta_libc_csr.a']}], ['OS=="win"', {'libraries': ['../src/lib/lib/ta_libc_csr.lib', '../src/lib/lib/ta_func_csr.lib', '../src/lib/lib/ta_common_csr.lib', '../src/lib/lib/ta_abstract_csr.lib']}]]}]}
n = input("Enter a number: ") n = int(n) if n > 1000: print("PLEASE ENTER A NUMBER THAT IS LESS THAN 1000!") else: n = str(n) if len(n) == 2: if n[0] == "2": a = "Twenty" if n[0] == "3": a = "Thirty" if n[0] == "4": a = "Fourty" if n[0] == "5": a = "Fifty" if n[0] == "6": a = "Sixty" if n[0] == "7": a = "Seventy" if n[0] == "8": a = "Eighty" if n[0] == "9": a = "Ninety" if n[1] == "0": b = "" if n[1] == "1": b = "-One" if n[1] == "2": b = "-Two" if n[1] == "3": b = "-Three" if n[1] == "4": b = "-Four" if n[1] == "5": b = "-Five" if n[1] == "6": b = "-Six" if n[1] == "7": b = "-Seven" if n[1] == "8": b = "-Eight" if n[1] == "9": b = "-Nine" print(a + b)
n = input('Enter a number: ') n = int(n) if n > 1000: print('PLEASE ENTER A NUMBER THAT IS LESS THAN 1000!') else: n = str(n) if len(n) == 2: if n[0] == '2': a = 'Twenty' if n[0] == '3': a = 'Thirty' if n[0] == '4': a = 'Fourty' if n[0] == '5': a = 'Fifty' if n[0] == '6': a = 'Sixty' if n[0] == '7': a = 'Seventy' if n[0] == '8': a = 'Eighty' if n[0] == '9': a = 'Ninety' if n[1] == '0': b = '' if n[1] == '1': b = '-One' if n[1] == '2': b = '-Two' if n[1] == '3': b = '-Three' if n[1] == '4': b = '-Four' if n[1] == '5': b = '-Five' if n[1] == '6': b = '-Six' if n[1] == '7': b = '-Seven' if n[1] == '8': b = '-Eight' if n[1] == '9': b = '-Nine' print(a + b)
def test1(foo, bar): foo = 3 def test2(quix): foo = 4 test2(123) print(foo) # Should be 3
def test1(foo, bar): foo = 3 def test2(quix): foo = 4 test2(123) print(foo)
temp: int = int(input()) temp_range: int = 0 if (10 <= temp <= 18) else 1 if (18 < temp <= 24) else 2 day_time: int = ('Morning', 'Afternoon', 'Evening',).index(input()) options: tuple = ( (('Sweatshirt', 'Sneakers',),('Shirt','Moccasins',),('Shirt','Moccasins',),), (('Shirt','Moccasins',),('T-Shirt','Sandals',),('Shirt','Moccasins',),), (('T-Shirt','Sandals',),('Swim Suit','Barefoot',),('Shirt','Moccasins',),), ) print(f'It\'s {temp} degrees, get your {options[temp_range][day_time][0]} and {options[temp_range][day_time][1]}.')
temp: int = int(input()) temp_range: int = 0 if 10 <= temp <= 18 else 1 if 18 < temp <= 24 else 2 day_time: int = ('Morning', 'Afternoon', 'Evening').index(input()) options: tuple = ((('Sweatshirt', 'Sneakers'), ('Shirt', 'Moccasins'), ('Shirt', 'Moccasins')), (('Shirt', 'Moccasins'), ('T-Shirt', 'Sandals'), ('Shirt', 'Moccasins')), (('T-Shirt', 'Sandals'), ('Swim Suit', 'Barefoot'), ('Shirt', 'Moccasins'))) print(f"It's {temp} degrees, get your {options[temp_range][day_time][0]} and {options[temp_range][day_time][1]}.")
def tmembership(my_tuple1,my_tuple2): for item in my_tuple1: # membership in and not in operator in tuple if item in my_tuple2: print(str(item) + ' in my_tuple2') if item not in my_tuple2: print(str(item) + ' not in my_tuple2') print(tmembership((1, 2, 3, 4, 5), (1, 2, 3)))
def tmembership(my_tuple1, my_tuple2): for item in my_tuple1: if item in my_tuple2: print(str(item) + ' in my_tuple2') if item not in my_tuple2: print(str(item) + ' not in my_tuple2') print(tmembership((1, 2, 3, 4, 5), (1, 2, 3)))
# Exceptions # Problem Link: https://www.hackerrank.com/challenges/exceptions/problem for _ in range(int(input())): try: a, b = [int(x) for x in input().split()] print(a // b) except Exception as e: print("Error Code:", e)
for _ in range(int(input())): try: (a, b) = [int(x) for x in input().split()] print(a // b) except Exception as e: print('Error Code:', e)
TYPEKRUISING = { 1: "aquaduct", 2: "brug", 3: "duiker", 4: "sifon", 5: "hevel", 6: "bypass" } MATERIAALKUNSTWERK = { 1: "aluminium", 2: "asbestcement", 3: "beton", 4: "gegolfd plaatstaal", 5: "gewapend beton", 6: "gietijzer", 7: "glad staal", 8: "glas", 9: "grasbetontegels", 10: "hout", 11: "ijzer", 12: "koper", 13: "kunststof", 14: "kunststoffolie", 15: "kurk", 16: "lood", 17: "metselwerk", 18: "plaatstaal", 19: "puinsteen", 20: "PVC", 21: "staal", 22: "steen", 23: "voorgespannen beton", 24: "riet en/of biezen", 25: "zand", 26: "gips", 28: "roestvrij staal", 27: "gres", 29: "veen", 30: "klei", 31: "lokale bodemsoort" } TYPESTUW = { 1: "schotbalkstuw", 2: "stuw met schuif", 3: "stuw met klep", 4: "segmentstuw", 5: "cascadestuw", 6: "hevelstuw", 7: "meetstuw", 8: "meetschot", 9: "stuw met contra-gewicht", 10: "inlaat- en/of aflaatstuw", 11: "overlaat", 12: "drijverstuw", 13: "trommelstuw", 20: "gronddamstuw", 21: "stuwbak", 22: "tuimel- of kantelstuw", 23: "balgstuw", 24: "brievenbusstuw", 25: "knijpstuw", 26: "conserveringstuw", 99: "onbekend" } TYPEREGELBAARHEID = { 1: "niet regelbaar (vast)", 2: "regelbaar, niet automatisch", 3: "regelbaar, automatisch", 4: "handmatig", 99: "overig", } VORMKOKER = { 1: "Rond", 2: "Driehoek", 3: "Rechthoekig", 4: "Eivormig", 5: "Ellipsvormig", 6: "Paraboolvormig", 7: "Trapeziumvormig", 8: "Heulprofiel", 9: "Muilprofiel", 10: "Langwerpig", 11: "Scherp", 99: "Onbekend", } SOORTAFSLUITMIDDEL = { 1: "deur", 2: "schotbalk sponning", 3: "zandzakken", 4: "schuif", 5: "terugslagklep", 6: "tolklep", 97: "niet afsluitbaar", 98: "overig", 99: "onbekend" }
typekruising = {1: 'aquaduct', 2: 'brug', 3: 'duiker', 4: 'sifon', 5: 'hevel', 6: 'bypass'} materiaalkunstwerk = {1: 'aluminium', 2: 'asbestcement', 3: 'beton', 4: 'gegolfd plaatstaal', 5: 'gewapend beton', 6: 'gietijzer', 7: 'glad staal', 8: 'glas', 9: 'grasbetontegels', 10: 'hout', 11: 'ijzer', 12: 'koper', 13: 'kunststof', 14: 'kunststoffolie', 15: 'kurk', 16: 'lood', 17: 'metselwerk', 18: 'plaatstaal', 19: 'puinsteen', 20: 'PVC', 21: 'staal', 22: 'steen', 23: 'voorgespannen beton', 24: 'riet en/of biezen', 25: 'zand', 26: 'gips', 28: 'roestvrij staal', 27: 'gres', 29: 'veen', 30: 'klei', 31: 'lokale bodemsoort'} typestuw = {1: 'schotbalkstuw', 2: 'stuw met schuif', 3: 'stuw met klep', 4: 'segmentstuw', 5: 'cascadestuw', 6: 'hevelstuw', 7: 'meetstuw', 8: 'meetschot', 9: 'stuw met contra-gewicht', 10: 'inlaat- en/of aflaatstuw', 11: 'overlaat', 12: 'drijverstuw', 13: 'trommelstuw', 20: 'gronddamstuw', 21: 'stuwbak', 22: 'tuimel- of kantelstuw', 23: 'balgstuw', 24: 'brievenbusstuw', 25: 'knijpstuw', 26: 'conserveringstuw', 99: 'onbekend'} typeregelbaarheid = {1: 'niet regelbaar (vast)', 2: 'regelbaar, niet automatisch', 3: 'regelbaar, automatisch', 4: 'handmatig', 99: 'overig'} vormkoker = {1: 'Rond', 2: 'Driehoek', 3: 'Rechthoekig', 4: 'Eivormig', 5: 'Ellipsvormig', 6: 'Paraboolvormig', 7: 'Trapeziumvormig', 8: 'Heulprofiel', 9: 'Muilprofiel', 10: 'Langwerpig', 11: 'Scherp', 99: 'Onbekend'} soortafsluitmiddel = {1: 'deur', 2: 'schotbalk sponning', 3: 'zandzakken', 4: 'schuif', 5: 'terugslagklep', 6: 'tolklep', 97: 'niet afsluitbaar', 98: 'overig', 99: 'onbekend'}
# -*- coding: utf-8 -*- EMPTY_STR = "" def is_empty(word): return bool(word == EMPTY_STR) def is_empty_strip(word): return bool(str(word).strip() == EMPTY_STR)
empty_str = '' def is_empty(word): return bool(word == EMPTY_STR) def is_empty_strip(word): return bool(str(word).strip() == EMPTY_STR)
""" 0849. Maximize Distance to Closest Person Easy In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty. There is at least one empty seat, and at least one person sitting. Alex wants to sit in the seat such that the distance between him and the closest person to him is maximized. Return that maximum distance to closest person. Example 1: Input: [1,0,0,0,1,0,1] Output: 2 Explanation: If Alex sits in the second open seat (seats[2]), then the closest person has distance 2. If Alex sits in any other open seat, the closest person has distance 1. Thus, the maximum distance to the closest person is 2. Example 2: Input: [1,0,0,0] Output: 3 Explanation: If Alex sits in the last seat, the closest person is 3 seats away. This is the maximum distance possible, so the answer is 3. Constraints: 2 <= seats.length <= 20000 seats contains only 0s or 1s, at least one 0, and at least one 1. """ class Solution: def maxDistToClosest(self, seats: List[int]) -> int: res = 0 last = -1 N = len(seats) for i in range(N): if seats[i]: res = max(res, i if last < 0 else (i - last) // 2) last = i return max(res, N - last - 1) class Solution: def maxDistToClosest(self, seats: List[int]) -> int: length, turn = len(seats), [] for i in range(length): if seats[i] == 1: turn.append(i) res = max(turn[0], length - turn[-1] - 1) for i in range(0, len(turn) - 1): if (turn[i+1] - turn[i]) // 2 > res: res = (turn[i+1] - turn[i]) // 2 return res
""" 0849. Maximize Distance to Closest Person Easy In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty. There is at least one empty seat, and at least one person sitting. Alex wants to sit in the seat such that the distance between him and the closest person to him is maximized. Return that maximum distance to closest person. Example 1: Input: [1,0,0,0,1,0,1] Output: 2 Explanation: If Alex sits in the second open seat (seats[2]), then the closest person has distance 2. If Alex sits in any other open seat, the closest person has distance 1. Thus, the maximum distance to the closest person is 2. Example 2: Input: [1,0,0,0] Output: 3 Explanation: If Alex sits in the last seat, the closest person is 3 seats away. This is the maximum distance possible, so the answer is 3. Constraints: 2 <= seats.length <= 20000 seats contains only 0s or 1s, at least one 0, and at least one 1. """ class Solution: def max_dist_to_closest(self, seats: List[int]) -> int: res = 0 last = -1 n = len(seats) for i in range(N): if seats[i]: res = max(res, i if last < 0 else (i - last) // 2) last = i return max(res, N - last - 1) class Solution: def max_dist_to_closest(self, seats: List[int]) -> int: (length, turn) = (len(seats), []) for i in range(length): if seats[i] == 1: turn.append(i) res = max(turn[0], length - turn[-1] - 1) for i in range(0, len(turn) - 1): if (turn[i + 1] - turn[i]) // 2 > res: res = (turn[i + 1] - turn[i]) // 2 return res
# This is a sample module used for testing doctest. # # This module is for testing how doctest handles a module with no # docstrings. class Foo(object): # A class with no docstring. def __init__(self): pass
class Foo(object): def __init__(self): pass
# generating magic square # note only works with odd number input # conditions and procedure in readme.md file at https://github.com/ThayalanGR/competitive-programs def generateMagicSquare(n): mSquare = [[0 for _ in range(n)] for _ in range(n)] # initialize row and col value i = int(n/2) j = n-1 num = 1 # filling magic square while num <= pow(n, 2): # checking condition 3 if i == -1 and j == n: i = 0 j = n - 2 else: # condition 1 block if j == n: j = 0 if i < 0: i = n - 1 # condition 2 block if mSquare[i][j]: i = i + 1 j = j - 2 continue else: mSquare[i][j] = num num += 1 # common statement - condition 1 i = i - 1 j = j + 1 return mSquare if __name__ == "__main__": inp = int(input()) magicSquare = generateMagicSquare(inp) print(magicSquare)
def generate_magic_square(n): m_square = [[0 for _ in range(n)] for _ in range(n)] i = int(n / 2) j = n - 1 num = 1 while num <= pow(n, 2): if i == -1 and j == n: i = 0 j = n - 2 else: if j == n: j = 0 if i < 0: i = n - 1 if mSquare[i][j]: i = i + 1 j = j - 2 continue else: mSquare[i][j] = num num += 1 i = i - 1 j = j + 1 return mSquare if __name__ == '__main__': inp = int(input()) magic_square = generate_magic_square(inp) print(magicSquare)
# Created by MechAviv # Map ID :: 940012010 # Hidden Street : Decades Later sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.removeSkill(60011219) if not "1" in sm.getQRValue(25807): sm.levelUntil(10) sm.setJob(6500) sm.createQuestWithQRValue(25807, "1") sm.resetStats() # Unhandled Stat Changed [HP] Packet: 00 00 00 04 00 00 00 00 00 00 C2 00 00 00 FF 00 00 00 00 # Unhandled Stat Changed [MHP] Packet: 00 00 00 08 00 00 00 00 00 00 C2 00 00 00 FF 00 00 00 00 # Unhandled Stat Changed [MMP] Packet: 00 00 00 20 00 00 00 00 00 00 71 00 00 00 FF 00 00 00 00 # Unhandled Stat Changed [MHP] Packet: 00 00 00 08 00 00 00 00 00 00 58 01 00 00 FF 00 00 00 00 # Unhandled Stat Changed [HP] Packet: 00 00 00 04 00 00 00 00 00 00 58 01 00 00 FF 00 00 00 00 sm.addSP(5, True) # [INVENTORY_GROW] [01 1C ] # [INVENTORY_GROW] [02 1C ] # [INVENTORY_GROW] [03 1C ] # [INVENTORY_GROW] [04 1C ] sm.giveSkill(60011216, 1, 1) sm.giveSkill(60011218, 1, 1) sm.giveSkill(60011220, 1, 1) sm.giveSkill(60011222, 1, 1) sm.sendDelay(300) sm.showFieldEffect("kaiser/text0", 0) sm.sendDelay(4200) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) # [FORCED_STAT_RESET] [] sm.warp(940011020, 0)
sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.removeSkill(60011219) if not '1' in sm.getQRValue(25807): sm.levelUntil(10) sm.setJob(6500) sm.createQuestWithQRValue(25807, '1') sm.resetStats() sm.addSP(5, True) sm.giveSkill(60011216, 1, 1) sm.giveSkill(60011218, 1, 1) sm.giveSkill(60011220, 1, 1) sm.giveSkill(60011222, 1, 1) sm.sendDelay(300) sm.showFieldEffect('kaiser/text0', 0) sm.sendDelay(4200) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) sm.warp(940011020, 0)
def tabuada(num): for x in range (11): print(num*x) num = int(input('Digite um valor: ')) tabuada(num)
def tabuada(num): for x in range(11): print(num * x) num = int(input('Digite um valor: ')) tabuada(num)
class Environment: def __init__(self, rows, columns, turns, drones_count, drone_max_payload): self.rows = rows self.columns = columns self.turns = turns self.drones_count = drones_count self.drone_max_payload = drone_max_payload
class Environment: def __init__(self, rows, columns, turns, drones_count, drone_max_payload): self.rows = rows self.columns = columns self.turns = turns self.drones_count = drones_count self.drone_max_payload = drone_max_payload
class DeviceInfo(object): """Device Info class""" @staticmethod def get_serial(): # Extract serial from cpuinfo file cpuserial = "0000000000000000" try: f = open('/proc/cpuinfo','r') for line in f: if line[0:6]=='Serial': cpuserial = line[10:26] f.close() except: cpuserial = "ERROR000000000" return cpuserial
class Deviceinfo(object): """Device Info class""" @staticmethod def get_serial(): cpuserial = '0000000000000000' try: f = open('/proc/cpuinfo', 'r') for line in f: if line[0:6] == 'Serial': cpuserial = line[10:26] f.close() except: cpuserial = 'ERROR000000000' return cpuserial
# Time: O(nlog*n) ~= O(n), n is the length of the positions # Space: O(n) # In this problem, a rooted tree is a directed graph such that, # there is exactly one node (the root) for # which all other nodes are descendants of this node, plus every node has exactly one parent, # except for the root node which has no parents. # # The given input is a directed graph that started as a rooted tree with N nodes # (with distinct values 1, 2, ..., N), with one additional directed edge added. # The added edge has two different vertices chosen from 1 to N, and was not an edge that already existed. # # The resulting graph is given as a 2D-array of edges. # Each element of edges is a pair [u, v] that represents a directed edge connecting nodes u and v, # where u is a parent of child v. # # Return an edge that can be removed so that the resulting graph is a rooted tree of N nodes. # If there are multiple answers, return the answer that occurs last in the given 2D-array. # # Example 1: # Input: [[1,2], [1,3], [2,3]] # Output: [2,3] # Explanation: The given directed graph will be like this: # 1 # / \ # v v # 2-->3 # Example 2: # Input: [[1,2], [2,3], [3,4], [4,1], [1,5]] # Output: [4,1] # Explanation: The given directed graph will be like this: # 5 <- 1 -> 2 # ^ | # | v # 4 <- 3 # Note: # The size of the input 2D-array will be between 3 and 1000. # Every integer represented in the 2D-array will be between 1 and N, where N is the size of the input array. class UnionFind(object): def __init__(self, n): self.set = range(n) self.count = n def find_set(self, x): if self.set[x] != x: self.set[x] = self.find_set(self.set[x]) # path compression. return self.set[x] def union_set(self, x, y): x_root, y_root = map(self.find_set, (x, y)) if x_root == y_root or \ y != y_root: # already has a father return False self.set[y_root] = x_root self.count -= 1 return True class Solution(object): def findRedundantDirectedConnection(self, edges): """ :type edges: List[List[int]] :rtype: List[int] """ union_find = UnionFind(len(edges)+1) for edge in edges: if not union_find.union_set(*edge): return edge return []
class Unionfind(object): def __init__(self, n): self.set = range(n) self.count = n def find_set(self, x): if self.set[x] != x: self.set[x] = self.find_set(self.set[x]) return self.set[x] def union_set(self, x, y): (x_root, y_root) = map(self.find_set, (x, y)) if x_root == y_root or y != y_root: return False self.set[y_root] = x_root self.count -= 1 return True class Solution(object): def find_redundant_directed_connection(self, edges): """ :type edges: List[List[int]] :rtype: List[int] """ union_find = union_find(len(edges) + 1) for edge in edges: if not union_find.union_set(*edge): return edge return []
f1 = open("slurm-3101.out", 'r') lines = f1.readlines() count = 0 d = {} for line in lines: s = line.split(' + ') s.remove('\n') print(s) count += 1 for x in s: s1 = x.split('A^') if (float(s1[0]) != 0 or int(s1[1]) != 0): print(s1) res = d.get(int(s1[1])) if (res == None): d[int(s1[1])] = float(s1[0]) else: d[int(s1[1])] = d[int(s1[1])] + float(s1[0]) else: count -= 1 print(d) final = {} for key in sorted(d): final[key] = d[key] / count print(str(final[key]) + "A^" + str(key) + " + ",end=""), print() print(count)
f1 = open('slurm-3101.out', 'r') lines = f1.readlines() count = 0 d = {} for line in lines: s = line.split(' + ') s.remove('\n') print(s) count += 1 for x in s: s1 = x.split('A^') if float(s1[0]) != 0 or int(s1[1]) != 0: print(s1) res = d.get(int(s1[1])) if res == None: d[int(s1[1])] = float(s1[0]) else: d[int(s1[1])] = d[int(s1[1])] + float(s1[0]) else: count -= 1 print(d) final = {} for key in sorted(d): final[key] = d[key] / count (print(str(final[key]) + 'A^' + str(key) + ' + ', end=''),) print() print(count)
input = """ bk(a,b). bk(b,c). bk(m,m). bk(x,y). """ output = """ bk(a,b). bk(b,c). bk(m,m). bk(x,y). """
input = '\nbk(a,b).\nbk(b,c).\nbk(m,m).\nbk(x,y).\n' output = '\nbk(a,b).\nbk(b,c).\nbk(m,m).\nbk(x,y).\n'
#recursive factorial def factorial(n): if (n == 0): return 1 else: return n * factorial(n - 1) #iterative factorial def factorial(n): total = 1 for i in range(1,n+1,1): total *= i return total #recursive greatest common divisor def gcd(a,b): if (b == 0): return a else: return gcd(b,a % b) #iterative greatest common divisor (broken) def gcd_bad(a,b): while (b != 0): a = b b = a % b return a #iterative greatest common divisor (broken) def gcd_bad2(a,b): while (b != 0): b = a % b a = b return a #iterative greatest common divisor (correct) def gcd(a,b): while (b != 0): temp = b b = a % b a = temp return a #iterative greatest common divisor (Python specific swap) def gcd2(a,b): while (b != 0): a,b = b,a % b return a #recursive fibonacci (inefficient) def fib(n): if (n < 2): return n else: return fib(n - 1) + fib(n - 2) #iterative fibonacci def fib(n): a = 0 # the first Fibonacci number b = 1 # the second Fibonacci number for i in range(0,n,1): c = a + b a = b b = c return a #recursive fibonacci (efficient) def fib(n): def loop(a,b,i): if (i < n): return loop(b,a + b,i + 1) else: return a return loop(0,1,0) #recursive factorial def fact(n): total = 1 for i in range(1,n+1,1): total *= i return total #recursive factorial (tail recursive) def fact2(n): def loop(total,i): if (i < n + 1): return loop(total * i,i + 1) else: return total return loop(1,1)
def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1) def factorial(n): total = 1 for i in range(1, n + 1, 1): total *= i return total def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) def gcd_bad(a, b): while b != 0: a = b b = a % b return a def gcd_bad2(a, b): while b != 0: b = a % b a = b return a def gcd(a, b): while b != 0: temp = b b = a % b a = temp return a def gcd2(a, b): while b != 0: (a, b) = (b, a % b) return a def fib(n): if n < 2: return n else: return fib(n - 1) + fib(n - 2) def fib(n): a = 0 b = 1 for i in range(0, n, 1): c = a + b a = b b = c return a def fib(n): def loop(a, b, i): if i < n: return loop(b, a + b, i + 1) else: return a return loop(0, 1, 0) def fact(n): total = 1 for i in range(1, n + 1, 1): total *= i return total def fact2(n): def loop(total, i): if i < n + 1: return loop(total * i, i + 1) else: return total return loop(1, 1)
# Extended Euclid's Algorithm for Modular Multiplicative Inverse def euclidean_mod_inverse(a, b): temp = b # Initialize variables t1, t2 = 0, 1 if b == 1: return 0 # Perform extended Euclid's algorithm until a > 1 while a > 1: quotient, remainder = divmod(a, b) a, b = b, remainder t1, t2 = t2 - t1 * quotient, t1 if (t2 < 0) : t2 += temp return t2 # Driver Code if __name__ == '__main__': num = 10 mod = 17 print( f"The Modular Multiplicative Inverse of {num} is : {euclidean_mod_inverse(num, mod)}")
def euclidean_mod_inverse(a, b): temp = b (t1, t2) = (0, 1) if b == 1: return 0 while a > 1: (quotient, remainder) = divmod(a, b) (a, b) = (b, remainder) (t1, t2) = (t2 - t1 * quotient, t1) if t2 < 0: t2 += temp return t2 if __name__ == '__main__': num = 10 mod = 17 print(f'The Modular Multiplicative Inverse of {num} is : {euclidean_mod_inverse(num, mod)}')
""" Given the array nums, obtain a subsequence of the array whose sum of elements is strictly greater than the sum of the non included elements in such subsequence. If there are multiple solutions, return the subsequence with minimum size and if there still exist multiple solutions, return the subsequence with the maximum total sum of all its elements. A subsequence of an array can be obtained by erasing some (possibly zero) elements from the array. Note that the solution with the given constraints is guaranteed to be unique. Also return the answer sorted in non-increasing order. Example: Input: nums = [4,3,10,9,8] Output: [10,9] Explanation: The subsequences [10,9] and [10,8] are minimal such that the sum of their elements is strictly greater than the sum of elements not included, however, the subsequence [10,9] has the maximum total sum of its elements. Example: Input: nums = [4,4,7,6,7] Output: [7,7,6] Explanation: The subsequence [7,7] has the sum of its elements equal to 14 which is not strictly greater than the sum of elements not included (14 = 4 + 4 + 6). Therefore, the subsequence [7,6,7] is the minimal satisfying the conditions. Note the subsequence has to returned in non-decreasing order. Example: Input: nums = [6] Output: [6] Constraints: - 1 <= nums.length <= 500 - 1 <= nums[i] <= 100 """ #Difficulty: Easy #103 / 103 test cases passed. #Runtime: 48 ms #Memory Usage: 14.1 MB #Runtime: 48 ms, faster than 99.72% of Python3 online submissions for Minimum Subsequence in Non-Increasing Order. #Memory Usage: 14.1 MB, less than 100.00% of Python3 online submissions for Minimum Subsequence in Non-Increasing Order. class Solution: def minSubsequence(self, nums: List[int]) -> List[int]: nums = sorted(nums, reverse=True) left = 0 right = sum(nums) for i, n in enumerate(nums): left += n if left > right - left: return nums[:i+1]
""" Given the array nums, obtain a subsequence of the array whose sum of elements is strictly greater than the sum of the non included elements in such subsequence. If there are multiple solutions, return the subsequence with minimum size and if there still exist multiple solutions, return the subsequence with the maximum total sum of all its elements. A subsequence of an array can be obtained by erasing some (possibly zero) elements from the array. Note that the solution with the given constraints is guaranteed to be unique. Also return the answer sorted in non-increasing order. Example: Input: nums = [4,3,10,9,8] Output: [10,9] Explanation: The subsequences [10,9] and [10,8] are minimal such that the sum of their elements is strictly greater than the sum of elements not included, however, the subsequence [10,9] has the maximum total sum of its elements. Example: Input: nums = [4,4,7,6,7] Output: [7,7,6] Explanation: The subsequence [7,7] has the sum of its elements equal to 14 which is not strictly greater than the sum of elements not included (14 = 4 + 4 + 6). Therefore, the subsequence [7,6,7] is the minimal satisfying the conditions. Note the subsequence has to returned in non-decreasing order. Example: Input: nums = [6] Output: [6] Constraints: - 1 <= nums.length <= 500 - 1 <= nums[i] <= 100 """ class Solution: def min_subsequence(self, nums: List[int]) -> List[int]: nums = sorted(nums, reverse=True) left = 0 right = sum(nums) for (i, n) in enumerate(nums): left += n if left > right - left: return nums[:i + 1]
budget = float(input("Enter the budget: ")) amount_of_video_card = int(input("Enter the number of video cards: ")) amount_of_processor = int(input("Enter the number of processors: ")) amount_of_ram_memory = int(input("Enter the number of ram memory: ")) video_card_price_per_one = 250 video_card_total_price = amount_of_video_card * video_card_price_per_one processor_price_per_one = video_card_total_price * 0.35 processor_total_price = amount_of_processor * processor_price_per_one ram_memory_per_one = video_card_total_price * 0.1 ram_memory_total_price = amount_of_ram_memory * ram_memory_per_one total_sum = video_card_total_price + processor_total_price + ram_memory_total_price if amount_of_video_card > amount_of_processor: total_sum = total_sum - total_sum * 0.15 money_left = abs(budget - total_sum) if budget >= total_sum: print(f"You have {money_left:.2f} leva left!") else: print(f"Not enough money! You need {money_left:.2f} leva more!")
budget = float(input('Enter the budget: ')) amount_of_video_card = int(input('Enter the number of video cards: ')) amount_of_processor = int(input('Enter the number of processors: ')) amount_of_ram_memory = int(input('Enter the number of ram memory: ')) video_card_price_per_one = 250 video_card_total_price = amount_of_video_card * video_card_price_per_one processor_price_per_one = video_card_total_price * 0.35 processor_total_price = amount_of_processor * processor_price_per_one ram_memory_per_one = video_card_total_price * 0.1 ram_memory_total_price = amount_of_ram_memory * ram_memory_per_one total_sum = video_card_total_price + processor_total_price + ram_memory_total_price if amount_of_video_card > amount_of_processor: total_sum = total_sum - total_sum * 0.15 money_left = abs(budget - total_sum) if budget >= total_sum: print(f'You have {money_left:.2f} leva left!') else: print(f'Not enough money! You need {money_left:.2f} leva more!')
pysmt_op = ["forall", "exists", "and", "or", "not", "=>", "iff", "symbol", "function", "real_constant", "bool_constant", "int_constant", "str_constant", "+", "-", "*", "<=", "<", "=", "ite", "toreal", "bv_constant", "bvnot", "bvand", "bvor", "bvxor", "concat", "extract", "bvult", "bvule", "bvneg", "bvadd", "bvsub", "bvmul", "bvudiv", "bvurem", "bvshl", "bvlshr", "bvrol", "bvror", "zero_extend", "sign_extend", "bvslt", "bvsle", "bvcomp", "bvsdiv", "bvsrem", "bvashr", "str.len", "str.++", "str.contains", "str.indexof", "str.replace", "str.substr", "str.prefixof", "str.suffixof", "str.to_int", "str.from_int", "str.at", "select", "store", "value", "/", "^", "algebraic_constant", "bv2nat"] other_op = ["compressed_op", "unknown", "distinct", ">=", ">", "bvuge", "bvugt", "bvsge", "bvsgt", "str.in_re", "str.to_re", "to_fp", "re.range", "re.union", "re.++", "re.+", "re.*", "re.allchar", "re.none", "xor", "mod"] fp_op = ["fp", "fp.neg", "fp.isZero", "fp.isNormal", "fp.isSubnormal", "fp.isPositive", "fp.isInfinite", "fp.isNan", "fp.eq", "fp.roundToIntegral", "fp.rem", "fp.sub", "fp.sqrt", "fp.lt", "fp.leq", "fp.gt", "fp.geq", "fp.abs", "fp.add", "fp.div", "fp.min", "fp.max", "fp.mul", "fp.to_sbv", "fp.to_ubv"] op = pysmt_op + other_op none_op = ["extract", "zero_extend", "sign_extend", "to_fp", "repeat", "+oo", "-oo"] tri_op = ["ite", "str.indexof", "str.replace", "str.substr", "store"] bv_constant = "constant" bool_constant = "constant" reserved_word = ["declare-fun", "define-fun", "declare-sort", "define-sort", "declare-datatype", "declare-const" "assert", "check-sat", "set-info", "set-logic", "set-option"]
pysmt_op = ['forall', 'exists', 'and', 'or', 'not', '=>', 'iff', 'symbol', 'function', 'real_constant', 'bool_constant', 'int_constant', 'str_constant', '+', '-', '*', '<=', '<', '=', 'ite', 'toreal', 'bv_constant', 'bvnot', 'bvand', 'bvor', 'bvxor', 'concat', 'extract', 'bvult', 'bvule', 'bvneg', 'bvadd', 'bvsub', 'bvmul', 'bvudiv', 'bvurem', 'bvshl', 'bvlshr', 'bvrol', 'bvror', 'zero_extend', 'sign_extend', 'bvslt', 'bvsle', 'bvcomp', 'bvsdiv', 'bvsrem', 'bvashr', 'str.len', 'str.++', 'str.contains', 'str.indexof', 'str.replace', 'str.substr', 'str.prefixof', 'str.suffixof', 'str.to_int', 'str.from_int', 'str.at', 'select', 'store', 'value', '/', '^', 'algebraic_constant', 'bv2nat'] other_op = ['compressed_op', 'unknown', 'distinct', '>=', '>', 'bvuge', 'bvugt', 'bvsge', 'bvsgt', 'str.in_re', 'str.to_re', 'to_fp', 're.range', 're.union', 're.++', 're.+', 're.*', 're.allchar', 're.none', 'xor', 'mod'] fp_op = ['fp', 'fp.neg', 'fp.isZero', 'fp.isNormal', 'fp.isSubnormal', 'fp.isPositive', 'fp.isInfinite', 'fp.isNan', 'fp.eq', 'fp.roundToIntegral', 'fp.rem', 'fp.sub', 'fp.sqrt', 'fp.lt', 'fp.leq', 'fp.gt', 'fp.geq', 'fp.abs', 'fp.add', 'fp.div', 'fp.min', 'fp.max', 'fp.mul', 'fp.to_sbv', 'fp.to_ubv'] op = pysmt_op + other_op none_op = ['extract', 'zero_extend', 'sign_extend', 'to_fp', 'repeat', '+oo', '-oo'] tri_op = ['ite', 'str.indexof', 'str.replace', 'str.substr', 'store'] bv_constant = 'constant' bool_constant = 'constant' reserved_word = ['declare-fun', 'define-fun', 'declare-sort', 'define-sort', 'declare-datatype', 'declare-constassert', 'check-sat', 'set-info', 'set-logic', 'set-option']
#!/usr/bin/env python # -*- coding: utf-8 -*- """ If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ def main(): x = 0 for n in range(1, 1000): if n % 3 == 0: x += n elif n % 5 == 0: x += n print(x) if __name__ == '__main__': main()
""" If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ def main(): x = 0 for n in range(1, 1000): if n % 3 == 0: x += n elif n % 5 == 0: x += n print(x) if __name__ == '__main__': main()
""" limis core - environment Environment variables set for a project. """ LIMIS_PROJECT_NAME_ENVIRONMENT_VARIABLE = 'LIMIS_PROJECT_NAME' LIMIS_PROJECT_SETTINGS_ENVIRONMENT_VARIABLE = 'LIMIS_PROJECT_SETTINGS'
""" limis core - environment Environment variables set for a project. """ limis_project_name_environment_variable = 'LIMIS_PROJECT_NAME' limis_project_settings_environment_variable = 'LIMIS_PROJECT_SETTINGS'
class CyclicQ(object): ''' Queue. read parameter is next scheduled for dequeue, write parameter is most recently queued. ''' def __init__(self, length): self.width = length self.length = 0 self.array = [None] * length self.read = 0 self.write = -1 def enqueue(self, item): ''' adds an item to the end of the queue ''' if self.length == self.width: raise ValueError self.write += 1 self.array[self.write % self.width] = item self.length += 1 def dequeue(self): ''' Returns the oldest item in queue ''' if self.length == 0: raise ValueError self.length -= 1 reval = self.array[self.read % self.width] self.read += 1 return reval def scrollback(self): ''' Lowers the read/write pointers back down into reasonable ranges, for sanity's sake I suppose. ''' if self.write <= 0: return offset = self.read % self.width self.write -= self.read - offset self.read = offset class FixedQ(object): ''' Fixed length/width queue. Pass list equal to queue length for previous queue values. oldest -> newest dequeues on enqueue, head is next to be dequeued. ''' def __init__(self, length, starter_list=None): self.width = length self.head = 0 if starter_list is None: self.array = [None] * length else: if len(starter_list) != length: raise ValueError else: self.array = starter_list def __str__(self): ''' stotrorrjw ''' return ' '.join(self.items()) def ndqueue(self, item): ''' enqueue and dequeue at the same time! ''' self.head = self.head % self.width reval = self.array[self.head] self.array[self.head] = item self.head += 1 return reval def items(self): retlist = [] index = self.head while index != self.head + self.width: retlist.append(self.array[index%self.width]) index += 1 return retlist def test_q(): qu = CyclicQ(4) qu.enqueue(1) qu.enqueue(2) assert qu.dequeue() == 1 qu.enqueue(3) assert qu.dequeue() == 2 assert qu.dequeue() == 3
class Cyclicq(object): """ Queue. read parameter is next scheduled for dequeue, write parameter is most recently queued. """ def __init__(self, length): self.width = length self.length = 0 self.array = [None] * length self.read = 0 self.write = -1 def enqueue(self, item): """ adds an item to the end of the queue """ if self.length == self.width: raise ValueError self.write += 1 self.array[self.write % self.width] = item self.length += 1 def dequeue(self): """ Returns the oldest item in queue """ if self.length == 0: raise ValueError self.length -= 1 reval = self.array[self.read % self.width] self.read += 1 return reval def scrollback(self): """ Lowers the read/write pointers back down into reasonable ranges, for sanity's sake I suppose. """ if self.write <= 0: return offset = self.read % self.width self.write -= self.read - offset self.read = offset class Fixedq(object): """ Fixed length/width queue. Pass list equal to queue length for previous queue values. oldest -> newest dequeues on enqueue, head is next to be dequeued. """ def __init__(self, length, starter_list=None): self.width = length self.head = 0 if starter_list is None: self.array = [None] * length elif len(starter_list) != length: raise ValueError else: self.array = starter_list def __str__(self): """ stotrorrjw """ return ' '.join(self.items()) def ndqueue(self, item): """ enqueue and dequeue at the same time! """ self.head = self.head % self.width reval = self.array[self.head] self.array[self.head] = item self.head += 1 return reval def items(self): retlist = [] index = self.head while index != self.head + self.width: retlist.append(self.array[index % self.width]) index += 1 return retlist def test_q(): qu = cyclic_q(4) qu.enqueue(1) qu.enqueue(2) assert qu.dequeue() == 1 qu.enqueue(3) assert qu.dequeue() == 2 assert qu.dequeue() == 3
######################################################## # Copyright (c) 2015-2017 by European Commission. # # All Rights Reserved. # ######################################################## extends("BaseKPI.py") """ Marginal costs statistics (euro/MWh) ------------------------------------- Indexed by * scope * delivery point * energy (electricity, reserve or gas) * test case * statistics (min, max, average or demand average) Computes the minimum, maximum and average value of the marginal cost over the year for a given delivery point and energy. The KPI also computes the demand weighted (demand average) marginal cost: .. math:: \\small demandWeightedMarginalCost_{zone, energy} = \\frac{\\sum_t marginalCost_t^{zone, energy}.demand_t^{zone, energy}}{\\sum_t demand_t^{zone, energy}} The marginal cost of a given energy and a given delivery point is the variable cost of the production unit that was last called (after the costs of the different technologies were ordered in increasing order) to meet the energy demand in the delivery point. """ def computeIndicator(context, indexFilter, paramsIndicator, kpiDict): timeStepDuration = getTimeStepDurationInHours(context) selectedScopes = indexFilter.filterIndexList(0, getScopes()) selectedDeliveryPoints = indexFilter.filterIndexList(1, getDeliveryPoints(context)) selectedEnergies = indexFilter.filterIndexList(2, getEnergies(context, includedEnergies = PRODUCED_ENERGIES)) selectedTestCases = indexFilter.filterIndexList(3, context.getResultsIndexSet()) selectedAssetsByScope = getAssetsByScope(context, selectedScopes, includeFinancialAssets=True, includedTechnologies = DEMAND_TYPES) demandDict = getDemandDict(context, selectedScopes, selectedTestCases, selectedEnergies, selectedDeliveryPoints, selectedAssetsByScope, aggregation = True) marginalCostDict = getMarginalCostDict(context, selectedScopes, selectedTestCases, selectedEnergies, selectedDeliveryPoints) for index in marginalCostDict: kpiDict[index + ("Min",)] = marginalCostDict[index].getMinValue() / timeStepDuration kpiDict[index + ("Max",)] = marginalCostDict[index].getMaxValue() / timeStepDuration kpiDict[index + ("Average",)] = marginalCostDict[index].getMeanValue() / timeStepDuration if index in demandDict and demandDict[index].getSumValue() > 0: kpiDict[index + ("Demand average",)] = (marginalCostDict[index]*demandDict[index]).getSumValue() / (timeStepDuration*demandDict[index]).getSumValue() return kpiDict def get_indexing(context) : baseIndexList = [getScopesIndexing(), context.getDeliveryPointsIndexing(), getEnergiesIndexing(context, includedEnergies = PRODUCED_ENERGIES), getTestCasesIndexing(context), BaseIndexDefault("Statistics",["Min", "Max", "Average", "Demand average"], False, False, True, 0)] return baseIndexList IndicatorLabel = "Marginal costs statistics" IndicatorUnit = u"\u20ac/MWh" IndicatorDeltaUnit = u"\u20ac/MWh" IndicatorDescription = "Marginal costs statistics (min, max and average)" IndicatorParameters = [] IndicatorIcon = "" IndicatorCategory = "Results>Marginal Costs" IndicatorTags = "Power System, Gas System, Power Markets"
extends('BaseKPI.py') '\nMarginal costs statistics (euro/MWh)\n-------------------------------------\n\nIndexed by\n\t* scope\n\t* delivery point\n\t* energy (electricity, reserve or gas)\n\t* test case\n\t* statistics (min, max, average or demand average)\n\nComputes the minimum, maximum and average value of the marginal cost over the year for a given delivery point and energy.\n\nThe KPI also computes the demand weighted (demand average) marginal cost:\n\n.. math::\n\n\t\\small demandWeightedMarginalCost_{zone, energy} = \\frac{\\sum_t marginalCost_t^{zone, energy}.demand_t^{zone, energy}}{\\sum_t demand_t^{zone, energy}} \n\nThe marginal cost of a given energy and a given delivery point is the variable cost of the production unit that was last called (after the costs of the different technologies were ordered in increasing order) to meet the energy demand in the delivery point.\n\n' def compute_indicator(context, indexFilter, paramsIndicator, kpiDict): time_step_duration = get_time_step_duration_in_hours(context) selected_scopes = indexFilter.filterIndexList(0, get_scopes()) selected_delivery_points = indexFilter.filterIndexList(1, get_delivery_points(context)) selected_energies = indexFilter.filterIndexList(2, get_energies(context, includedEnergies=PRODUCED_ENERGIES)) selected_test_cases = indexFilter.filterIndexList(3, context.getResultsIndexSet()) selected_assets_by_scope = get_assets_by_scope(context, selectedScopes, includeFinancialAssets=True, includedTechnologies=DEMAND_TYPES) demand_dict = get_demand_dict(context, selectedScopes, selectedTestCases, selectedEnergies, selectedDeliveryPoints, selectedAssetsByScope, aggregation=True) marginal_cost_dict = get_marginal_cost_dict(context, selectedScopes, selectedTestCases, selectedEnergies, selectedDeliveryPoints) for index in marginalCostDict: kpiDict[index + ('Min',)] = marginalCostDict[index].getMinValue() / timeStepDuration kpiDict[index + ('Max',)] = marginalCostDict[index].getMaxValue() / timeStepDuration kpiDict[index + ('Average',)] = marginalCostDict[index].getMeanValue() / timeStepDuration if index in demandDict and demandDict[index].getSumValue() > 0: kpiDict[index + ('Demand average',)] = (marginalCostDict[index] * demandDict[index]).getSumValue() / (timeStepDuration * demandDict[index]).getSumValue() return kpiDict def get_indexing(context): base_index_list = [get_scopes_indexing(), context.getDeliveryPointsIndexing(), get_energies_indexing(context, includedEnergies=PRODUCED_ENERGIES), get_test_cases_indexing(context), base_index_default('Statistics', ['Min', 'Max', 'Average', 'Demand average'], False, False, True, 0)] return baseIndexList indicator_label = 'Marginal costs statistics' indicator_unit = u'€/MWh' indicator_delta_unit = u'€/MWh' indicator_description = 'Marginal costs statistics (min, max and average)' indicator_parameters = [] indicator_icon = '' indicator_category = 'Results>Marginal Costs' indicator_tags = 'Power System, Gas System, Power Markets'
def response_json(target): def decorator(*args, **kwargs): response = target(*args, **kwargs) # TODO: you can add your error handling in here return response.json() return decorator
def response_json(target): def decorator(*args, **kwargs): response = target(*args, **kwargs) return response.json() return decorator
NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY = 9999 # MessageProcessor # priority constants for message processors between modules ASSETS_PRIORITY_PARSE_ISSUANCE = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 0 ASSETS_PRIORITY_PARSE_DESTRUCTION = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 1 ASSETS_PRIORITY_BALANCE_CHANGE = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 2 DEX_PRIORITY_PARSE_TRADEBOOK = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 3 BETTING_PRIORITY_PARSE_BROADCAST = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 4 CWALLET_PRIORITY_PARSE_FOR_SOCKETIO = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 5 # comes last # MempoolMessageProcessor CWALLET_PRIORITY_PUBLISH_MEMPOOL = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 0
non_core_depdendent_tasks_first_priority = 9999 assets_priority_parse_issuance = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 0 assets_priority_parse_destruction = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 1 assets_priority_balance_change = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 2 dex_priority_parse_tradebook = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 3 betting_priority_parse_broadcast = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 4 cwallet_priority_parse_for_socketio = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 5 cwallet_priority_publish_mempool = NON_CORE_DEPDENDENT_TASKS_FIRST_PRIORITY - 0
#coding: utf8 def get_data_by_binary_search(target, source_list): min=0 max=len(source_list)-1 while min<=max: mid=(min+max)//2 if source_list[mid]==target: return mid if source_list[mid]>target: max=mid-1 else: min=mid+1 if __name__=='__main__': source_list=[1,3,5,7,9,10,12,14,15,18] res=get_data_by_binary_search(14, source_list) print(res)
def get_data_by_binary_search(target, source_list): min = 0 max = len(source_list) - 1 while min <= max: mid = (min + max) // 2 if source_list[mid] == target: return mid if source_list[mid] > target: max = mid - 1 else: min = mid + 1 if __name__ == '__main__': source_list = [1, 3, 5, 7, 9, 10, 12, 14, 15, 18] res = get_data_by_binary_search(14, source_list) print(res)
# -*- coding: utf-8 -*- """Binary Search.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1pgYTs84FYj7s3soy6YSyOLeeo6y34p0U """ def binary_search(arr, target): first = 0 last = len(arr)-1 found = False while first <= last and not found: mid = (first + last) // 2 if arr[mid] == target: found = True else: if target < arr[mid]: last = mid-1 else: first = mid+1 return found arr = [1,2,3,4,5,6,10,12,14,18,20] binary_search(arr, 5)
"""Binary Search.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1pgYTs84FYj7s3soy6YSyOLeeo6y34p0U """ def binary_search(arr, target): first = 0 last = len(arr) - 1 found = False while first <= last and (not found): mid = (first + last) // 2 if arr[mid] == target: found = True elif target < arr[mid]: last = mid - 1 else: first = mid + 1 return found arr = [1, 2, 3, 4, 5, 6, 10, 12, 14, 18, 20] binary_search(arr, 5)
# # WAP accept a number and check even or odd.. number = int(input("Enter number: ")) if(number == 0): print("Zero") elif(number % 2 == 0): print("Even") else: print("Odd") # # WAP accept three subject marks . Calculate % marks. and display grade as per following condition... # # 80 - 100 > A... ..... 60 -<80 >> B..... 40- 60 >> C else D marks1 = float(input("Enter marks for subject 1: ")) marks2 = float(input("Enter marks for subject 2: ")) marks3 = float(input("Enter marks for subject 3: ")) percent = (marks1+marks2+marks3)/3 if(percent >= 80 and percent <= 100): print("Grade A") elif(percent >= 60 and percent < 80): print("Grade B") elif(percent >= 40 and percent < 60): print("Grade C") else: print("Grade D")
number = int(input('Enter number: ')) if number == 0: print('Zero') elif number % 2 == 0: print('Even') else: print('Odd') marks1 = float(input('Enter marks for subject 1: ')) marks2 = float(input('Enter marks for subject 2: ')) marks3 = float(input('Enter marks for subject 3: ')) percent = (marks1 + marks2 + marks3) / 3 if percent >= 80 and percent <= 100: print('Grade A') elif percent >= 60 and percent < 80: print('Grade B') elif percent >= 40 and percent < 60: print('Grade C') else: print('Grade D')
pizzas = ['hawaiian', 'pepperoni', 'margherita'] friend_pizzas = pizzas[:] pizzas.append('marinara') friend_pizzas.append('vegetariana') print("My favorite pizzas are:") for pizza in pizzas: print(pizza) print("\nMy friend's favorite pizzas are:") for pizza in friend_pizzas: print(pizza)
pizzas = ['hawaiian', 'pepperoni', 'margherita'] friend_pizzas = pizzas[:] pizzas.append('marinara') friend_pizzas.append('vegetariana') print('My favorite pizzas are:') for pizza in pizzas: print(pizza) print("\nMy friend's favorite pizzas are:") for pizza in friend_pizzas: print(pizza)
# # PySNMP MIB module DOCS-IETF-BPI2-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DOCS-IETF-BPI2-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:43:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") Counter64, Unsigned32, Integer32, mib_2, IpAddress, Bits, Gauge32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, iso, TimeTicks, ObjectIdentity, NotificationType, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Unsigned32", "Integer32", "mib-2", "IpAddress", "Bits", "Gauge32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "iso", "TimeTicks", "ObjectIdentity", "NotificationType", "MibIdentifier") MacAddress, RowStatus, StorageType, TextualConvention, TruthValue, DateAndTime, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "RowStatus", "StorageType", "TextualConvention", "TruthValue", "DateAndTime", "DisplayString") docsBpi2MIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 126)) docsBpi2MIB.setRevisions(('2005-07-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: docsBpi2MIB.setRevisionsDescriptions(('Initial version of the IETF BPI+ MIB module. This version published as RFC 4131.',)) if mibBuilder.loadTexts: docsBpi2MIB.setLastUpdated('200507200000Z') if mibBuilder.loadTexts: docsBpi2MIB.setOrganization('IETF IP over Cable Data Network (IPCDN) Working Group') if mibBuilder.loadTexts: docsBpi2MIB.setContactInfo('--------------------------------------- Stuart M. Green E-mail: rubbersoul3@yahoo.com --------------------------------------- Kaz Ozawa Automotive Systems Development Center TOSHIBA CORPORATION 1-1, Shibaura 1-Chome Minato-ku, Tokyo 105-8001 Japan Phone: +81-3-3457-8569 Fax: +81-3-5444-9325 E-mail: Kazuyoshi.Ozawa@toshiba.co.jp --------------------------------------- Alexander Katsnelson Postal: Tel: +1-303-680-3924 E-mail: katsnelson6@peoplepc.com --------------------------------------- Eduardo Cardona Postal: Cable Television Laboratories, Inc. 858 Coal Creek Circle Louisville, CO 80027- 9750 U.S.A. Tel: +1 303 661 9100 Fax: +1 303 661 9199 E-mail: e.cardona@cablelabs.com --------------------------------------- IETF IPCDN Working Group General Discussion: ipcdn@ietf.org Subscribe: http://www.ietf.org/mailman/listinfo/ipcdn. Archive: ftp://ftp.ietf.org/ietf-mail-archive/ipcdn. Co-chairs: Richard Woundy, rwoundy@cisco.com Jean-Francois Mule, jfm@cablelabs.com') if mibBuilder.loadTexts: docsBpi2MIB.setDescription('This is the MIB module for the DOCSIS Baseline Privacy Plus Interface (BPI+) at cable modems (CMs) and cable modem termination systems (CMTSs). Copyright (C) The Internet Society (2005). This version of this MIB module is part of RFC 4131; see the RFC itself for full legal notices.') class DocsX509ASN1DEREncodedCertificate(TextualConvention, OctetString): description = 'An X509 digital certificate encoded as an ASN.1 DER object.' status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 4096) class DocsSAId(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 2.1.3, BPI+ Security Associations' description = 'Security Association identifier (SAID).' status = 'current' displayHint = 'd' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 16383) class DocsSAIdOrZero(TextualConvention, Unsigned32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 2.1.3, BPI+ Security Associations' description = 'Security Association identifier (SAID). The value zero indicates that the SAID is yet to be determined.' status = 'current' displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 16383), ) class DocsBpkmSAType(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 4.2.2.24' description = "The type of security association (SA). The values of the named-numbers are associated with the BPKM SA-Type attributes: 'primary' corresponds to code '1', 'static' to code '2', and 'dynamic' to code '3'. The 'none' value must only be used if the SA type has yet to be determined." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("none", 0), ("primary", 1), ("static", 2), ("dynamic", 3)) class DocsBpkmDataEncryptAlg(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.' description = "The list of data encryption algorithms defined for the DOCSIS interface in the BPKM cryptographic-suite parameter. The value 'none' indicates that the SAID being referenced has no data encryption." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5)) namedValues = NamedValues(("none", 0), ("des56CbcMode", 1), ("des40CbcMode", 2), ("t3Des128CbcMode", 3), ("aes128CbcMode", 4), ("aes256CbcMode", 5)) class DocsBpkmDataAuthentAlg(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.' description = "The list of data integrity algorithms defined for the DOCSIS interface in the BPKM cryptographic-suite parameter. The value 'none' indicates that no data integrity is used for the SAID being referenced." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("none", 0), ("hmacSha196", 1)) docsBpi2MIBObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1)) docsBpi2CmObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 1)) docsBpi2CmBaseTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 1, 1), ) if mibBuilder.loadTexts: docsBpi2CmBaseTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmBaseTable.setDescription('This table describes the basic and authorization- related Baseline Privacy Plus attributes of each CM MAC interface.') docsBpi2CmBaseEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: docsBpi2CmBaseEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmBaseEntry.setDescription('Each entry contains objects describing attributes of one CM MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docsBpi2CmPrivacyEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.') if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setDescription('This object identifies whether this CM is provisioned to run Baseline Privacy Plus.') docsBpi2CmPublicKey = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 524))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmPublicKey.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.4.') if mibBuilder.loadTexts: docsBpi2CmPublicKey.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmPublicKey.setDescription('The value of this object is a DER-encoded RSAPublicKey ASN.1 type string, as defined in the RSA Encryption Standard (PKCS #1), corresponding to the public key of the CM.') docsBpi2CmAuthState = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("start", 1), ("authWait", 2), ("authorized", 3), ("reauthWait", 4), ("authRejectWait", 5), ("silent", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.2.1.') if mibBuilder.loadTexts: docsBpi2CmAuthState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthState.setDescription('The value of this object is the state of the CM authorization FSM. The start state indicates that FSM is in its initial state.') docsBpi2CmAuthKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.10.') if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setDescription('The value of this object is the most recent authorization key sequence number for this FSM.') docsBpi2CmAuthExpiresOld = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 5), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent authorization key for this FSM. If this FSM has only one authorization key, then the value is the time of activation of this FSM.') docsBpi2CmAuthExpiresNew = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 6), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent authorization key for this FSM.') docsBpi2CmAuthReset = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 7), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmAuthReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.2.3.4.') if mibBuilder.loadTexts: docsBpi2CmAuthReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthReset.setDescription("Setting this object to 'true' generates a Reauthorize event in the authorization FSM. Reading this object always returns FALSE. This object is for testing purposes only, and therefore it is not required to be associated with a last reset object.") docsBpi2CmAuthGraceTime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6047999))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.3.') if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setDescription('The value of this object is the grace time for an authorization key in seconds. A CM is expected to start trying to get a new authorization key beginning AuthGraceTime seconds before the most recent authorization key actually expires.') docsBpi2CmTEKGraceTime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 302399))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.6.') if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setDescription('The value of this object is the grace time for the TEK in seconds. The CM is expected to start trying to acquire a new TEK beginning TEK GraceTime seconds before the expiration of the most recent TEK.') docsBpi2CmAuthWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.1.') if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setDescription('The value of this object is the Authorize Wait Timeout in seconds.') docsBpi2CmReauthWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.2.') if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setDescription('The value of this object is the Reauthorize Wait Timeout in seconds.') docsBpi2CmOpWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.4.') if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setDescription('The value of this object is the Operational Wait Timeout in seconds.') docsBpi2CmRekeyWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.5.') if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setDescription('The value of this object is the Rekey Wait Timeout in seconds.') docsBpi2CmAuthRejectWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 600))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.7.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setDescription('The value of this object is the Authorization Reject Wait Timeout in seconds.') docsBpi2CmSAMapWaitTimeout = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.8.') if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setDescription('The value of this object is the retransmission interval, in seconds, of SA Map Requests from the MAP Wait state.') docsBpi2CmSAMapMaxRetries = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setUnits('count').setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.9.') if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setDescription('The value of this object is the maximum number of Map Request retries allowed.') docsBpi2CmAuthentInfos = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setDescription('The value of this object is the number of times the CM has transmitted an Authentication Information message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmAuthRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setDescription('The value of this object is the number of times the CM has transmitted an Authorization Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmAuthReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setDescription('The value of this object is the number of times the CM has received an Authorization Reply message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmAuthRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setDescription('The value of this object is the number of times the CM has received an Authorization Reject message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmAuthInvalids = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setDescription('The value of this object is the count of times the CM has received an Authorization Invalid message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmAuthRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 8, 11))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedCm", 3), ("unauthorizedSaid", 4), ("permanentAuthorizationFailure", 8), ("timeOfDayNotAcquired", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Reject message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Reject message has been received since reboot.') docsBpi2CmAuthRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 23), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setDescription('The value of this object is the text string in the most recent Authorization Reject message received by the CM. This is a zero length string if no Authorization Reject message has been received since reboot.') docsBpi2CmAuthInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 6, 7))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedCm", 3), ("unsolicited", 5), ("invalidKeySequence", 6), ("keyRequestAuthenticationFailure", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Invalid message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Invalid message has been received since reboot.') docsBpi2CmAuthInvalidErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 25), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setDescription('The value of this object is the text string in the most recent Authorization Invalid message received by the CM. This is a zero length string if no Authorization Invalid message has been received since reboot.') docsBpi2CmTEKTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 1, 2), ) if mibBuilder.loadTexts: docsBpi2CmTEKTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKTable.setDescription('This table describes the attributes of each CM Traffic Encryption Key (TEK) association. The CM maintains (no more than) one TEK association per SAID per CM MAC interface.') docsBpi2CmTEKEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKSAId")) if mibBuilder.loadTexts: docsBpi2CmTEKEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKEntry.setDescription('Each entry contains objects describing the TEK association attributes of one SAID. The CM MUST create one entry per SAID, regardless of whether the SAID was obtained from a Registration Response message, from an Authorization Reply message, or from any dynamic SAID establishment mechanisms.') docsBpi2CmTEKSAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 1), DocsSAId()) if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setDescription('The value of this object is the DOCSIS Security Association ID (SAID).') docsBpi2CmTEKSAType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 2), DocsBpkmSAType()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setDescription('The value of this object is the type of security association.') docsBpi2CmTEKDataEncryptAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 3), DocsBpkmDataEncryptAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this SAID.') docsBpi2CmTEKDataAuthentAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 4), DocsBpkmDataAuthentAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this SAID.') docsBpi2CmTEKState = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("start", 1), ("opWait", 2), ("opReauthWait", 3), ("operational", 4), ("rekeyWait", 5), ("rekeyReauthWait", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.1.') if mibBuilder.loadTexts: docsBpi2CmTEKState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKState.setDescription('The value of this object is the state of the indicated TEK FSM. The start(1) state indicates that the FSM is in its initial state.') docsBpi2CmTEKKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.2.10 and 4.2.2.13.') if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setDescription('The value of this object is the most recent TEK key sequence number for this TEK FSM.') docsBpi2CmTEKExpiresOld = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 7), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent TEK for this FSM. If this FSM has only one TEK, then the value is the time of activation of this FSM.') docsBpi2CmTEKExpiresNew = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 8), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent TEK for this FSM.') docsBpi2CmTEKKeyRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.4.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setDescription('The value of this object is the number of times the CM has transmitted a Key Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmTEKKeyReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setDescription('The value of this object is the number of times the CM has received a Key Reply message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmTEKKeyRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.6.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setDescription('The value of this object is the number of times the CM has received a Key Reject message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmTEKInvalids = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.8.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setDescription('The value of this object is the number of times the CM has received a TEK Invalid message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmTEKAuthPends = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.3.3.') if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setDescription('The value of this object is the count of times an Authorization Pending (Auth Pend) event occurred in this FSM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmTEKKeyRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedSaid", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.6 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Key Reject message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Key Reject message has been received since registration.') docsBpi2CmTEKKeyRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 15), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.6 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setDescription('The value of this object is the text string in the most recent Key Reject message received by the CM. This is a zero length string if no Key Reject message has been received since registration.') docsBpi2CmTEKInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 6))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("invalidKeySequence", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.8 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent TEK Invalid message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no TEK Invalid message has been received since registration.') docsBpi2CmTEKInvalidErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 17), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.8 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setDescription('The value of this object is the text string in the most recent TEK Invalid message received by the CM. This is a zero length string if no TEK Invalid message has been received since registration.') docsBpi2CmMulticastObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 1, 3)) docsBpi2CmIpMulticastMapTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1), ) if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapTable.setDescription('This table maps multicast IP addresses to SAIDs per CM MAC Interface. It is intended to map multicast IP addresses associated with SA MAP Request messages.') docsBpi2CmIpMulticastMapEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastIndex")) if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapEntry.setDescription('Each entry contains objects describing the mapping of one multicast IP address to one SAID, as well as associated state, message counters, and error information. An entry may be removed from this table upon the reception of an SA Map Reject.') docsBpi2CmIpMulticastIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmIpMulticastIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastIndex.setDescription('The index of this row.') docsBpi2CmIpMulticastAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddressType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddressType.setDescription('The type of Internet address for docsBpi2CmIpMulticastAddress.') docsBpi2CmIpMulticastAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 3), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 5.4.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setDescription('This object represents the IP multicast address to be mapped. The type of this address is determined by the value of the docsBpi2CmIpMulticastAddressType object.') docsBpi2CmIpMulticastSAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 4), DocsSAIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setDescription('This object represents the SAID to which the IP multicast address has been mapped. If no SA Map Reply has been received for the IP address, this object should have the value 0.') docsBpi2CmIpMulticastSAMapState = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("start", 1), ("mapWait", 2), ("mapped", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 5.3.1.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setDescription('The value of this object is the state of the SA Mapping FSM for this IP.') docsBpi2CmIpMulticastSAMapRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setDescription('The value of this object is the number of times the CM has transmitted an SA Map Request message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmIpMulticastSAMapReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setDescription('The value of this object is the number of times the CM has received an SA Map Reply message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmIpMulticastSAMapRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setDescription('The value of this object is the number of times the CM has received an SA MAP Reject message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmIpMulticastSAMapRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 9, 10))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("noAuthForRequestedDSFlow", 9), ("dsFlowNotMappedToSA", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent SA Map Reject message sent in response to an SA Map Request for This IP. It has the value none(1) if no SA MAP Reject message has been received since entry creation.') docsBpi2CmIpMulticastSAMapRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 10), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setDescription('The value of this object is the text string in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It is a zero length string if no SA Map Reject message has been received since entry creation.') docsBpi2CmCertObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 1, 4)) docsBpi2CmDeviceCertTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1), ) if mibBuilder.loadTexts: docsBpi2CmDeviceCertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCertTable.setDescription('This table describes the Baseline Privacy Plus device certificates for each CM MAC interface.') docsBpi2CmDeviceCertEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: docsBpi2CmDeviceCertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCertEntry.setDescription('Each entry contains the device certificates of one CM MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docsBpi2CmDeviceCmCert = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1, 1), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.1.') if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setDescription("The X509 DER-encoded cable modem certificate. Note: This object can be set only when the value is the zero-length OCTET STRING; otherwise, an error of 'inconsistentValue' is returned. Once the object contains the certificate, its access MUST be read-only and persists after re-initialization of the managed system.") docsBpi2CmDeviceManufCert = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1, 2), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.1.') if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setDescription('The X509 DER-encoded manufacturer certificate that signed the cable modem certificate.') docsBpi2CmCryptoSuiteTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 1, 5), ) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteTable.setDescription('This table describes the Baseline Privacy Plus cryptographic suite capabilities for each CM MAC interface.') docsBpi2CmCryptoSuiteEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmCryptoSuiteIndex")) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteEntry.setDescription('Each entry contains a cryptographic suite pair that this CM MAC supports.') docsBpi2CmCryptoSuiteIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteIndex.setDescription('The index for a cryptographic suite row.') docsBpi2CmCryptoSuiteDataEncryptAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 2), DocsBpkmDataEncryptAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this cryptographic suite capability.') docsBpi2CmCryptoSuiteDataAuthentAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 3), DocsBpkmDataAuthentAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this cryptographic suite capability.') docsBpi2CmtsObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 2)) docsBpi2CmtsBaseTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 1), ) if mibBuilder.loadTexts: docsBpi2CmtsBaseTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsBaseTable.setDescription('This table describes the basic Baseline Privacy attributes of each CMTS MAC interface.') docsBpi2CmtsBaseEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: docsBpi2CmtsBaseEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsBaseEntry.setDescription('Each entry contains objects describing attributes of one CMTS MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docsBpi2CmtsDefaultAuthLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6048000)).clone(604800)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setDescription('The value of this object is the default lifetime, in seconds, that the CMTS assigns to a new authorization key. This object value persists after re-initialization of the managed system.') docsBpi2CmtsDefaultTEKLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 604800)).clone(43200)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setDescription('The value of this object is the default lifetime, in seconds, that the CMTS assigns to a new Traffic Encryption Key (TEK). This object value persists after re-initialization of the managed system.') docsBpi2CmtsDefaultSelfSignedManufCertTrust = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("trusted", 1), ("untrusted", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setDescription('This object determines the default trust of self-signed manufacturer certificate entries, contained in docsBpi2CmtsCACertTable, and created after this object is set. This object need not persist after re-initialization of the managed system.') docsBpi2CmtsCheckCertValidityPeriods = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.2') if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setDescription("Setting this object to 'true' causes all chained and root certificates in the chain to have their validity periods checked against the current time of day, when the CMTS receives an Authorization Request from the CM. A 'false' setting causes all certificates in the chain not to have their validity periods checked against the current time of day. This object need not persist after re-initialization of the managed system.") docsBpi2CmtsAuthentInfos = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setDescription('The value of this object is the number of times the CMTS has received an Authentication Information message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setDescription('The value of this object is the number of times the CMTS has received an Authorization Request message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reply message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reject message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthInvalids = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Invalid message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsSAMapRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setDescription('The value of this object is the number of times the CMTS has received an SA Map Request message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsSAMapReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reply message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsSAMapRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reject message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 2), ) if mibBuilder.loadTexts: docsBpi2CmtsAuthTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthTable.setDescription('This table describes the attributes of each CM authorization association. The CMTS maintains one authorization association with each Baseline Privacy- enabled CM, registered on each CMTS MAC interface, regardless of whether the CM is authorized or rejected.') docsBpi2CmtsAuthEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmMacAddress")) if mibBuilder.loadTexts: docsBpi2CmtsAuthEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthEntry.setDescription('Each entry contains objects describing attributes of one authorization association. The CMTS MUST create one entry per CM per MAC interface, based on the receipt of an Authorization Request message, and MUST not delete the entry until the CM loses registration.') docsBpi2CmtsAuthCmMacAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 1), MacAddress()) if mibBuilder.loadTexts: docsBpi2CmtsAuthCmMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmMacAddress.setDescription('The value of this object is the physical address of the CM to which the authorization association applies.') docsBpi2CmtsAuthCmBpiVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("bpi", 0), ("bpiPlus", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.22; ANSI/SCTE 22-2 2002(formerly DSS 02-03) Data-Over-Cable Service Interface Specification DOCSIS 1.0 Baseline Privacy Interface (BPI)') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setDescription("The value of this object is the version of Baseline Privacy for which this CM has registered. The value 'bpiplus' represents the value of BPI-Version Attribute of the Baseline Privacy Key Management BPKM attribute BPI-Version (1). The value 'bpi' is used to represent the CM registered using DOCSIS 1.0 Baseline Privacy.") docsBpi2CmtsAuthCmPublicKey = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 524))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.4.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setDescription('The value of this object is a DER-encoded RSAPublicKey ASN.1 type string, as defined in the RSA Encryption Standard (PKCS #1), corresponding to the public key of the CM. This is the zero-length OCTET STRING if the CMTS does not retain the public key.') docsBpi2CmtsAuthCmKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.10.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setDescription('The value of this object is the most recent authorization key sequence number for this CM.') docsBpi2CmtsAuthCmExpiresOld = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 5), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent authorization key for this FSM. If this FSM has only one authorization key, then the value is the time of activation of this FSM. Note: This object has no meaning for CMs running in BPI mode; therefore, this object is not instantiated for entries associated to those CMs.') docsBpi2CmtsAuthCmExpiresNew = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 6), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent authorization key for this FSM.') docsBpi2CmtsAuthCmLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6048000))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2 and Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setDescription('The value of this object is the lifetime, in seconds, that the CMTS assigns to an authorization key for this CM.') docsBpi2CmtsAuthCmReset = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("noResetRequested", 1), ("invalidateAuth", 2), ("sendAuthInvalid", 3), ("invalidateTeks", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.3.4, 4.1.2.3.5, and 4.1.3.3.5.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setDescription("Setting this object to invalidateAuth(2) causes the CMTS to invalidate the current CM authorization key(s), but not to transmit an Authorization Invalid message nor to invalidate the primary SAID's TEKs. Setting this object to sendAuthInvalid(3) causes the CMTS to invalidate the current CM authorization key(s), and to transmit an Authorization Invalid message to the CM, but not to invalidate the primary SAID's TEKs. Setting this object to invalidateTeks(4) causes the CMTS to invalidate the current CM authorization key(s), to transmit an Authorization Invalid message to the CM, and to invalidate the TEKs associated with this CM's primary SAID. For BPI mode, substitute all of the CM's unicast TEKs for the primary SAID's TEKs in the previous paragraph. Reading this object returns the most recently set value of this object or, if the object has not been set since entry creation, returns noResetRequested(1).") docsBpi2CmtsAuthCmInfos = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setDescription('The value of this object is the number of times the CMTS has received an Authentication Information message from this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthCmRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setDescription('The value of this object is the number of times the CMTS has received an Authorization Request message from this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthCmReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reply message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthCmRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reject message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthCmInvalids = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Invalid message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsAuthRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 8, 11))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedCm", 3), ("unauthorizedSaid", 4), ("permanentAuthorizationFailure", 8), ("timeOfDayNotAcquired", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Reject message transmitted to the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Reject message has been transmitted to the CM since entry creation.') docsBpi2CmtsAuthRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 15), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setDescription('The value of this object is the text string in the most recent Authorization Reject message transmitted to the CM. This is a zero length string if no Authorization Reject message has been transmitted to the CM since entry creation.') docsBpi2CmtsAuthInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 6, 7))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedCm", 3), ("unsolicited", 5), ("invalidKeySequence", 6), ("keyRequestAuthenticationFailure", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Invalid message transmitted to the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Invalid message has been transmitted to the CM since entry creation.') docsBpi2CmtsAuthInvalidErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 17), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setDescription('The value of this object is the text string in the most recent Authorization Invalid message transmitted to the CM. This is a zero length string if no Authorization Invalid message has been transmitted to the CM since entry creation.') docsBpi2CmtsAuthPrimarySAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 18), DocsSAIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setDescription('The value of this object is the Primary Security Association identifier. For BPI mode, the value must be any unicast SID.') docsBpi2CmtsAuthBpkmCmCertValid = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 0), ("validCmChained", 1), ("validCmTrusted", 2), ("invalidCmUntrusted", 3), ("invalidCAUntrusted", 4), ("invalidCmOther", 5), ("invalidCAOther", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setDescription("Contains the reason why a CM's certificate is deemed valid or invalid. Return unknown(0) if the CM is running BPI mode. ValidCmChained(1) means the certificate is valid because it chains to a valid certificate. ValidCmTrusted(2) means the certificate is valid because it has been provisioned (in the docsBpi2CmtsProvisionedCmCert table) to be trusted. InvalidCmUntrusted(3) means the certificate is invalid because it has been provisioned (in the docsBpi2CmtsProvisionedCmCert table) to be untrusted. InvalidCAUntrusted(4) means the certificate is invalid because it chains to an untrusted certificate. InvalidCmOther(5) and InvalidCAOther(6) refer to errors in parsing, validity periods, etc., which are attributable to the CM certificate or its chain, respectively; additional information may be found in docsBpi2AuthRejectErrorString for these types of errors.") docsBpi2CmtsAuthBpkmCmCert = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 20), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setDescription('The X509 CM Certificate sent as part of a BPKM Authorization Request. Note: The zero-length OCTET STRING must be returned if the Entire certificate is not retained in the CMTS.') docsBpi2CmtsAuthCACertIndexPtr = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setDescription('A row index into docsBpi2CmtsCACertTable. Returns the index in docsBpi2CmtsCACertTable to which CA certificate this CM is chained to. A value of 0 means it could not be found or not applicable.') docsBpi2CmtsTEKTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 3), ) if mibBuilder.loadTexts: docsBpi2CmtsTEKTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKTable.setDescription('This table describes the attributes of each Traffic Encryption Key (TEK) association. The CMTS Maintains one TEK association per SAID on each CMTS MAC interface.') docsBpi2CmtsTEKEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKSAId")) if mibBuilder.loadTexts: docsBpi2CmtsTEKEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKEntry.setDescription('Each entry contains objects describing attributes of one TEK association on a particular CMTS MAC interface. The CMTS MUST create one entry per SAID per MAC interface, based on the receipt of a Key Request message, and MUST not delete the entry before the CM authorization for the SAID permanently expires.') docsBpi2CmtsTEKSAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 1), DocsSAId()) if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setDescription('The value of this object is the DOCSIS Security Association ID (SAID).') docsBpi2CmtsTEKSAType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 2), DocsBpkmSAType()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setDescription("The value of this object is the type of security association. 'dynamic' does not apply to CMs running in BPI mode. Unicast BPI TEKs must utilize the 'primary' encoding, and multicast BPI TEKs must utilize the 'static' encoding.") docsBpi2CmtsTEKDataEncryptAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 3), DocsBpkmDataEncryptAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this SAID.') docsBpi2CmtsTEKDataAuthentAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 4), DocsBpkmDataAuthentAlg()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this SAID.') docsBpi2CmtsTEKLifetime = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 604800))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5 and Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setDescription('The value of this object is the lifetime, in seconds, that the CMTS assigns to keys for this TEK association.') docsBpi2CmtsTEKKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.2.10 and 4.2.2.13.') if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setDescription('The value of this object is the most recent TEK key sequence number for this SAID.') docsBpi2CmtsTEKExpiresOld = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 7), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent TEK for this FSM. If this FSM has only one TEK, then the value is the time of activation of this FSM.') docsBpi2CmtsTEKExpiresNew = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 8), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent TEK for this FSM.') docsBpi2CmtsTEKReset = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 9), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.3.5.') if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setDescription("Setting this object to 'true' causes the CMTS to invalidate all currently active TEKs and to generate new TEKs for the associated SAID; the CMTS MAY also generate unsolicited TEK Invalid messages, to optimize the TEK synchronization between the CMTS and the CM(s). Reading this object always returns FALSE.") docsBpi2CmtsKeyRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.4.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setDescription('The value of this object is the number of times the CMTS has received a Key Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsKeyReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5.') if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setDescription('The value of this object is the number of times the CMTS has transmitted a Key Reply message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsKeyRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.6.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setDescription('The value of this object is the number of times the CMTS has transmitted a Key Reject message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsTEKInvalids = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.8.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted a TEK Invalid message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsKeyRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("unauthorizedSaid", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.6 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Key Reject message sent in response to a Key Request for this SAID. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Key Reject message has been received since registration.') docsBpi2CmtsKeyRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 15), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.6 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setDescription('The value of this object is the text string in the most recent Key Reject message sent in response to a Key Request for this SAID. This is a zero length string if no Key Reject message has been received since registration.') docsBpi2CmtsTEKInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 6))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("invalidKeySequence", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.8 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent TEK Invalid message sent in association with this SAID. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no TEK Invalid message has been received since registration.') docsBpi2CmtsTEKInvalidErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 17), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.8 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setDescription('The value of this object is the text string in the most recent TEK Invalid message sent in association with this SAID. This is a zero length string if no TEK Invalid message has been received since registration.') docsBpi2CmtsMulticastObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 2, 4)) docsBpi2CmtsIpMulticastMapTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1), ) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapTable.setDescription('This table maps multicast IP addresses to SAIDs. If a multicast IP address is mapped by multiple rows in the table, the row with the lowest docsBpi2CmtsIpMulticastIndex must be utilized for the mapping.') docsBpi2CmtsIpMulticastMapEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastIndex")) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapEntry.setDescription('Each entry contains objects describing the mapping of a set of multicast IP address and the mask to one SAID associated to a CMTS MAC Interface, as well as associated message counters and error information.') docsBpi2CmtsIpMulticastIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastIndex.setDescription("The index of this row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.") docsBpi2CmtsIpMulticastAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 2), InetAddressType().clone('ipv4')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddressType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddressType.setDescription('The type of Internet address for docsBpi2CmtsIpMulticastAddress and docsBpi2CmtsIpMulticastMask.') docsBpi2CmtsIpMulticastAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 3), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddress.setDescription('This object represents the IP multicast address to be mapped, in conjunction with docsBpi2CmtsIpMulticastMask. The type of this address is determined by the value of the object docsBpi2CmtsIpMulticastAddressType.') docsBpi2CmtsIpMulticastMask = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 4), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMask.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMask.setDescription("This object represents the IP multicast address mask for this row. An IP multicast address matches this row if the logical AND of the address with docsBpi2CmtsIpMulticastMask is identical to the logical AND of docsBpi2CmtsIpMulticastAddr with docsBpi2CmtsIpMulticastMask. The type of this address is determined by the value of the object docsBpi2CmtsIpMulticastAddressType. Note: For IPv6, this object need not represent a contiguous netmask; e.g., to associate a SAID to a multicast group matching 'any' multicast scope. The TC InetAddressPrefixLength is not used, as it only represents contiguous netmask.") docsBpi2CmtsIpMulticastSAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 5), DocsSAIdOrZero()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAId.setDescription('This object represents the multicast SAID to be used in this IP multicast address mapping entry.') docsBpi2CmtsIpMulticastSAType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 6), DocsBpkmSAType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setDescription("The value of this object is the type of security association. 'dynamic' does not apply to CMs running in BPI mode. Unicast BPI TEKs must utilize the 'primary' encoding, and multicast BPI TEKs must utilize the 'static' encoding. By default, SNMP created entries set this object to 'static' if not set at row creation.") docsBpi2CmtsIpMulticastDataEncryptAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 7), DocsBpkmDataEncryptAlg().clone('des56CbcMode')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this IP.') docsBpi2CmtsIpMulticastDataAuthentAlg = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 8), DocsBpkmDataAuthentAlg().clone('none')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this IP.') docsBpi2CmtsIpMulticastSAMapRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setDescription('The value of this object is the number of times the CMTS has received an SA Map Request message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsIpMulticastSAMapReplies = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reply message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsIpMulticastSAMapRejects = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reject message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docsBpi2CmtsIpMulticastSAMapRejectErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 9, 10))).clone(namedValues=NamedValues(("none", 1), ("unknown", 2), ("noAuthForRequestedDSFlow", 9), ("dsFlowNotMappedToSA", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It has the value unknown(2) if the last Error-Code Value was 0 and none(1) if no SA MAP Reject message has been received since entry creation.') docsBpi2CmtsIpMulticastSAMapRejectErrorString = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 13), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setDescription('The value of this object is the text string in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It is a zero length string if no SA Map Reject message has been received since entry creation.') docsBpi2CmtsIpMulticastMapControl = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 14), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapControl.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapControl.setDescription('This object controls and reflects the IP multicast address mapping entry. There is no restriction on the ability to change values in this row while the row is active. A created row can be set to active only after the Corresponding instances of docsBpi2CmtsIpMulticastAddress, docsBpi2CmtsIpMulticastMask, docsBpi2CmtsIpMulticastSAId, and docsBpi2CmtsIpMulticastSAType have all been set.') docsBpi2CmtsIpMulticastMapStorageType = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 15), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapStorageType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapStorageType.setDescription("The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.") docsBpi2CmtsMulticastAuthTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2), ) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthTable.setDescription('This table describes the multicast SAID authorization for each CM on each CMTS MAC interface.') docsBpi2CmtsMulticastAuthEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsMulticastAuthSAId"), (0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsMulticastAuthCmMacAddress")) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthEntry.setDescription('Each entry contains objects describing the key authorization of one cable modem for one multicast SAID for one CMTS MAC interface. Row entries persist after re-initialization of the managed system.') docsBpi2CmtsMulticastAuthSAId = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 1), DocsSAId()) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthSAId.setDescription('This object represents the multicast SAID for authorization.') docsBpi2CmtsMulticastAuthCmMacAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 2), MacAddress()) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthCmMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthCmMacAddress.setDescription('This object represents the MAC address of the CM to which the multicast SAID authorization applies.') docsBpi2CmtsMulticastAuthControl = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthControl.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthControl.setDescription('The status of this conceptual row for the authorization of multicast SAIDs to CMs.') docsBpi2CmtsCertObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 2, 5)) docsBpi2CmtsProvisionedCmCertTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1), ) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTable.setDescription('A table of CM certificate trust entries provisioned to the CMTS. The trust object for a certificate in this table has an overriding effect on the validity object of a certificate in the authorization table, as long as the entire contents of the two certificates are identical.') docsBpi2CmtsProvisionedCmCertEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1), ).setIndexNames((0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsProvisionedCmCertMacAddress")) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setReference('Data-Over-Cable Service Interface Specifications: Operations Support System Interface Specification SP-OSSIv2.0-I05-040407, Section 6.2.14') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setDescription("An entry in the CMTS's provisioned CM certificate table. Row entries persist after re-initialization of the managed system.") docsBpi2CmtsProvisionedCmCertMacAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 1), MacAddress()) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertMacAddress.setDescription('The index of this row.') docsBpi2CmtsProvisionedCmCertTrust = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("trusted", 1), ("untrusted", 2))).clone('untrusted')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setDescription('Trust state for the provisioned CM certificate entry. Note: Setting this object need only override the validity of CM certificates sent in future authorization requests; instantaneous effect need not occur.') docsBpi2CmtsProvisionedCmCertSource = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("snmp", 1), ("configurationFile", 2), ("externalDatabase", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setDescription('This object indicates how the certificate reached the CMTS. Other(4) means that it originated from a source not identified above.') docsBpi2CmtsProvisionedCmCertStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertStatus.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertStatus.setDescription("The status of this conceptual row. Values in this row cannot be changed while the row is 'active'.") docsBpi2CmtsProvisionedCmCert = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 5), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setDescription('An X509 DER-encoded Certificate Authority certificate. Note: The zero-length OCTET STRING must be returned, on reads, if the entire certificate is not retained in the CMTS.') docsBpi2CmtsCACertTable = MibTable((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2), ) if mibBuilder.loadTexts: docsBpi2CmtsCACertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertTable.setDescription('The table of known Certificate Authority certificates acquired by this device.') docsBpi2CmtsCACertEntry = MibTableRow((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1), ).setIndexNames((0, "DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertIndex")) if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setReference('Data-Over-Cable Service Interface Specifications: Operations Support System Interface Specification SP-OSSIv2.0-I05-040407, Section 6.2.14') if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setDescription("A row in the Certificate Authority certificate table. Row entries with the trust status 'trusted', 'untrusted', or 'root' persist after re-initialization of the managed system.") docsBpi2CmtsCACertIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmtsCACertIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertIndex.setDescription('The index for this row.') docsBpi2CmtsCACertSubject = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.4') if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setDescription("The subject name exactly as it is encoded in the X509 certificate. The organizationName portion of the certificate's subject name must be present. All other fields are optional. Any optional field present must be prepended with <CR> (carriage return, U+000D) <LF> (line feed, U+000A). Ordering of fields present must conform to the following: organizationName <CR> <LF> countryName <CR> <LF> stateOrProvinceName <CR> <LF> localityName <CR> <LF> organizationalUnitName <CR> <LF> organizationalUnitName=<Manufacturing Location> <CR> <LF> commonName") docsBpi2CmtsCACertIssuer = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 3), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.4') if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setDescription("The issuer name exactly as it is encoded in the X509 certificate. The commonName portion of the certificate's issuer name must be present. All other fields are optional. Any optional field present must be prepended with <CR> (carriage return, U+000D) <LF> (line feed, U+000A). Ordering of fields present must conform to the following: CommonName <CR><LF> countryName <CR><LF> stateOrProvinceName <CR><LF> localityName <CR><LF> organizationName <CR><LF> organizationalUnitName <CR><LF> organizationalUnitName=<Manufacturing Location>") docsBpi2CmtsCACertSerialNumber = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.2') if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setDescription("This CA certificate's serial number, represented as an octet string.") docsBpi2CmtsCACertTrust = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("trusted", 1), ("untrusted", 2), ("chained", 3), ("root", 4))).clone('chained')).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setDescription('This object controls the trust status of this certificate. Root certificates must be given root(4) trust; manufacturer certificates must not be given root(4) trust. Trust on root certificates must not change. Note: Setting this object need only affect the validity of CM certificates sent in future authorization requests; instantaneous effect need not occur.') docsBpi2CmtsCACertSource = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("snmp", 1), ("configurationFile", 2), ("externalDatabase", 3), ("other", 4), ("authentInfo", 5), ("compiledIntoCode", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setDescription('This object indicates how the certificate reached the CMTS. Other(4) means that it originated from a source not identified above.') docsBpi2CmtsCACertStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsCACertStatus.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertStatus.setDescription("The status of this conceptual row. An attempt to set writable columnar values while this row is active behaves as follows: - Sets to the object docsBpi2CmtsCACertTrust are allowed. - Sets to the object docsBpi2CmtsCACert will return an error of 'inconsistentValue'. A newly created entry cannot be set to active until the value of docsBpi2CmtsCACert is being set.") docsBpi2CmtsCACert = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 8), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readcreate") if mibBuilder.loadTexts: docsBpi2CmtsCACert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsCACert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACert.setDescription('An X509 DER-encoded Certificate Authority certificate. To help identify certificates, either this object or docsBpi2CmtsCACertThumbprint must be returned by a CMTS for self-signed CA certificates. Note: The zero-length OCTET STRING must be returned, on reads, if the entire certificate is not retained in the CMTS.') docsBpi2CmtsCACertThumbprint = MibTableColumn((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(20, 20)).setFixedLength(20)).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.3') if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setDescription('The SHA-1 hash of a CA certificate. To help identify certificates, either this object or docsBpi2CmtsCACert must be returned by a CMTS for self-signed CA certificates. Note: The zero-length OCTET STRING must be returned, on reads, if the CA certificate thumb print is not retained in the CMTS.') docsBpi2CodeDownloadControl = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 1, 4)) docsBpi2CodeDownloadStatusCode = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("configFileCvcVerified", 1), ("configFileCvcRejected", 2), ("snmpCvcVerified", 3), ("snmpCvcRejected", 4), ("codeFileVerified", 5), ("codeFileRejected", 6), ("other", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections D.3.3.2 and D.3.5.1.') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setDescription('The value indicates the result of the latest config file CVC verification, SNMP CVC verification, or code file verification.') docsBpi2CodeDownloadStatusString = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.7') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setDescription('The value of this object indicates the additional information to the status code. The value will include the error code and error description, which will be defined separately.') docsBpi2CodeMfgOrgName = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 3), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setDescription("The value of this object is the device manufacturer's organizationName.") docsBpi2CodeMfgCodeAccessStart = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 4), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(11, 11)).setFixedLength(11)).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setDescription("The value of this object is the device manufacturer's current codeAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10).") docsBpi2CodeMfgCvcAccessStart = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 5), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(11, 11)).setFixedLength(11)).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setDescription("The value of this object is the device manufacturer's current cvcAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10).") docsBpi2CodeCoSignerOrgName = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 6), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setDescription("The value of this object is the co-signer's organizationName. The value is a zero length string if the co-signer is not specified.") docsBpi2CodeCoSignerCodeAccessStart = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 7), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(11, 11)).setFixedLength(11)).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setDescription("The value of this object is the co-signer's current codeAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10). If docsBpi2CodeCoSignerOrgName is a zero length string, the value of this object is meaningless.") docsBpi2CodeCoSignerCvcAccessStart = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 8), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(11, 11)).setFixedLength(11)).setMaxAccess("readonly") if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setDescription("The value of this object is the co-signer's current cvcAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10). If docsBpi2CodeCoSignerOrgName is a zero length string, the value of this object is meaningless.") docsBpi2CodeCvcUpdate = MibScalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 9), DocsX509ASN1DEREncodedCertificate()).setMaxAccess("readwrite") if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setDescription('Setting a CVC to this object triggers the device to verify the CVC and update the cvcAccessStart values. The content of this object is then discarded. If the device is not enabled to upgrade codefiles, or if the CVC verification fails, the CVC will be rejected. Reading this object always returns the zero-length OCTET STRING.') docsBpi2Notification = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 0)) docsBpi2Conformance = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 2)) docsBpi2Compliances = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 2, 1)) docsBpi2Groups = MibIdentifier((1, 3, 6, 1, 2, 1, 126, 2, 2)) docsBpi2CmCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 126, 2, 1, 1)).setObjects(("DOCS-IETF-BPI2-MIB", "docsBpi2CmGroup"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeDownloadGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsBpi2CmCompliance = docsBpi2CmCompliance.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCompliance.setDescription('This is the compliance statement for CMs that implement the DOCSIS Baseline Privacy Interface Plus.') docsBpi2CmtsCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 126, 2, 1, 2)).setObjects(("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsGroup"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeDownloadGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsBpi2CmtsCompliance = docsBpi2CmtsCompliance.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCompliance.setDescription('This is the compliance statement for CMTSs that implement the DOCSIS Baseline Privacy Interface Plus.') docsBpi2CmGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 126, 2, 2, 1)).setObjects(("DOCS-IETF-BPI2-MIB", "docsBpi2CmPrivacyEnable"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmPublicKey"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthState"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthKeySequenceNumber"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthExpiresOld"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthExpiresNew"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthReset"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthGraceTime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKGraceTime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmReauthWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmOpWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmRekeyWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthRejectWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmSAMapWaitTimeout"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmSAMapMaxRetries"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthentInfos"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthInvalids"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthInvalidErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmAuthInvalidErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKSAType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKDataEncryptAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKDataAuthentAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKState"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeySequenceNumber"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKExpiresOld"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKExpiresNew"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeyRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeyReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeyRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKInvalids"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKAuthPends"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeyRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKKeyRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKInvalidErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmTEKInvalidErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastAddressType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastAddress"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAId"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapState"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmIpMulticastSAMapRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmDeviceCmCert"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmDeviceManufCert"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmCryptoSuiteDataEncryptAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmCryptoSuiteDataAuthentAlg")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsBpi2CmGroup = docsBpi2CmGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmGroup.setDescription('This collection of objects provides CM BPI+ status and control.') docsBpi2CmtsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 126, 2, 2, 2)).setObjects(("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsDefaultAuthLifetime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsDefaultTEKLifetime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsDefaultSelfSignedManufCertTrust"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCheckCertValidityPeriods"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthentInfos"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthInvalids"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsSAMapRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsSAMapReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsSAMapRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmBpiVersion"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmPublicKey"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmKeySequenceNumber"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmExpiresOld"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmExpiresNew"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmLifetime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmReset"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmInfos"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCmInvalids"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthInvalidErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthInvalidErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthPrimarySAId"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthBpkmCmCertValid"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthBpkmCmCert"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsAuthCACertIndexPtr"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKSAType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKDataEncryptAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKDataAuthentAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKLifetime"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKKeySequenceNumber"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKExpiresOld"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKExpiresNew"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKReset"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsKeyRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsKeyReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsKeyRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKInvalids"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsKeyRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsKeyRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKInvalidErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsTEKInvalidErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastAddressType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastAddress"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastMask"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAId"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastDataEncryptAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastDataAuthentAlg"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAMapRequests"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAMapReplies"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAMapRejects"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAMapRejectErrorCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastSAMapRejectErrorString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastMapControl"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsIpMulticastMapStorageType"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsMulticastAuthControl"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsProvisionedCmCertTrust"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsProvisionedCmCertSource"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsProvisionedCmCertStatus"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsProvisionedCmCert"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertSubject"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertIssuer"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertSerialNumber"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertTrust"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertSource"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertStatus"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACert"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CmtsCACertThumbprint")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsBpi2CmtsGroup = docsBpi2CmtsGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsGroup.setDescription('This collection of objects provides CMTS BPI+ status and control.') docsBpi2CodeDownloadGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 126, 2, 2, 3)).setObjects(("DOCS-IETF-BPI2-MIB", "docsBpi2CodeDownloadStatusCode"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeDownloadStatusString"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeMfgOrgName"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeMfgCodeAccessStart"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeMfgCvcAccessStart"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeCoSignerOrgName"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeCoSignerCodeAccessStart"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeCoSignerCvcAccessStart"), ("DOCS-IETF-BPI2-MIB", "docsBpi2CodeCvcUpdate")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docsBpi2CodeDownloadGroup = docsBpi2CodeDownloadGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadGroup.setDescription('This collection of objects provides authenticated software download support.') mibBuilder.exportSymbols("DOCS-IETF-BPI2-MIB", docsBpi2CmtsProvisionedCmCertTrust=docsBpi2CmtsProvisionedCmCertTrust, docsBpi2CmtsIpMulticastMapStorageType=docsBpi2CmtsIpMulticastMapStorageType, docsBpi2CmIpMulticastSAMapReplies=docsBpi2CmIpMulticastSAMapReplies, docsBpi2CmAuthInvalidErrorString=docsBpi2CmAuthInvalidErrorString, docsBpi2CmtsMulticastAuthCmMacAddress=docsBpi2CmtsMulticastAuthCmMacAddress, docsBpi2CmtsIpMulticastSAType=docsBpi2CmtsIpMulticastSAType, docsBpi2CmGroup=docsBpi2CmGroup, docsBpi2CmtsAuthInvalidErrorCode=docsBpi2CmtsAuthInvalidErrorCode, docsBpi2CmtsIpMulticastSAMapRejects=docsBpi2CmtsIpMulticastSAMapRejects, docsBpi2CmtsTEKInvalids=docsBpi2CmtsTEKInvalids, docsBpi2CmAuthRejectWaitTimeout=docsBpi2CmAuthRejectWaitTimeout, docsBpi2CmTEKDataAuthentAlg=docsBpi2CmTEKDataAuthentAlg, docsBpi2CmCryptoSuiteDataAuthentAlg=docsBpi2CmCryptoSuiteDataAuthentAlg, DocsBpkmSAType=DocsBpkmSAType, docsBpi2CmCryptoSuiteEntry=docsBpi2CmCryptoSuiteEntry, docsBpi2CmDeviceManufCert=docsBpi2CmDeviceManufCert, docsBpi2CmtsMulticastAuthTable=docsBpi2CmtsMulticastAuthTable, docsBpi2CmtsAuthPrimarySAId=docsBpi2CmtsAuthPrimarySAId, docsBpi2CmtsCertObjects=docsBpi2CmtsCertObjects, docsBpi2CmtsIpMulticastSAMapRejectErrorString=docsBpi2CmtsIpMulticastSAMapRejectErrorString, docsBpi2CmIpMulticastSAMapRejects=docsBpi2CmIpMulticastSAMapRejects, docsBpi2CmAuthInvalids=docsBpi2CmAuthInvalids, docsBpi2CmtsCACertIndex=docsBpi2CmtsCACertIndex, docsBpi2Groups=docsBpi2Groups, docsBpi2CmtsProvisionedCmCertEntry=docsBpi2CmtsProvisionedCmCertEntry, docsBpi2CmtsIpMulticastMask=docsBpi2CmtsIpMulticastMask, docsBpi2CmtsProvisionedCmCert=docsBpi2CmtsProvisionedCmCert, docsBpi2CmIpMulticastMapTable=docsBpi2CmIpMulticastMapTable, docsBpi2CodeMfgCodeAccessStart=docsBpi2CodeMfgCodeAccessStart, docsBpi2CmtsMulticastAuthEntry=docsBpi2CmtsMulticastAuthEntry, docsBpi2CmtsAuthInvalidErrorString=docsBpi2CmtsAuthInvalidErrorString, docsBpi2CmtsAuthCmInvalids=docsBpi2CmtsAuthCmInvalids, docsBpi2CmtsGroup=docsBpi2CmtsGroup, docsBpi2CmRekeyWaitTimeout=docsBpi2CmRekeyWaitTimeout, docsBpi2CmTEKTable=docsBpi2CmTEKTable, docsBpi2CodeCoSignerOrgName=docsBpi2CodeCoSignerOrgName, docsBpi2CmtsTEKExpiresNew=docsBpi2CmtsTEKExpiresNew, docsBpi2CmTEKSAType=docsBpi2CmTEKSAType, docsBpi2CmtsAuthCmReplies=docsBpi2CmtsAuthCmReplies, docsBpi2CmtsAuthCmMacAddress=docsBpi2CmtsAuthCmMacAddress, docsBpi2CmtsDefaultTEKLifetime=docsBpi2CmtsDefaultTEKLifetime, docsBpi2CmtsCACertIssuer=docsBpi2CmtsCACertIssuer, docsBpi2CmAuthRejectErrorString=docsBpi2CmAuthRejectErrorString, docsBpi2CmAuthRejects=docsBpi2CmAuthRejects, docsBpi2CmAuthReplies=docsBpi2CmAuthReplies, docsBpi2CmTEKKeySequenceNumber=docsBpi2CmTEKKeySequenceNumber, docsBpi2CmtsCACertSource=docsBpi2CmtsCACertSource, docsBpi2CodeCoSignerCvcAccessStart=docsBpi2CodeCoSignerCvcAccessStart, docsBpi2CmtsIpMulticastSAMapRequests=docsBpi2CmtsIpMulticastSAMapRequests, docsBpi2CmTEKInvalids=docsBpi2CmTEKInvalids, docsBpi2CmtsAuthCmRejects=docsBpi2CmtsAuthCmRejects, docsBpi2Compliances=docsBpi2Compliances, docsBpi2CmDeviceCertEntry=docsBpi2CmDeviceCertEntry, docsBpi2CmtsAuthBpkmCmCert=docsBpi2CmtsAuthBpkmCmCert, docsBpi2CmtsSAMapRequests=docsBpi2CmtsSAMapRequests, docsBpi2CmOpWaitTimeout=docsBpi2CmOpWaitTimeout, docsBpi2CmtsAuthRequests=docsBpi2CmtsAuthRequests, docsBpi2CmAuthReset=docsBpi2CmAuthReset, docsBpi2CmtsAuthCmReset=docsBpi2CmtsAuthCmReset, docsBpi2CmTEKState=docsBpi2CmTEKState, docsBpi2CmtsAuthReplies=docsBpi2CmtsAuthReplies, docsBpi2CmIpMulticastSAMapRequests=docsBpi2CmIpMulticastSAMapRequests, DocsSAId=DocsSAId, docsBpi2CmtsAuthCmKeySequenceNumber=docsBpi2CmtsAuthCmKeySequenceNumber, docsBpi2CmCryptoSuiteIndex=docsBpi2CmCryptoSuiteIndex, docsBpi2CmtsCACertTable=docsBpi2CmtsCACertTable, docsBpi2CmtsSAMapRejects=docsBpi2CmtsSAMapRejects, docsBpi2CmTEKKeyRequests=docsBpi2CmTEKKeyRequests, docsBpi2CmtsBaseEntry=docsBpi2CmtsBaseEntry, docsBpi2CmAuthWaitTimeout=docsBpi2CmAuthWaitTimeout, docsBpi2CmtsAuthCmInfos=docsBpi2CmtsAuthCmInfos, DocsSAIdOrZero=DocsSAIdOrZero, docsBpi2CmtsKeyRequests=docsBpi2CmtsKeyRequests, docsBpi2CmtsProvisionedCmCertMacAddress=docsBpi2CmtsProvisionedCmCertMacAddress, docsBpi2CmAuthExpiresNew=docsBpi2CmAuthExpiresNew, docsBpi2CmSAMapWaitTimeout=docsBpi2CmSAMapWaitTimeout, docsBpi2CmAuthRequests=docsBpi2CmAuthRequests, docsBpi2CmTEKEntry=docsBpi2CmTEKEntry, docsBpi2CodeDownloadControl=docsBpi2CodeDownloadControl, docsBpi2CmtsCACertSubject=docsBpi2CmtsCACertSubject, docsBpi2CmtsCACertThumbprint=docsBpi2CmtsCACertThumbprint, docsBpi2CmTEKKeyRejectErrorString=docsBpi2CmTEKKeyRejectErrorString, docsBpi2CmPublicKey=docsBpi2CmPublicKey, docsBpi2CmReauthWaitTimeout=docsBpi2CmReauthWaitTimeout, docsBpi2CmTEKKeyRejects=docsBpi2CmTEKKeyRejects, docsBpi2MIB=docsBpi2MIB, docsBpi2CmtsTEKExpiresOld=docsBpi2CmtsTEKExpiresOld, docsBpi2CmTEKKeyReplies=docsBpi2CmTEKKeyReplies, docsBpi2CmtsCACert=docsBpi2CmtsCACert, docsBpi2CodeMfgOrgName=docsBpi2CodeMfgOrgName, docsBpi2CmCertObjects=docsBpi2CmCertObjects, docsBpi2CmtsAuthInvalids=docsBpi2CmtsAuthInvalids, docsBpi2CmtsIpMulticastMapControl=docsBpi2CmtsIpMulticastMapControl, docsBpi2CmTEKExpiresOld=docsBpi2CmTEKExpiresOld, docsBpi2CmtsAuthTable=docsBpi2CmtsAuthTable, docsBpi2CmIpMulticastAddressType=docsBpi2CmIpMulticastAddressType, docsBpi2CmtsAuthCmExpiresNew=docsBpi2CmtsAuthCmExpiresNew, DocsX509ASN1DEREncodedCertificate=DocsX509ASN1DEREncodedCertificate, docsBpi2CmtsKeyRejects=docsBpi2CmtsKeyRejects, docsBpi2CmTEKGraceTime=docsBpi2CmTEKGraceTime, docsBpi2CmtsMulticastObjects=docsBpi2CmtsMulticastObjects, docsBpi2CmAuthRejectErrorCode=docsBpi2CmAuthRejectErrorCode, docsBpi2CmtsAuthentInfos=docsBpi2CmtsAuthentInfos, docsBpi2CmtsAuthEntry=docsBpi2CmtsAuthEntry, docsBpi2CmMulticastObjects=docsBpi2CmMulticastObjects, docsBpi2CmtsTEKTable=docsBpi2CmtsTEKTable, docsBpi2CmtsAuthCmBpiVersion=docsBpi2CmtsAuthCmBpiVersion, docsBpi2CmIpMulticastSAMapState=docsBpi2CmIpMulticastSAMapState, docsBpi2CmtsTEKKeySequenceNumber=docsBpi2CmtsTEKKeySequenceNumber, docsBpi2CmtsAuthCmPublicKey=docsBpi2CmtsAuthCmPublicKey, docsBpi2Notification=docsBpi2Notification, docsBpi2CmIpMulticastMapEntry=docsBpi2CmIpMulticastMapEntry, docsBpi2CmTEKDataEncryptAlg=docsBpi2CmTEKDataEncryptAlg, docsBpi2CmtsAuthCmLifetime=docsBpi2CmtsAuthCmLifetime, docsBpi2CmtsIpMulticastSAMapReplies=docsBpi2CmtsIpMulticastSAMapReplies, docsBpi2CmtsCACertEntry=docsBpi2CmtsCACertEntry, docsBpi2CmIpMulticastIndex=docsBpi2CmIpMulticastIndex, docsBpi2CmBaseTable=docsBpi2CmBaseTable, docsBpi2CmTEKKeyRejectErrorCode=docsBpi2CmTEKKeyRejectErrorCode, docsBpi2CmBaseEntry=docsBpi2CmBaseEntry, docsBpi2CmDeviceCmCert=docsBpi2CmDeviceCmCert, docsBpi2CmCryptoSuiteDataEncryptAlg=docsBpi2CmCryptoSuiteDataEncryptAlg, docsBpi2CmtsTEKSAId=docsBpi2CmtsTEKSAId, docsBpi2CmtsIpMulticastDataAuthentAlg=docsBpi2CmtsIpMulticastDataAuthentAlg, docsBpi2CmSAMapMaxRetries=docsBpi2CmSAMapMaxRetries, docsBpi2CmtsTEKEntry=docsBpi2CmtsTEKEntry, docsBpi2CmtsMulticastAuthControl=docsBpi2CmtsMulticastAuthControl, docsBpi2CmtsIpMulticastAddress=docsBpi2CmtsIpMulticastAddress, docsBpi2CodeMfgCvcAccessStart=docsBpi2CodeMfgCvcAccessStart, docsBpi2CmtsBaseTable=docsBpi2CmtsBaseTable, docsBpi2CmtsCACertTrust=docsBpi2CmtsCACertTrust, docsBpi2CmAuthGraceTime=docsBpi2CmAuthGraceTime, docsBpi2CmtsCACertSerialNumber=docsBpi2CmtsCACertSerialNumber, docsBpi2Conformance=docsBpi2Conformance, docsBpi2CmtsTEKLifetime=docsBpi2CmtsTEKLifetime, docsBpi2CmObjects=docsBpi2CmObjects, docsBpi2CmIpMulticastAddress=docsBpi2CmIpMulticastAddress, docsBpi2CmtsCompliance=docsBpi2CmtsCompliance, PYSNMP_MODULE_ID=docsBpi2MIB, docsBpi2CmtsAuthCACertIndexPtr=docsBpi2CmtsAuthCACertIndexPtr, docsBpi2CmtsTEKReset=docsBpi2CmtsTEKReset, docsBpi2CmtsIpMulticastIndex=docsBpi2CmtsIpMulticastIndex, docsBpi2CmtsCACertStatus=docsBpi2CmtsCACertStatus, docsBpi2CmIpMulticastSAId=docsBpi2CmIpMulticastSAId, docsBpi2CmtsAuthBpkmCmCertValid=docsBpi2CmtsAuthBpkmCmCertValid, docsBpi2CmIpMulticastSAMapRejectErrorString=docsBpi2CmIpMulticastSAMapRejectErrorString, docsBpi2CmtsKeyReplies=docsBpi2CmtsKeyReplies, docsBpi2CodeDownloadGroup=docsBpi2CodeDownloadGroup, docsBpi2CmtsTEKInvalidErrorString=docsBpi2CmtsTEKInvalidErrorString, docsBpi2CmtsAuthCmRequests=docsBpi2CmtsAuthCmRequests, docsBpi2CmtsIpMulticastMapTable=docsBpi2CmtsIpMulticastMapTable, docsBpi2CmtsAuthRejects=docsBpi2CmtsAuthRejects, docsBpi2CmtsDefaultSelfSignedManufCertTrust=docsBpi2CmtsDefaultSelfSignedManufCertTrust, docsBpi2CmtsSAMapReplies=docsBpi2CmtsSAMapReplies, docsBpi2CmtsTEKDataAuthentAlg=docsBpi2CmtsTEKDataAuthentAlg, docsBpi2CmPrivacyEnable=docsBpi2CmPrivacyEnable, docsBpi2CmtsProvisionedCmCertTable=docsBpi2CmtsProvisionedCmCertTable, docsBpi2CmDeviceCertTable=docsBpi2CmDeviceCertTable, docsBpi2CmtsCheckCertValidityPeriods=docsBpi2CmtsCheckCertValidityPeriods, docsBpi2CmAuthState=docsBpi2CmAuthState, docsBpi2CodeCoSignerCodeAccessStart=docsBpi2CodeCoSignerCodeAccessStart, docsBpi2CodeCvcUpdate=docsBpi2CodeCvcUpdate, docsBpi2CmtsTEKSAType=docsBpi2CmtsTEKSAType, docsBpi2CmIpMulticastSAMapRejectErrorCode=docsBpi2CmIpMulticastSAMapRejectErrorCode, docsBpi2CmtsProvisionedCmCertStatus=docsBpi2CmtsProvisionedCmCertStatus, docsBpi2CmtsAuthRejectErrorCode=docsBpi2CmtsAuthRejectErrorCode, DocsBpkmDataAuthentAlg=DocsBpkmDataAuthentAlg, docsBpi2CmTEKSAId=docsBpi2CmTEKSAId, docsBpi2CmtsObjects=docsBpi2CmtsObjects, docsBpi2CmCompliance=docsBpi2CmCompliance, docsBpi2CmCryptoSuiteTable=docsBpi2CmCryptoSuiteTable, docsBpi2CodeDownloadStatusCode=docsBpi2CodeDownloadStatusCode, docsBpi2CmtsIpMulticastSAMapRejectErrorCode=docsBpi2CmtsIpMulticastSAMapRejectErrorCode, docsBpi2CmtsAuthCmExpiresOld=docsBpi2CmtsAuthCmExpiresOld, docsBpi2CmTEKInvalidErrorString=docsBpi2CmTEKInvalidErrorString, docsBpi2CmtsKeyRejectErrorCode=docsBpi2CmtsKeyRejectErrorCode, docsBpi2CmtsKeyRejectErrorString=docsBpi2CmtsKeyRejectErrorString, docsBpi2CmtsIpMulticastSAId=docsBpi2CmtsIpMulticastSAId, docsBpi2CmTEKInvalidErrorCode=docsBpi2CmTEKInvalidErrorCode, docsBpi2CmAuthKeySequenceNumber=docsBpi2CmAuthKeySequenceNumber, docsBpi2CmAuthentInfos=docsBpi2CmAuthentInfos, docsBpi2CmtsTEKInvalidErrorCode=docsBpi2CmtsTEKInvalidErrorCode, docsBpi2CmtsIpMulticastMapEntry=docsBpi2CmtsIpMulticastMapEntry, docsBpi2CmtsIpMulticastAddressType=docsBpi2CmtsIpMulticastAddressType, docsBpi2CodeDownloadStatusString=docsBpi2CodeDownloadStatusString, docsBpi2CmtsProvisionedCmCertSource=docsBpi2CmtsProvisionedCmCertSource, DocsBpkmDataEncryptAlg=DocsBpkmDataEncryptAlg, docsBpi2CmAuthExpiresOld=docsBpi2CmAuthExpiresOld, docsBpi2MIBObjects=docsBpi2MIBObjects, docsBpi2CmtsAuthRejectErrorString=docsBpi2CmtsAuthRejectErrorString, docsBpi2CmAuthInvalidErrorCode=docsBpi2CmAuthInvalidErrorCode, docsBpi2CmtsDefaultAuthLifetime=docsBpi2CmtsDefaultAuthLifetime, docsBpi2CmtsTEKDataEncryptAlg=docsBpi2CmtsTEKDataEncryptAlg, docsBpi2CmtsIpMulticastDataEncryptAlg=docsBpi2CmtsIpMulticastDataEncryptAlg, docsBpi2CmtsMulticastAuthSAId=docsBpi2CmtsMulticastAuthSAId, docsBpi2CmTEKExpiresNew=docsBpi2CmTEKExpiresNew, docsBpi2CmTEKAuthPends=docsBpi2CmTEKAuthPends)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_union, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (counter64, unsigned32, integer32, mib_2, ip_address, bits, gauge32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, iso, time_ticks, object_identity, notification_type, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Unsigned32', 'Integer32', 'mib-2', 'IpAddress', 'Bits', 'Gauge32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'iso', 'TimeTicks', 'ObjectIdentity', 'NotificationType', 'MibIdentifier') (mac_address, row_status, storage_type, textual_convention, truth_value, date_and_time, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'RowStatus', 'StorageType', 'TextualConvention', 'TruthValue', 'DateAndTime', 'DisplayString') docs_bpi2_mib = module_identity((1, 3, 6, 1, 2, 1, 126)) docsBpi2MIB.setRevisions(('2005-07-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: docsBpi2MIB.setRevisionsDescriptions(('Initial version of the IETF BPI+ MIB module. This version published as RFC 4131.',)) if mibBuilder.loadTexts: docsBpi2MIB.setLastUpdated('200507200000Z') if mibBuilder.loadTexts: docsBpi2MIB.setOrganization('IETF IP over Cable Data Network (IPCDN) Working Group') if mibBuilder.loadTexts: docsBpi2MIB.setContactInfo('--------------------------------------- Stuart M. Green E-mail: rubbersoul3@yahoo.com --------------------------------------- Kaz Ozawa Automotive Systems Development Center TOSHIBA CORPORATION 1-1, Shibaura 1-Chome Minato-ku, Tokyo 105-8001 Japan Phone: +81-3-3457-8569 Fax: +81-3-5444-9325 E-mail: Kazuyoshi.Ozawa@toshiba.co.jp --------------------------------------- Alexander Katsnelson Postal: Tel: +1-303-680-3924 E-mail: katsnelson6@peoplepc.com --------------------------------------- Eduardo Cardona Postal: Cable Television Laboratories, Inc. 858 Coal Creek Circle Louisville, CO 80027- 9750 U.S.A. Tel: +1 303 661 9100 Fax: +1 303 661 9199 E-mail: e.cardona@cablelabs.com --------------------------------------- IETF IPCDN Working Group General Discussion: ipcdn@ietf.org Subscribe: http://www.ietf.org/mailman/listinfo/ipcdn. Archive: ftp://ftp.ietf.org/ietf-mail-archive/ipcdn. Co-chairs: Richard Woundy, rwoundy@cisco.com Jean-Francois Mule, jfm@cablelabs.com') if mibBuilder.loadTexts: docsBpi2MIB.setDescription('This is the MIB module for the DOCSIS Baseline Privacy Plus Interface (BPI+) at cable modems (CMs) and cable modem termination systems (CMTSs). Copyright (C) The Internet Society (2005). This version of this MIB module is part of RFC 4131; see the RFC itself for full legal notices.') class Docsx509Asn1Derencodedcertificate(TextualConvention, OctetString): description = 'An X509 digital certificate encoded as an ASN.1 DER object.' status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 4096) class Docssaid(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 2.1.3, BPI+ Security Associations' description = 'Security Association identifier (SAID).' status = 'current' display_hint = 'd' subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 16383) class Docssaidorzero(TextualConvention, Unsigned32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 2.1.3, BPI+ Security Associations' description = 'Security Association identifier (SAID). The value zero indicates that the SAID is yet to be determined.' status = 'current' display_hint = 'd' subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 16383)) class Docsbpkmsatype(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface specification, Section 4.2.2.24' description = "The type of security association (SA). The values of the named-numbers are associated with the BPKM SA-Type attributes: 'primary' corresponds to code '1', 'static' to code '2', and 'dynamic' to code '3'. The 'none' value must only be used if the SA type has yet to be determined." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3)) named_values = named_values(('none', 0), ('primary', 1), ('static', 2), ('dynamic', 3)) class Docsbpkmdataencryptalg(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.' description = "The list of data encryption algorithms defined for the DOCSIS interface in the BPKM cryptographic-suite parameter. The value 'none' indicates that the SAID being referenced has no data encryption." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5)) named_values = named_values(('none', 0), ('des56CbcMode', 1), ('des40CbcMode', 2), ('t3Des128CbcMode', 3), ('aes128CbcMode', 4), ('aes256CbcMode', 5)) class Docsbpkmdataauthentalg(TextualConvention, Integer32): reference = 'DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.' description = "The list of data integrity algorithms defined for the DOCSIS interface in the BPKM cryptographic-suite parameter. The value 'none' indicates that no data integrity is used for the SAID being referenced." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1)) named_values = named_values(('none', 0), ('hmacSha196', 1)) docs_bpi2_mib_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1)) docs_bpi2_cm_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 1)) docs_bpi2_cm_base_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 1, 1)) if mibBuilder.loadTexts: docsBpi2CmBaseTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmBaseTable.setDescription('This table describes the basic and authorization- related Baseline Privacy Plus attributes of each CM MAC interface.') docs_bpi2_cm_base_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: docsBpi2CmBaseEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmBaseEntry.setDescription('Each entry contains objects describing attributes of one CM MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docs_bpi2_cm_privacy_enable = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 1), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.') if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmPrivacyEnable.setDescription('This object identifies whether this CM is provisioned to run Baseline Privacy Plus.') docs_bpi2_cm_public_key = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 524))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmPublicKey.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.4.') if mibBuilder.loadTexts: docsBpi2CmPublicKey.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmPublicKey.setDescription('The value of this object is a DER-encoded RSAPublicKey ASN.1 type string, as defined in the RSA Encryption Standard (PKCS #1), corresponding to the public key of the CM.') docs_bpi2_cm_auth_state = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('start', 1), ('authWait', 2), ('authorized', 3), ('reauthWait', 4), ('authRejectWait', 5), ('silent', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.2.1.') if mibBuilder.loadTexts: docsBpi2CmAuthState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthState.setDescription('The value of this object is the state of the CM authorization FSM. The start state indicates that FSM is in its initial state.') docs_bpi2_cm_auth_key_sequence_number = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.10.') if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthKeySequenceNumber.setDescription('The value of this object is the most recent authorization key sequence number for this FSM.') docs_bpi2_cm_auth_expires_old = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 5), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent authorization key for this FSM. If this FSM has only one authorization key, then the value is the time of activation of this FSM.') docs_bpi2_cm_auth_expires_new = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 6), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent authorization key for this FSM.') docs_bpi2_cm_auth_reset = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 7), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmAuthReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.2.3.4.') if mibBuilder.loadTexts: docsBpi2CmAuthReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthReset.setDescription("Setting this object to 'true' generates a Reauthorize event in the authorization FSM. Reading this object always returns FALSE. This object is for testing purposes only, and therefore it is not required to be associated with a last reset object.") docs_bpi2_cm_auth_grace_time = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 6047999))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.3.') if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthGraceTime.setDescription('The value of this object is the grace time for an authorization key in seconds. A CM is expected to start trying to get a new authorization key beginning AuthGraceTime seconds before the most recent authorization key actually expires.') docs_bpi2_cm_tek_grace_time = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 302399))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.6.') if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKGraceTime.setDescription('The value of this object is the grace time for the TEK in seconds. The CM is expected to start trying to acquire a new TEK beginning TEK GraceTime seconds before the expiration of the most recent TEK.') docs_bpi2_cm_auth_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 30))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.1.') if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthWaitTimeout.setDescription('The value of this object is the Authorize Wait Timeout in seconds.') docs_bpi2_cm_reauth_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 30))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.2.') if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmReauthWaitTimeout.setDescription('The value of this object is the Reauthorize Wait Timeout in seconds.') docs_bpi2_cm_op_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.4.') if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmOpWaitTimeout.setDescription('The value of this object is the Operational Wait Timeout in seconds.') docs_bpi2_cm_rekey_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.5.') if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmRekeyWaitTimeout.setDescription('The value of this object is the Rekey Wait Timeout in seconds.') docs_bpi2_cm_auth_reject_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(1, 600))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.7.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectWaitTimeout.setDescription('The value of this object is the Authorization Reject Wait Timeout in seconds.') docs_bpi2_cm_sa_map_wait_timeout = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.8.') if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmSAMapWaitTimeout.setDescription('The value of this object is the retransmission interval, in seconds, of SA Map Requests from the MAP Wait state.') docs_bpi2_cm_sa_map_max_retries = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 10))).setUnits('count').setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.1.1.1.9.') if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmSAMapMaxRetries.setDescription('The value of this object is the maximum number of Map Request retries allowed.') docs_bpi2_cm_authent_infos = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthentInfos.setDescription('The value of this object is the number of times the CM has transmitted an Authentication Information message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_auth_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRequests.setDescription('The value of this object is the number of times the CM has transmitted an Authorization Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_auth_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthReplies.setDescription('The value of this object is the number of times the CM has received an Authorization Reply message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_auth_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejects.setDescription('The value of this object is the number of times the CM has received an Authorization Reject message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_auth_invalids = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalids.setDescription('The value of this object is the count of times the CM has received an Authorization Invalid message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_auth_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 8, 11))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedCm', 3), ('unauthorizedSaid', 4), ('permanentAuthorizationFailure', 8), ('timeOfDayNotAcquired', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Reject message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Reject message has been received since reboot.') docs_bpi2_cm_auth_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 23), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthRejectErrorString.setDescription('The value of this object is the text string in the most recent Authorization Reject message received by the CM. This is a zero length string if no Authorization Reject message has been received since reboot.') docs_bpi2_cm_auth_invalid_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 5, 6, 7))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedCm', 3), ('unsolicited', 5), ('invalidKeySequence', 6), ('keyRequestAuthenticationFailure', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Invalid message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Invalid message has been received since reboot.') docs_bpi2_cm_auth_invalid_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 1, 1, 25), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmAuthInvalidErrorString.setDescription('The value of this object is the text string in the most recent Authorization Invalid message received by the CM. This is a zero length string if no Authorization Invalid message has been received since reboot.') docs_bpi2_cm_tek_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 1, 2)) if mibBuilder.loadTexts: docsBpi2CmTEKTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKTable.setDescription('This table describes the attributes of each CM Traffic Encryption Key (TEK) association. The CM maintains (no more than) one TEK association per SAID per CM MAC interface.') docs_bpi2_cm_tek_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKSAId')) if mibBuilder.loadTexts: docsBpi2CmTEKEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKEntry.setDescription('Each entry contains objects describing the TEK association attributes of one SAID. The CM MUST create one entry per SAID, regardless of whether the SAID was obtained from a Registration Response message, from an Authorization Reply message, or from any dynamic SAID establishment mechanisms.') docs_bpi2_cm_teksa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 1), docs_sa_id()) if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKSAId.setDescription('The value of this object is the DOCSIS Security Association ID (SAID).') docs_bpi2_cm_teksa_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 2), docs_bpkm_sa_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKSAType.setDescription('The value of this object is the type of security association.') docs_bpi2_cm_tek_data_encrypt_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 3), docs_bpkm_data_encrypt_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this SAID.') docs_bpi2_cm_tek_data_authent_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 4), docs_bpkm_data_authent_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this SAID.') docs_bpi2_cm_tek_state = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('start', 1), ('opWait', 2), ('opReauthWait', 3), ('operational', 4), ('rekeyWait', 5), ('rekeyReauthWait', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.1.') if mibBuilder.loadTexts: docsBpi2CmTEKState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKState.setDescription('The value of this object is the state of the indicated TEK FSM. The start(1) state indicates that the FSM is in its initial state.') docs_bpi2_cm_tek_key_sequence_number = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.2.10 and 4.2.2.13.') if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeySequenceNumber.setDescription('The value of this object is the most recent TEK key sequence number for this TEK FSM.') docs_bpi2_cm_tek_expires_old = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 7), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent TEK for this FSM. If this FSM has only one TEK, then the value is the time of activation of this FSM.') docs_bpi2_cm_tek_expires_new = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 8), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent TEK for this FSM.') docs_bpi2_cm_tek_key_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.4.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRequests.setDescription('The value of this object is the number of times the CM has transmitted a Key Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_tek_key_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyReplies.setDescription('The value of this object is the number of times the CM has received a Key Reply message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_tek_key_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.6.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejects.setDescription('The value of this object is the number of times the CM has received a Key Reject message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_tek_invalids = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.8.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalids.setDescription('The value of this object is the number of times the CM has received a TEK Invalid message, including a message whose authentication failed. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_tek_auth_pends = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.3.3.') if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKAuthPends.setDescription('The value of this object is the count of times an Authorization Pending (Auth Pend) event occurred in this FSM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_tek_key_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedSaid', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.6 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Key Reject message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Key Reject message has been received since registration.') docs_bpi2_cm_tek_key_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 15), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.6 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKKeyRejectErrorString.setDescription('The value of this object is the text string in the most recent Key Reject message received by the CM. This is a zero length string if no Key Reject message has been received since registration.') docs_bpi2_cm_tek_invalid_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 6))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('invalidKeySequence', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.8 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent TEK Invalid message received by the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no TEK Invalid message has been received since registration.') docs_bpi2_cm_tek_invalid_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 2, 1, 17), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.8 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmTEKInvalidErrorString.setDescription('The value of this object is the text string in the most recent TEK Invalid message received by the CM. This is a zero length string if no TEK Invalid message has been received since registration.') docs_bpi2_cm_multicast_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 1, 3)) docs_bpi2_cm_ip_multicast_map_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1)) if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapTable.setDescription('This table maps multicast IP addresses to SAIDs per CM MAC Interface. It is intended to map multicast IP addresses associated with SA MAP Request messages.') docs_bpi2_cm_ip_multicast_map_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastIndex')) if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastMapEntry.setDescription('Each entry contains objects describing the mapping of one multicast IP address to one SAID, as well as associated state, message counters, and error information. An entry may be removed from this table upon the reception of an SA Map Reject.') docs_bpi2_cm_ip_multicast_index = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmIpMulticastIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastIndex.setDescription('The index of this row.') docs_bpi2_cm_ip_multicast_address_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 2), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddressType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddressType.setDescription('The type of Internet address for docsBpi2CmIpMulticastAddress.') docs_bpi2_cm_ip_multicast_address = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 3), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 5.4.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastAddress.setDescription('This object represents the IP multicast address to be mapped. The type of this address is determined by the value of the docsBpi2CmIpMulticastAddressType object.') docs_bpi2_cm_ip_multicast_sa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 4), docs_sa_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAId.setDescription('This object represents the SAID to which the IP multicast address has been mapped. If no SA Map Reply has been received for the IP address, this object should have the value 0.') docs_bpi2_cm_ip_multicast_sa_map_state = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('start', 1), ('mapWait', 2), ('mapped', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 5.3.1.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapState.setDescription('The value of this object is the state of the SA Mapping FSM for this IP.') docs_bpi2_cm_ip_multicast_sa_map_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRequests.setDescription('The value of this object is the number of times the CM has transmitted an SA Map Request message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_ip_multicast_sa_map_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapReplies.setDescription('The value of this object is the number of times the CM has received an SA Map Reply message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_ip_multicast_sa_map_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejects.setDescription('The value of this object is the number of times the CM has received an SA MAP Reject message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cm_ip_multicast_sa_map_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 9, 10))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('noAuthForRequestedDSFlow', 9), ('dsFlowNotMappedToSA', 10)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent SA Map Reject message sent in response to an SA Map Request for This IP. It has the value none(1) if no SA MAP Reject message has been received since entry creation.') docs_bpi2_cm_ip_multicast_sa_map_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 3, 1, 1, 10), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmIpMulticastSAMapRejectErrorString.setDescription('The value of this object is the text string in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It is a zero length string if no SA Map Reject message has been received since entry creation.') docs_bpi2_cm_cert_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 1, 4)) docs_bpi2_cm_device_cert_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1)) if mibBuilder.loadTexts: docsBpi2CmDeviceCertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCertTable.setDescription('This table describes the Baseline Privacy Plus device certificates for each CM MAC interface.') docs_bpi2_cm_device_cert_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: docsBpi2CmDeviceCertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCertEntry.setDescription('Each entry contains the device certificates of one CM MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docs_bpi2_cm_device_cm_cert = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1, 1), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.1.') if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceCmCert.setDescription("The X509 DER-encoded cable modem certificate. Note: This object can be set only when the value is the zero-length OCTET STRING; otherwise, an error of 'inconsistentValue' is returned. Once the object contains the certificate, its access MUST be read-only and persists after re-initialization of the managed system.") docs_bpi2_cm_device_manuf_cert = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 4, 1, 1, 2), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.1.') if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmDeviceManufCert.setDescription('The X509 DER-encoded manufacturer certificate that signed the cable modem certificate.') docs_bpi2_cm_crypto_suite_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 1, 5)) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteTable.setDescription('This table describes the Baseline Privacy Plus cryptographic suite capabilities for each CM MAC interface.') docs_bpi2_cm_crypto_suite_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmCryptoSuiteIndex')) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteEntry.setDescription('Each entry contains a cryptographic suite pair that this CM MAC supports.') docs_bpi2_cm_crypto_suite_index = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 1000))) if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteIndex.setDescription('The index for a cryptographic suite row.') docs_bpi2_cm_crypto_suite_data_encrypt_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 2), docs_bpkm_data_encrypt_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this cryptographic suite capability.') docs_bpi2_cm_crypto_suite_data_authent_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 1, 5, 1, 3), docs_bpkm_data_authent_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCryptoSuiteDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this cryptographic suite capability.') docs_bpi2_cmts_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 2)) docs_bpi2_cmts_base_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 1)) if mibBuilder.loadTexts: docsBpi2CmtsBaseTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsBaseTable.setDescription('This table describes the basic Baseline Privacy attributes of each CMTS MAC interface.') docs_bpi2_cmts_base_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: docsBpi2CmtsBaseEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsBaseEntry.setDescription('Each entry contains objects describing attributes of one CMTS MAC interface. An entry in this table exists for each ifEntry with an ifType of docsCableMaclayer(127).') docs_bpi2_cmts_default_auth_lifetime = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 6048000)).clone(604800)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultAuthLifetime.setDescription('The value of this object is the default lifetime, in seconds, that the CMTS assigns to a new authorization key. This object value persists after re-initialization of the managed system.') docs_bpi2_cmts_default_tek_lifetime = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 604800)).clone(43200)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultTEKLifetime.setDescription('The value of this object is the default lifetime, in seconds, that the CMTS assigns to a new Traffic Encryption Key (TEK). This object value persists after re-initialization of the managed system.') docs_bpi2_cmts_default_self_signed_manuf_cert_trust = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('trusted', 1), ('untrusted', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsDefaultSelfSignedManufCertTrust.setDescription('This object determines the default trust of self-signed manufacturer certificate entries, contained in docsBpi2CmtsCACertTable, and created after this object is set. This object need not persist after re-initialization of the managed system.') docs_bpi2_cmts_check_cert_validity_periods = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.2') if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCheckCertValidityPeriods.setDescription("Setting this object to 'true' causes all chained and root certificates in the chain to have their validity periods checked against the current time of day, when the CMTS receives an Authorization Request from the CM. A 'false' setting causes all certificates in the chain not to have their validity periods checked against the current time of day. This object need not persist after re-initialization of the managed system.") docs_bpi2_cmts_authent_infos = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthentInfos.setDescription('The value of this object is the number of times the CMTS has received an Authentication Information message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRequests.setDescription('The value of this object is the number of times the CMTS has received an Authorization Request message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reply message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reject message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_invalids = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Invalid message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_sa_map_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRequests.setDescription('The value of this object is the number of times the CMTS has received an SA Map Request message from any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_sa_map_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reply message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_sa_map_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsSAMapRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reject message to any CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 2)) if mibBuilder.loadTexts: docsBpi2CmtsAuthTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthTable.setDescription('This table describes the attributes of each CM authorization association. The CMTS maintains one authorization association with each Baseline Privacy- enabled CM, registered on each CMTS MAC interface, regardless of whether the CM is authorized or rejected.') docs_bpi2_cmts_auth_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmMacAddress')) if mibBuilder.loadTexts: docsBpi2CmtsAuthEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthEntry.setDescription('Each entry contains objects describing attributes of one authorization association. The CMTS MUST create one entry per CM per MAC interface, based on the receipt of an Authorization Request message, and MUST not delete the entry until the CM loses registration.') docs_bpi2_cmts_auth_cm_mac_address = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 1), mac_address()) if mibBuilder.loadTexts: docsBpi2CmtsAuthCmMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmMacAddress.setDescription('The value of this object is the physical address of the CM to which the authorization association applies.') docs_bpi2_cmts_auth_cm_bpi_version = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('bpi', 0), ('bpiPlus', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.22; ANSI/SCTE 22-2 2002(formerly DSS 02-03) Data-Over-Cable Service Interface Specification DOCSIS 1.0 Baseline Privacy Interface (BPI)') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmBpiVersion.setDescription("The value of this object is the version of Baseline Privacy for which this CM has registered. The value 'bpiplus' represents the value of BPI-Version Attribute of the Baseline Privacy Key Management BPKM attribute BPI-Version (1). The value 'bpi' is used to represent the CM registered using DOCSIS 1.0 Baseline Privacy.") docs_bpi2_cmts_auth_cm_public_key = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 524))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.4.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmPublicKey.setDescription('The value of this object is a DER-encoded RSAPublicKey ASN.1 type string, as defined in the RSA Encryption Standard (PKCS #1), corresponding to the public key of the CM. This is the zero-length OCTET STRING if the CMTS does not retain the public key.') docs_bpi2_cmts_auth_cm_key_sequence_number = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.10.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmKeySequenceNumber.setDescription('The value of this object is the most recent authorization key sequence number for this CM.') docs_bpi2_cmts_auth_cm_expires_old = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 5), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent authorization key for this FSM. If this FSM has only one authorization key, then the value is the time of activation of this FSM. Note: This object has no meaning for CMs running in BPI mode; therefore, this object is not instantiated for entries associated to those CMs.') docs_bpi2_cmts_auth_cm_expires_new = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 6), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.2 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent authorization key for this FSM.') docs_bpi2_cmts_auth_cm_lifetime = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 6048000))).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2 and Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmLifetime.setDescription('The value of this object is the lifetime, in seconds, that the CMTS assigns to an authorization key for this CM.') docs_bpi2_cmts_auth_cm_reset = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('noResetRequested', 1), ('invalidateAuth', 2), ('sendAuthInvalid', 3), ('invalidateTeks', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.1.2.3.4, 4.1.2.3.5, and 4.1.3.3.5.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReset.setDescription("Setting this object to invalidateAuth(2) causes the CMTS to invalidate the current CM authorization key(s), but not to transmit an Authorization Invalid message nor to invalidate the primary SAID's TEKs. Setting this object to sendAuthInvalid(3) causes the CMTS to invalidate the current CM authorization key(s), and to transmit an Authorization Invalid message to the CM, but not to invalidate the primary SAID's TEKs. Setting this object to invalidateTeks(4) causes the CMTS to invalidate the current CM authorization key(s), to transmit an Authorization Invalid message to the CM, and to invalidate the TEKs associated with this CM's primary SAID. For BPI mode, substitute all of the CM's unicast TEKs for the primary SAID's TEKs in the previous paragraph. Reading this object returns the most recently set value of this object or, if the object has not been set since entry creation, returns noResetRequested(1).") docs_bpi2_cmts_auth_cm_infos = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.9.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInfos.setDescription('The value of this object is the number of times the CMTS has received an Authentication Information message from this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_cm_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.1.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRequests.setDescription('The value of this object is the number of times the CMTS has received an Authorization Request message from this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_cm_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reply message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_cm_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Reject message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_cm_invalids = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.7.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCmInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted an Authorization Invalid message to this CM. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_auth_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 8, 11))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedCm', 3), ('unauthorizedSaid', 4), ('permanentAuthorizationFailure', 8), ('timeOfDayNotAcquired', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Reject message transmitted to the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Reject message has been transmitted to the CM since entry creation.') docs_bpi2_cmts_auth_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 15), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.3 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthRejectErrorString.setDescription('The value of this object is the text string in the most recent Authorization Reject message transmitted to the CM. This is a zero length string if no Authorization Reject message has been transmitted to the CM since entry creation.') docs_bpi2_cmts_auth_invalid_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 5, 6, 7))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedCm', 3), ('unsolicited', 5), ('invalidKeySequence', 6), ('keyRequestAuthenticationFailure', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Authorization Invalid message transmitted to the CM. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Authorization Invalid message has been transmitted to the CM since entry creation.') docs_bpi2_cmts_auth_invalid_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 17), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.7 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthInvalidErrorString.setDescription('The value of this object is the text string in the most recent Authorization Invalid message transmitted to the CM. This is a zero length string if no Authorization Invalid message has been transmitted to the CM since entry creation.') docs_bpi2_cmts_auth_primary_sa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 18), docs_sa_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthPrimarySAId.setDescription('The value of this object is the Primary Security Association identifier. For BPI mode, the value must be any unicast SID.') docs_bpi2_cmts_auth_bpkm_cm_cert_valid = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 0), ('validCmChained', 1), ('validCmTrusted', 2), ('invalidCmUntrusted', 3), ('invalidCAUntrusted', 4), ('invalidCmOther', 5), ('invalidCAOther', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCertValid.setDescription("Contains the reason why a CM's certificate is deemed valid or invalid. Return unknown(0) if the CM is running BPI mode. ValidCmChained(1) means the certificate is valid because it chains to a valid certificate. ValidCmTrusted(2) means the certificate is valid because it has been provisioned (in the docsBpi2CmtsProvisionedCmCert table) to be trusted. InvalidCmUntrusted(3) means the certificate is invalid because it has been provisioned (in the docsBpi2CmtsProvisionedCmCert table) to be untrusted. InvalidCAUntrusted(4) means the certificate is invalid because it chains to an untrusted certificate. InvalidCmOther(5) and InvalidCAOther(6) refer to errors in parsing, validity periods, etc., which are attributable to the CM certificate or its chain, respectively; additional information may be found in docsBpi2AuthRejectErrorString for these types of errors.") docs_bpi2_cmts_auth_bpkm_cm_cert = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 20), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthBpkmCmCert.setDescription('The X509 CM Certificate sent as part of a BPKM Authorization Request. Note: The zero-length OCTET STRING must be returned if the Entire certificate is not retained in the CMTS.') docs_bpi2_cmts_auth_ca_cert_index_ptr = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 2, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsAuthCACertIndexPtr.setDescription('A row index into docsBpi2CmtsCACertTable. Returns the index in docsBpi2CmtsCACertTable to which CA certificate this CM is chained to. A value of 0 means it could not be found or not applicable.') docs_bpi2_cmts_tek_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 3)) if mibBuilder.loadTexts: docsBpi2CmtsTEKTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKTable.setDescription('This table describes the attributes of each Traffic Encryption Key (TEK) association. The CMTS Maintains one TEK association per SAID on each CMTS MAC interface.') docs_bpi2_cmts_tek_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKSAId')) if mibBuilder.loadTexts: docsBpi2CmtsTEKEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKEntry.setDescription('Each entry contains objects describing attributes of one TEK association on a particular CMTS MAC interface. The CMTS MUST create one entry per SAID per MAC interface, based on the receipt of a Key Request message, and MUST not delete the entry before the CM authorization for the SAID permanently expires.') docs_bpi2_cmts_teksa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 1), docs_sa_id()) if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.12.') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAId.setDescription('The value of this object is the DOCSIS Security Association ID (SAID).') docs_bpi2_cmts_teksa_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 2), docs_bpkm_sa_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKSAType.setDescription("The value of this object is the type of security association. 'dynamic' does not apply to CMs running in BPI mode. Unicast BPI TEKs must utilize the 'primary' encoding, and multicast BPI TEKs must utilize the 'static' encoding.") docs_bpi2_cmts_tek_data_encrypt_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 3), docs_bpkm_data_encrypt_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this SAID.') docs_bpi2_cmts_tek_data_authent_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 4), docs_bpkm_data_authent_alg()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this SAID.') docs_bpi2_cmts_tek_lifetime = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 604800))).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5 and Appendix A.2.') if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKLifetime.setDescription('The value of this object is the lifetime, in seconds, that the CMTS assigns to keys for this TEK association.') docs_bpi2_cmts_tek_key_sequence_number = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.2.10 and 4.2.2.13.') if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKKeySequenceNumber.setDescription('The value of this object is the most recent TEK key sequence number for this SAID.') docs_bpi2_cmts_tek_expires_old = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 7), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresOld.setDescription('The value of this object is the actual clock time for expiration of the immediate predecessor of the most recent TEK for this FSM. If this FSM has only one TEK, then the value is the time of activation of this FSM.') docs_bpi2_cmts_tek_expires_new = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 8), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.5 and 4.2.2.9.') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKExpiresNew.setDescription('The value of this object is the actual clock time for expiration of the most recent TEK for this FSM.') docs_bpi2_cmts_tek_reset = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 9), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.1.3.3.5.') if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKReset.setDescription("Setting this object to 'true' causes the CMTS to invalidate all currently active TEKs and to generate new TEKs for the associated SAID; the CMTS MAY also generate unsolicited TEK Invalid messages, to optimize the TEK synchronization between the CMTS and the CM(s). Reading this object always returns FALSE.") docs_bpi2_cmts_key_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.4.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRequests.setDescription('The value of this object is the number of times the CMTS has received a Key Request message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_key_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.5.') if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyReplies.setDescription('The value of this object is the number of times the CMTS has transmitted a Key Reply message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_key_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.6.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejects.setDescription('The value of this object is the number of times the CMTS has transmitted a Key Reject message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_tek_invalids = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.8.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalids.setDescription('The value of this object is the number of times the CMTS has transmitted a TEK Invalid message. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_key_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('unauthorizedSaid', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.6 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent Key Reject message sent in response to a Key Request for this SAID. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no Key Reject message has been received since registration.') docs_bpi2_cmts_key_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 15), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.6 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsKeyRejectErrorString.setDescription('The value of this object is the text string in the most recent Key Reject message sent in response to a Key Request for this SAID. This is a zero length string if no Key Reject message has been received since registration.') docs_bpi2_cmts_tek_invalid_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 6))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('invalidKeySequence', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.8 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent TEK Invalid message sent in association with this SAID. This has the value unknown(2) if the last Error-Code value was 0 and none(1) if no TEK Invalid message has been received since registration.') docs_bpi2_cmts_tek_invalid_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 3, 1, 17), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.8 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsTEKInvalidErrorString.setDescription('The value of this object is the text string in the most recent TEK Invalid message sent in association with this SAID. This is a zero length string if no TEK Invalid message has been received since registration.') docs_bpi2_cmts_multicast_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 2, 4)) docs_bpi2_cmts_ip_multicast_map_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1)) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapTable.setDescription('This table maps multicast IP addresses to SAIDs. If a multicast IP address is mapped by multiple rows in the table, the row with the lowest docsBpi2CmtsIpMulticastIndex must be utilized for the mapping.') docs_bpi2_cmts_ip_multicast_map_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastIndex')) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapEntry.setDescription('Each entry contains objects describing the mapping of a set of multicast IP address and the mask to one SAID associated to a CMTS MAC Interface, as well as associated message counters and error information.') docs_bpi2_cmts_ip_multicast_index = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastIndex.setDescription("The index of this row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.") docs_bpi2_cmts_ip_multicast_address_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 2), inet_address_type().clone('ipv4')).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddressType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddressType.setDescription('The type of Internet address for docsBpi2CmtsIpMulticastAddress and docsBpi2CmtsIpMulticastMask.') docs_bpi2_cmts_ip_multicast_address = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 3), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastAddress.setDescription('This object represents the IP multicast address to be mapped, in conjunction with docsBpi2CmtsIpMulticastMask. The type of this address is determined by the value of the object docsBpi2CmtsIpMulticastAddressType.') docs_bpi2_cmts_ip_multicast_mask = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 4), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMask.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMask.setDescription("This object represents the IP multicast address mask for this row. An IP multicast address matches this row if the logical AND of the address with docsBpi2CmtsIpMulticastMask is identical to the logical AND of docsBpi2CmtsIpMulticastAddr with docsBpi2CmtsIpMulticastMask. The type of this address is determined by the value of the object docsBpi2CmtsIpMulticastAddressType. Note: For IPv6, this object need not represent a contiguous netmask; e.g., to associate a SAID to a multicast group matching 'any' multicast scope. The TC InetAddressPrefixLength is not used, as it only represents contiguous netmask.") docs_bpi2_cmts_ip_multicast_sa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 5), docs_sa_id_or_zero()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAId.setDescription('This object represents the multicast SAID to be used in this IP multicast address mapping entry.') docs_bpi2_cmts_ip_multicast_sa_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 6), docs_bpkm_sa_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 2.1.3.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAType.setDescription("The value of this object is the type of security association. 'dynamic' does not apply to CMs running in BPI mode. Unicast BPI TEKs must utilize the 'primary' encoding, and multicast BPI TEKs must utilize the 'static' encoding. By default, SNMP created entries set this object to 'static' if not set at row creation.") docs_bpi2_cmts_ip_multicast_data_encrypt_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 7), docs_bpkm_data_encrypt_alg().clone('des56CbcMode')).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataEncryptAlg.setDescription('The value of this object is the data encryption algorithm for this IP.') docs_bpi2_cmts_ip_multicast_data_authent_alg = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 8), docs_bpkm_data_authent_alg().clone('none')).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.2.20.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastDataAuthentAlg.setDescription('The value of this object is the data authentication algorithm for this IP.') docs_bpi2_cmts_ip_multicast_sa_map_requests = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.10.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRequests.setDescription('The value of this object is the number of times the CMTS has received an SA Map Request message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_ip_multicast_sa_map_replies = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.11.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapReplies.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reply message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_ip_multicast_sa_map_rejects = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 4.2.1.12.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejects.setDescription('The value of this object is the number of times the CMTS has transmitted an SA Map Reject message for this IP. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.') docs_bpi2_cmts_ip_multicast_sa_map_reject_error_code = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 9, 10))).clone(namedValues=named_values(('none', 1), ('unknown', 2), ('noAuthForRequestedDSFlow', 9), ('dsFlowNotMappedToSA', 10)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.15.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorCode.setDescription('The value of this object is the enumerated description of the Error-Code in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It has the value unknown(2) if the last Error-Code Value was 0 and none(1) if no SA MAP Reject message has been received since entry creation.') docs_bpi2_cmts_ip_multicast_sa_map_reject_error_string = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 13), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections 4.2.1.12 and 4.2.2.6.') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastSAMapRejectErrorString.setDescription('The value of this object is the text string in the most recent SA Map Reject message sent in response to an SA Map Request for this IP. It is a zero length string if no SA Map Reject message has been received since entry creation.') docs_bpi2_cmts_ip_multicast_map_control = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 14), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapControl.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapControl.setDescription('This object controls and reflects the IP multicast address mapping entry. There is no restriction on the ability to change values in this row while the row is active. A created row can be set to active only after the Corresponding instances of docsBpi2CmtsIpMulticastAddress, docsBpi2CmtsIpMulticastMask, docsBpi2CmtsIpMulticastSAId, and docsBpi2CmtsIpMulticastSAType have all been set.') docs_bpi2_cmts_ip_multicast_map_storage_type = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 1, 1, 15), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapStorageType.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsIpMulticastMapStorageType.setDescription("The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.") docs_bpi2_cmts_multicast_auth_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2)) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthTable.setDescription('This table describes the multicast SAID authorization for each CM on each CMTS MAC interface.') docs_bpi2_cmts_multicast_auth_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsMulticastAuthSAId'), (0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsMulticastAuthCmMacAddress')) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthEntry.setDescription('Each entry contains objects describing the key authorization of one cable modem for one multicast SAID for one CMTS MAC interface. Row entries persist after re-initialization of the managed system.') docs_bpi2_cmts_multicast_auth_sa_id = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 1), docs_sa_id()) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthSAId.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthSAId.setDescription('This object represents the multicast SAID for authorization.') docs_bpi2_cmts_multicast_auth_cm_mac_address = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 2), mac_address()) if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthCmMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthCmMacAddress.setDescription('This object represents the MAC address of the CM to which the multicast SAID authorization applies.') docs_bpi2_cmts_multicast_auth_control = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 4, 2, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthControl.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsMulticastAuthControl.setDescription('The status of this conceptual row for the authorization of multicast SAIDs to CMs.') docs_bpi2_cmts_cert_objects = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 2, 5)) docs_bpi2_cmts_provisioned_cm_cert_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1)) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTable.setDescription('A table of CM certificate trust entries provisioned to the CMTS. The trust object for a certificate in this table has an overriding effect on the validity object of a certificate in the authorization table, as long as the entire contents of the two certificates are identical.') docs_bpi2_cmts_provisioned_cm_cert_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1)).setIndexNames((0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsProvisionedCmCertMacAddress')) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setReference('Data-Over-Cable Service Interface Specifications: Operations Support System Interface Specification SP-OSSIv2.0-I05-040407, Section 6.2.14') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertEntry.setDescription("An entry in the CMTS's provisioned CM certificate table. Row entries persist after re-initialization of the managed system.") docs_bpi2_cmts_provisioned_cm_cert_mac_address = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 1), mac_address()) if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertMacAddress.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertMacAddress.setDescription('The index of this row.') docs_bpi2_cmts_provisioned_cm_cert_trust = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('trusted', 1), ('untrusted', 2))).clone('untrusted')).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertTrust.setDescription('Trust state for the provisioned CM certificate entry. Note: Setting this object need only override the validity of CM certificates sent in future authorization requests; instantaneous effect need not occur.') docs_bpi2_cmts_provisioned_cm_cert_source = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('snmp', 1), ('configurationFile', 2), ('externalDatabase', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertSource.setDescription('This object indicates how the certificate reached the CMTS. Other(4) means that it originated from a source not identified above.') docs_bpi2_cmts_provisioned_cm_cert_status = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertStatus.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCertStatus.setDescription("The status of this conceptual row. Values in this row cannot be changed while the row is 'active'.") docs_bpi2_cmts_provisioned_cm_cert = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 1, 1, 5), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsProvisionedCmCert.setDescription('An X509 DER-encoded Certificate Authority certificate. Note: The zero-length OCTET STRING must be returned, on reads, if the entire certificate is not retained in the CMTS.') docs_bpi2_cmts_ca_cert_table = mib_table((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2)) if mibBuilder.loadTexts: docsBpi2CmtsCACertTable.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertTable.setDescription('The table of known Certificate Authority certificates acquired by this device.') docs_bpi2_cmts_ca_cert_entry = mib_table_row((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1)).setIndexNames((0, 'DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertIndex')) if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setReference('Data-Over-Cable Service Interface Specifications: Operations Support System Interface Specification SP-OSSIv2.0-I05-040407, Section 6.2.14') if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertEntry.setDescription("A row in the Certificate Authority certificate table. Row entries with the trust status 'trusted', 'untrusted', or 'root' persist after re-initialization of the managed system.") docs_bpi2_cmts_ca_cert_index = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: docsBpi2CmtsCACertIndex.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertIndex.setDescription('The index for this row.') docs_bpi2_cmts_ca_cert_subject = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.4') if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSubject.setDescription("The subject name exactly as it is encoded in the X509 certificate. The organizationName portion of the certificate's subject name must be present. All other fields are optional. Any optional field present must be prepended with <CR> (carriage return, U+000D) <LF> (line feed, U+000A). Ordering of fields present must conform to the following: organizationName <CR> <LF> countryName <CR> <LF> stateOrProvinceName <CR> <LF> localityName <CR> <LF> organizationalUnitName <CR> <LF> organizationalUnitName=<Manufacturing Location> <CR> <LF> commonName") docs_bpi2_cmts_ca_cert_issuer = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 3), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.4') if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertIssuer.setDescription("The issuer name exactly as it is encoded in the X509 certificate. The commonName portion of the certificate's issuer name must be present. All other fields are optional. Any optional field present must be prepended with <CR> (carriage return, U+000D) <LF> (line feed, U+000A). Ordering of fields present must conform to the following: CommonName <CR><LF> countryName <CR><LF> stateOrProvinceName <CR><LF> localityName <CR><LF> organizationName <CR><LF> organizationalUnitName <CR><LF> organizationalUnitName=<Manufacturing Location>") docs_bpi2_cmts_ca_cert_serial_number = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.2') if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSerialNumber.setDescription("This CA certificate's serial number, represented as an octet string.") docs_bpi2_cmts_ca_cert_trust = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('trusted', 1), ('untrusted', 2), ('chained', 3), ('root', 4))).clone('chained')).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertTrust.setDescription('This object controls the trust status of this certificate. Root certificates must be given root(4) trust; manufacturer certificates must not be given root(4) trust. Trust on root certificates must not change. Note: Setting this object need only affect the validity of CM certificates sent in future authorization requests; instantaneous effect need not occur.') docs_bpi2_cmts_ca_cert_source = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('snmp', 1), ('configurationFile', 2), ('externalDatabase', 3), ('other', 4), ('authentInfo', 5), ('compiledIntoCode', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.1') if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertSource.setDescription('This object indicates how the certificate reached the CMTS. Other(4) means that it originated from a source not identified above.') docs_bpi2_cmts_ca_cert_status = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 7), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsCACertStatus.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertStatus.setDescription("The status of this conceptual row. An attempt to set writable columnar values while this row is active behaves as follows: - Sets to the object docsBpi2CmtsCACertTrust are allowed. - Sets to the object docsBpi2CmtsCACert will return an error of 'inconsistentValue'. A newly created entry cannot be set to active until the value of docsBpi2CmtsCACert is being set.") docs_bpi2_cmts_ca_cert = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 8), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readcreate') if mibBuilder.loadTexts: docsBpi2CmtsCACert.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.2.') if mibBuilder.loadTexts: docsBpi2CmtsCACert.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACert.setDescription('An X509 DER-encoded Certificate Authority certificate. To help identify certificates, either this object or docsBpi2CmtsCACertThumbprint must be returned by a CMTS for self-signed CA certificates. Note: The zero-length OCTET STRING must be returned, on reads, if the entire certificate is not retained in the CMTS.') docs_bpi2_cmts_ca_cert_thumbprint = mib_table_column((1, 3, 6, 1, 2, 1, 126, 1, 2, 5, 2, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(20, 20)).setFixedLength(20)).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section 9.4.3') if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCACertThumbprint.setDescription('The SHA-1 hash of a CA certificate. To help identify certificates, either this object or docsBpi2CmtsCACert must be returned by a CMTS for self-signed CA certificates. Note: The zero-length OCTET STRING must be returned, on reads, if the CA certificate thumb print is not retained in the CMTS.') docs_bpi2_code_download_control = mib_identifier((1, 3, 6, 1, 2, 1, 126, 1, 4)) docs_bpi2_code_download_status_code = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('configFileCvcVerified', 1), ('configFileCvcRejected', 2), ('snmpCvcVerified', 3), ('snmpCvcRejected', 4), ('codeFileVerified', 5), ('codeFileRejected', 6), ('other', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Sections D.3.3.2 and D.3.5.1.') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusCode.setDescription('The value indicates the result of the latest config file CVC verification, SNMP CVC verification, or code file verification.') docs_bpi2_code_download_status_string = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.7') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadStatusString.setDescription('The value of this object indicates the additional information to the status code. The value will include the error code and error description, which will be defined separately.') docs_bpi2_code_mfg_org_name = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 3), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgOrgName.setDescription("The value of this object is the device manufacturer's organizationName.") docs_bpi2_code_mfg_code_access_start = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 4), date_and_time().subtype(subtypeSpec=value_size_constraint(11, 11)).setFixedLength(11)).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgCodeAccessStart.setDescription("The value of this object is the device manufacturer's current codeAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10).") docs_bpi2_code_mfg_cvc_access_start = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 5), date_and_time().subtype(subtypeSpec=value_size_constraint(11, 11)).setFixedLength(11)).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeMfgCvcAccessStart.setDescription("The value of this object is the device manufacturer's current cvcAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10).") docs_bpi2_code_co_signer_org_name = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 6), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerOrgName.setDescription("The value of this object is the co-signer's organizationName. The value is a zero length string if the co-signer is not specified.") docs_bpi2_code_co_signer_code_access_start = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 7), date_and_time().subtype(subtypeSpec=value_size_constraint(11, 11)).setFixedLength(11)).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCodeAccessStart.setDescription("The value of this object is the co-signer's current codeAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10). If docsBpi2CodeCoSignerOrgName is a zero length string, the value of this object is meaningless.") docs_bpi2_code_co_signer_cvc_access_start = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 8), date_and_time().subtype(subtypeSpec=value_size_constraint(11, 11)).setFixedLength(11)).setMaxAccess('readonly') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCoSignerCvcAccessStart.setDescription("The value of this object is the co-signer's current cvcAccessStart value. This value will always refer to Greenwich Mean Time (GMT), and the value format must contain TimeZone information (fields 8-10). If docsBpi2CodeCoSignerOrgName is a zero length string, the value of this object is meaningless.") docs_bpi2_code_cvc_update = mib_scalar((1, 3, 6, 1, 2, 1, 126, 1, 4, 9), docs_x509_asn1_der_encoded_certificate()).setMaxAccess('readwrite') if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setReference('DOCSIS Baseline Privacy Plus Interface Specification, Section D.3.3.2.2.') if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeCvcUpdate.setDescription('Setting a CVC to this object triggers the device to verify the CVC and update the cvcAccessStart values. The content of this object is then discarded. If the device is not enabled to upgrade codefiles, or if the CVC verification fails, the CVC will be rejected. Reading this object always returns the zero-length OCTET STRING.') docs_bpi2_notification = mib_identifier((1, 3, 6, 1, 2, 1, 126, 0)) docs_bpi2_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 126, 2)) docs_bpi2_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 126, 2, 1)) docs_bpi2_groups = mib_identifier((1, 3, 6, 1, 2, 1, 126, 2, 2)) docs_bpi2_cm_compliance = module_compliance((1, 3, 6, 1, 2, 1, 126, 2, 1, 1)).setObjects(('DOCS-IETF-BPI2-MIB', 'docsBpi2CmGroup'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeDownloadGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docs_bpi2_cm_compliance = docsBpi2CmCompliance.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmCompliance.setDescription('This is the compliance statement for CMs that implement the DOCSIS Baseline Privacy Interface Plus.') docs_bpi2_cmts_compliance = module_compliance((1, 3, 6, 1, 2, 1, 126, 2, 1, 2)).setObjects(('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsGroup'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeDownloadGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docs_bpi2_cmts_compliance = docsBpi2CmtsCompliance.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsCompliance.setDescription('This is the compliance statement for CMTSs that implement the DOCSIS Baseline Privacy Interface Plus.') docs_bpi2_cm_group = object_group((1, 3, 6, 1, 2, 1, 126, 2, 2, 1)).setObjects(('DOCS-IETF-BPI2-MIB', 'docsBpi2CmPrivacyEnable'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmPublicKey'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthState'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthKeySequenceNumber'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthExpiresOld'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthExpiresNew'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthReset'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthGraceTime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKGraceTime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmReauthWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmOpWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmRekeyWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthRejectWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmSAMapWaitTimeout'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmSAMapMaxRetries'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthentInfos'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthInvalids'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthInvalidErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmAuthInvalidErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKSAType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKDataEncryptAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKDataAuthentAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKState'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeySequenceNumber'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKExpiresOld'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKExpiresNew'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeyRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeyReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeyRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKInvalids'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKAuthPends'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeyRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKKeyRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKInvalidErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmTEKInvalidErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastAddressType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastAddress'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAId'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapState'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmIpMulticastSAMapRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmDeviceCmCert'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmDeviceManufCert'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmCryptoSuiteDataEncryptAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmCryptoSuiteDataAuthentAlg')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docs_bpi2_cm_group = docsBpi2CmGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmGroup.setDescription('This collection of objects provides CM BPI+ status and control.') docs_bpi2_cmts_group = object_group((1, 3, 6, 1, 2, 1, 126, 2, 2, 2)).setObjects(('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsDefaultAuthLifetime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsDefaultTEKLifetime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsDefaultSelfSignedManufCertTrust'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCheckCertValidityPeriods'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthentInfos'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthInvalids'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsSAMapRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsSAMapReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsSAMapRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmBpiVersion'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmPublicKey'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmKeySequenceNumber'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmExpiresOld'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmExpiresNew'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmLifetime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmReset'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmInfos'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCmInvalids'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthInvalidErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthInvalidErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthPrimarySAId'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthBpkmCmCertValid'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthBpkmCmCert'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsAuthCACertIndexPtr'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKSAType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKDataEncryptAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKDataAuthentAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKLifetime'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKKeySequenceNumber'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKExpiresOld'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKExpiresNew'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKReset'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsKeyRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsKeyReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsKeyRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKInvalids'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsKeyRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsKeyRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKInvalidErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsTEKInvalidErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastAddressType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastAddress'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastMask'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAId'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastDataEncryptAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastDataAuthentAlg'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAMapRequests'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAMapReplies'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAMapRejects'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAMapRejectErrorCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastSAMapRejectErrorString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastMapControl'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsIpMulticastMapStorageType'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsMulticastAuthControl'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsProvisionedCmCertTrust'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsProvisionedCmCertSource'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsProvisionedCmCertStatus'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsProvisionedCmCert'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertSubject'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertIssuer'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertSerialNumber'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertTrust'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertSource'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertStatus'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACert'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CmtsCACertThumbprint')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docs_bpi2_cmts_group = docsBpi2CmtsGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CmtsGroup.setDescription('This collection of objects provides CMTS BPI+ status and control.') docs_bpi2_code_download_group = object_group((1, 3, 6, 1, 2, 1, 126, 2, 2, 3)).setObjects(('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeDownloadStatusCode'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeDownloadStatusString'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeMfgOrgName'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeMfgCodeAccessStart'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeMfgCvcAccessStart'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeCoSignerOrgName'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeCoSignerCodeAccessStart'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeCoSignerCvcAccessStart'), ('DOCS-IETF-BPI2-MIB', 'docsBpi2CodeCvcUpdate')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): docs_bpi2_code_download_group = docsBpi2CodeDownloadGroup.setStatus('current') if mibBuilder.loadTexts: docsBpi2CodeDownloadGroup.setDescription('This collection of objects provides authenticated software download support.') mibBuilder.exportSymbols('DOCS-IETF-BPI2-MIB', docsBpi2CmtsProvisionedCmCertTrust=docsBpi2CmtsProvisionedCmCertTrust, docsBpi2CmtsIpMulticastMapStorageType=docsBpi2CmtsIpMulticastMapStorageType, docsBpi2CmIpMulticastSAMapReplies=docsBpi2CmIpMulticastSAMapReplies, docsBpi2CmAuthInvalidErrorString=docsBpi2CmAuthInvalidErrorString, docsBpi2CmtsMulticastAuthCmMacAddress=docsBpi2CmtsMulticastAuthCmMacAddress, docsBpi2CmtsIpMulticastSAType=docsBpi2CmtsIpMulticastSAType, docsBpi2CmGroup=docsBpi2CmGroup, docsBpi2CmtsAuthInvalidErrorCode=docsBpi2CmtsAuthInvalidErrorCode, docsBpi2CmtsIpMulticastSAMapRejects=docsBpi2CmtsIpMulticastSAMapRejects, docsBpi2CmtsTEKInvalids=docsBpi2CmtsTEKInvalids, docsBpi2CmAuthRejectWaitTimeout=docsBpi2CmAuthRejectWaitTimeout, docsBpi2CmTEKDataAuthentAlg=docsBpi2CmTEKDataAuthentAlg, docsBpi2CmCryptoSuiteDataAuthentAlg=docsBpi2CmCryptoSuiteDataAuthentAlg, DocsBpkmSAType=DocsBpkmSAType, docsBpi2CmCryptoSuiteEntry=docsBpi2CmCryptoSuiteEntry, docsBpi2CmDeviceManufCert=docsBpi2CmDeviceManufCert, docsBpi2CmtsMulticastAuthTable=docsBpi2CmtsMulticastAuthTable, docsBpi2CmtsAuthPrimarySAId=docsBpi2CmtsAuthPrimarySAId, docsBpi2CmtsCertObjects=docsBpi2CmtsCertObjects, docsBpi2CmtsIpMulticastSAMapRejectErrorString=docsBpi2CmtsIpMulticastSAMapRejectErrorString, docsBpi2CmIpMulticastSAMapRejects=docsBpi2CmIpMulticastSAMapRejects, docsBpi2CmAuthInvalids=docsBpi2CmAuthInvalids, docsBpi2CmtsCACertIndex=docsBpi2CmtsCACertIndex, docsBpi2Groups=docsBpi2Groups, docsBpi2CmtsProvisionedCmCertEntry=docsBpi2CmtsProvisionedCmCertEntry, docsBpi2CmtsIpMulticastMask=docsBpi2CmtsIpMulticastMask, docsBpi2CmtsProvisionedCmCert=docsBpi2CmtsProvisionedCmCert, docsBpi2CmIpMulticastMapTable=docsBpi2CmIpMulticastMapTable, docsBpi2CodeMfgCodeAccessStart=docsBpi2CodeMfgCodeAccessStart, docsBpi2CmtsMulticastAuthEntry=docsBpi2CmtsMulticastAuthEntry, docsBpi2CmtsAuthInvalidErrorString=docsBpi2CmtsAuthInvalidErrorString, docsBpi2CmtsAuthCmInvalids=docsBpi2CmtsAuthCmInvalids, docsBpi2CmtsGroup=docsBpi2CmtsGroup, docsBpi2CmRekeyWaitTimeout=docsBpi2CmRekeyWaitTimeout, docsBpi2CmTEKTable=docsBpi2CmTEKTable, docsBpi2CodeCoSignerOrgName=docsBpi2CodeCoSignerOrgName, docsBpi2CmtsTEKExpiresNew=docsBpi2CmtsTEKExpiresNew, docsBpi2CmTEKSAType=docsBpi2CmTEKSAType, docsBpi2CmtsAuthCmReplies=docsBpi2CmtsAuthCmReplies, docsBpi2CmtsAuthCmMacAddress=docsBpi2CmtsAuthCmMacAddress, docsBpi2CmtsDefaultTEKLifetime=docsBpi2CmtsDefaultTEKLifetime, docsBpi2CmtsCACertIssuer=docsBpi2CmtsCACertIssuer, docsBpi2CmAuthRejectErrorString=docsBpi2CmAuthRejectErrorString, docsBpi2CmAuthRejects=docsBpi2CmAuthRejects, docsBpi2CmAuthReplies=docsBpi2CmAuthReplies, docsBpi2CmTEKKeySequenceNumber=docsBpi2CmTEKKeySequenceNumber, docsBpi2CmtsCACertSource=docsBpi2CmtsCACertSource, docsBpi2CodeCoSignerCvcAccessStart=docsBpi2CodeCoSignerCvcAccessStart, docsBpi2CmtsIpMulticastSAMapRequests=docsBpi2CmtsIpMulticastSAMapRequests, docsBpi2CmTEKInvalids=docsBpi2CmTEKInvalids, docsBpi2CmtsAuthCmRejects=docsBpi2CmtsAuthCmRejects, docsBpi2Compliances=docsBpi2Compliances, docsBpi2CmDeviceCertEntry=docsBpi2CmDeviceCertEntry, docsBpi2CmtsAuthBpkmCmCert=docsBpi2CmtsAuthBpkmCmCert, docsBpi2CmtsSAMapRequests=docsBpi2CmtsSAMapRequests, docsBpi2CmOpWaitTimeout=docsBpi2CmOpWaitTimeout, docsBpi2CmtsAuthRequests=docsBpi2CmtsAuthRequests, docsBpi2CmAuthReset=docsBpi2CmAuthReset, docsBpi2CmtsAuthCmReset=docsBpi2CmtsAuthCmReset, docsBpi2CmTEKState=docsBpi2CmTEKState, docsBpi2CmtsAuthReplies=docsBpi2CmtsAuthReplies, docsBpi2CmIpMulticastSAMapRequests=docsBpi2CmIpMulticastSAMapRequests, DocsSAId=DocsSAId, docsBpi2CmtsAuthCmKeySequenceNumber=docsBpi2CmtsAuthCmKeySequenceNumber, docsBpi2CmCryptoSuiteIndex=docsBpi2CmCryptoSuiteIndex, docsBpi2CmtsCACertTable=docsBpi2CmtsCACertTable, docsBpi2CmtsSAMapRejects=docsBpi2CmtsSAMapRejects, docsBpi2CmTEKKeyRequests=docsBpi2CmTEKKeyRequests, docsBpi2CmtsBaseEntry=docsBpi2CmtsBaseEntry, docsBpi2CmAuthWaitTimeout=docsBpi2CmAuthWaitTimeout, docsBpi2CmtsAuthCmInfos=docsBpi2CmtsAuthCmInfos, DocsSAIdOrZero=DocsSAIdOrZero, docsBpi2CmtsKeyRequests=docsBpi2CmtsKeyRequests, docsBpi2CmtsProvisionedCmCertMacAddress=docsBpi2CmtsProvisionedCmCertMacAddress, docsBpi2CmAuthExpiresNew=docsBpi2CmAuthExpiresNew, docsBpi2CmSAMapWaitTimeout=docsBpi2CmSAMapWaitTimeout, docsBpi2CmAuthRequests=docsBpi2CmAuthRequests, docsBpi2CmTEKEntry=docsBpi2CmTEKEntry, docsBpi2CodeDownloadControl=docsBpi2CodeDownloadControl, docsBpi2CmtsCACertSubject=docsBpi2CmtsCACertSubject, docsBpi2CmtsCACertThumbprint=docsBpi2CmtsCACertThumbprint, docsBpi2CmTEKKeyRejectErrorString=docsBpi2CmTEKKeyRejectErrorString, docsBpi2CmPublicKey=docsBpi2CmPublicKey, docsBpi2CmReauthWaitTimeout=docsBpi2CmReauthWaitTimeout, docsBpi2CmTEKKeyRejects=docsBpi2CmTEKKeyRejects, docsBpi2MIB=docsBpi2MIB, docsBpi2CmtsTEKExpiresOld=docsBpi2CmtsTEKExpiresOld, docsBpi2CmTEKKeyReplies=docsBpi2CmTEKKeyReplies, docsBpi2CmtsCACert=docsBpi2CmtsCACert, docsBpi2CodeMfgOrgName=docsBpi2CodeMfgOrgName, docsBpi2CmCertObjects=docsBpi2CmCertObjects, docsBpi2CmtsAuthInvalids=docsBpi2CmtsAuthInvalids, docsBpi2CmtsIpMulticastMapControl=docsBpi2CmtsIpMulticastMapControl, docsBpi2CmTEKExpiresOld=docsBpi2CmTEKExpiresOld, docsBpi2CmtsAuthTable=docsBpi2CmtsAuthTable, docsBpi2CmIpMulticastAddressType=docsBpi2CmIpMulticastAddressType, docsBpi2CmtsAuthCmExpiresNew=docsBpi2CmtsAuthCmExpiresNew, DocsX509ASN1DEREncodedCertificate=DocsX509ASN1DEREncodedCertificate, docsBpi2CmtsKeyRejects=docsBpi2CmtsKeyRejects, docsBpi2CmTEKGraceTime=docsBpi2CmTEKGraceTime, docsBpi2CmtsMulticastObjects=docsBpi2CmtsMulticastObjects, docsBpi2CmAuthRejectErrorCode=docsBpi2CmAuthRejectErrorCode, docsBpi2CmtsAuthentInfos=docsBpi2CmtsAuthentInfos, docsBpi2CmtsAuthEntry=docsBpi2CmtsAuthEntry, docsBpi2CmMulticastObjects=docsBpi2CmMulticastObjects, docsBpi2CmtsTEKTable=docsBpi2CmtsTEKTable, docsBpi2CmtsAuthCmBpiVersion=docsBpi2CmtsAuthCmBpiVersion, docsBpi2CmIpMulticastSAMapState=docsBpi2CmIpMulticastSAMapState, docsBpi2CmtsTEKKeySequenceNumber=docsBpi2CmtsTEKKeySequenceNumber, docsBpi2CmtsAuthCmPublicKey=docsBpi2CmtsAuthCmPublicKey, docsBpi2Notification=docsBpi2Notification, docsBpi2CmIpMulticastMapEntry=docsBpi2CmIpMulticastMapEntry, docsBpi2CmTEKDataEncryptAlg=docsBpi2CmTEKDataEncryptAlg, docsBpi2CmtsAuthCmLifetime=docsBpi2CmtsAuthCmLifetime, docsBpi2CmtsIpMulticastSAMapReplies=docsBpi2CmtsIpMulticastSAMapReplies, docsBpi2CmtsCACertEntry=docsBpi2CmtsCACertEntry, docsBpi2CmIpMulticastIndex=docsBpi2CmIpMulticastIndex, docsBpi2CmBaseTable=docsBpi2CmBaseTable, docsBpi2CmTEKKeyRejectErrorCode=docsBpi2CmTEKKeyRejectErrorCode, docsBpi2CmBaseEntry=docsBpi2CmBaseEntry, docsBpi2CmDeviceCmCert=docsBpi2CmDeviceCmCert, docsBpi2CmCryptoSuiteDataEncryptAlg=docsBpi2CmCryptoSuiteDataEncryptAlg, docsBpi2CmtsTEKSAId=docsBpi2CmtsTEKSAId, docsBpi2CmtsIpMulticastDataAuthentAlg=docsBpi2CmtsIpMulticastDataAuthentAlg, docsBpi2CmSAMapMaxRetries=docsBpi2CmSAMapMaxRetries, docsBpi2CmtsTEKEntry=docsBpi2CmtsTEKEntry, docsBpi2CmtsMulticastAuthControl=docsBpi2CmtsMulticastAuthControl, docsBpi2CmtsIpMulticastAddress=docsBpi2CmtsIpMulticastAddress, docsBpi2CodeMfgCvcAccessStart=docsBpi2CodeMfgCvcAccessStart, docsBpi2CmtsBaseTable=docsBpi2CmtsBaseTable, docsBpi2CmtsCACertTrust=docsBpi2CmtsCACertTrust, docsBpi2CmAuthGraceTime=docsBpi2CmAuthGraceTime, docsBpi2CmtsCACertSerialNumber=docsBpi2CmtsCACertSerialNumber, docsBpi2Conformance=docsBpi2Conformance, docsBpi2CmtsTEKLifetime=docsBpi2CmtsTEKLifetime, docsBpi2CmObjects=docsBpi2CmObjects, docsBpi2CmIpMulticastAddress=docsBpi2CmIpMulticastAddress, docsBpi2CmtsCompliance=docsBpi2CmtsCompliance, PYSNMP_MODULE_ID=docsBpi2MIB, docsBpi2CmtsAuthCACertIndexPtr=docsBpi2CmtsAuthCACertIndexPtr, docsBpi2CmtsTEKReset=docsBpi2CmtsTEKReset, docsBpi2CmtsIpMulticastIndex=docsBpi2CmtsIpMulticastIndex, docsBpi2CmtsCACertStatus=docsBpi2CmtsCACertStatus, docsBpi2CmIpMulticastSAId=docsBpi2CmIpMulticastSAId, docsBpi2CmtsAuthBpkmCmCertValid=docsBpi2CmtsAuthBpkmCmCertValid, docsBpi2CmIpMulticastSAMapRejectErrorString=docsBpi2CmIpMulticastSAMapRejectErrorString, docsBpi2CmtsKeyReplies=docsBpi2CmtsKeyReplies, docsBpi2CodeDownloadGroup=docsBpi2CodeDownloadGroup, docsBpi2CmtsTEKInvalidErrorString=docsBpi2CmtsTEKInvalidErrorString, docsBpi2CmtsAuthCmRequests=docsBpi2CmtsAuthCmRequests, docsBpi2CmtsIpMulticastMapTable=docsBpi2CmtsIpMulticastMapTable, docsBpi2CmtsAuthRejects=docsBpi2CmtsAuthRejects, docsBpi2CmtsDefaultSelfSignedManufCertTrust=docsBpi2CmtsDefaultSelfSignedManufCertTrust, docsBpi2CmtsSAMapReplies=docsBpi2CmtsSAMapReplies, docsBpi2CmtsTEKDataAuthentAlg=docsBpi2CmtsTEKDataAuthentAlg, docsBpi2CmPrivacyEnable=docsBpi2CmPrivacyEnable, docsBpi2CmtsProvisionedCmCertTable=docsBpi2CmtsProvisionedCmCertTable, docsBpi2CmDeviceCertTable=docsBpi2CmDeviceCertTable, docsBpi2CmtsCheckCertValidityPeriods=docsBpi2CmtsCheckCertValidityPeriods, docsBpi2CmAuthState=docsBpi2CmAuthState, docsBpi2CodeCoSignerCodeAccessStart=docsBpi2CodeCoSignerCodeAccessStart, docsBpi2CodeCvcUpdate=docsBpi2CodeCvcUpdate, docsBpi2CmtsTEKSAType=docsBpi2CmtsTEKSAType, docsBpi2CmIpMulticastSAMapRejectErrorCode=docsBpi2CmIpMulticastSAMapRejectErrorCode, docsBpi2CmtsProvisionedCmCertStatus=docsBpi2CmtsProvisionedCmCertStatus, docsBpi2CmtsAuthRejectErrorCode=docsBpi2CmtsAuthRejectErrorCode, DocsBpkmDataAuthentAlg=DocsBpkmDataAuthentAlg, docsBpi2CmTEKSAId=docsBpi2CmTEKSAId, docsBpi2CmtsObjects=docsBpi2CmtsObjects, docsBpi2CmCompliance=docsBpi2CmCompliance, docsBpi2CmCryptoSuiteTable=docsBpi2CmCryptoSuiteTable, docsBpi2CodeDownloadStatusCode=docsBpi2CodeDownloadStatusCode, docsBpi2CmtsIpMulticastSAMapRejectErrorCode=docsBpi2CmtsIpMulticastSAMapRejectErrorCode, docsBpi2CmtsAuthCmExpiresOld=docsBpi2CmtsAuthCmExpiresOld, docsBpi2CmTEKInvalidErrorString=docsBpi2CmTEKInvalidErrorString, docsBpi2CmtsKeyRejectErrorCode=docsBpi2CmtsKeyRejectErrorCode, docsBpi2CmtsKeyRejectErrorString=docsBpi2CmtsKeyRejectErrorString, docsBpi2CmtsIpMulticastSAId=docsBpi2CmtsIpMulticastSAId, docsBpi2CmTEKInvalidErrorCode=docsBpi2CmTEKInvalidErrorCode, docsBpi2CmAuthKeySequenceNumber=docsBpi2CmAuthKeySequenceNumber, docsBpi2CmAuthentInfos=docsBpi2CmAuthentInfos, docsBpi2CmtsTEKInvalidErrorCode=docsBpi2CmtsTEKInvalidErrorCode, docsBpi2CmtsIpMulticastMapEntry=docsBpi2CmtsIpMulticastMapEntry, docsBpi2CmtsIpMulticastAddressType=docsBpi2CmtsIpMulticastAddressType, docsBpi2CodeDownloadStatusString=docsBpi2CodeDownloadStatusString, docsBpi2CmtsProvisionedCmCertSource=docsBpi2CmtsProvisionedCmCertSource, DocsBpkmDataEncryptAlg=DocsBpkmDataEncryptAlg, docsBpi2CmAuthExpiresOld=docsBpi2CmAuthExpiresOld, docsBpi2MIBObjects=docsBpi2MIBObjects, docsBpi2CmtsAuthRejectErrorString=docsBpi2CmtsAuthRejectErrorString, docsBpi2CmAuthInvalidErrorCode=docsBpi2CmAuthInvalidErrorCode, docsBpi2CmtsDefaultAuthLifetime=docsBpi2CmtsDefaultAuthLifetime, docsBpi2CmtsTEKDataEncryptAlg=docsBpi2CmtsTEKDataEncryptAlg, docsBpi2CmtsIpMulticastDataEncryptAlg=docsBpi2CmtsIpMulticastDataEncryptAlg, docsBpi2CmtsMulticastAuthSAId=docsBpi2CmtsMulticastAuthSAId, docsBpi2CmTEKExpiresNew=docsBpi2CmTEKExpiresNew, docsBpi2CmTEKAuthPends=docsBpi2CmTEKAuthPends)
grid = [] n = int(raw_input()) for i in range(n): arr = [] s = raw_input() for j in range(n): arr.append(s[j]) grid.append(arr) status = True for i in range(n): b = 0 c = 0 lastChar = ' ' lastCount = 0 for x in range(n): if grid[x][i] == 'B': b += 1 else: c += 1 if grid[x][i] == lastChar: lastCount += 1 else: lastCount = 1 lastChar = grid[x][i] if lastCount == 3: status = False if b != c: status = False b = 0 c = 0 lastChar = ' ' lastCount = 0 for x in range(n): if grid[i][x] == 'B': b += 1 else: c += 1 if grid[i][x] == lastChar: lastCount += 1 else: lastCount = 1 lastChar = grid[i][x] if lastCount == 3: status = False if b != c: status = False if not status: break print(1 if status else 0)
grid = [] n = int(raw_input()) for i in range(n): arr = [] s = raw_input() for j in range(n): arr.append(s[j]) grid.append(arr) status = True for i in range(n): b = 0 c = 0 last_char = ' ' last_count = 0 for x in range(n): if grid[x][i] == 'B': b += 1 else: c += 1 if grid[x][i] == lastChar: last_count += 1 else: last_count = 1 last_char = grid[x][i] if lastCount == 3: status = False if b != c: status = False b = 0 c = 0 last_char = ' ' last_count = 0 for x in range(n): if grid[i][x] == 'B': b += 1 else: c += 1 if grid[i][x] == lastChar: last_count += 1 else: last_count = 1 last_char = grid[i][x] if lastCount == 3: status = False if b != c: status = False if not status: break print(1 if status else 0)
#This is a simple class definition to hold information about each judge. Is used by other files, and is not to be run directly. class judge(object): #initialized using a "line". This should be a line from the .csv file produced by judgeMetaDataExtractor.py def __init__(self,line): parts = line.strip().split(',') self.circuit = parts[1] self.start = int(parts[3]) self.end = int(parts[4]) self.party = parts[2] self.fullName = parts[0] self.lastName = parts[0].split('<')[0].lower() self.firstName = parts[0].split('<')[1].lower().strip().split(' ')[0] def __str__(self): return self.fullName + ' Circuit: ' + self.circuit + ' Party: ' + self.party +' Start: ' +str(self.start) + ' End: ' +str(self.end) def __repr__(self): return self.fullName + ' Circuit: ' + self.circuit + ' Party: ' + self.party +' Start: ' +str(self.start) + ' End: ' +str(self.end)
class Judge(object): def __init__(self, line): parts = line.strip().split(',') self.circuit = parts[1] self.start = int(parts[3]) self.end = int(parts[4]) self.party = parts[2] self.fullName = parts[0] self.lastName = parts[0].split('<')[0].lower() self.firstName = parts[0].split('<')[1].lower().strip().split(' ')[0] def __str__(self): return self.fullName + ' Circuit: ' + self.circuit + ' Party: ' + self.party + ' Start: ' + str(self.start) + ' End: ' + str(self.end) def __repr__(self): return self.fullName + ' Circuit: ' + self.circuit + ' Party: ' + self.party + ' Start: ' + str(self.start) + ' End: ' + str(self.end)
USER_CREDENTIALS = [ ("user1", "user1@example.com", "pass1"), ("user2", "user2@example.com", "pass2"), ("user3", "user3@example.com", "pass3"), ("user4", "user4@example.com", "pass4"), ("user5", "user5@example.com", "pass5") ]
user_credentials = [('user1', 'user1@example.com', 'pass1'), ('user2', 'user2@example.com', 'pass2'), ('user3', 'user3@example.com', 'pass3'), ('user4', 'user4@example.com', 'pass4'), ('user5', 'user5@example.com', 'pass5')]
def _compute_lcs(source, target): """Computes the Longest Common Subsequence (LCS). Description of the dynamic programming algorithm: https://www.algorithmist.com/index.php/Longest_Common_Subsequence Args: source: List of source tokens. target: List of target tokens. Returns: List of tokens in the LCS. """ table = _lcs_table(source, target) return _backtrack(table, source, target, len(source), len(target)) def _lcs_table(source, target): """Returns the Longest Common Subsequence dynamic programming table.""" rows = len(source) cols = len(target) lcs_table = [[0] * (cols + 1) for _ in range(rows + 1)] for i in range(1, rows + 1): for j in range(1, cols + 1): if source[i - 1] == target[j - 1]: lcs_table[i][j] = lcs_table[i - 1][j - 1] + 1 else: lcs_table[i][j] = max(lcs_table[i - 1][j], lcs_table[i][j - 1]) return lcs_table def _backtrack(table, source, target, i, j): """Backtracks the Longest Common Subsequence table to reconstruct the LCS. Args: table: Precomputed LCS table. source: List of source tokens. target: List of target tokens. i: Current row index. j: Current column index. Returns: List of tokens corresponding to LCS. """ if i == 0 or j == 0: return [] if source[i - 1] == target[j - 1]: # Append the aligned token to output. return _backtrack(table, source, target, i - 1, j - 1) + [target[j - 1]] if table[i][j - 1] > table[i - 1][j]: return _backtrack(table, source, target, i, j - 1) else: return _backtrack(table, source, target, i - 1, j) def insert_dummy(tokens, p='[unused%d]'): rlt = [] cnt = 1 for token in tokens: rlt.append(p % cnt) rlt.append(token) cnt += 1 rlt.append(p % cnt) return rlt def convert_tokens_to_string(tokenizer, tokens, en=False): if en: return tokenizer.convert_tokens_to_string(tokens) return ''.join(tokenizer.convert_tokens_to_string(tokens).split(' ')) def _decode_valid_tags(source, tags, tokenizer, en): string = [] for token, tag in zip(source, tags): if tag == 'DELETE': continue elif tag == 'KEEP': string.append(token) else: string.append(tag.split('|')[-1]) return convert_tokens_to_string(tokenizer, string, en) def convert_tags(source, target, tokenizer, debug=False, en=False): source = insert_dummy(tokenizer.tokenize(source)) target = tokenizer.tokenize(target) # initialize tags tags = ['DELETE'] * len(source) kept_tokens = _compute_lcs(source, target) + ['[DUMMY]'] target_idx = 0 phrase = [] for source_idx in range(len(source)): if source[source_idx] == kept_tokens[0]: tags[source_idx] = 'KEEP' while target_idx < len(target) and target[target_idx] != kept_tokens[0]: phrase.append(target[target_idx]) target_idx += 1 kept_tokens = kept_tokens[1:] if len(phrase) > 0: if debug: tags[source_idx - 1] = 'CHANGE|' + convert_tokens_to_string(tokenizer, phrase, en) else: tags[source_idx - 1] = 'CHANGE|' + '<|>'.join(phrase) phrase = [] target_idx += 1 if target_idx < len(target): if debug: tags[-1] = 'CHANGE|' + convert_tokens_to_string(tokenizer, target[target_idx:], en) else: tags[-1] = 'CHANGE|' + "<|>".join(target[target_idx:]) if debug and _decode_valid_tags(source, tags, tokenizer, en) != convert_tokens_to_string(tokenizer, target, en): print(f"decoded: {_decode_valid_tags(source, tags, tokenizer, en)} " f"original: {convert_tokens_to_string(tokenizer, target, en)}") return tags, source def data_iter(file_path, mode): with open(file_path, 'r', encoding='utf-8') as f: for line in f: line = line.strip() if mode == 'wechat': line_split = line.split('\t\t') contexts_source, target = line_split[:-1], line_split[-1] contexts = contexts_source[:-1] source = contexts_source[-1] elif mode == "ailab": line_split = line.split('\t') if line_split[-1] != '0': contexts_source, target = line_split[:5], line_split[-1] else: contexts_source, target = line_split[:5], line_split[4] contexts = contexts_source[:-1] source = contexts_source[-1] elif mode == 'canard': line_split = line.split('\t') contexts_source, target = line_split[:-1], line_split[-1] contexts = contexts_source[:-1] source = contexts_source[-1] else: raise ValueError("mode must in [wechat, ailab, local]") yield contexts, source, target def str2bool(v): return v.lower() in ("yes", "true", "t", "1")
def _compute_lcs(source, target): """Computes the Longest Common Subsequence (LCS). Description of the dynamic programming algorithm: https://www.algorithmist.com/index.php/Longest_Common_Subsequence Args: source: List of source tokens. target: List of target tokens. Returns: List of tokens in the LCS. """ table = _lcs_table(source, target) return _backtrack(table, source, target, len(source), len(target)) def _lcs_table(source, target): """Returns the Longest Common Subsequence dynamic programming table.""" rows = len(source) cols = len(target) lcs_table = [[0] * (cols + 1) for _ in range(rows + 1)] for i in range(1, rows + 1): for j in range(1, cols + 1): if source[i - 1] == target[j - 1]: lcs_table[i][j] = lcs_table[i - 1][j - 1] + 1 else: lcs_table[i][j] = max(lcs_table[i - 1][j], lcs_table[i][j - 1]) return lcs_table def _backtrack(table, source, target, i, j): """Backtracks the Longest Common Subsequence table to reconstruct the LCS. Args: table: Precomputed LCS table. source: List of source tokens. target: List of target tokens. i: Current row index. j: Current column index. Returns: List of tokens corresponding to LCS. """ if i == 0 or j == 0: return [] if source[i - 1] == target[j - 1]: return _backtrack(table, source, target, i - 1, j - 1) + [target[j - 1]] if table[i][j - 1] > table[i - 1][j]: return _backtrack(table, source, target, i, j - 1) else: return _backtrack(table, source, target, i - 1, j) def insert_dummy(tokens, p='[unused%d]'): rlt = [] cnt = 1 for token in tokens: rlt.append(p % cnt) rlt.append(token) cnt += 1 rlt.append(p % cnt) return rlt def convert_tokens_to_string(tokenizer, tokens, en=False): if en: return tokenizer.convert_tokens_to_string(tokens) return ''.join(tokenizer.convert_tokens_to_string(tokens).split(' ')) def _decode_valid_tags(source, tags, tokenizer, en): string = [] for (token, tag) in zip(source, tags): if tag == 'DELETE': continue elif tag == 'KEEP': string.append(token) else: string.append(tag.split('|')[-1]) return convert_tokens_to_string(tokenizer, string, en) def convert_tags(source, target, tokenizer, debug=False, en=False): source = insert_dummy(tokenizer.tokenize(source)) target = tokenizer.tokenize(target) tags = ['DELETE'] * len(source) kept_tokens = _compute_lcs(source, target) + ['[DUMMY]'] target_idx = 0 phrase = [] for source_idx in range(len(source)): if source[source_idx] == kept_tokens[0]: tags[source_idx] = 'KEEP' while target_idx < len(target) and target[target_idx] != kept_tokens[0]: phrase.append(target[target_idx]) target_idx += 1 kept_tokens = kept_tokens[1:] if len(phrase) > 0: if debug: tags[source_idx - 1] = 'CHANGE|' + convert_tokens_to_string(tokenizer, phrase, en) else: tags[source_idx - 1] = 'CHANGE|' + '<|>'.join(phrase) phrase = [] target_idx += 1 if target_idx < len(target): if debug: tags[-1] = 'CHANGE|' + convert_tokens_to_string(tokenizer, target[target_idx:], en) else: tags[-1] = 'CHANGE|' + '<|>'.join(target[target_idx:]) if debug and _decode_valid_tags(source, tags, tokenizer, en) != convert_tokens_to_string(tokenizer, target, en): print(f'decoded: {_decode_valid_tags(source, tags, tokenizer, en)} original: {convert_tokens_to_string(tokenizer, target, en)}') return (tags, source) def data_iter(file_path, mode): with open(file_path, 'r', encoding='utf-8') as f: for line in f: line = line.strip() if mode == 'wechat': line_split = line.split('\t\t') (contexts_source, target) = (line_split[:-1], line_split[-1]) contexts = contexts_source[:-1] source = contexts_source[-1] elif mode == 'ailab': line_split = line.split('\t') if line_split[-1] != '0': (contexts_source, target) = (line_split[:5], line_split[-1]) else: (contexts_source, target) = (line_split[:5], line_split[4]) contexts = contexts_source[:-1] source = contexts_source[-1] elif mode == 'canard': line_split = line.split('\t') (contexts_source, target) = (line_split[:-1], line_split[-1]) contexts = contexts_source[:-1] source = contexts_source[-1] else: raise value_error('mode must in [wechat, ailab, local]') yield (contexts, source, target) def str2bool(v): return v.lower() in ('yes', 'true', 't', '1')
##defines SWARM = ["SeqSwarm", "PyramidSwarm", "RingSwarm", "LocalSwarm"] FUNCTION = ["Sphere", "Rastrigin", "Rosenbrock", "Schaffer", "Griewank","Ackley", "Schwefel", "Levy No.5"] DISPLAYDIGITS = 3 ##end defines class PsoParameter: steps = 0 stepwidth = 1 runs = 0 #the actual settings for the batch run param = [] logdir = "" attributeslist = [] attributesDesc = [] #describe the log run before/after description = "" observation = "" def __init__(self): pass def __str__(self): out = "" out += "logdir: " + self.logdir + "\n" out += "runs: " + str(self.runs) + "\n" out += "steps: " + str(self.steps) + "\n" out += "stepwidth: " + str(self.stepwidth) + "\n" out += "attributes: " + str(self.attributeslist) + "\n" out += "attrDesc: " + str(self.attributesDesc) + "\n" out += "param:\n[\n" for i in range(len(self.param)): out += " " +str(self.param[i]) + "\n" out += "]\n" out += "description:\n" + self.description + "\n" out += "observation:\n" + self.observation + "\n" return out def parameterString(self, i): out = SWARM[self.param[i][9]] +" - w=" + str(round(self.param[i][0],DISPLAYDIGITS)) + ", c1=" + str(round(self.param[i][2],DISPLAYDIGITS))+ ", c2=" + str(round(self.param[i][3],DISPLAYDIGITS))+ ", size=" + str(self.param[i][4])+ ", height=" + str(self.param[i][6])+ ", branch=" + str(self.param[i][7]) return out def functionString(self): out = FUNCTION[self.param[0][8]] + " (dim=" + str(self.param[0][5]) + ")" return out
swarm = ['SeqSwarm', 'PyramidSwarm', 'RingSwarm', 'LocalSwarm'] function = ['Sphere', 'Rastrigin', 'Rosenbrock', 'Schaffer', 'Griewank', 'Ackley', 'Schwefel', 'Levy No.5'] displaydigits = 3 class Psoparameter: steps = 0 stepwidth = 1 runs = 0 param = [] logdir = '' attributeslist = [] attributes_desc = [] description = '' observation = '' def __init__(self): pass def __str__(self): out = '' out += 'logdir: ' + self.logdir + '\n' out += 'runs: ' + str(self.runs) + '\n' out += 'steps: ' + str(self.steps) + '\n' out += 'stepwidth: ' + str(self.stepwidth) + '\n' out += 'attributes: ' + str(self.attributeslist) + '\n' out += 'attrDesc: ' + str(self.attributesDesc) + '\n' out += 'param:\n[\n' for i in range(len(self.param)): out += ' ' + str(self.param[i]) + '\n' out += ']\n' out += 'description:\n' + self.description + '\n' out += 'observation:\n' + self.observation + '\n' return out def parameter_string(self, i): out = SWARM[self.param[i][9]] + ' - w=' + str(round(self.param[i][0], DISPLAYDIGITS)) + ', c1=' + str(round(self.param[i][2], DISPLAYDIGITS)) + ', c2=' + str(round(self.param[i][3], DISPLAYDIGITS)) + ', size=' + str(self.param[i][4]) + ', height=' + str(self.param[i][6]) + ', branch=' + str(self.param[i][7]) return out def function_string(self): out = FUNCTION[self.param[0][8]] + ' (dim=' + str(self.param[0][5]) + ')' return out
a, b, c, d, e, f, g, h = '00000000' cell = '' with open(input('What file to execute?> '), 'r') as F: for row in F: for x in str(row): if x == '!': if cell == '': cell = 'a' elif 'a' <= cell <= 'g': cell = chr(ord(cell) + 1) elif cell == 'h': cell = '' if x == '?': if cell == '': cell = 'h' elif cell == 'a': cell = '' elif 'b' <= cell <= 'h': cell = chr(ord(cell) - 1) if x == '#': print(a + b + c + d + e + f + g + h) if x == "+": if cell == 'a' and a == '0': a = '1' elif cell == 'b' and b == '0': b = '1' elif cell == 'c' and c == '0': c = '1' elif cell == 'd' and d == '0': d = '1' elif cell == 'e' and e == '0': e = '1' elif cell == 'f' and f == '0': f = '1' elif cell == 'g' and g == '0': g = '1' elif cell == 'h' and h == '0': h = '1' if x == ".": print(cell) if x == ",": a, b, c, d, e, f, g, h = '00000000' cell = ''
(a, b, c, d, e, f, g, h) = '00000000' cell = '' with open(input('What file to execute?> '), 'r') as f: for row in F: for x in str(row): if x == '!': if cell == '': cell = 'a' elif 'a' <= cell <= 'g': cell = chr(ord(cell) + 1) elif cell == 'h': cell = '' if x == '?': if cell == '': cell = 'h' elif cell == 'a': cell = '' elif 'b' <= cell <= 'h': cell = chr(ord(cell) - 1) if x == '#': print(a + b + c + d + e + f + g + h) if x == '+': if cell == 'a' and a == '0': a = '1' elif cell == 'b' and b == '0': b = '1' elif cell == 'c' and c == '0': c = '1' elif cell == 'd' and d == '0': d = '1' elif cell == 'e' and e == '0': e = '1' elif cell == 'f' and f == '0': f = '1' elif cell == 'g' and g == '0': g = '1' elif cell == 'h' and h == '0': h = '1' if x == '.': print(cell) if x == ',': (a, b, c, d, e, f, g, h) = '00000000' cell = ''
# noinspection SpellCheckingInspection """ The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take a string and make this conversion given a number of rows: string convert(string text, int nRows); convert("PAYPALISHIRING", 3) should return "PAHNAPLSIIGYIR". https://leetcode.com/problems/zigzag-conversion/ """ # noinspection PyPep8Naming,PyMethodMayBeStatic class Solution: def convert(self, s, numRows): """ :type s: str :type numRows: int :rtype: str """ if numRows <= 1 or len(s) <= numRows: return s result = [''] * numRows row, step = 0, 1 for char in s: result[row] += char if row == 0: step = 1 elif row == numRows - 1: step = -1 row += step return ''.join(result)
""" The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take a string and make this conversion given a number of rows: string convert(string text, int nRows); convert("PAYPALISHIRING", 3) should return "PAHNAPLSIIGYIR". https://leetcode.com/problems/zigzag-conversion/ """ class Solution: def convert(self, s, numRows): """ :type s: str :type numRows: int :rtype: str """ if numRows <= 1 or len(s) <= numRows: return s result = [''] * numRows (row, step) = (0, 1) for char in s: result[row] += char if row == 0: step = 1 elif row == numRows - 1: step = -1 row += step return ''.join(result)
person = { "first_name": "Bob", "last_name": "Smith" } # for key in person: # print(key) # for key in person.keys(): # print(key) # for value in person.values(): # print(value) # for key, value in person.items(): # print(key, value) the_keys = person.keys() person["age"] = 23 print(the_keys)
person = {'first_name': 'Bob', 'last_name': 'Smith'} the_keys = person.keys() person['age'] = 23 print(the_keys)
# -*- coding: utf-8 -*- """ Created on Wed Sep 2 10:24:30 2020 @author: roger luo """ def example(): """show example code Returns ------- None. Example -------- >>> 1+2 3 >>> d = sum([1,2,3]) >>> pd.Series([1,2,3]) Out[15]: 0 1 1 2 2 3 dtype: int64 """
""" Created on Wed Sep 2 10:24:30 2020 @author: roger luo """ def example(): """show example code Returns ------- None. Example -------- >>> 1+2 3 >>> d = sum([1,2,3]) >>> pd.Series([1,2,3]) Out[15]: 0 1 1 2 2 3 dtype: int64 """
WELCOME_BRIEF = "Configures welcoming people to the server." WELCOME_DESCRIPTION = "Configures welcoming people to the server, what channel it occurs and, and what welcome " \ "messages are sent." WELCOME_INFO_BRIEF = "Lists basic Welcome info for this server." WELCOME_ENABLE_BRIEF = "Enables Welcomes for this server." WELCOME_DISABLE_BRIEF = "Disables Welcomes for this server." WELCOME_ADD_BRIEF = "Adds the given sentence to the list of possible welcomes." WELCOME_ADD_DESCRIPTION = "Adds the given sentence, preferably wrapped in quotes, to the list of randomly chosen " \ "welcomes. To have the new persons name show up, put \"{0}\" without quotes anywhere " \ "in the message. To have them be @mentioned, put \"{1}\" anywhere. Again, without quotes." WELCOME_REMOVE_BRIEF = "Removes a sentence at the given index from possible welcomes." WELCOME_REMOVE_DESCRIPTION = "Removes the sentence at the given index shown in the info command from the list of " \ "randomly chosen welcomes." WELCOME_SET_BRIEF = "Sets the welcome channel." WELCOME_ENABLED = "Enabled Welcomes." WELCOME_ENABLED_ALREADY = "Welcomes are already enabled." WELCOME_ENABLED_NO_CHANNEL_SET = "You will need to set a channel to send welcomes to before this will function." WELCOME_DISABLED = "Disabled Welcomes." WELCOME_DISABLED_ALREADY = "Welcomes were already disabled." WELCOME_SET_CHANNEL = "Welcomes will now be sent in this channel."
welcome_brief = 'Configures welcoming people to the server.' welcome_description = 'Configures welcoming people to the server, what channel it occurs and, and what welcome messages are sent.' welcome_info_brief = 'Lists basic Welcome info for this server.' welcome_enable_brief = 'Enables Welcomes for this server.' welcome_disable_brief = 'Disables Welcomes for this server.' welcome_add_brief = 'Adds the given sentence to the list of possible welcomes.' welcome_add_description = 'Adds the given sentence, preferably wrapped in quotes, to the list of randomly chosen welcomes. To have the new persons name show up, put "{0}" without quotes anywhere in the message. To have them be @mentioned, put "{1}" anywhere. Again, without quotes.' welcome_remove_brief = 'Removes a sentence at the given index from possible welcomes.' welcome_remove_description = 'Removes the sentence at the given index shown in the info command from the list of randomly chosen welcomes.' welcome_set_brief = 'Sets the welcome channel.' welcome_enabled = 'Enabled Welcomes.' welcome_enabled_already = 'Welcomes are already enabled.' welcome_enabled_no_channel_set = 'You will need to set a channel to send welcomes to before this will function.' welcome_disabled = 'Disabled Welcomes.' welcome_disabled_already = 'Welcomes were already disabled.' welcome_set_channel = 'Welcomes will now be sent in this channel.'
def thread_colorize(area, lexer, theme, index, stopindex): for pos, token, value in lexer.get_tokens_unprocessed(area.get(index, stopindex)): area.tag_add(str(token), '%s +%sc' % (index, pos), '%s +%sc' % (index, pos + len(value))) yield def matrix_step(map): count, offset = 0, 0 for pos, token, value in map: srow = count scol = pos - offset n = value.count('\n') erow = srow + n count = count + n m = value.rfind('\n') offset = pos + m + 1 if m >= 0 else offset ecol = len(value) - (m + 1) if m >= 0 else scol + len(value) yield(((srow, scol), (erow, ecol)), token, value) def get_tokens_unprocessed_matrix(count, offset, data, lexer): map = matrix_step(lexer.get_tokens_unprocessed(data)) for ((srow, scol), (erow, ecol)), token, value in map: if '\n' in value: yield(((srow + count, scol + offset), (erow + count, ecol)), token, value) break else: yield(((srow + count, scol + offset), (erow + count, ecol + offset)), token, value) for ((srow, scol), (erow, ecol)), token, value in map: yield(((srow + count, scol), (erow + count, ecol)), token, value)
def thread_colorize(area, lexer, theme, index, stopindex): for (pos, token, value) in lexer.get_tokens_unprocessed(area.get(index, stopindex)): area.tag_add(str(token), '%s +%sc' % (index, pos), '%s +%sc' % (index, pos + len(value))) yield def matrix_step(map): (count, offset) = (0, 0) for (pos, token, value) in map: srow = count scol = pos - offset n = value.count('\n') erow = srow + n count = count + n m = value.rfind('\n') offset = pos + m + 1 if m >= 0 else offset ecol = len(value) - (m + 1) if m >= 0 else scol + len(value) yield (((srow, scol), (erow, ecol)), token, value) def get_tokens_unprocessed_matrix(count, offset, data, lexer): map = matrix_step(lexer.get_tokens_unprocessed(data)) for (((srow, scol), (erow, ecol)), token, value) in map: if '\n' in value: yield (((srow + count, scol + offset), (erow + count, ecol)), token, value) break else: yield (((srow + count, scol + offset), (erow + count, ecol + offset)), token, value) for (((srow, scol), (erow, ecol)), token, value) in map: yield (((srow + count, scol), (erow + count, ecol)), token, value)
#!/usr/bin/env python3 def solution(array): """ Finds the number of combinations (ai, aj), given: - ai == 0 - aj == 1 - j > i Time Complexity: O(n), as we go through the array only once (in reverse order) Space Complexity O(1), as we store three variables and create one iterator """ result = 0 count = 0 # We iterate over array in reverse order to reuse the counter of 1s for i in range(len(array) - 1, -1, -1): if array[i] == 1: count += 1 else: if result + count > 1000000000: return -1 # We never reset "count", as we need to sum the number of all 1s after each 0 result += count return result
def solution(array): """ Finds the number of combinations (ai, aj), given: - ai == 0 - aj == 1 - j > i Time Complexity: O(n), as we go through the array only once (in reverse order) Space Complexity O(1), as we store three variables and create one iterator """ result = 0 count = 0 for i in range(len(array) - 1, -1, -1): if array[i] == 1: count += 1 else: if result + count > 1000000000: return -1 result += count return result
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'ACCEPTING COMMA ENVIRONMENT EQUALS FILE INCLUDE INPUTS INPUT_ENABLED INPUT_STATES LEFT_BRACE LEFT_BRACKET LEFT_PAREN LIVENESS NAME OUTPUTS OUTPUT_STATES PROCESS RECEIVE RIGHT_BRACE RIGHT_BRACKET RIGHT_PAREN SAFETY SEND STATES STRONG_FAIRNESS STRONG_NON_BLOCKINGautomata : include automata\n | function automata\n | definition automata\n | instantiation automata\n | strong_non_blocking automata\n | include\n | function\n | definition\n | instantiation\n | strong_non_blocking\n | errorinclude : INCLUDE FILEstrong_non_blocking : STRONG_NON_BLOCKING LEFT_BRACKET names RIGHT_BRACKETdefinition : PROCESS NAME inner\n | ENVIRONMENT NAME inner\n | LIVENESS NAME inner\n | SAFETY NAME innerinner : LEFT_BRACE optional_states optional_input_states optional_output_states inputs optional_input_enabled outputs initial optional_accepting edges RIGHT_BRACE\n inputs : INPUTS LEFT_BRACKET names RIGHT_BRACKEToptional_input_enabled : INPUT_ENABLED LEFT_BRACKET names RIGHT_BRACKEToptional_input_enabled : outputs : OUTPUTS LEFT_BRACKET names RIGHT_BRACKEToptional_states : STATES LEFT_BRACKET names RIGHT_BRACKEToptional_states : optional_input_states : INPUT_STATES LEFT_BRACKET names RIGHT_BRACKEToptional_input_states : optional_output_states : OUTPUT_STATES LEFT_BRACKET names RIGHT_BRACKEToptional_output_states : optional_accepting : ACCEPTING LEFT_BRACKET names RIGHT_BRACKEToptional_accepting : instantiation : NAME EQUALS NAME LEFT_PAREN names RIGHT_PARENfunction : PROCESS NAME LEFT_PAREN names RIGHT_PAREN inner\n | ENVIRONMENT NAME LEFT_PAREN names RIGHT_PAREN inner\n | LIVENESS NAME LEFT_PAREN names RIGHT_PAREN inner\n | SAFETY NAME LEFT_PAREN names RIGHT_PAREN inner\n names : NAME COMMA namesnames : NAME\n |initial : NAME NAMEedges : edge edgesedges : edge : NAME NAME SEND NAME\n | NAME NAME RECEIVE NAMEedge : NAME NAME SEND NAME STRONG_FAIRNESS\n | NAME NAME RECEIVE NAME STRONG_FAIRNESS' _lr_action_items = {'STRONG_FAIRNESS':([103,104,],[105,106,]),'INPUT_STATES':([27,40,66,],[-24,49,-23,]),'RIGHT_BRACKET':([20,30,31,42,48,52,57,58,67,70,74,75,78,79,83,84,89,94,99,],[-38,-37,43,-38,-38,-36,66,-38,71,-38,-38,80,-38,85,-38,90,95,-38,102,]),'STATES':([27,],[39,]),'LEFT_BRACE':([15,24,25,26,51,54,55,56,],[27,27,27,27,27,27,27,27,]),'FILE':([8,],[21,]),'RIGHT_PAREN':([28,30,33,35,37,41,42,44,45,46,47,52,53,],[-38,-37,-38,-38,-38,51,-38,-38,54,55,56,-36,62,]),'LEFT_PAREN':([15,24,25,26,32,],[28,33,35,37,44,]),'INPUT_ENABLED':([68,85,],[73,-19,]),'COMMA':([30,],[42,]),'$end':([2,3,4,5,6,9,14,16,17,18,19,21,22,29,34,36,38,43,61,62,63,64,65,97,],[-9,-10,0,-6,-7,-8,-11,-4,-5,-1,-2,-12,-3,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'INPUTS':([27,40,50,59,66,71,80,],[-24,-26,-28,69,-23,-25,-27,]),'RECEIVE':([96,],[100,]),'STRONG_NON_BLOCKING':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[7,7,7,7,7,7,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'EQUALS':([10,],[23,]),'RIGHT_BRACE':([81,86,88,92,93,98,102,103,104,105,106,],[-30,-41,-39,97,-41,-40,-29,-43,-42,-45,-44,]),'OUTPUT_STATES':([27,40,50,66,71,],[-24,-26,60,-23,-25,]),'INCLUDE':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[8,8,8,8,8,8,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'ENVIRONMENT':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[1,1,1,1,1,1,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'NAME':([0,1,2,3,5,6,9,11,12,13,20,21,23,28,29,33,34,35,36,37,38,42,43,44,48,58,61,62,63,64,65,70,74,76,78,81,82,83,86,88,91,93,94,95,97,100,101,102,103,104,105,106,],[10,15,10,10,10,10,10,24,25,26,30,-12,32,30,-15,30,-14,30,-16,30,-17,30,-13,30,30,30,-33,-31,-32,-34,-35,30,30,82,30,-30,88,30,91,-39,96,91,30,-22,-18,103,104,-29,-43,-42,-45,-44,]),'PROCESS':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[11,11,11,11,11,11,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'OUTPUTS':([68,72,85,90,],[-21,77,-19,-20,]),'LIVENESS':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[12,12,12,12,12,12,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'SEND':([96,],[101,]),'SAFETY':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[13,13,13,13,13,13,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'error':([0,2,3,5,6,9,21,29,34,36,38,43,61,62,63,64,65,97,],[14,14,14,14,14,14,-12,-15,-14,-16,-17,-13,-33,-31,-32,-34,-35,-18,]),'ACCEPTING':([81,88,],[87,-39,]),'LEFT_BRACKET':([7,39,49,60,69,73,77,87,],[20,48,58,70,74,78,83,94,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'function':([0,2,3,5,6,9,],[6,6,6,6,6,6,]),'definition':([0,2,3,5,6,9,],[9,9,9,9,9,9,]),'instantiation':([0,2,3,5,6,9,],[2,2,2,2,2,2,]),'initial':([76,],[81,]),'inputs':([59,],[68,]),'outputs':([72,],[76,]),'strong_non_blocking':([0,2,3,5,6,9,],[3,3,3,3,3,3,]),'optional_output_states':([50,],[59,]),'optional_input_enabled':([68,],[72,]),'edges':([86,93,],[92,98,]),'edge':([86,93,],[93,93,]),'optional_accepting':([81,],[86,]),'automata':([0,2,3,5,6,9,],[4,16,17,18,19,22,]),'optional_input_states':([40,],[50,]),'inner':([15,24,25,26,51,54,55,56,],[29,34,36,38,61,63,64,65,]),'optional_states':([27,],[40,]),'include':([0,2,3,5,6,9,],[5,5,5,5,5,5,]),'names':([20,28,33,35,37,42,44,48,58,70,74,78,83,94,],[31,41,45,46,47,52,53,57,67,75,79,84,89,99,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> automata","S'",1,None,None,None), ('automata -> include automata','automata',2,'p_automata','parser.py',138), ('automata -> function automata','automata',2,'p_automata','parser.py',139), ('automata -> definition automata','automata',2,'p_automata','parser.py',140), ('automata -> instantiation automata','automata',2,'p_automata','parser.py',141), ('automata -> strong_non_blocking automata','automata',2,'p_automata','parser.py',142), ('automata -> include','automata',1,'p_automata','parser.py',143), ('automata -> function','automata',1,'p_automata','parser.py',144), ('automata -> definition','automata',1,'p_automata','parser.py',145), ('automata -> instantiation','automata',1,'p_automata','parser.py',146), ('automata -> strong_non_blocking','automata',1,'p_automata','parser.py',147), ('automata -> error','automata',1,'p_automata','parser.py',148), ('include -> INCLUDE FILE','include',2,'p_include','parser.py',153), ('strong_non_blocking -> STRONG_NON_BLOCKING LEFT_BRACKET names RIGHT_BRACKET','strong_non_blocking',4,'p_strong_non_blocking','parser.py',173), ('definition -> PROCESS NAME inner','definition',3,'p_definition','parser.py',183), ('definition -> ENVIRONMENT NAME inner','definition',3,'p_definition','parser.py',184), ('definition -> LIVENESS NAME inner','definition',3,'p_definition','parser.py',185), ('definition -> SAFETY NAME inner','definition',3,'p_definition','parser.py',186), ('inner -> LEFT_BRACE optional_states optional_input_states optional_output_states inputs optional_input_enabled outputs initial optional_accepting edges RIGHT_BRACE','inner',11,'p_inner','parser.py',247), ('inputs -> INPUTS LEFT_BRACKET names RIGHT_BRACKET','inputs',4,'p_inputs','parser.py',271), ('optional_input_enabled -> INPUT_ENABLED LEFT_BRACKET names RIGHT_BRACKET','optional_input_enabled',4,'p_input_enabled','parser.py',275), ('optional_input_enabled -> <empty>','optional_input_enabled',0,'p_input_enabled_empty','parser.py',279), ('outputs -> OUTPUTS LEFT_BRACKET names RIGHT_BRACKET','outputs',4,'p_outputs','parser.py',283), ('optional_states -> STATES LEFT_BRACKET names RIGHT_BRACKET','optional_states',4,'p_states','parser.py',287), ('optional_states -> <empty>','optional_states',0,'p_states_empty','parser.py',291), ('optional_input_states -> INPUT_STATES LEFT_BRACKET names RIGHT_BRACKET','optional_input_states',4,'p_input_states','parser.py',295), ('optional_input_states -> <empty>','optional_input_states',0,'p_input_states_empty','parser.py',299), ('optional_output_states -> OUTPUT_STATES LEFT_BRACKET names RIGHT_BRACKET','optional_output_states',4,'p_output_states','parser.py',303), ('optional_output_states -> <empty>','optional_output_states',0,'p_output_states_empty','parser.py',307), ('optional_accepting -> ACCEPTING LEFT_BRACKET names RIGHT_BRACKET','optional_accepting',4,'p_accepting','parser.py',311), ('optional_accepting -> <empty>','optional_accepting',0,'p_accepting_empty','parser.py',315), ('instantiation -> NAME EQUALS NAME LEFT_PAREN names RIGHT_PAREN','instantiation',6,'p_instantiation','parser.py',371), ('function -> PROCESS NAME LEFT_PAREN names RIGHT_PAREN inner','function',6,'p_function','parser.py',379), ('function -> ENVIRONMENT NAME LEFT_PAREN names RIGHT_PAREN inner','function',6,'p_function','parser.py',380), ('function -> LIVENESS NAME LEFT_PAREN names RIGHT_PAREN inner','function',6,'p_function','parser.py',381), ('function -> SAFETY NAME LEFT_PAREN names RIGHT_PAREN inner','function',6,'p_function','parser.py',382), ('names -> NAME COMMA names','names',3,'p_names_many','parser.py',387), ('names -> NAME','names',1,'p_names_single','parser.py',391), ('names -> <empty>','names',0,'p_names_single','parser.py',392), ('initial -> NAME NAME','initial',2,'p_initial','parser.py',396), ('edges -> edge edges','edges',2,'p_edges_many','parser.py',402), ('edges -> <empty>','edges',0,'p_edges_empty','parser.py',406), ('edge -> NAME NAME SEND NAME','edge',4,'p_edge','parser.py',410), ('edge -> NAME NAME RECEIVE NAME','edge',4,'p_edge','parser.py',411), ('edge -> NAME NAME SEND NAME STRONG_FAIRNESS','edge',5,'p_edge_with_strong_fairness','parser.py',415), ('edge -> NAME NAME RECEIVE NAME STRONG_FAIRNESS','edge',5,'p_edge_with_strong_fairness','parser.py',416), ]
_tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'ACCEPTING COMMA ENVIRONMENT EQUALS FILE INCLUDE INPUTS INPUT_ENABLED INPUT_STATES LEFT_BRACE LEFT_BRACKET LEFT_PAREN LIVENESS NAME OUTPUTS OUTPUT_STATES PROCESS RECEIVE RIGHT_BRACE RIGHT_BRACKET RIGHT_PAREN SAFETY SEND STATES STRONG_FAIRNESS STRONG_NON_BLOCKINGautomata : include automata\n | function automata\n | definition automata\n | instantiation automata\n | strong_non_blocking automata\n | include\n | function\n | definition\n | instantiation\n | strong_non_blocking\n | errorinclude : INCLUDE FILEstrong_non_blocking : STRONG_NON_BLOCKING LEFT_BRACKET names RIGHT_BRACKETdefinition : PROCESS NAME inner\n | ENVIRONMENT NAME inner\n | LIVENESS NAME inner\n | SAFETY NAME innerinner : LEFT_BRACE optional_states optional_input_states optional_output_states inputs optional_input_enabled outputs initial optional_accepting edges RIGHT_BRACE\n inputs : INPUTS LEFT_BRACKET names RIGHT_BRACKEToptional_input_enabled : INPUT_ENABLED LEFT_BRACKET names RIGHT_BRACKEToptional_input_enabled : outputs : OUTPUTS LEFT_BRACKET names RIGHT_BRACKEToptional_states : STATES LEFT_BRACKET names RIGHT_BRACKEToptional_states : optional_input_states : INPUT_STATES LEFT_BRACKET names RIGHT_BRACKEToptional_input_states : optional_output_states : OUTPUT_STATES LEFT_BRACKET names RIGHT_BRACKEToptional_output_states : optional_accepting : ACCEPTING LEFT_BRACKET names RIGHT_BRACKEToptional_accepting : instantiation : NAME EQUALS NAME LEFT_PAREN names RIGHT_PARENfunction : PROCESS NAME LEFT_PAREN names RIGHT_PAREN inner\n | ENVIRONMENT NAME LEFT_PAREN names RIGHT_PAREN inner\n | LIVENESS NAME LEFT_PAREN names RIGHT_PAREN inner\n | SAFETY NAME LEFT_PAREN names RIGHT_PAREN inner\n names : NAME COMMA namesnames : NAME\n |initial : NAME NAMEedges : edge edgesedges : edge : NAME NAME SEND NAME\n | NAME NAME RECEIVE NAMEedge : NAME NAME SEND NAME STRONG_FAIRNESS\n | NAME NAME RECEIVE NAME STRONG_FAIRNESS' _lr_action_items = {'STRONG_FAIRNESS': ([103, 104], [105, 106]), 'INPUT_STATES': ([27, 40, 66], [-24, 49, -23]), 'RIGHT_BRACKET': ([20, 30, 31, 42, 48, 52, 57, 58, 67, 70, 74, 75, 78, 79, 83, 84, 89, 94, 99], [-38, -37, 43, -38, -38, -36, 66, -38, 71, -38, -38, 80, -38, 85, -38, 90, 95, -38, 102]), 'STATES': ([27], [39]), 'LEFT_BRACE': ([15, 24, 25, 26, 51, 54, 55, 56], [27, 27, 27, 27, 27, 27, 27, 27]), 'FILE': ([8], [21]), 'RIGHT_PAREN': ([28, 30, 33, 35, 37, 41, 42, 44, 45, 46, 47, 52, 53], [-38, -37, -38, -38, -38, 51, -38, -38, 54, 55, 56, -36, 62]), 'LEFT_PAREN': ([15, 24, 25, 26, 32], [28, 33, 35, 37, 44]), 'INPUT_ENABLED': ([68, 85], [73, -19]), 'COMMA': ([30], [42]), '$end': ([2, 3, 4, 5, 6, 9, 14, 16, 17, 18, 19, 21, 22, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [-9, -10, 0, -6, -7, -8, -11, -4, -5, -1, -2, -12, -3, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'INPUTS': ([27, 40, 50, 59, 66, 71, 80], [-24, -26, -28, 69, -23, -25, -27]), 'RECEIVE': ([96], [100]), 'STRONG_NON_BLOCKING': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [7, 7, 7, 7, 7, 7, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'EQUALS': ([10], [23]), 'RIGHT_BRACE': ([81, 86, 88, 92, 93, 98, 102, 103, 104, 105, 106], [-30, -41, -39, 97, -41, -40, -29, -43, -42, -45, -44]), 'OUTPUT_STATES': ([27, 40, 50, 66, 71], [-24, -26, 60, -23, -25]), 'INCLUDE': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [8, 8, 8, 8, 8, 8, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'ENVIRONMENT': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [1, 1, 1, 1, 1, 1, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'NAME': ([0, 1, 2, 3, 5, 6, 9, 11, 12, 13, 20, 21, 23, 28, 29, 33, 34, 35, 36, 37, 38, 42, 43, 44, 48, 58, 61, 62, 63, 64, 65, 70, 74, 76, 78, 81, 82, 83, 86, 88, 91, 93, 94, 95, 97, 100, 101, 102, 103, 104, 105, 106], [10, 15, 10, 10, 10, 10, 10, 24, 25, 26, 30, -12, 32, 30, -15, 30, -14, 30, -16, 30, -17, 30, -13, 30, 30, 30, -33, -31, -32, -34, -35, 30, 30, 82, 30, -30, 88, 30, 91, -39, 96, 91, 30, -22, -18, 103, 104, -29, -43, -42, -45, -44]), 'PROCESS': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [11, 11, 11, 11, 11, 11, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'OUTPUTS': ([68, 72, 85, 90], [-21, 77, -19, -20]), 'LIVENESS': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [12, 12, 12, 12, 12, 12, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'SEND': ([96], [101]), 'SAFETY': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [13, 13, 13, 13, 13, 13, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'error': ([0, 2, 3, 5, 6, 9, 21, 29, 34, 36, 38, 43, 61, 62, 63, 64, 65, 97], [14, 14, 14, 14, 14, 14, -12, -15, -14, -16, -17, -13, -33, -31, -32, -34, -35, -18]), 'ACCEPTING': ([81, 88], [87, -39]), 'LEFT_BRACKET': ([7, 39, 49, 60, 69, 73, 77, 87], [20, 48, 58, 70, 74, 78, 83, 94])} _lr_action = {} for (_k, _v) in _lr_action_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'function': ([0, 2, 3, 5, 6, 9], [6, 6, 6, 6, 6, 6]), 'definition': ([0, 2, 3, 5, 6, 9], [9, 9, 9, 9, 9, 9]), 'instantiation': ([0, 2, 3, 5, 6, 9], [2, 2, 2, 2, 2, 2]), 'initial': ([76], [81]), 'inputs': ([59], [68]), 'outputs': ([72], [76]), 'strong_non_blocking': ([0, 2, 3, 5, 6, 9], [3, 3, 3, 3, 3, 3]), 'optional_output_states': ([50], [59]), 'optional_input_enabled': ([68], [72]), 'edges': ([86, 93], [92, 98]), 'edge': ([86, 93], [93, 93]), 'optional_accepting': ([81], [86]), 'automata': ([0, 2, 3, 5, 6, 9], [4, 16, 17, 18, 19, 22]), 'optional_input_states': ([40], [50]), 'inner': ([15, 24, 25, 26, 51, 54, 55, 56], [29, 34, 36, 38, 61, 63, 64, 65]), 'optional_states': ([27], [40]), 'include': ([0, 2, 3, 5, 6, 9], [5, 5, 5, 5, 5, 5]), 'names': ([20, 28, 33, 35, 37, 42, 44, 48, 58, 70, 74, 78, 83, 94], [31, 41, 45, 46, 47, 52, 53, 57, 67, 75, 79, 84, 89, 99])} _lr_goto = {} for (_k, _v) in _lr_goto_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [("S' -> automata", "S'", 1, None, None, None), ('automata -> include automata', 'automata', 2, 'p_automata', 'parser.py', 138), ('automata -> function automata', 'automata', 2, 'p_automata', 'parser.py', 139), ('automata -> definition automata', 'automata', 2, 'p_automata', 'parser.py', 140), ('automata -> instantiation automata', 'automata', 2, 'p_automata', 'parser.py', 141), ('automata -> strong_non_blocking automata', 'automata', 2, 'p_automata', 'parser.py', 142), ('automata -> include', 'automata', 1, 'p_automata', 'parser.py', 143), ('automata -> function', 'automata', 1, 'p_automata', 'parser.py', 144), ('automata -> definition', 'automata', 1, 'p_automata', 'parser.py', 145), ('automata -> instantiation', 'automata', 1, 'p_automata', 'parser.py', 146), ('automata -> strong_non_blocking', 'automata', 1, 'p_automata', 'parser.py', 147), ('automata -> error', 'automata', 1, 'p_automata', 'parser.py', 148), ('include -> INCLUDE FILE', 'include', 2, 'p_include', 'parser.py', 153), ('strong_non_blocking -> STRONG_NON_BLOCKING LEFT_BRACKET names RIGHT_BRACKET', 'strong_non_blocking', 4, 'p_strong_non_blocking', 'parser.py', 173), ('definition -> PROCESS NAME inner', 'definition', 3, 'p_definition', 'parser.py', 183), ('definition -> ENVIRONMENT NAME inner', 'definition', 3, 'p_definition', 'parser.py', 184), ('definition -> LIVENESS NAME inner', 'definition', 3, 'p_definition', 'parser.py', 185), ('definition -> SAFETY NAME inner', 'definition', 3, 'p_definition', 'parser.py', 186), ('inner -> LEFT_BRACE optional_states optional_input_states optional_output_states inputs optional_input_enabled outputs initial optional_accepting edges RIGHT_BRACE', 'inner', 11, 'p_inner', 'parser.py', 247), ('inputs -> INPUTS LEFT_BRACKET names RIGHT_BRACKET', 'inputs', 4, 'p_inputs', 'parser.py', 271), ('optional_input_enabled -> INPUT_ENABLED LEFT_BRACKET names RIGHT_BRACKET', 'optional_input_enabled', 4, 'p_input_enabled', 'parser.py', 275), ('optional_input_enabled -> <empty>', 'optional_input_enabled', 0, 'p_input_enabled_empty', 'parser.py', 279), ('outputs -> OUTPUTS LEFT_BRACKET names RIGHT_BRACKET', 'outputs', 4, 'p_outputs', 'parser.py', 283), ('optional_states -> STATES LEFT_BRACKET names RIGHT_BRACKET', 'optional_states', 4, 'p_states', 'parser.py', 287), ('optional_states -> <empty>', 'optional_states', 0, 'p_states_empty', 'parser.py', 291), ('optional_input_states -> INPUT_STATES LEFT_BRACKET names RIGHT_BRACKET', 'optional_input_states', 4, 'p_input_states', 'parser.py', 295), ('optional_input_states -> <empty>', 'optional_input_states', 0, 'p_input_states_empty', 'parser.py', 299), ('optional_output_states -> OUTPUT_STATES LEFT_BRACKET names RIGHT_BRACKET', 'optional_output_states', 4, 'p_output_states', 'parser.py', 303), ('optional_output_states -> <empty>', 'optional_output_states', 0, 'p_output_states_empty', 'parser.py', 307), ('optional_accepting -> ACCEPTING LEFT_BRACKET names RIGHT_BRACKET', 'optional_accepting', 4, 'p_accepting', 'parser.py', 311), ('optional_accepting -> <empty>', 'optional_accepting', 0, 'p_accepting_empty', 'parser.py', 315), ('instantiation -> NAME EQUALS NAME LEFT_PAREN names RIGHT_PAREN', 'instantiation', 6, 'p_instantiation', 'parser.py', 371), ('function -> PROCESS NAME LEFT_PAREN names RIGHT_PAREN inner', 'function', 6, 'p_function', 'parser.py', 379), ('function -> ENVIRONMENT NAME LEFT_PAREN names RIGHT_PAREN inner', 'function', 6, 'p_function', 'parser.py', 380), ('function -> LIVENESS NAME LEFT_PAREN names RIGHT_PAREN inner', 'function', 6, 'p_function', 'parser.py', 381), ('function -> SAFETY NAME LEFT_PAREN names RIGHT_PAREN inner', 'function', 6, 'p_function', 'parser.py', 382), ('names -> NAME COMMA names', 'names', 3, 'p_names_many', 'parser.py', 387), ('names -> NAME', 'names', 1, 'p_names_single', 'parser.py', 391), ('names -> <empty>', 'names', 0, 'p_names_single', 'parser.py', 392), ('initial -> NAME NAME', 'initial', 2, 'p_initial', 'parser.py', 396), ('edges -> edge edges', 'edges', 2, 'p_edges_many', 'parser.py', 402), ('edges -> <empty>', 'edges', 0, 'p_edges_empty', 'parser.py', 406), ('edge -> NAME NAME SEND NAME', 'edge', 4, 'p_edge', 'parser.py', 410), ('edge -> NAME NAME RECEIVE NAME', 'edge', 4, 'p_edge', 'parser.py', 411), ('edge -> NAME NAME SEND NAME STRONG_FAIRNESS', 'edge', 5, 'p_edge_with_strong_fairness', 'parser.py', 415), ('edge -> NAME NAME RECEIVE NAME STRONG_FAIRNESS', 'edge', 5, 'p_edge_with_strong_fairness', 'parser.py', 416)]
#1. get input #2. store each character into an array #3. convert to ascii #4. change even to odd and odd to even #5. convert from ascii to char #6. convert array to string #7. print string #1 """ print("#1") text = input("Enter text for encryption or decryption") #2 print("#2") letters = [] character = text.split() for character in text: print(character) letters.append(character) #3 print("#3") i=0 while(i<len(letters)): letters[i] = ord(letters[i]) print(letters[i]) i += 1 #4 print("#4") i=0 while(i<len(letters)): check = letters[i] % 2 if(check == 0): letters[i] -= 1 else: letters[i] += 1 i += 1 #5 print("#5") i=0 while(i<len(letters)): print(letters[i]) letters[i] = chr(letters[i]) print(letters[i]) i += 1 #6 print("#6") word = "" i=0 while(i<len(letters)): word = word + letters[i] i += 1 print(word) """ def get_input(text): letters = [] character = text.split() for character in text: print(character) letters.append(character) return letters def to_ascii(letters): i = 0 while (i < len(letters)): letters[i] = ord(letters[i]) print(letters[i]) i += 1 return letters def encrypt(letters): i = 0 while (i < len(letters)): check = letters[i] % 2 if (check == 0): letters[i] -= 1 else: letters[i] += 1 i += 1 return letters def to_char(letters): i = 0 while (i < len(letters)): print(letters[i]) letters[i] = chr(letters[i]) print(letters[i]) i += 1 return letters def concatinate(letters): word = "" i = 0 while (i < len(letters)): word = word + letters[i] i += 1 return word def encrypt_input(input): letters = [] letters = get_input(input) letters = to_ascii(letters) letters = encrypt(letters) letters = to_char(letters) text = concatinate(letters) return text
""" print("#1") text = input("Enter text for encryption or decryption") #2 print("#2") letters = [] character = text.split() for character in text: print(character) letters.append(character) #3 print("#3") i=0 while(i<len(letters)): letters[i] = ord(letters[i]) print(letters[i]) i += 1 #4 print("#4") i=0 while(i<len(letters)): check = letters[i] % 2 if(check == 0): letters[i] -= 1 else: letters[i] += 1 i += 1 #5 print("#5") i=0 while(i<len(letters)): print(letters[i]) letters[i] = chr(letters[i]) print(letters[i]) i += 1 #6 print("#6") word = "" i=0 while(i<len(letters)): word = word + letters[i] i += 1 print(word) """ def get_input(text): letters = [] character = text.split() for character in text: print(character) letters.append(character) return letters def to_ascii(letters): i = 0 while i < len(letters): letters[i] = ord(letters[i]) print(letters[i]) i += 1 return letters def encrypt(letters): i = 0 while i < len(letters): check = letters[i] % 2 if check == 0: letters[i] -= 1 else: letters[i] += 1 i += 1 return letters def to_char(letters): i = 0 while i < len(letters): print(letters[i]) letters[i] = chr(letters[i]) print(letters[i]) i += 1 return letters def concatinate(letters): word = '' i = 0 while i < len(letters): word = word + letters[i] i += 1 return word def encrypt_input(input): letters = [] letters = get_input(input) letters = to_ascii(letters) letters = encrypt(letters) letters = to_char(letters) text = concatinate(letters) return text
# Class Hero, containig all the # current information about the hero class Hero: """Hero""" def __init__(self, health=100, magic=0): self.health = health self.magic = magic self.x = None self.y = None def printH(self): print('Health: {0}, Magic: {1}, X: {2}, Y: {3}'. format(self.health, self.magic, self.x, self.y)) def setHealth(self, num): if num >= 0: self.health = num else: self.health = 0
class Hero: """Hero""" def __init__(self, health=100, magic=0): self.health = health self.magic = magic self.x = None self.y = None def print_h(self): print('Health: {0}, Magic: {1}, X: {2}, Y: {3}'.format(self.health, self.magic, self.x, self.y)) def set_health(self, num): if num >= 0: self.health = num else: self.health = 0
class Heap: def __init__(self,maxSize): self.heapList = (maxSize+1)*[None] self.heapSize = 0 self.maxSize = maxSize def __str__(self): return str(self.heapList) def size(self,root): return root.heapSize def peek(self,root): if root.heapList[1] == None: return None else: return root.heapList[1] def levelOrderTraversal(self,root): if root.heapSize == 0: return else: for i in range(1,root.heapSize+1): print(root.heapList[i]) def heapifyTreeInsert(self,root,index,heapType): parentIndex = index//2 if index <= 1: return if heapType == "Min": if root.heapList[index] < root.heapList[parentIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[parentIndex] root.heapList[parentIndex] = temp self.heapifyTreeInsert(root,parentIndex,heapType) elif heapType == "Max": if root.heapList[index] > root.heapList[parentIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[parentIndex] root.heapList[parentIndex] = temp self.heapifyTreeInsert(root,parentIndex,heapType) def insert(self,root,value,heapType): if root.heapSize == root.maxSize+1: return 'Binary Heap is full' root.heapList[root.heapSize+1] = value root.heapSize += 1 self.heapifyTreeInsert(root,root.heapSize,heapType) return 'Inserted successfully' def heapifyTreeExtract(self,root,index,heapType): leftIndex = index * 2 rightIndex = index * 2 + 1 swapChild = 0 if leftIndex > root.heapSize: return elif root.heapSize == leftIndex: if heapType == "Min": if root.heapList[index] > root.heapList[leftIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[leftIndex] root.heapList[leftIndex] = temp return elif heapType == "Max": if root.heapList[index] < root.heapList[leftIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp return else: if heapType == "Min": if root.heapList[leftIndex] < root.heapList[rightIndex]: swapChild = leftIndex else: swapChild = rightIndex if root.heapList[index] > root.heapList[swapChild]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp else: if root.heapList[leftIndex] > root.heapList[rightIndex]: swapChild = leftIndex else: swapChild = rightIndex if root.heapList[index] < root.heapList[swapChild]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp self.heapifyTreeExtract(root,swapChild,heapType) def extract(self,root,heapType): if root.heapSize == 0: return else: extractedNode = root.heapList[1] root.heapList[1] = root.heapList[root.heapSize] root.heapList[root.heapSize] = None root.heapSize -= 1 self.heapifyTreeExtract(root,1,heapType) return extractedNode def clear(self,root): root.binaryList.clear() root.heapSize = 0
class Heap: def __init__(self, maxSize): self.heapList = (maxSize + 1) * [None] self.heapSize = 0 self.maxSize = maxSize def __str__(self): return str(self.heapList) def size(self, root): return root.heapSize def peek(self, root): if root.heapList[1] == None: return None else: return root.heapList[1] def level_order_traversal(self, root): if root.heapSize == 0: return else: for i in range(1, root.heapSize + 1): print(root.heapList[i]) def heapify_tree_insert(self, root, index, heapType): parent_index = index // 2 if index <= 1: return if heapType == 'Min': if root.heapList[index] < root.heapList[parentIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[parentIndex] root.heapList[parentIndex] = temp self.heapifyTreeInsert(root, parentIndex, heapType) elif heapType == 'Max': if root.heapList[index] > root.heapList[parentIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[parentIndex] root.heapList[parentIndex] = temp self.heapifyTreeInsert(root, parentIndex, heapType) def insert(self, root, value, heapType): if root.heapSize == root.maxSize + 1: return 'Binary Heap is full' root.heapList[root.heapSize + 1] = value root.heapSize += 1 self.heapifyTreeInsert(root, root.heapSize, heapType) return 'Inserted successfully' def heapify_tree_extract(self, root, index, heapType): left_index = index * 2 right_index = index * 2 + 1 swap_child = 0 if leftIndex > root.heapSize: return elif root.heapSize == leftIndex: if heapType == 'Min': if root.heapList[index] > root.heapList[leftIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[leftIndex] root.heapList[leftIndex] = temp return elif heapType == 'Max': if root.heapList[index] < root.heapList[leftIndex]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp return else: if heapType == 'Min': if root.heapList[leftIndex] < root.heapList[rightIndex]: swap_child = leftIndex else: swap_child = rightIndex if root.heapList[index] > root.heapList[swapChild]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp else: if root.heapList[leftIndex] > root.heapList[rightIndex]: swap_child = leftIndex else: swap_child = rightIndex if root.heapList[index] < root.heapList[swapChild]: temp = root.heapList[index] root.heapList[index] = root.heapList[swapChild] root.heapList[swapChild] = temp self.heapifyTreeExtract(root, swapChild, heapType) def extract(self, root, heapType): if root.heapSize == 0: return else: extracted_node = root.heapList[1] root.heapList[1] = root.heapList[root.heapSize] root.heapList[root.heapSize] = None root.heapSize -= 1 self.heapifyTreeExtract(root, 1, heapType) return extractedNode def clear(self, root): root.binaryList.clear() root.heapSize = 0
class Lock: def __init__(self): self.locked = False def lock(self, msg): assert not self.locked, msg self.locked = True def unlock(self): self.locked = False
class Lock: def __init__(self): self.locked = False def lock(self, msg): assert not self.locked, msg self.locked = True def unlock(self): self.locked = False
# Author: Luka Maletin class GraphError(Exception): pass class Graph(object): class Vertex(object): def __init__(self, x): self._element = x def element(self): return self._element def __hash__(self): return hash(id(self)) class Edge(object): def __init__(self, u, v): self._source = u self._destination = v def source(self): return self._source def destination(self): return self._destination def __hash__(self): return hash((self._source, self._destination)) def __init__(self): # (K, V) = (Vertex, destinations (dictionary)): self._outgoing = {} # top-level dictionary # (K, V) = (Vertex, sources (dictionary)): self._incoming = {} # top-level dictionary # (K, V) = (link, Vertex) self._vertices = {} def insert_vertex(self, x=None): if x not in self._vertices: v = self.Vertex(x) # (K, V) = (Vertex, Edge): self._outgoing[v] = {} # (K, V) = (Vertex, Edge): self._incoming[v] = {} self._vertices[x] = v return v else: return self._vertices[x] def insert_edge(self, u, v): if self.get_edge(u, v) is not None: raise GraphError('Vertices are already connected.') e = self.Edge(u, v) self._outgoing[u][v] = e self._incoming[v][u] = e def get_edge(self, u, v): return self._outgoing[u].get(v) def get_vertex(self, x): return self._vertices[x] def incoming_degree(self, v): return len(self._incoming[v]) def incoming_edges(self, v): result = [] for edge in self._incoming[v].values(): result.append(edge) return result
class Grapherror(Exception): pass class Graph(object): class Vertex(object): def __init__(self, x): self._element = x def element(self): return self._element def __hash__(self): return hash(id(self)) class Edge(object): def __init__(self, u, v): self._source = u self._destination = v def source(self): return self._source def destination(self): return self._destination def __hash__(self): return hash((self._source, self._destination)) def __init__(self): self._outgoing = {} self._incoming = {} self._vertices = {} def insert_vertex(self, x=None): if x not in self._vertices: v = self.Vertex(x) self._outgoing[v] = {} self._incoming[v] = {} self._vertices[x] = v return v else: return self._vertices[x] def insert_edge(self, u, v): if self.get_edge(u, v) is not None: raise graph_error('Vertices are already connected.') e = self.Edge(u, v) self._outgoing[u][v] = e self._incoming[v][u] = e def get_edge(self, u, v): return self._outgoing[u].get(v) def get_vertex(self, x): return self._vertices[x] def incoming_degree(self, v): return len(self._incoming[v]) def incoming_edges(self, v): result = [] for edge in self._incoming[v].values(): result.append(edge) return result
def add(*lists_of_numbers): lengths = set(tuple(tuple(len(sublist) for sublist in outer_list) for outer_list in lists_of_numbers)) if len(lengths) != 1: raise ValueError return [[sum(p) for p in zip(*sublists)] for sublists in zip(*lists_of_numbers)]
def add(*lists_of_numbers): lengths = set(tuple((tuple((len(sublist) for sublist in outer_list)) for outer_list in lists_of_numbers))) if len(lengths) != 1: raise ValueError return [[sum(p) for p in zip(*sublists)] for sublists in zip(*lists_of_numbers)]
# 8zxx xxxx - Mobile, Data Services, New Numbers and Prepaid Numbers # 9yxx xxxx - Mobile, Data Services and Pager (until May 2012) # x denotes 0 to 9 # y denotes 0 to 8 only # z denotes 1 to 8 only min8range = 81000000 max8range = 88000000 min9range = 90000000 max9range = 98000000 eight = [] for i in range(min8range, max8range): eight.append(i) print("appended") nine = [] for i in range(min9range, max9range): nine.append(i) print("appended") def printnumbers(): return nine return eight printnumbers()
min8range = 81000000 max8range = 88000000 min9range = 90000000 max9range = 98000000 eight = [] for i in range(min8range, max8range): eight.append(i) print('appended') nine = [] for i in range(min9range, max9range): nine.append(i) print('appended') def printnumbers(): return nine return eight printnumbers()
""" A file containing validator functions to make sure the input from SQS Message is correct. Every function follows the logic of checking the values and returning True or False depending on whether or not they are correct. """ supported_input_formats = [ "WAV", "FLAC", "MP3", "AIFF", "AAC", "OGG", "OPUS", "WMA", "FLV", "OGV", "AC3" ] supported_output_formats = [ "WAV", "FLAC", "MP3", "AIFF" ] def validate_message(data): try: validations = [ validate_message_keys(data), validate_input_keys(data["input"]), validate_output_keys(data["outputs"]) ] except KeyError: return False return False not in validations def validate_message_keys(body): return list(body.keys()) == ["id", "input", "outputs"] def validate_input_keys(input): return list(input.keys()) == ["key", "bucket"] def validate_output_keys(outputs): validations = [] for output in outputs: validations.append(list(output.keys()) == ["key", "format", "bucket"]) return False not in validations def check_error_list(errors): return len(errors) > 0 def validate_input_format(format): return format.upper() in supported_input_formats def validate_output_formats(format): return format.upper() in supported_output_formats
""" A file containing validator functions to make sure the input from SQS Message is correct. Every function follows the logic of checking the values and returning True or False depending on whether or not they are correct. """ supported_input_formats = ['WAV', 'FLAC', 'MP3', 'AIFF', 'AAC', 'OGG', 'OPUS', 'WMA', 'FLV', 'OGV', 'AC3'] supported_output_formats = ['WAV', 'FLAC', 'MP3', 'AIFF'] def validate_message(data): try: validations = [validate_message_keys(data), validate_input_keys(data['input']), validate_output_keys(data['outputs'])] except KeyError: return False return False not in validations def validate_message_keys(body): return list(body.keys()) == ['id', 'input', 'outputs'] def validate_input_keys(input): return list(input.keys()) == ['key', 'bucket'] def validate_output_keys(outputs): validations = [] for output in outputs: validations.append(list(output.keys()) == ['key', 'format', 'bucket']) return False not in validations def check_error_list(errors): return len(errors) > 0 def validate_input_format(format): return format.upper() in supported_input_formats def validate_output_formats(format): return format.upper() in supported_output_formats
if True: print("It's IF!!!") while True: print("It's WHILE!!!")
if True: print("It's IF!!!") while True: print("It's WHILE!!!")
POSTS = [ [ 'Microsoft Is Hiring!', 'We are looking for a delivry driver to work at our Haifa office', 'Bill Gates', True, 'Delivery driver', ], [ 'Apple Is Hiring!', 'We are looking for a web developer to work at our Tel Aviv office', 'Tim Cook', True, 'Web developer', ], [ 'Microsoft Is Hiring!', 'We are looking for a graphic designer to work at our Herzliya offices', 'Bill Gates', True, 'Graphic Designer', ], [ 'Apple Is Hiring!', 'We are looking for a database administrator to work at our Tel Aviv office', 'Tim Cook', True, 'Database Administrator', ], [ 'Microsoft Is Hiring!', 'We are looking for an accountant to work at our Tel Aviv office', 'Bill Gates', True, 'Accountant', ], [ 'Apple Is Hiring!', 'We are looking for a talented human resources specialist to work at our Tel Aviv office', 'Tim Cook', True, 'Human resources', ], [ 'Im a Job Seeker!', 'Looking for a delivery driver opportunity', 'John Doe', False, None, ], [ 'Im Job Seeking!', 'Looking for a django web developing opportunity', 'Jane Doe', False, None, ], [ 'Im a Job Seeker!', 'Looking for a secretary full time position', 'Jane Doe', False, None, ], [ 'I am looking for a job!', 'Looking for an electrician position', 'John Doe', False, None, ], [ 'Please help me find a job', 'Looking for a Graphic Designer opportunity', 'Jane Doe', False, None, ], [ 'Im Job Seeking!', 'Looking for a librarian opportunity', 'John Doe', False, None, ], ]
posts = [['Microsoft Is Hiring!', 'We are looking for a delivry driver to work at our Haifa office', 'Bill Gates', True, 'Delivery driver'], ['Apple Is Hiring!', 'We are looking for a web developer to work at our Tel Aviv office', 'Tim Cook', True, 'Web developer'], ['Microsoft Is Hiring!', 'We are looking for a graphic designer to work at our Herzliya offices', 'Bill Gates', True, 'Graphic Designer'], ['Apple Is Hiring!', 'We are looking for a database administrator to work at our Tel Aviv office', 'Tim Cook', True, 'Database Administrator'], ['Microsoft Is Hiring!', 'We are looking for an accountant to work at our Tel Aviv office', 'Bill Gates', True, 'Accountant'], ['Apple Is Hiring!', 'We are looking for a talented human resources specialist to work at our Tel Aviv office', 'Tim Cook', True, 'Human resources'], ['Im a Job Seeker!', 'Looking for a delivery driver opportunity', 'John Doe', False, None], ['Im Job Seeking!', 'Looking for a django web developing opportunity', 'Jane Doe', False, None], ['Im a Job Seeker!', 'Looking for a secretary full time position', 'Jane Doe', False, None], ['I am looking for a job!', 'Looking for an electrician position', 'John Doe', False, None], ['Please help me find a job', 'Looking for a Graphic Designer opportunity', 'Jane Doe', False, None], ['Im Job Seeking!', 'Looking for a librarian opportunity', 'John Doe', False, None]]
class TextureNodeTexBlend: pass
class Texturenodetexblend: pass
num1=10 num2=20 num3=30 num4=40
num1 = 10 num2 = 20 num3 = 30 num4 = 40
# lc643.py # LeetCode 643. Maximum Average Subarray I `E` # 1sk | 98% | 9' # A~0g17 class Solution: def findMaxAverage(self, nums: List[int], k: int) -> float: maxsum = cursum = sum(nums[0:k]) for i in range(len(nums)-k): cursum += nums[i+k] - nums[i] maxsum = max(cursum, maxsum) return maxsum / k
class Solution: def find_max_average(self, nums: List[int], k: int) -> float: maxsum = cursum = sum(nums[0:k]) for i in range(len(nums) - k): cursum += nums[i + k] - nums[i] maxsum = max(cursum, maxsum) return maxsum / k