content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
# Copyright (c) 2021 Hashz Software.
class ArgNotFound:
def __init__(self, arg):
print("ArgNotFound: %s" % arg) | class Argnotfound:
def __init__(self, arg):
print('ArgNotFound: %s' % arg) |
"""
213. House Robber II
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given a list of non-negative integers representing the amount of money of each house, determine the maximum amount of money you can rob tonight without alerting the police.
Example 1:
Input: [2,3,2]
Output: 3
Explanation: You cannot rob house 1 (money = 2) and then rob house 3 (money = 2),
because they are adjacent houses.
Example 2:
Input: [1,2,3,1]
Output: 4
Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).
Total amount you can rob = 1 + 3 = 4.
"""
# Runtime: 20 ms, faster than 99.21% of Python3 online submissions for House Robber II.
# Memory Usage: 12.6 MB, less than 100.00% of Python3 online submissions for House Robber II.
class Solution:
def rob(self, nums: List[int]) -> int:
n = len(nums)
if n == 0:
return 0
if n <= 3:
return max(nums)
return max(self.helper(nums[1:]), self.helper(nums[:-1]))
def helper(self, arr):
n = len(arr)
if n <= 2:
return 0
dp = [0 for _ in range(n)]
dp[0] = arr[0]
dp[1] = arr[1]
dp[2] = arr[2] + arr[0]
for i in range(3, n):
dp[i] = max(dp[i-2], dp[i-3]) + arr[i]
return max(dp[-1], dp[-2])
| """
213. House Robber II
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given a list of non-negative integers representing the amount of money of each house, determine the maximum amount of money you can rob tonight without alerting the police.
Example 1:
Input: [2,3,2]
Output: 3
Explanation: You cannot rob house 1 (money = 2) and then rob house 3 (money = 2),
because they are adjacent houses.
Example 2:
Input: [1,2,3,1]
Output: 4
Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).
Total amount you can rob = 1 + 3 = 4.
"""
class Solution:
def rob(self, nums: List[int]) -> int:
n = len(nums)
if n == 0:
return 0
if n <= 3:
return max(nums)
return max(self.helper(nums[1:]), self.helper(nums[:-1]))
def helper(self, arr):
n = len(arr)
if n <= 2:
return 0
dp = [0 for _ in range(n)]
dp[0] = arr[0]
dp[1] = arr[1]
dp[2] = arr[2] + arr[0]
for i in range(3, n):
dp[i] = max(dp[i - 2], dp[i - 3]) + arr[i]
return max(dp[-1], dp[-2]) |
#These information comes from Twitter API
#Create a Twitter Account and Get These Information from apps.twitter.com
consumer_key = 'R1feyoEHAw2Lg32k4OKyyn01v'
consumer_secret = 'KdxSi79P7PAjhmY4OYU2VfeKUcaUt4WmyJMb7Oew0nE1M7Ji5h'
access_token = '145566333-KIndElco5MlHXPIGWeGkvjVXlMchLyQI2bMD8BJT'
access_secret = 'iqfFlcM4clh6wCwDSLZaQqJttgstiIybUDOoB3uyzaZx8'
| consumer_key = 'R1feyoEHAw2Lg32k4OKyyn01v'
consumer_secret = 'KdxSi79P7PAjhmY4OYU2VfeKUcaUt4WmyJMb7Oew0nE1M7Ji5h'
access_token = '145566333-KIndElco5MlHXPIGWeGkvjVXlMchLyQI2bMD8BJT'
access_secret = 'iqfFlcM4clh6wCwDSLZaQqJttgstiIybUDOoB3uyzaZx8' |
class lightswitch:
is_on = False
def Flip(self):
#self refers to the instance of the object. needs to be included only when using class, to ensure that it is defined only within the class
self.is_on = not self.is_on #field/attribute
print(self.is_on)
def FlipMany(self, number:int):
for i in range(number):
self.Flip()
living_room_light = lightswitch() #object
bedroom_light = lightswitch()
print('living_room_light:')
living_room_light.FlipMany(13)
print('bedroom_light:')
bedroom_light.FlipMany(4)
print(type(bedroom_light)) #built type
print(dir(bedroom_light)) #print all the methods within the class, including the ones u have created
| class Lightswitch:
is_on = False
def flip(self):
self.is_on = not self.is_on
print(self.is_on)
def flip_many(self, number: int):
for i in range(number):
self.Flip()
living_room_light = lightswitch()
bedroom_light = lightswitch()
print('living_room_light:')
living_room_light.FlipMany(13)
print('bedroom_light:')
bedroom_light.FlipMany(4)
print(type(bedroom_light))
print(dir(bedroom_light)) |
if __name__ == "__main__":
TC = int(input())
for t in range(0,TC):
N = int(input())
max_score = -1
tie = False
win = 0
for n in range(0,N):
T = [0] * 6
C = list(map(int, input().split()))
for c in range(1,len(C)):
T[C[c]-1]+=1
T.sort()
score = C[0]
score += T[0]*4
T[1] -= T[0];
T[2] -= T[0];
score += T[1]*2
T[2] -= T[1];
score += T[2];
#print(T)
#print(score)
if score > max_score:
tie = False
max_score = score
win = n
elif score == max_score:
tie = True
max_score = score
win = n
if tie:
print("tie")
elif win == 0:
print("chef")
else:
print(win+1)
| if __name__ == '__main__':
tc = int(input())
for t in range(0, TC):
n = int(input())
max_score = -1
tie = False
win = 0
for n in range(0, N):
t = [0] * 6
c = list(map(int, input().split()))
for c in range(1, len(C)):
T[C[c] - 1] += 1
T.sort()
score = C[0]
score += T[0] * 4
T[1] -= T[0]
T[2] -= T[0]
score += T[1] * 2
T[2] -= T[1]
score += T[2]
if score > max_score:
tie = False
max_score = score
win = n
elif score == max_score:
tie = True
max_score = score
win = n
if tie:
print('tie')
elif win == 0:
print('chef')
else:
print(win + 1) |
def value_at(poly_spec, x):
num=1
total=0
for i,j in enumerate(poly_spec[::-1]):
total+=j*num
num=(num*(x-i))/(i+1)
return round(total, 2) | def value_at(poly_spec, x):
num = 1
total = 0
for (i, j) in enumerate(poly_spec[::-1]):
total += j * num
num = num * (x - i) / (i + 1)
return round(total, 2) |
class BaseGenerator:
"""Base class for generators.
Generators should provide of synthesis measurements for a location. For performance reasons
generation of data should be initialized by the :meth:`uwb.generator.BaseGenerator.gen`. and
:meth:`uwb.generator.BaseGenerator.get_closest_position` should provide the indices for the
given coordinates.
"""
def __init__(self):
pass
def gen(self):
"""Initializes the generation process."""
pass
def __iter__(self):
"""Iterator implementation for generator.
Returns the data per measurement location. General layout should be
(np.array, index, position), where the position should match the shape of the underlying
structure.
"""
pass
def get_closest_position(self, coordinates):
"""Finds indices in the map for the given coordinates.
Method provides indices in the map for the underlying geometry of the location.
Attributes:
coordinates: coordinates to look up map position.
"""
pass
@property
def shape(self):
"""Shape of the underlying structure.
Shape of the underlying structure. This will be used for pre-allocation. In most cases
a grid structure is preferable. Having positions with no measurements are easier to deal
with than obscure shapes. For memory efficiency this decision can be altered.
"""
return (1,)
| class Basegenerator:
"""Base class for generators.
Generators should provide of synthesis measurements for a location. For performance reasons
generation of data should be initialized by the :meth:`uwb.generator.BaseGenerator.gen`. and
:meth:`uwb.generator.BaseGenerator.get_closest_position` should provide the indices for the
given coordinates.
"""
def __init__(self):
pass
def gen(self):
"""Initializes the generation process."""
pass
def __iter__(self):
"""Iterator implementation for generator.
Returns the data per measurement location. General layout should be
(np.array, index, position), where the position should match the shape of the underlying
structure.
"""
pass
def get_closest_position(self, coordinates):
"""Finds indices in the map for the given coordinates.
Method provides indices in the map for the underlying geometry of the location.
Attributes:
coordinates: coordinates to look up map position.
"""
pass
@property
def shape(self):
"""Shape of the underlying structure.
Shape of the underlying structure. This will be used for pre-allocation. In most cases
a grid structure is preferable. Having positions with no measurements are easier to deal
with than obscure shapes. For memory efficiency this decision can be altered.
"""
return (1,) |
REV_CLASS_MAP = {
0: "rock",
1: "paper",
2: "scissors",
3: "none"
}
# 0_Rock 1_Paper 2_Scissors
def mapper(val):
return REV_CLASS_MAP[val]
def calculate_winner(move1, move2):
if move1 == move2:
return "Tie"
if move1 == "rock":
if move2 == 2:
return "User"
if move2 == 1:
return "Computer"
if move1 == "paper":
if move2 == 0:
return "User"
if move2 == 2:
return "Computer"
if move1 == "scissors":
if move2 == 2:
return "User"
if move2 == 0:
return "Computer" | rev_class_map = {0: 'rock', 1: 'paper', 2: 'scissors', 3: 'none'}
def mapper(val):
return REV_CLASS_MAP[val]
def calculate_winner(move1, move2):
if move1 == move2:
return 'Tie'
if move1 == 'rock':
if move2 == 2:
return 'User'
if move2 == 1:
return 'Computer'
if move1 == 'paper':
if move2 == 0:
return 'User'
if move2 == 2:
return 'Computer'
if move1 == 'scissors':
if move2 == 2:
return 'User'
if move2 == 0:
return 'Computer' |
class ArtistNotFound(Exception):
pass
class AlbumNotFound(Exception):
pass
| class Artistnotfound(Exception):
pass
class Albumnotfound(Exception):
pass |
standard = {
'rulebook_white': {
'name':'Rulebook White T',
'style': {
'color': '#666666',
'background': '#fff',
'border-color': '#000',
},
},
'rulebook_pink': {
'name':'Rulebook Pink',
'style': {
'color': '#ffffdd',
'background': '#F25292',
'border-color': '#FE98C0',
},
},
'rulebook_blue': {
'name':'Rulebook Blue',
'style': {
'color': '#000',
'background': '#CCE5F3',
},
},
'endeavor': {
'name': 'Endeavor',
'style': {
'color': '#fff',
'background': '#997030',
},
},
'the_watcher': {
'name': 'The Watcher',
'style': {
'color': '#E5BE2F',
'background': '#414042',
},
},
'twilight_knight': {
'name': 'Twilight Knight',
'style': {
'border-color': "#000",
'background': 'radial-gradient(#919B9A, #273736, #0D1110)',
'color': '#fff',
},
},
'sunstalker': {
'name': 'Sunstalker',
'style': {
'background': 'radial-gradient(#907859, #5D5B2E, #24271F)',
'color': '#ffff00',
},
},
'innovate': {
'name': 'Innovation',
'style': {
'border-color': "#0277BD",
'background': 'linear-gradient(to bottom, #4EC7F1, #40ADD0)',
'color': '#fff',
},
},
'location': {
'name': 'Location',
'style': {
'border-color': '#0D743A',
'background': 'linear-gradient(to bottom, #73C26C, #51B952)',
'color': '#fff',
},
},
'dying_lantern': {
'name': 'Dying Lantern',
'style': {
'border-color': "#666",
'background': 'radial-gradient(#C2BA95, #B19A55)',
'color': '#fff',
},
},
'bloodskin': {
'name': 'Bloodskin',
'style': {
'border-color': "#371516",
'background': 'radial-gradient(#BF8D83, #5F1711)',
'color': '#fff',
},
},
'fade': {
'name': 'Fade',
'style': {
'border-color': "#000",
'background': 'radial-gradient(#585550, #26252A)',
'color': '#E5E4E2',
},
},
'vibrant_lantern': {
'name': 'Vibrant Lantern',
'style': {
'border-color': "",
'background': 'radial-gradient(#DED6B3, #E7CE32)',
'color': '#000',
},
},
'proxy_1': {
'name': 'Proxy 1 (Red)',
'style': {
'border-color': "#660000",
'background': 'radial-gradient(#B14529, #9F3E25)',
'color': '#FFF',
},
},
'proxy_2': {
'name': 'Proxy 2 (Brown)',
'style': {
'border-color': "#666",
'background': 'radial-gradient(#5C2800, #572500)',
'color': '#FFF',
},
},
'proxy_3': {
'name': 'Proxy 3 (Green)',
'style': {
'border-color': "#006600",
'background': 'radial-gradient(#ABC0A4, #9FB193)',
'color': '#FFF',
},
},
'proxy_4': {
'name': 'Proxy 4 (Blue)',
'style': {
'border-color': "#000066",
'background': 'radial-gradient(#3261AD, #2D5394)',
'color': '#FFF',
},
},
}
| standard = {'rulebook_white': {'name': 'Rulebook White T', 'style': {'color': '#666666', 'background': '#fff', 'border-color': '#000'}}, 'rulebook_pink': {'name': 'Rulebook Pink', 'style': {'color': '#ffffdd', 'background': '#F25292', 'border-color': '#FE98C0'}}, 'rulebook_blue': {'name': 'Rulebook Blue', 'style': {'color': '#000', 'background': '#CCE5F3'}}, 'endeavor': {'name': 'Endeavor', 'style': {'color': '#fff', 'background': '#997030'}}, 'the_watcher': {'name': 'The Watcher', 'style': {'color': '#E5BE2F', 'background': '#414042'}}, 'twilight_knight': {'name': 'Twilight Knight', 'style': {'border-color': '#000', 'background': 'radial-gradient(#919B9A, #273736, #0D1110)', 'color': '#fff'}}, 'sunstalker': {'name': 'Sunstalker', 'style': {'background': 'radial-gradient(#907859, #5D5B2E, #24271F)', 'color': '#ffff00'}}, 'innovate': {'name': 'Innovation', 'style': {'border-color': '#0277BD', 'background': 'linear-gradient(to bottom, #4EC7F1, #40ADD0)', 'color': '#fff'}}, 'location': {'name': 'Location', 'style': {'border-color': '#0D743A', 'background': 'linear-gradient(to bottom, #73C26C, #51B952)', 'color': '#fff'}}, 'dying_lantern': {'name': 'Dying Lantern', 'style': {'border-color': '#666', 'background': 'radial-gradient(#C2BA95, #B19A55)', 'color': '#fff'}}, 'bloodskin': {'name': 'Bloodskin', 'style': {'border-color': '#371516', 'background': 'radial-gradient(#BF8D83, #5F1711)', 'color': '#fff'}}, 'fade': {'name': 'Fade', 'style': {'border-color': '#000', 'background': 'radial-gradient(#585550, #26252A)', 'color': '#E5E4E2'}}, 'vibrant_lantern': {'name': 'Vibrant Lantern', 'style': {'border-color': '', 'background': 'radial-gradient(#DED6B3, #E7CE32)', 'color': '#000'}}, 'proxy_1': {'name': 'Proxy 1 (Red)', 'style': {'border-color': '#660000', 'background': 'radial-gradient(#B14529, #9F3E25)', 'color': '#FFF'}}, 'proxy_2': {'name': 'Proxy 2 (Brown)', 'style': {'border-color': '#666', 'background': 'radial-gradient(#5C2800, #572500)', 'color': '#FFF'}}, 'proxy_3': {'name': 'Proxy 3 (Green)', 'style': {'border-color': '#006600', 'background': 'radial-gradient(#ABC0A4, #9FB193)', 'color': '#FFF'}}, 'proxy_4': {'name': 'Proxy 4 (Blue)', 'style': {'border-color': '#000066', 'background': 'radial-gradient(#3261AD, #2D5394)', 'color': '#FFF'}}} |
def recurFibonaci(number):
if number <= 1:
return number
else:
return recurFibonaci(number - 1) + recurFibonaci(number - 2)
numberTerms = 10
if numberTerms <= 0:
print("enter positive integers")
else:
print("fibonaci sequence ")
for i in range(numberTerms):
print(recurFibonaci(i))
| def recur_fibonaci(number):
if number <= 1:
return number
else:
return recur_fibonaci(number - 1) + recur_fibonaci(number - 2)
number_terms = 10
if numberTerms <= 0:
print('enter positive integers')
else:
print('fibonaci sequence ')
for i in range(numberTerms):
print(recur_fibonaci(i)) |
cadena_ingresada = input("Ingrese la fecha actual en formato dd/mm/yyyy: ");
separado = cadena_ingresada.split('/');
print(separado);
print(
f'Dia: {separado[0]}', '-',
f'Mes: {separado[1]}', '-',
f'Anio: {separado[2]}'
);
c = cadena_ingresada;
print(
f'Dia: {c[0]}{c[1]}', '-',
f'Mes: {c[3]}{c[4]}', '-',
f'Anio: {c[6]}{c[7]}{c[8]}{c[9]}'
);
| cadena_ingresada = input('Ingrese la fecha actual en formato dd/mm/yyyy: ')
separado = cadena_ingresada.split('/')
print(separado)
print(f'Dia: {separado[0]}', '-', f'Mes: {separado[1]}', '-', f'Anio: {separado[2]}')
c = cadena_ingresada
print(f'Dia: {c[0]}{c[1]}', '-', f'Mes: {c[3]}{c[4]}', '-', f'Anio: {c[6]}{c[7]}{c[8]}{c[9]}') |
carros = []
carros.append("audi")
carros.append("bmw")
carros.append("subaru")
carros.append("toyota")
carros.append("chevrolet")
carros.append("honda")
# if elif else
for carro in carros:
if carro == "honda":
print(carro.upper() + " !")
elif carro == "BMW":
print(carro.upper())
elif carro == "toyota":
print(carro.upper() + " !")
else:
print(carro.title() + " *")
print("------\n")
# multiplas condicionais
for x in range(0, int(len(carros))):
if(carros[x] == "audi" and carros[x + 1] == "bmw"):
print(str(x))
if(carros[x] == "chevrolet" and carros[x + 1] == "honda"):
print(str(x))
# mais condicionais
recheios_disponiveis = []
recheios_disponiveis.append("champignon")
recheios_disponiveis.append("azeite")
recheios_disponiveis.append("presunto")
recheios_disponiveis.append("pepperoni")
recheios_disponiveis.append("abacaxi")
recheios_disponiveis.append("borda de cheddar")
# teste input
a = raw_input()
print("------")
if not a:
print("null")
else:
print(a)
print("------")
# input com condicionais
recheios_solicitados = []
recheio_pizza = []
pedido = raw_input()
while pedido:
recheios_solicitados.append(str(pedido))
pedido = raw_input()
for recheio_solicitado in recheios_solicitados:
if recheio_solicitado in recheios_disponiveis:
print("recheio " + recheio_solicitado + " adicionado com sucesso!")
recheio_pizza.append(recheio_solicitado)
else:
print("recheio " + recheio_solicitado + " indisponivel no momento :(")
print("Pizza montada com os seguintes recheios:")
print(recheio_pizza)
| carros = []
carros.append('audi')
carros.append('bmw')
carros.append('subaru')
carros.append('toyota')
carros.append('chevrolet')
carros.append('honda')
for carro in carros:
if carro == 'honda':
print(carro.upper() + ' !')
elif carro == 'BMW':
print(carro.upper())
elif carro == 'toyota':
print(carro.upper() + ' !')
else:
print(carro.title() + ' *')
print('------\n')
for x in range(0, int(len(carros))):
if carros[x] == 'audi' and carros[x + 1] == 'bmw':
print(str(x))
if carros[x] == 'chevrolet' and carros[x + 1] == 'honda':
print(str(x))
recheios_disponiveis = []
recheios_disponiveis.append('champignon')
recheios_disponiveis.append('azeite')
recheios_disponiveis.append('presunto')
recheios_disponiveis.append('pepperoni')
recheios_disponiveis.append('abacaxi')
recheios_disponiveis.append('borda de cheddar')
a = raw_input()
print('------')
if not a:
print('null')
else:
print(a)
print('------')
recheios_solicitados = []
recheio_pizza = []
pedido = raw_input()
while pedido:
recheios_solicitados.append(str(pedido))
pedido = raw_input()
for recheio_solicitado in recheios_solicitados:
if recheio_solicitado in recheios_disponiveis:
print('recheio ' + recheio_solicitado + ' adicionado com sucesso!')
recheio_pizza.append(recheio_solicitado)
else:
print('recheio ' + recheio_solicitado + ' indisponivel no momento :(')
print('Pizza montada com os seguintes recheios:')
print(recheio_pizza) |
# Digit factorials
def factorial(n):
if n == 0: return 1
return n*factorial(n-1)
def digitized_factorial_sum(num):
if num == 1 or num == 2: return False
return sum([factorial(int(digit)) for digit in str(num)]) == num
# Need bounds on the numbers to be checked if their sum of factorial of digits is equal
# to the original number.
for i in range(int(1e6)):
if digitized_factorial_sum(i):
print("The number {} is equal to the sum of the factorial of its digits.\n".format(i))
| def factorial(n):
if n == 0:
return 1
return n * factorial(n - 1)
def digitized_factorial_sum(num):
if num == 1 or num == 2:
return False
return sum([factorial(int(digit)) for digit in str(num)]) == num
for i in range(int(1000000.0)):
if digitized_factorial_sum(i):
print('The number {} is equal to the sum of the factorial of its digits.\n'.format(i)) |
# Question 2 - Shouting!
def main():
# You don't need to modify this function.
name = input('Please enter your name: ')
# The computer is pleased to see you! Shout out to the user
shout_name = shout(name)
print('This program is happy to see you, {}'.format(shout_name))
def shout(name):
# TODO return the name in uppercase with !!! at the end.
# Example: if the name is 'Beyonce' then return 'BEYONCE!!!'
pass # TODO replace this with your code
# You don't need to modify the following code.
if __name__ == "__main__":
main()
| def main():
name = input('Please enter your name: ')
shout_name = shout(name)
print('This program is happy to see you, {}'.format(shout_name))
def shout(name):
pass
if __name__ == '__main__':
main() |
#python3
# Compute the last digit of the sum of squares of Fibonacci numbers till Fn
def fib_mod_sum(n):
mod_seq = [0, 1]
# mod is 10 -> pisano period is 60
pp = 60
fib_i = n % pp
for _ in range(1, fib_i):
mod_seq.append((mod_seq[-1] + mod_seq[-2]))
fn_seq = mod_seq[:fib_i + 1]
return sum([i**2 for i in fn_seq]) % 10
def main():
n = int(input())
print(fib_mod_sum(n))
if __name__ == "__main__":
main()
| def fib_mod_sum(n):
mod_seq = [0, 1]
pp = 60
fib_i = n % pp
for _ in range(1, fib_i):
mod_seq.append(mod_seq[-1] + mod_seq[-2])
fn_seq = mod_seq[:fib_i + 1]
return sum([i ** 2 for i in fn_seq]) % 10
def main():
n = int(input())
print(fib_mod_sum(n))
if __name__ == '__main__':
main() |
__title__ = 'django-uuslug'
__author__ = 'Val Neekman'
__author_email__ = 'info@neekware.com'
__description__ = "A Django slugify application that also handles Unicode"
__url__ = 'https://github.com/un33k/django-uuslug'
__license__ = 'MIT'
__copyright__ = 'Copyright 2022 Val Neekman @ Neekware Inc.'
__version__ = '2.0.0'
| __title__ = 'django-uuslug'
__author__ = 'Val Neekman'
__author_email__ = 'info@neekware.com'
__description__ = 'A Django slugify application that also handles Unicode'
__url__ = 'https://github.com/un33k/django-uuslug'
__license__ = 'MIT'
__copyright__ = 'Copyright 2022 Val Neekman @ Neekware Inc.'
__version__ = '2.0.0' |
class Quadrado:
def __init__(self, lado):
self.lado = lado
def perimetro(self):
return 4 * self.lado
def area(self):
return self.lado * self.lado
class Retangulo:
def __init__(self, base, altura):
self.base = base
self.altura = altura
def area(self):
return self.base * self.altura
| class Quadrado:
def __init__(self, lado):
self.lado = lado
def perimetro(self):
return 4 * self.lado
def area(self):
return self.lado * self.lado
class Retangulo:
def __init__(self, base, altura):
self.base = base
self.altura = altura
def area(self):
return self.base * self.altura |
# https://codeforces.com/problemset/problem/510/A
n, m = input().split()
whileloop_count = 1
dotline = 0
k = int(m)-1
while whileloop_count <= int(n):
if whileloop_count % 2 != 0:
print("#"*int(m))
elif whileloop_count % 2 == 0 and dotline % 2 == 0:
print(("."*k+"#"))
dotline += 1
elif whileloop_count % 2 == 0 and dotline % 2 != 0:
print("#"+("."*k))
dotline += 1
whileloop_count += 1
| (n, m) = input().split()
whileloop_count = 1
dotline = 0
k = int(m) - 1
while whileloop_count <= int(n):
if whileloop_count % 2 != 0:
print('#' * int(m))
elif whileloop_count % 2 == 0 and dotline % 2 == 0:
print('.' * k + '#')
dotline += 1
elif whileloop_count % 2 == 0 and dotline % 2 != 0:
print('#' + '.' * k)
dotline += 1
whileloop_count += 1 |
minha_lista = [1,2,3,4,5]
sua_lista = [item ** 2 for item in minha_lista]
print(minha_lista)
print(sua_lista)
| minha_lista = [1, 2, 3, 4, 5]
sua_lista = [item ** 2 for item in minha_lista]
print(minha_lista)
print(sua_lista) |
#!/usr/bin/python
# -*- coding:utf-8 -*-
class Cursor:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
self.x_max = 5
self.y_max = 32
def up(self, buff):
return Cursor(self.x - 1, self.y).clamp(buff)
def down(self, buff):
return Cursor(self.x + 1, self.y).clamp(buff)
def right(self, buff):
return Cursor(self.x, self.y + 1).clamp(buff)
def left(self, buff):
return Cursor(self.x, self.y - 1).clamp(buff)
def clamp(self, buff):
x = max(min(self.x, self.line_height(buff)), 0)
y = max(min(self.y, self.line_length(buff)), 0)
return Cursor(x, y)
def move_to_y(self, y):
return Cursor(self.x, y)
def line_length(self, buff):
return len(buff.lines[self.x])
def line_height(self, buff):
return len(buff.lines)
| class Cursor:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
self.x_max = 5
self.y_max = 32
def up(self, buff):
return cursor(self.x - 1, self.y).clamp(buff)
def down(self, buff):
return cursor(self.x + 1, self.y).clamp(buff)
def right(self, buff):
return cursor(self.x, self.y + 1).clamp(buff)
def left(self, buff):
return cursor(self.x, self.y - 1).clamp(buff)
def clamp(self, buff):
x = max(min(self.x, self.line_height(buff)), 0)
y = max(min(self.y, self.line_length(buff)), 0)
return cursor(x, y)
def move_to_y(self, y):
return cursor(self.x, y)
def line_length(self, buff):
return len(buff.lines[self.x])
def line_height(self, buff):
return len(buff.lines) |
# Fern Zapata
# https://github.com/fernzi/dotfiles
# Qtile Window Manager - User settings
terminal = 'alacritty'
launcher = 'rofi -show drun'
switcher = 'rofi -show window'
file_manager = 'pcmanfm-qt'
wallpaper = '~/Pictures/Wallpapers/Other/Waves.png'
applications = dict(
messenger='discord',
mixer='pavucontrol-qt',
web_browser='qutebrowser',
)
autostart = [
'lxqt-policykit-agent',
'setxkbmap -option compose:ralt',
'ibus-daemon -dxr',
'picom --experimental-backends',
'nm-applet',
'blueman-applet',
]
| terminal = 'alacritty'
launcher = 'rofi -show drun'
switcher = 'rofi -show window'
file_manager = 'pcmanfm-qt'
wallpaper = '~/Pictures/Wallpapers/Other/Waves.png'
applications = dict(messenger='discord', mixer='pavucontrol-qt', web_browser='qutebrowser')
autostart = ['lxqt-policykit-agent', 'setxkbmap -option compose:ralt', 'ibus-daemon -dxr', 'picom --experimental-backends', 'nm-applet', 'blueman-applet'] |
#---
# title: Zen Markdown Demo
# author: Dr. P. B. Patel
# date: CURRENT_DATE
# output:
# format: pdf
#---
## with sql
# %%{sql}
"""SELECT *
FROM stocks"""
#```
# %%{run=true, echo=true, render=true}
zen.to_latex()
#```
# with custom con string
# %%{sql, con_string=my_con_string, name=custom_df}
"""SELECT *
FROM stocks"""
#```
# %%{run=true, echo=true, render=true}
custom_df.to_latex()
#``` | """SELECT *
FROM stocks"""
zen.to_latex()
'SELECT * \nFROM stocks'
custom_df.to_latex() |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 04 2021 - 10:22
Introduction to Computation and Programming Using Python. John V. Guttag, 2016, 2nd ed
A complimentary exercise from the book companion,
the OCW video lecture series - Lecture 6
Song Lyrics parser
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/lecture-videos/index.htm
@author: Atanas Kozarev - github.com/ultraasi-atanas
"""
def removePunctuation(s):
"""
Parameters
----------
s : string
Song lyrics string
Returns
-------
converted : string
A copy of s with removed punctuation and all letters turned to lowercase.
"""
s = s.lower()
converted = ''
for c in s:
if c in "abcdefghijklmnopqrstuvwxyz ":
converted += c
return converted
def lyrics_to_frequencies(l):
""" Assumes l is a list with strings
Takes each string and checks if it exists as a key in the dict
If it does - it increases the value of that key by 1
If it doesn't - it creates the key with value 1
Parameters
----------
l : list
list with strings, words of song lyrics.
Returns
-------
frequenciesDict : dict
contains distinct list entries as keys and their number of occurences as values
"""
frequenciesDict = {}
for word in l:
if word in frequenciesDict:
frequenciesDict[word] = frequenciesDict[word] + 1
else:
frequenciesDict[word] = 1
return frequenciesDict
def mostCommon(d):
"""
Parameters
----------
d : dict
words and frequencies value pairs
Returns
-------
a tuple containing the highest frequency and the respective word(s) list
"""
mostCommonValue = max(d.values())
results = []
for e in d:
if d[e] == mostCommonValue:
results.append(e)
return (results,mostCommonValue)
# 1 Step
lyrics = """'A Place In This World
I don't know what I want, so don't ask me
Cause I'm still trying to figure it out
Don't know what's down this road, I'm just walking
Trying to see through the rain coming down
Even though I'm not the only one
Who feels the way I do
[Chorus:]
I'm alone, on my own, and that's all I know
I'll be strong, I'll be wrong, oh but life goes on
Oh, I'm just a girl, trying to find a place in this world
Got the radio on, my old blue jeans
And I'm wearing my heart on my sleeve
Feeling lucky today, got the sunshine
Could you tell me what more do I need
And tomorrow's just a mystery, oh yeah
But that's ok
[Chorus]
Maybe I'm just a girl on a mission
But I'm ready to fly
I'm alone, on my own, and that's all I know
I'll be strong, I'll be wrong, oh but life goes on
Oh I'm alone, on my own, and that's all I know
Oh I'm just a girl, trying to find a place in this world
Oh I'm just a girl
Oh I'm just a girl, oh, oh,
Oh I'm just a girl
"""
# 2 Step
lyricsNoLineEnds = lyrics.replace('\n',' ')
lyricsTextOnly = removePunctuation(lyricsNoLineEnds)
lyricsList = lyricsTextOnly.split(' ')
# 3 Step
lyricsFrequencies = lyrics_to_frequencies(lyricsList)
# 4 Step
print(lyricsFrequencies)
print('Most common word is:', mostCommon(lyricsFrequencies))
| """
Created on Mon Jan 04 2021 - 10:22
Introduction to Computation and Programming Using Python. John V. Guttag, 2016, 2nd ed
A complimentary exercise from the book companion,
the OCW video lecture series - Lecture 6
Song Lyrics parser
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/lecture-videos/index.htm
@author: Atanas Kozarev - github.com/ultraasi-atanas
"""
def remove_punctuation(s):
"""
Parameters
----------
s : string
Song lyrics string
Returns
-------
converted : string
A copy of s with removed punctuation and all letters turned to lowercase.
"""
s = s.lower()
converted = ''
for c in s:
if c in 'abcdefghijklmnopqrstuvwxyz ':
converted += c
return converted
def lyrics_to_frequencies(l):
""" Assumes l is a list with strings
Takes each string and checks if it exists as a key in the dict
If it does - it increases the value of that key by 1
If it doesn't - it creates the key with value 1
Parameters
----------
l : list
list with strings, words of song lyrics.
Returns
-------
frequenciesDict : dict
contains distinct list entries as keys and their number of occurences as values
"""
frequencies_dict = {}
for word in l:
if word in frequenciesDict:
frequenciesDict[word] = frequenciesDict[word] + 1
else:
frequenciesDict[word] = 1
return frequenciesDict
def most_common(d):
"""
Parameters
----------
d : dict
words and frequencies value pairs
Returns
-------
a tuple containing the highest frequency and the respective word(s) list
"""
most_common_value = max(d.values())
results = []
for e in d:
if d[e] == mostCommonValue:
results.append(e)
return (results, mostCommonValue)
lyrics = "'A Place In This World\n\nI don't know what I want, so don't ask me\nCause I'm still trying to figure it out\nDon't know what's down this road, I'm just walking\nTrying to see through the rain coming down\nEven though I'm not the only one\nWho feels the way I do\n\n[Chorus:]\nI'm alone, on my own, and that's all I know\nI'll be strong, I'll be wrong, oh but life goes on\nOh, I'm just a girl, trying to find a place in this world\n\nGot the radio on, my old blue jeans\nAnd I'm wearing my heart on my sleeve\nFeeling lucky today, got the sunshine\nCould you tell me what more do I need\nAnd tomorrow's just a mystery, oh yeah\nBut that's ok\n\n[Chorus]\n\nMaybe I'm just a girl on a mission\nBut I'm ready to fly\n\nI'm alone, on my own, and that's all I know\nI'll be strong, I'll be wrong, oh but life goes on\nOh I'm alone, on my own, and that's all I know\nOh I'm just a girl, trying to find a place in this world\n\nOh I'm just a girl\nOh I'm just a girl, oh, oh,\nOh I'm just a girl\n"
lyrics_no_line_ends = lyrics.replace('\n', ' ')
lyrics_text_only = remove_punctuation(lyricsNoLineEnds)
lyrics_list = lyricsTextOnly.split(' ')
lyrics_frequencies = lyrics_to_frequencies(lyricsList)
print(lyricsFrequencies)
print('Most common word is:', most_common(lyricsFrequencies)) |
# http://www.geeksforgeeks.org/find-number-of-triangles-possible/
def number_of_triangles(input):
input.sort()
count = 0
for i in range(len(input)-2):
k = i + 2
for j in range(i+1, len(input)):
while k < len(input) and input[i] + input[j] > input[k]:
k = k + 1
count += k - j - 1
return count
if __name__ == '__main__':
input = [15, 9, 8, 3, 4, 5, 6]
print(number_of_triangles(input))
| def number_of_triangles(input):
input.sort()
count = 0
for i in range(len(input) - 2):
k = i + 2
for j in range(i + 1, len(input)):
while k < len(input) and input[i] + input[j] > input[k]:
k = k + 1
count += k - j - 1
return count
if __name__ == '__main__':
input = [15, 9, 8, 3, 4, 5, 6]
print(number_of_triangles(input)) |
def primeCheck(n):
# 0, 1, even numbers greater than 2 are NOT PRIME
if n==1 or n==0 or (n % 2 == 0 and n > 2):
return "Not prime"
else:
# Not prime if divisable by another number less
# or equal to the square root of itself.
# n**(1/2) returns square root of n
for i in range(3, int(n**(1/2))+1, 2):
if n%i == 0:
return "Not prime"
return "Prime" | def prime_check(n):
if n == 1 or n == 0 or (n % 2 == 0 and n > 2):
return 'Not prime'
else:
for i in range(3, int(n ** (1 / 2)) + 1, 2):
if n % i == 0:
return 'Not prime'
return 'Prime' |
"""
Utilities that are not kartothek-specific but are required to archive certain tasks.
"""
__all__ = ()
| """
Utilities that are not kartothek-specific but are required to archive certain tasks.
"""
__all__ = () |
"""
Conversion functions between fahrentheit and centrigrade
This module shows off two functions for converting temperature back and forth
between fahrenheit and centigrade. It also shows how to use variables to
represent "constants", or values that we give a name in order to remember them
better.
Author: Walker M. White (wmw2)
Date: March 1, 2019
"""
# Functions
def to_centigrade(x):
"""
Returns: x converted to centigrade
The value returned has type float.
Parameter x: the temperature in fahrenheit
Precondition: x is a float
"""
assert type(x) == float, repr(x)+' is not a float'
return 5*(x-32)/9.0
def to_fahrenheit(x):
"""
Returns: x converted to fahrenheit
The value returned has type float.
Parameter x: the temperature in centigrade
Precondition: x is a float
"""
assert type(x) == float, repr(x)+' is not a float'
return 9*x/5.0+32
# Constants
FREEZING_C = 0.0 # Temperature water freezes in centrigrade
FREEZING_F = to_fahrenheit(FREEZING_C)
BOILING_C = 100.0 # Temperature water freezes in centrigrade
BOILING_F = to_fahrenheit(BOILING_C)
| """
Conversion functions between fahrentheit and centrigrade
This module shows off two functions for converting temperature back and forth
between fahrenheit and centigrade. It also shows how to use variables to
represent "constants", or values that we give a name in order to remember them
better.
Author: Walker M. White (wmw2)
Date: March 1, 2019
"""
def to_centigrade(x):
"""
Returns: x converted to centigrade
The value returned has type float.
Parameter x: the temperature in fahrenheit
Precondition: x is a float
"""
assert type(x) == float, repr(x) + ' is not a float'
return 5 * (x - 32) / 9.0
def to_fahrenheit(x):
"""
Returns: x converted to fahrenheit
The value returned has type float.
Parameter x: the temperature in centigrade
Precondition: x is a float
"""
assert type(x) == float, repr(x) + ' is not a float'
return 9 * x / 5.0 + 32
freezing_c = 0.0
freezing_f = to_fahrenheit(FREEZING_C)
boiling_c = 100.0
boiling_f = to_fahrenheit(BOILING_C) |
#!/usr/bin/env python
# coding: utf-8
template = """<!DOCTYPE html>
<html lang="en">
<head>
<title>RoadScanner result</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100%; width: 100% }
</style>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script type="text/javascript">
var bounds = new google.maps.LatLngBounds();
function addRoad(road, map) {
var coordinates = [];
for (var i = 0; i < road.length; i++) {
var ll = road[i];
gll = new google.maps.LatLng(ll[1], ll[0])
coordinates.push(gll);
bounds.extend(gll)
}
var percurso = new google.maps.Polyline({path: coordinates, strokeColor: "red"});
percurso.setMap(map);
}
function initialize () {
var mapOptions = {
center: new google.maps.LatLng(-30.212202,-51.362572),
zoom: 11,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
roads = $$$$
for (var i = 0; i < roads.length; i++) {
addRoad(roads[i], map);
}
map.fitBounds(bounds);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>"""
def createMap(paths, fname):
source = template.replace("$$$$", str(paths))
with open(fname, 'w') as out:
out.write(source) | template = '<!DOCTYPE html>\n<html lang="en">\n<head>\n <title>RoadScanner result</title>\n <meta charset="utf-8">\n <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />\n <style type="text/css">\n html { height: 100% }\n body { height: 100%; margin: 0; padding: 0 }\n #map_canvas { height: 100%; width: 100% }\n </style>\n\n <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>\n \n <script type="text/javascript">\n\n var bounds = new google.maps.LatLngBounds();\n\n function addRoad(road, map) {\n var coordinates = [];\n for (var i = 0; i < road.length; i++) {\n var ll = road[i];\n gll = new google.maps.LatLng(ll[1], ll[0])\n coordinates.push(gll);\n bounds.extend(gll)\n } \n var percurso = new google.maps.Polyline({path: coordinates, strokeColor: "red"});\n percurso.setMap(map);\n }\n\n function initialize () {\n \n var mapOptions = {\n center: new google.maps.LatLng(-30.212202,-51.362572),\n zoom: 11,\n mapTypeId: google.maps.MapTypeId.HYBRID\n };\n var map = new google.maps.Map(document.getElementById("map_canvas"),\n mapOptions);\n \n roads = $$$$\n \n for (var i = 0; i < roads.length; i++) {\n addRoad(roads[i], map);\n }\n\n map.fitBounds(bounds);\n }\n \n google.maps.event.addDomListener(window, \'load\', initialize);\n \n </script>\n</head>\n\n<body>\n <div id="map_canvas"></div>\n\n</body>\n</html>'
def create_map(paths, fname):
source = template.replace('$$$$', str(paths))
with open(fname, 'w') as out:
out.write(source) |
class Solution:
def largestOverlap(self, img1: List[List[int]], img2: List[List[int]]) -> int:
"""Array.
Running time: O(n^2 + AB) where is n is the length of img1, A is the number of 1s in img1 and B is the number of 1s in img2.
"""
n = len(img1)
pimg1 = []
pimg2 = []
for i in range(n):
for j in range(n):
if img2[i][j] == 1:
pimg2.append((i, j))
if img1[i][j] == 1:
pimg1.append((i, j))
d = collections.defaultdict(int)
for i1, j1 in pimg1:
for i2, j2 in pimg2:
d[(i1-i2, j1-j2)] += 1
return max(d.values() or [0])
| class Solution:
def largest_overlap(self, img1: List[List[int]], img2: List[List[int]]) -> int:
"""Array.
Running time: O(n^2 + AB) where is n is the length of img1, A is the number of 1s in img1 and B is the number of 1s in img2.
"""
n = len(img1)
pimg1 = []
pimg2 = []
for i in range(n):
for j in range(n):
if img2[i][j] == 1:
pimg2.append((i, j))
if img1[i][j] == 1:
pimg1.append((i, j))
d = collections.defaultdict(int)
for (i1, j1) in pimg1:
for (i2, j2) in pimg2:
d[i1 - i2, j1 - j2] += 1
return max(d.values() or [0]) |
class MWB:
"""MainWidgetBase"""
def __init__(self, params):
self.parent_node_instance = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass
class IWB:
"""InputWidgetBase"""
def __init__(self, params):
self.parent_port_instance, self.parent_node_instance = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass
| class Mwb:
"""MainWidgetBase"""
def __init__(self, params):
self.parent_node_instance = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass
class Iwb:
"""InputWidgetBase"""
def __init__(self, params):
(self.parent_port_instance, self.parent_node_instance) = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass |
# GYP file to build unit tests.
{
'includes': [
'apptype_console.gypi',
'common.gypi',
],
'targets': [
{
'target_name': 'tests',
'type': 'executable',
'include_dirs' : [
'../src/core',
'../src/gpu',
],
'sources': [
'../tests/AAClipTest.cpp',
'../tests/BitmapCopyTest.cpp',
'../tests/BitmapGetColorTest.cpp',
'../tests/BitSetTest.cpp',
'../tests/BlitRowTest.cpp',
'../tests/BlurTest.cpp',
'../tests/CanvasTest.cpp',
'../tests/ClampRangeTest.cpp',
'../tests/ClipCubicTest.cpp',
'../tests/ClipStackTest.cpp',
'../tests/ClipperTest.cpp',
'../tests/ColorFilterTest.cpp',
'../tests/ColorTest.cpp',
'../tests/DataRefTest.cpp',
'../tests/DequeTest.cpp',
'../tests/DrawBitmapRectTest.cpp',
'../tests/EmptyPathTest.cpp',
'../tests/FillPathTest.cpp',
'../tests/FlateTest.cpp',
'../tests/GeometryTest.cpp',
'../tests/GLInterfaceValidation.cpp',
'../tests/GLProgramsTest.cpp',
'../tests/InfRectTest.cpp',
'../tests/MathTest.cpp',
'../tests/MatrixTest.cpp',
'../tests/Matrix44Test.cpp',
'../tests/MetaDataTest.cpp',
'../tests/PackBitsTest.cpp',
'../tests/PaintTest.cpp',
'../tests/ParsePathTest.cpp',
'../tests/PathCoverageTest.cpp',
'../tests/PathMeasureTest.cpp',
'../tests/PathTest.cpp',
'../tests/PDFPrimitivesTest.cpp',
'../tests/PointTest.cpp',
'../tests/QuickRejectTest.cpp',
'../tests/Reader32Test.cpp',
'../tests/ReadPixelsTest.cpp',
'../tests/RefDictTest.cpp',
'../tests/RegionTest.cpp',
'../tests/ScalarTest.cpp',
'../tests/ShaderOpacityTest.cpp',
'../tests/Sk64Test.cpp',
'../tests/skia_test.cpp',
'../tests/SortTest.cpp',
'../tests/SrcOverTest.cpp',
'../tests/StreamTest.cpp',
'../tests/StringTest.cpp',
'../tests/Test.cpp',
'../tests/Test.h',
'../tests/TestSize.cpp',
'../tests/ToUnicode.cpp',
'../tests/UnicodeTest.cpp',
'../tests/UtilsTest.cpp',
'../tests/WArrayTest.cpp',
'../tests/WritePixelsTest.cpp',
'../tests/Writer32Test.cpp',
'../tests/XfermodeTest.cpp',
],
'dependencies': [
'core.gyp:core',
'effects.gyp:effects',
'experimental.gyp:experimental',
'gpu.gyp:gr',
'gpu.gyp:skgr',
'images.gyp:images',
'ports.gyp:ports',
'pdf.gyp:pdf',
'utils.gyp:utils',
],
},
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2:
| {'includes': ['apptype_console.gypi', 'common.gypi'], 'targets': [{'target_name': 'tests', 'type': 'executable', 'include_dirs': ['../src/core', '../src/gpu'], 'sources': ['../tests/AAClipTest.cpp', '../tests/BitmapCopyTest.cpp', '../tests/BitmapGetColorTest.cpp', '../tests/BitSetTest.cpp', '../tests/BlitRowTest.cpp', '../tests/BlurTest.cpp', '../tests/CanvasTest.cpp', '../tests/ClampRangeTest.cpp', '../tests/ClipCubicTest.cpp', '../tests/ClipStackTest.cpp', '../tests/ClipperTest.cpp', '../tests/ColorFilterTest.cpp', '../tests/ColorTest.cpp', '../tests/DataRefTest.cpp', '../tests/DequeTest.cpp', '../tests/DrawBitmapRectTest.cpp', '../tests/EmptyPathTest.cpp', '../tests/FillPathTest.cpp', '../tests/FlateTest.cpp', '../tests/GeometryTest.cpp', '../tests/GLInterfaceValidation.cpp', '../tests/GLProgramsTest.cpp', '../tests/InfRectTest.cpp', '../tests/MathTest.cpp', '../tests/MatrixTest.cpp', '../tests/Matrix44Test.cpp', '../tests/MetaDataTest.cpp', '../tests/PackBitsTest.cpp', '../tests/PaintTest.cpp', '../tests/ParsePathTest.cpp', '../tests/PathCoverageTest.cpp', '../tests/PathMeasureTest.cpp', '../tests/PathTest.cpp', '../tests/PDFPrimitivesTest.cpp', '../tests/PointTest.cpp', '../tests/QuickRejectTest.cpp', '../tests/Reader32Test.cpp', '../tests/ReadPixelsTest.cpp', '../tests/RefDictTest.cpp', '../tests/RegionTest.cpp', '../tests/ScalarTest.cpp', '../tests/ShaderOpacityTest.cpp', '../tests/Sk64Test.cpp', '../tests/skia_test.cpp', '../tests/SortTest.cpp', '../tests/SrcOverTest.cpp', '../tests/StreamTest.cpp', '../tests/StringTest.cpp', '../tests/Test.cpp', '../tests/Test.h', '../tests/TestSize.cpp', '../tests/ToUnicode.cpp', '../tests/UnicodeTest.cpp', '../tests/UtilsTest.cpp', '../tests/WArrayTest.cpp', '../tests/WritePixelsTest.cpp', '../tests/Writer32Test.cpp', '../tests/XfermodeTest.cpp'], 'dependencies': ['core.gyp:core', 'effects.gyp:effects', 'experimental.gyp:experimental', 'gpu.gyp:gr', 'gpu.gyp:skgr', 'images.gyp:images', 'ports.gyp:ports', 'pdf.gyp:pdf', 'utils.gyp:utils']}]} |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:joel
# time:2018/8/14 15:36
def headerstool(p):
"""deal with the request headers"""
with open(p + '_new.txt', 'w') as fw:
with open(p, 'r') as fr:
for line in fr.readlines():
if not line.endswith('\n'):
line = line + '\n'
line_w = '\'' + line.replace(': ', '\': \'').replace('\n', '\',\n')
fw.writelines(line_w)
if __name__ == '__main__':
path = input(u'Please input the txt path: ')
headerstool(path)
| def headerstool(p):
"""deal with the request headers"""
with open(p + '_new.txt', 'w') as fw:
with open(p, 'r') as fr:
for line in fr.readlines():
if not line.endswith('\n'):
line = line + '\n'
line_w = "'" + line.replace(': ', "': '").replace('\n', "',\n")
fw.writelines(line_w)
if __name__ == '__main__':
path = input(u'Please input the txt path: ')
headerstool(path) |
class UserAlreadyEnteredError(Exception):
pass
class NoUsersEnteredError(Exception):
pass
class WrongTimeFormatError(Exception):
pass
#custom error just for readability | class Useralreadyenterederror(Exception):
pass
class Nousersenterederror(Exception):
pass
class Wrongtimeformaterror(Exception):
pass |
'''
Given an integer n, return the next bigger permutation of its digits.
If n is already in its biggest permutation, rotate to the smallest permutation.
case 1
n= 5342310
ans=5343012
case 2
n= 543321
ans= 123345
'''
n = 5342310 # case 1
# n = 543321 # case 2
a = list(map(int, str(n)))
i = len(a)-2
# finding i such that a[i]...a[n-1] is decreasing suffix
while a[i] >= a[i+1]:
i -= 1
if i == 0:
# print('case 2')
a.reverse()
print(''.join(map(str, a)))
exit(0)
# print(i,a[i])
# finding j such that a[j]>a[i] and swapping them
for j in range(i+1, len(a)):
if a[j] > a[i]:
a[i], a[j] = a[j], a[i]
break
# reversing the decreasing suffix to make it increasing
a[i+1:] = reversed(a[i+1:])
# print('case 1')
print(''.join(map(str, a)))
exit(0) | """
Given an integer n, return the next bigger permutation of its digits.
If n is already in its biggest permutation, rotate to the smallest permutation.
case 1
n= 5342310
ans=5343012
case 2
n= 543321
ans= 123345
"""
n = 5342310
a = list(map(int, str(n)))
i = len(a) - 2
while a[i] >= a[i + 1]:
i -= 1
if i == 0:
a.reverse()
print(''.join(map(str, a)))
exit(0)
for j in range(i + 1, len(a)):
if a[j] > a[i]:
(a[i], a[j]) = (a[j], a[i])
break
a[i + 1:] = reversed(a[i + 1:])
print(''.join(map(str, a)))
exit(0) |
# function test
# test 1
def println ( str ) :
print ( str )
return
println ( "Hello World" )
# test 2
def printStu ( name, age ):
print ("%s, %d" % (name, age))
return
printStu (age = 19, name = "Inno")
# test 3
def printInfo ( who, sex = 'male' ):
print ("%s/%s" % (who, sex))
return
printInfo ("Inno")
# test 4
def countSum ( *var_arg ):
sum = 0
for i in var_arg:
sum += i
else:
print ( sum )
return
countSum ( 1, 2, 3 )
countSum ( 10, 20, 30, 40, 50 )
# Lambda test
sum = lambda arg1, arg2: arg1 + arg2
print ("1 + 2 = ", sum(1, 2))
print ("10 + 20 = ", sum(10, 20)) | def println(str):
print(str)
return
println('Hello World')
def print_stu(name, age):
print('%s, %d' % (name, age))
return
print_stu(age=19, name='Inno')
def print_info(who, sex='male'):
print('%s/%s' % (who, sex))
return
print_info('Inno')
def count_sum(*var_arg):
sum = 0
for i in var_arg:
sum += i
else:
print(sum)
return
count_sum(1, 2, 3)
count_sum(10, 20, 30, 40, 50)
sum = lambda arg1, arg2: arg1 + arg2
print('1 + 2 = ', sum(1, 2))
print('10 + 20 = ', sum(10, 20)) |
#
# PySNMP MIB module HM2-PWRMGMT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HM2-PWRMGMT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:18:36 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
hm2ConfigurationMibs, = mibBuilder.importSymbols("HM2-TC-MIB", "hm2ConfigurationMibs")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibIdentifier, NotificationType, Bits, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Unsigned32, TimeTicks, Counter32, iso, Gauge32, Counter64, Integer32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "NotificationType", "Bits", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Unsigned32", "TimeTicks", "Counter32", "iso", "Gauge32", "Counter64", "Integer32", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
hm2PowerMgmtMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 248, 11, 11))
hm2PowerMgmtMib.setRevisions(('2011-03-16 00:00',))
if mibBuilder.loadTexts: hm2PowerMgmtMib.setLastUpdated('201103160000Z')
if mibBuilder.loadTexts: hm2PowerMgmtMib.setOrganization('Hirschmann Automation and Control GmbH')
hm2PowerMgmtMibNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 0))
hm2PowerMgmtMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 1))
hm2PowerSupplyGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1))
hm2PSTable = MibTable((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1), )
if mibBuilder.loadTexts: hm2PSTable.setStatus('current')
hm2PSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1), ).setIndexNames((0, "HM2-PWRMGMT-MIB", "hm2PSID"))
if mibBuilder.loadTexts: hm2PSEntry.setStatus('current')
hm2PSID = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSID.setStatus('current')
hm2PSState = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("present", 1), ("defective", 2), ("notInstalled", 3), ("unknown", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSState.setStatus('current')
hm2PSUSlotInfoTable = MibTable((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10), )
if mibBuilder.loadTexts: hm2PSUSlotInfoTable.setStatus('current')
hm2PSUSlotInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1), ).setIndexNames((0, "HM2-PWRMGMT-MIB", "hm2PSUSlotIndex"))
if mibBuilder.loadTexts: hm2PSUSlotInfoEntry.setStatus('current')
hm2PSUSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4)))
if mibBuilder.loadTexts: hm2PSUSlotIndex.setStatus('current')
hm2PSUSlotChassisTypeId = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 0), ("mach1020", 1), ("mach4000", 2), ("railswitch", 3), ("grs", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotChassisTypeId.setStatus('current')
hm2PSUSlotManufacturerId = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("other", 0), ("hirschmann", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotManufacturerId.setStatus('current')
hm2PSUSlotManufacturerDate = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotManufacturerDate.setStatus('obsolete')
hm2PSUSlotSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 5), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotSerialNumber.setStatus('current')
hm2PSUSlotProductCode = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 6), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotProductCode.setStatus('current')
hm2PSUSlotDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 7), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotDescription.setStatus('current')
hm2PSUSlotCombinationType = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("only-on-psu1", 0), ("psu1-sys-psu2-poe", 1), ("psu1-poe-psu2-sys", 2), ("two-separate-psus", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotCombinationType.setStatus('current')
hm2PSUSlotTemperatureRange = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("tr-0-60", 0), ("tr-minus40-60", 1), ("tr-minus40-70", 2), ("tr-minus40-70cc", 3), ("tr-minus40-85", 4), ("tr-minus40-85cc", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotTemperatureRange.setStatus('current')
hm2PSUSlotRevisionId = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUSlotRevisionId.setStatus('current')
hm2PSUUnitInfoTable = MibTable((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20), )
if mibBuilder.loadTexts: hm2PSUUnitInfoTable.setStatus('current')
hm2PSUUnitInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1), ).setIndexNames((0, "HM2-PWRMGMT-MIB", "hm2PSUSlotIndex"), (0, "HM2-PWRMGMT-MIB", "hm2PSUUnitIndex"))
if mibBuilder.loadTexts: hm2PSUUnitInfoEntry.setStatus('current')
hm2PSUUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2)))
if mibBuilder.loadTexts: hm2PSUUnitIndex.setStatus('current')
hm2PSUUnitConverterType = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ac", 1), ("dc", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitConverterType.setStatus('current')
hm2PSUUnitNumberOfInputs = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitNumberOfInputs.setStatus('current')
hm2PSUUnitOutputType = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("system", 1), ("both", 2), ("poe", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitOutputType.setStatus('current')
hm2PSUUnitSystemBudget = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitSystemBudget.setStatus('current')
hm2PSUUnitPoeBudget = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitPoeBudget.setStatus('current')
hm2PSUUnitFanCount = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitFanCount.setStatus('current')
hm2PSUUnitVoltageRange = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("vr-18-60vdc", 0), ("vr-24-60vdc", 1), ("vr-24-48vdc", 2), ("vr-60-250vdc-110-240vac", 3), ("vr-48-54vdc-poe", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitVoltageRange.setStatus('current')
hm2PSUUnitPowerInterruption = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2PSUUnitPowerInterruption.setStatus('current')
hm2PowerSupplyTrap = NotificationType((1, 3, 6, 1, 4, 1, 248, 11, 11, 0, 1)).setObjects(("HM2-PWRMGMT-MIB", "hm2PSID"), ("HM2-PWRMGMT-MIB", "hm2PSState"))
if mibBuilder.loadTexts: hm2PowerSupplyTrap.setStatus('current')
mibBuilder.exportSymbols("HM2-PWRMGMT-MIB", hm2PSUUnitIndex=hm2PSUUnitIndex, hm2PSUSlotCombinationType=hm2PSUSlotCombinationType, hm2PSUUnitConverterType=hm2PSUUnitConverterType, hm2PSUSlotIndex=hm2PSUSlotIndex, hm2PSUSlotChassisTypeId=hm2PSUSlotChassisTypeId, hm2PSUUnitNumberOfInputs=hm2PSUUnitNumberOfInputs, hm2PSUUnitInfoTable=hm2PSUUnitInfoTable, hm2PSUSlotInfoTable=hm2PSUSlotInfoTable, hm2PowerMgmtMibNotifications=hm2PowerMgmtMibNotifications, PYSNMP_MODULE_ID=hm2PowerMgmtMib, hm2PowerSupplyGroup=hm2PowerSupplyGroup, hm2PSUUnitOutputType=hm2PSUUnitOutputType, hm2PSUUnitSystemBudget=hm2PSUUnitSystemBudget, hm2PSUUnitPowerInterruption=hm2PSUUnitPowerInterruption, hm2PSUSlotManufacturerDate=hm2PSUSlotManufacturerDate, hm2PSUSlotDescription=hm2PSUSlotDescription, hm2PSUUnitVoltageRange=hm2PSUUnitVoltageRange, hm2PSTable=hm2PSTable, hm2PSState=hm2PSState, hm2PowerMgmtMib=hm2PowerMgmtMib, hm2PSUSlotManufacturerId=hm2PSUSlotManufacturerId, hm2PSUUnitPoeBudget=hm2PSUUnitPoeBudget, hm2PSUSlotInfoEntry=hm2PSUSlotInfoEntry, hm2PowerMgmtMibObjects=hm2PowerMgmtMibObjects, hm2PowerSupplyTrap=hm2PowerSupplyTrap, hm2PSEntry=hm2PSEntry, hm2PSUSlotRevisionId=hm2PSUSlotRevisionId, hm2PSUUnitFanCount=hm2PSUUnitFanCount, hm2PSID=hm2PSID, hm2PSUSlotTemperatureRange=hm2PSUSlotTemperatureRange, hm2PSUUnitInfoEntry=hm2PSUUnitInfoEntry, hm2PSUSlotProductCode=hm2PSUSlotProductCode, hm2PSUSlotSerialNumber=hm2PSUSlotSerialNumber)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, value_size_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(hm2_configuration_mibs,) = mibBuilder.importSymbols('HM2-TC-MIB', 'hm2ConfigurationMibs')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, notification_type, bits, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, unsigned32, time_ticks, counter32, iso, gauge32, counter64, integer32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'NotificationType', 'Bits', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Unsigned32', 'TimeTicks', 'Counter32', 'iso', 'Gauge32', 'Counter64', 'Integer32', 'IpAddress')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
hm2_power_mgmt_mib = module_identity((1, 3, 6, 1, 4, 1, 248, 11, 11))
hm2PowerMgmtMib.setRevisions(('2011-03-16 00:00',))
if mibBuilder.loadTexts:
hm2PowerMgmtMib.setLastUpdated('201103160000Z')
if mibBuilder.loadTexts:
hm2PowerMgmtMib.setOrganization('Hirschmann Automation and Control GmbH')
hm2_power_mgmt_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 0))
hm2_power_mgmt_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 1))
hm2_power_supply_group = mib_identifier((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1))
hm2_ps_table = mib_table((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1))
if mibBuilder.loadTexts:
hm2PSTable.setStatus('current')
hm2_ps_entry = mib_table_row((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1)).setIndexNames((0, 'HM2-PWRMGMT-MIB', 'hm2PSID'))
if mibBuilder.loadTexts:
hm2PSEntry.setStatus('current')
hm2_psid = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 8))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSID.setStatus('current')
hm2_ps_state = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('present', 1), ('defective', 2), ('notInstalled', 3), ('unknown', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSState.setStatus('current')
hm2_psu_slot_info_table = mib_table((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10))
if mibBuilder.loadTexts:
hm2PSUSlotInfoTable.setStatus('current')
hm2_psu_slot_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1)).setIndexNames((0, 'HM2-PWRMGMT-MIB', 'hm2PSUSlotIndex'))
if mibBuilder.loadTexts:
hm2PSUSlotInfoEntry.setStatus('current')
hm2_psu_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4)))
if mibBuilder.loadTexts:
hm2PSUSlotIndex.setStatus('current')
hm2_psu_slot_chassis_type_id = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('other', 0), ('mach1020', 1), ('mach4000', 2), ('railswitch', 3), ('grs', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotChassisTypeId.setStatus('current')
hm2_psu_slot_manufacturer_id = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('other', 0), ('hirschmann', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotManufacturerId.setStatus('current')
hm2_psu_slot_manufacturer_date = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 4), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotManufacturerDate.setStatus('obsolete')
hm2_psu_slot_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 5), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotSerialNumber.setStatus('current')
hm2_psu_slot_product_code = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 6), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotProductCode.setStatus('current')
hm2_psu_slot_description = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 7), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotDescription.setStatus('current')
hm2_psu_slot_combination_type = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('only-on-psu1', 0), ('psu1-sys-psu2-poe', 1), ('psu1-poe-psu2-sys', 2), ('two-separate-psus', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotCombinationType.setStatus('current')
hm2_psu_slot_temperature_range = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('tr-0-60', 0), ('tr-minus40-60', 1), ('tr-minus40-70', 2), ('tr-minus40-70cc', 3), ('tr-minus40-85', 4), ('tr-minus40-85cc', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotTemperatureRange.setStatus('current')
hm2_psu_slot_revision_id = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 10, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUSlotRevisionId.setStatus('current')
hm2_psu_unit_info_table = mib_table((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20))
if mibBuilder.loadTexts:
hm2PSUUnitInfoTable.setStatus('current')
hm2_psu_unit_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1)).setIndexNames((0, 'HM2-PWRMGMT-MIB', 'hm2PSUSlotIndex'), (0, 'HM2-PWRMGMT-MIB', 'hm2PSUUnitIndex'))
if mibBuilder.loadTexts:
hm2PSUUnitInfoEntry.setStatus('current')
hm2_psu_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2)))
if mibBuilder.loadTexts:
hm2PSUUnitIndex.setStatus('current')
hm2_psu_unit_converter_type = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ac', 1), ('dc', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitConverterType.setStatus('current')
hm2_psu_unit_number_of_inputs = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitNumberOfInputs.setStatus('current')
hm2_psu_unit_output_type = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('system', 1), ('both', 2), ('poe', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitOutputType.setStatus('current')
hm2_psu_unit_system_budget = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitSystemBudget.setStatus('current')
hm2_psu_unit_poe_budget = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitPoeBudget.setStatus('current')
hm2_psu_unit_fan_count = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitFanCount.setStatus('current')
hm2_psu_unit_voltage_range = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('vr-18-60vdc', 0), ('vr-24-60vdc', 1), ('vr-24-48vdc', 2), ('vr-60-250vdc-110-240vac', 3), ('vr-48-54vdc-poe', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitVoltageRange.setStatus('current')
hm2_psu_unit_power_interruption = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 11, 1, 1, 20, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2PSUUnitPowerInterruption.setStatus('current')
hm2_power_supply_trap = notification_type((1, 3, 6, 1, 4, 1, 248, 11, 11, 0, 1)).setObjects(('HM2-PWRMGMT-MIB', 'hm2PSID'), ('HM2-PWRMGMT-MIB', 'hm2PSState'))
if mibBuilder.loadTexts:
hm2PowerSupplyTrap.setStatus('current')
mibBuilder.exportSymbols('HM2-PWRMGMT-MIB', hm2PSUUnitIndex=hm2PSUUnitIndex, hm2PSUSlotCombinationType=hm2PSUSlotCombinationType, hm2PSUUnitConverterType=hm2PSUUnitConverterType, hm2PSUSlotIndex=hm2PSUSlotIndex, hm2PSUSlotChassisTypeId=hm2PSUSlotChassisTypeId, hm2PSUUnitNumberOfInputs=hm2PSUUnitNumberOfInputs, hm2PSUUnitInfoTable=hm2PSUUnitInfoTable, hm2PSUSlotInfoTable=hm2PSUSlotInfoTable, hm2PowerMgmtMibNotifications=hm2PowerMgmtMibNotifications, PYSNMP_MODULE_ID=hm2PowerMgmtMib, hm2PowerSupplyGroup=hm2PowerSupplyGroup, hm2PSUUnitOutputType=hm2PSUUnitOutputType, hm2PSUUnitSystemBudget=hm2PSUUnitSystemBudget, hm2PSUUnitPowerInterruption=hm2PSUUnitPowerInterruption, hm2PSUSlotManufacturerDate=hm2PSUSlotManufacturerDate, hm2PSUSlotDescription=hm2PSUSlotDescription, hm2PSUUnitVoltageRange=hm2PSUUnitVoltageRange, hm2PSTable=hm2PSTable, hm2PSState=hm2PSState, hm2PowerMgmtMib=hm2PowerMgmtMib, hm2PSUSlotManufacturerId=hm2PSUSlotManufacturerId, hm2PSUUnitPoeBudget=hm2PSUUnitPoeBudget, hm2PSUSlotInfoEntry=hm2PSUSlotInfoEntry, hm2PowerMgmtMibObjects=hm2PowerMgmtMibObjects, hm2PowerSupplyTrap=hm2PowerSupplyTrap, hm2PSEntry=hm2PSEntry, hm2PSUSlotRevisionId=hm2PSUSlotRevisionId, hm2PSUUnitFanCount=hm2PSUUnitFanCount, hm2PSID=hm2PSID, hm2PSUSlotTemperatureRange=hm2PSUSlotTemperatureRange, hm2PSUUnitInfoEntry=hm2PSUUnitInfoEntry, hm2PSUSlotProductCode=hm2PSUSlotProductCode, hm2PSUSlotSerialNumber=hm2PSUSlotSerialNumber) |
"""
Main.class
javac Main.java .
"""
constant_pool = list()
def is_class(magic_code):
return magic_code == 'cafebabe'
def read_constant_class(f, tag, index):
name_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'name_index': name_index,
'index': index,
}
def read_constant_ref(f, tag, index):
class_index = int(f.read(2).hex(), 16)
name_and_type_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'class_index': class_index,
'name_and_type_index': name_and_type_index,
'index': index,
}
def read_constant_string(f, tag, index):
string_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'string_index': string_index,
'index': index
}
def read_constant_num(f, tag, index):
b = f.read(4)
return {
'tag': tag,
'bytes': b,
'index': index
}
def read_constant_long_num(f, tag, index):
hb = f.read(4)
lb = f.read(4)
return {
'tag': tag,
'high_bytes': hb,
'low_bytes': lb,
'index': index
}
def read_constant_name_and_type(f, tag, index):
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'name_index': name_index,
'descriptor_index': descriptor_index,
'index': index
}
def read_constant_utf8_info(f, tag, index):
length = int(f.read(2).hex(), 16)
string = f.read(length).decode('ascii')
return {
'tag': tag,
'length': length,
'bytes': string,
'index': index
}
def read_constant_method_handle_info(f, tag, index):
reference_kind = int(f.read(1).hex(), 16)
reference_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'reference_kind': reference_kind,
'reference_index': reference_index,
'index': index
}
def read_constant_method_type_info(f, tag, index):
descriptor_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'descriptor_index': descriptor_index,
'index': index
}
def read_invoke_dynamic_info(f, tag, index):
bootstrap_method_attr_index = int(f.read(2).hex(), 16)
name_and_type_index = int(f.read(2).hex(), 16)
return {
'tag': tag,
'bootstrap_method_attr_index': bootstrap_method_attr_index,
'name_and_type_index': name_and_type_index,
'index': index
}
tag_constant_map = {
7: read_constant_class,
9: read_constant_ref, # Fieldref
10: read_constant_ref, # Methodref
11: read_constant_ref, # InterfaceMethodref,
8: read_constant_string,
3: read_constant_num, # Integer
4: read_constant_num, # Float
5: read_constant_long_num, # Long
6: read_constant_long_num, # Double,
12: read_constant_name_and_type,
1: read_constant_utf8_info,
15: read_constant_method_handle_info,
16: read_constant_method_type_info,
18: read_invoke_dynamic_info
}
def read_field_access_flags(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {
0: {
1: 'SYNTHETIC',
4: 'ENUM',
},
2: {
1: 'FINAL',
4: 'VOLATILE',
8: 'TRANSIENT'
},
3: {
1: 'PUBLIC',
2: 'PRIVATE',
4: 'PROTECTED',
8: 'STATIC'
}
}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_class_access_flags(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {
0: {
1: 'SYNTHETIC',
2: 'ANNOTATION',
4: 'ENUM'
},
1: {
2: 'INTERFACE',
4: 'ABSTRACT'
},
2: {
1: 'FINAL',
2: 'SUPER'
},
3: {
1: 'PUBLIC'
}
}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_method_access_flag(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {
0: {
1: 'SYNTHETIC',
},
1: {
1: 'NATIVE',
4: 'ABSTRACT',
8: 'STRICT',
},
2: {
1: 'FINAL',
2: 'SYNCHRONIZED',
4: 'BRIDGE',
8: 'VARARGS',
},
3: {
1: 'PUBLIC',
2: 'PRIVATE',
4: 'PROTECTED',
8: 'STATIC'
}
}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_field(f):
access_flags = read_field_access_flags(f)
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
attributes_count = int(f.read(2).hex(), 16)
index = 0
attributes = list()
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {
'access_flags': access_flags,
'name_index': name_index,
'descriptor_index': descriptor_index,
'attributes_count': attributes_count,
'attributes': attributes
}
def read_method(f):
access_flags = read_method_access_flag(f)
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
index = 0
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {
'access_flags': access_flags,
'name_index': name_index,
'descriptor_index': descriptor_index,
'attributes_count': attributes_count,
'attributes': attributes
}
def read_attribute_code(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
max_stack = int(f.read(2).hex(), 16)
max_locals = int(f.read(2).hex(), 16)
code_length = int(f.read(4).hex(), 16)
code = list()
index = 0
while index < code_length:
code.append(f.read(1).hex())
index += 1
exception_table_length = int(f.read(2).hex(), 16)
exception_table = list()
index = 0
while index < exception_table_length:
exception_table.append({
'start_pc': int(f.read(2).hex(), 16),
'end_pc': int(f.read(2).hex(), 16),
'handler_pc': int(f.read(2).hex(), 16),
'catch_type': int(f.read(2).hex(), 16)
})
index += 1
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'max_stack': max_stack,
'max_locals': max_locals,
'code_length': code_length,
'code': code,
'exception_table_legnth': exception_table_length,
'exception_tables': exception_table,
'attributes_count': attributes_count,
'attributes': attributes
}
def read_attribute_sourcefile(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
sourcefile_index = int(f.read(2).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'sourcefile_index': sourcefile_index
}
def read_attribute_line_number_table(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
line_number_table_length = int(f.read(2).hex(), 16)
line_number_table = list()
index = 0
while index < line_number_table_length:
line_number_table.append({
'start_pc': int(f.read(2).hex(), 16),
'line_number': int(f.read(2).hex(), 16),
})
index += 1
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'line_number_table_length': line_number_table_length,
'line_number_table': line_number_table
}
def read_attribute_constant_value(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
constantvalue_index = int(f.read(2).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'constantvalue_index': constantvalue_index
}
def read_attribute_exceptions(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_exceptions = int(f.read(2).hex(), 16)
exception_index_table = list()
index = 0
while index < number_of_exceptions:
exception_index_table.append(int(f.read(2).hex(), 16))
index += 1
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'number_of_exceptions': number_of_exceptions,
'exception_index_table': exception_index_table
}
def read_attribute_signature(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
signature_index = int(f.read(2).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'signature_index': signature_index
}
def read_attribute_stack_map_table(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_entries = int(f.read(2).hex(), 16)
entries = list()
index = 0
while index < number_of_entries:
frame_type = int(f.read(1).hex(), 16)
entries.append(read_stack_map_frame(f, frame_type))
index += 1
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'number_of_entries': number_of_entries,
'entries': entries,
}
def read_stack_map_frame(f, frame_type):
stack_map_frame = {
'frame_type': frame_type,
}
if 0 <= frame_type <= 63:
# SAME
pass
elif 64 <= frame_type <= 127:
# SAME_LOCALS_!_STACK_ITEM
number_of_stack_items = 1
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
elif frame_type == 247:
# SAME_LOCALS_1_STACK_ITEM_EXTENDED
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_stack_items = 1
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
elif 248 <= frame_type <= 250:
# CHOP
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
elif frame_type == 251:
# SAME_FRAME_EXTENDED
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
elif 252 <= frame_type <= 254:
# APPEND
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_locals = frame_type - 251
locals_ = list()
index = 0
while index < number_of_locals:
tag = int(f.read(1).hex(), 16)
locals_.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['locals'] = locals_
elif frame_type == 255:
# FULL_FRAME
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_locals = int(f.read(2).hex(), 16)
stack_map_frame['number_of_locals'] = number_of_locals
locals_ = list()
index = 0
while index < number_of_locals:
tag = int(f.read(1).hex(), 16)
locals_.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['locals'] = locals_
number_of_stack_items = int(f.read(2).hex(), 16)
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
return stack_map_frame
def read_verification_type_info(f, tag):
# Top_variable_info
# Integer_variable_info
# Float_variable_info
# Long_variable_info
# Double_variable_info
# Null_variable_info
# UninitializedThis_variable_info
# Object_variable_info
# Uninitialized_variable_info
verification_type_info = {
'tag': tag
}
if tag <= 6:
pass
elif tag == 7:
verification_type_info['cpool_index'] = int(f.read(2).hex(), 16)
elif tag == 8:
verification_type_info['offset'] = int(f.read(2).hex(), 16)
return verification_type_info
def read_attribute_inner_classes(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_classes = int(f.read(2).hex(), 16)
classes = list()
index = 0
while index < number_of_classes:
classes.append({
'inner_class_info_index': int(f.read(2).hex(), 16),
'outer_class_info_index': int(f.read(2).hex(), 16),
'inner_name_index': int(f.read(2).hex(), 16),
'inner_class_access_flags': read_class_access_flags(f)
})
index += 1
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'number_of_classes': number_of_classes,
'classes': classes
}
def read_attribute_enclosing_method(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
class_index = int(f.read(2).hex(), 16)
method_index = int(f.read(2).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'class_index': class_index,
'method_index': method_index
}
def read_attribute_synthetic(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length
}
def read_attribute_deprecated(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length
}
def read_attribute_uncommon(f, attribute_name_index):
# other uncommon attributes
attribute_length = int(f.read(4).hex(), 16)
attribute = f.read(attribute_length).hex()
return {
'attribute_name_index': attribute_name_index,
'attribute_length': attribute_length,
'attribute': attribute
}
name_attribute_map = {
'Code': read_attribute_code,
'SourceFile': read_attribute_sourcefile,
'LineNumberTable': read_attribute_line_number_table,
'ConstantValue': read_attribute_constant_value,
'Exceptions': read_attribute_exceptions,
'Signature': read_attribute_signature,
'StackMapTable': read_attribute_stack_map_table,
'InnerClasses': read_attribute_inner_classes,
'EnclosingMethod': read_attribute_enclosing_method,
'Synthetic': read_attribute_synthetic,
'Deprecated': read_attribute_deprecated
}
def read_attribute(f, attribute_name_index):
attribute_name = constant_pool[attribute_name_index - 1]['bytes']
parse_func = name_attribute_map.get(attribute_name, read_attribute_uncommon)
return parse_func(f, attribute_name_index)
def main(class_file_path):
with open(class_file_path, 'rb') as f:
magic_code = f.read(4).hex()
if not is_class(magic_code):
raise ValueError("not a valid class file")
minor_version = int(f.read(2).hex(), 16)
major_version = int(f.read(2).hex(), 16)
constant_pool_count = int(f.read(2).hex(), 16)
# start to read constant pool
index = 1
while index < constant_pool_count:
tag = int(f.read(1).hex(), 16)
parse_func = tag_constant_map[tag]
constant_pool.append(parse_func(f, tag, index))
index += 1
access_flags = read_class_access_flags(f)
this_class = int(f.read(2).hex(), 16)
super_class = int(f.read(2).hex(), 16)
interface_count = int(f.read(2).hex(), 16)
interfaces = list()
index = 0
while index < interface_count:
interfaces.append(int(f.read(2).hex(), 16))
index += 1
fields_count = int(f.read(2).hex(), 16)
fields = list()
index = 0
while index < fields_count:
fields.append(read_field(f))
index += 1
methods_count = int(f.read(2).hex(), 16)
methods = list()
index = 0
while index < methods_count:
methods.append(read_method(f))
index += 1
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
index = 0
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attributes.append(read_attribute(f, attribute_name_index))
index += 1
if __name__ == '__main__':
main("Main.class")
| """
Main.class
javac Main.java .
"""
constant_pool = list()
def is_class(magic_code):
return magic_code == 'cafebabe'
def read_constant_class(f, tag, index):
name_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'name_index': name_index, 'index': index}
def read_constant_ref(f, tag, index):
class_index = int(f.read(2).hex(), 16)
name_and_type_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'class_index': class_index, 'name_and_type_index': name_and_type_index, 'index': index}
def read_constant_string(f, tag, index):
string_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'string_index': string_index, 'index': index}
def read_constant_num(f, tag, index):
b = f.read(4)
return {'tag': tag, 'bytes': b, 'index': index}
def read_constant_long_num(f, tag, index):
hb = f.read(4)
lb = f.read(4)
return {'tag': tag, 'high_bytes': hb, 'low_bytes': lb, 'index': index}
def read_constant_name_and_type(f, tag, index):
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'name_index': name_index, 'descriptor_index': descriptor_index, 'index': index}
def read_constant_utf8_info(f, tag, index):
length = int(f.read(2).hex(), 16)
string = f.read(length).decode('ascii')
return {'tag': tag, 'length': length, 'bytes': string, 'index': index}
def read_constant_method_handle_info(f, tag, index):
reference_kind = int(f.read(1).hex(), 16)
reference_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'reference_kind': reference_kind, 'reference_index': reference_index, 'index': index}
def read_constant_method_type_info(f, tag, index):
descriptor_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'descriptor_index': descriptor_index, 'index': index}
def read_invoke_dynamic_info(f, tag, index):
bootstrap_method_attr_index = int(f.read(2).hex(), 16)
name_and_type_index = int(f.read(2).hex(), 16)
return {'tag': tag, 'bootstrap_method_attr_index': bootstrap_method_attr_index, 'name_and_type_index': name_and_type_index, 'index': index}
tag_constant_map = {7: read_constant_class, 9: read_constant_ref, 10: read_constant_ref, 11: read_constant_ref, 8: read_constant_string, 3: read_constant_num, 4: read_constant_num, 5: read_constant_long_num, 6: read_constant_long_num, 12: read_constant_name_and_type, 1: read_constant_utf8_info, 15: read_constant_method_handle_info, 16: read_constant_method_type_info, 18: read_invoke_dynamic_info}
def read_field_access_flags(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {0: {1: 'SYNTHETIC', 4: 'ENUM'}, 2: {1: 'FINAL', 4: 'VOLATILE', 8: 'TRANSIENT'}, 3: {1: 'PUBLIC', 2: 'PRIVATE', 4: 'PROTECTED', 8: 'STATIC'}}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_class_access_flags(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {0: {1: 'SYNTHETIC', 2: 'ANNOTATION', 4: 'ENUM'}, 1: {2: 'INTERFACE', 4: 'ABSTRACT'}, 2: {1: 'FINAL', 2: 'SUPER'}, 3: {1: 'PUBLIC'}}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_method_access_flag(f):
access_flags_hex = f.read(2).hex()
access_flags = list()
flags = {0: {1: 'SYNTHETIC'}, 1: {1: 'NATIVE', 4: 'ABSTRACT', 8: 'STRICT'}, 2: {1: 'FINAL', 2: 'SYNCHRONIZED', 4: 'BRIDGE', 8: 'VARARGS'}, 3: {1: 'PUBLIC', 2: 'PRIVATE', 4: 'PROTECTED', 8: 'STATIC'}}
for index in range(len(access_flags_hex)):
b = access_flags_hex[index]
if index in flags:
for flag in flags[index]:
if int(b, 16) & flag != 0:
access_flags.append(flags[index][flag])
return access_flags
def read_field(f):
access_flags = read_field_access_flags(f)
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
attributes_count = int(f.read(2).hex(), 16)
index = 0
attributes = list()
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {'access_flags': access_flags, 'name_index': name_index, 'descriptor_index': descriptor_index, 'attributes_count': attributes_count, 'attributes': attributes}
def read_method(f):
access_flags = read_method_access_flag(f)
name_index = int(f.read(2).hex(), 16)
descriptor_index = int(f.read(2).hex(), 16)
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
index = 0
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {'access_flags': access_flags, 'name_index': name_index, 'descriptor_index': descriptor_index, 'attributes_count': attributes_count, 'attributes': attributes}
def read_attribute_code(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
max_stack = int(f.read(2).hex(), 16)
max_locals = int(f.read(2).hex(), 16)
code_length = int(f.read(4).hex(), 16)
code = list()
index = 0
while index < code_length:
code.append(f.read(1).hex())
index += 1
exception_table_length = int(f.read(2).hex(), 16)
exception_table = list()
index = 0
while index < exception_table_length:
exception_table.append({'start_pc': int(f.read(2).hex(), 16), 'end_pc': int(f.read(2).hex(), 16), 'handler_pc': int(f.read(2).hex(), 16), 'catch_type': int(f.read(2).hex(), 16)})
index += 1
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attribute = read_attribute(f, attribute_name_index)
attributes.append(attribute)
index += 1
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'max_stack': max_stack, 'max_locals': max_locals, 'code_length': code_length, 'code': code, 'exception_table_legnth': exception_table_length, 'exception_tables': exception_table, 'attributes_count': attributes_count, 'attributes': attributes}
def read_attribute_sourcefile(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
sourcefile_index = int(f.read(2).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'sourcefile_index': sourcefile_index}
def read_attribute_line_number_table(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
line_number_table_length = int(f.read(2).hex(), 16)
line_number_table = list()
index = 0
while index < line_number_table_length:
line_number_table.append({'start_pc': int(f.read(2).hex(), 16), 'line_number': int(f.read(2).hex(), 16)})
index += 1
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'line_number_table_length': line_number_table_length, 'line_number_table': line_number_table}
def read_attribute_constant_value(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
constantvalue_index = int(f.read(2).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'constantvalue_index': constantvalue_index}
def read_attribute_exceptions(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_exceptions = int(f.read(2).hex(), 16)
exception_index_table = list()
index = 0
while index < number_of_exceptions:
exception_index_table.append(int(f.read(2).hex(), 16))
index += 1
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'number_of_exceptions': number_of_exceptions, 'exception_index_table': exception_index_table}
def read_attribute_signature(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
signature_index = int(f.read(2).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'signature_index': signature_index}
def read_attribute_stack_map_table(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_entries = int(f.read(2).hex(), 16)
entries = list()
index = 0
while index < number_of_entries:
frame_type = int(f.read(1).hex(), 16)
entries.append(read_stack_map_frame(f, frame_type))
index += 1
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'number_of_entries': number_of_entries, 'entries': entries}
def read_stack_map_frame(f, frame_type):
stack_map_frame = {'frame_type': frame_type}
if 0 <= frame_type <= 63:
pass
elif 64 <= frame_type <= 127:
number_of_stack_items = 1
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
elif frame_type == 247:
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_stack_items = 1
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
elif 248 <= frame_type <= 250:
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
elif frame_type == 251:
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
elif 252 <= frame_type <= 254:
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_locals = frame_type - 251
locals_ = list()
index = 0
while index < number_of_locals:
tag = int(f.read(1).hex(), 16)
locals_.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['locals'] = locals_
elif frame_type == 255:
stack_map_frame['offset_delta'] = int(f.read(2).hex(), 16)
number_of_locals = int(f.read(2).hex(), 16)
stack_map_frame['number_of_locals'] = number_of_locals
locals_ = list()
index = 0
while index < number_of_locals:
tag = int(f.read(1).hex(), 16)
locals_.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['locals'] = locals_
number_of_stack_items = int(f.read(2).hex(), 16)
stack_items = list()
index = 0
while index < number_of_stack_items:
tag = int(f.read(1).hex(), 16)
stack_items.append(read_verification_type_info(f, tag))
index += 1
stack_map_frame['stack'] = stack_items
return stack_map_frame
def read_verification_type_info(f, tag):
verification_type_info = {'tag': tag}
if tag <= 6:
pass
elif tag == 7:
verification_type_info['cpool_index'] = int(f.read(2).hex(), 16)
elif tag == 8:
verification_type_info['offset'] = int(f.read(2).hex(), 16)
return verification_type_info
def read_attribute_inner_classes(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
number_of_classes = int(f.read(2).hex(), 16)
classes = list()
index = 0
while index < number_of_classes:
classes.append({'inner_class_info_index': int(f.read(2).hex(), 16), 'outer_class_info_index': int(f.read(2).hex(), 16), 'inner_name_index': int(f.read(2).hex(), 16), 'inner_class_access_flags': read_class_access_flags(f)})
index += 1
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'number_of_classes': number_of_classes, 'classes': classes}
def read_attribute_enclosing_method(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
class_index = int(f.read(2).hex(), 16)
method_index = int(f.read(2).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'class_index': class_index, 'method_index': method_index}
def read_attribute_synthetic(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length}
def read_attribute_deprecated(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length}
def read_attribute_uncommon(f, attribute_name_index):
attribute_length = int(f.read(4).hex(), 16)
attribute = f.read(attribute_length).hex()
return {'attribute_name_index': attribute_name_index, 'attribute_length': attribute_length, 'attribute': attribute}
name_attribute_map = {'Code': read_attribute_code, 'SourceFile': read_attribute_sourcefile, 'LineNumberTable': read_attribute_line_number_table, 'ConstantValue': read_attribute_constant_value, 'Exceptions': read_attribute_exceptions, 'Signature': read_attribute_signature, 'StackMapTable': read_attribute_stack_map_table, 'InnerClasses': read_attribute_inner_classes, 'EnclosingMethod': read_attribute_enclosing_method, 'Synthetic': read_attribute_synthetic, 'Deprecated': read_attribute_deprecated}
def read_attribute(f, attribute_name_index):
attribute_name = constant_pool[attribute_name_index - 1]['bytes']
parse_func = name_attribute_map.get(attribute_name, read_attribute_uncommon)
return parse_func(f, attribute_name_index)
def main(class_file_path):
with open(class_file_path, 'rb') as f:
magic_code = f.read(4).hex()
if not is_class(magic_code):
raise value_error('not a valid class file')
minor_version = int(f.read(2).hex(), 16)
major_version = int(f.read(2).hex(), 16)
constant_pool_count = int(f.read(2).hex(), 16)
index = 1
while index < constant_pool_count:
tag = int(f.read(1).hex(), 16)
parse_func = tag_constant_map[tag]
constant_pool.append(parse_func(f, tag, index))
index += 1
access_flags = read_class_access_flags(f)
this_class = int(f.read(2).hex(), 16)
super_class = int(f.read(2).hex(), 16)
interface_count = int(f.read(2).hex(), 16)
interfaces = list()
index = 0
while index < interface_count:
interfaces.append(int(f.read(2).hex(), 16))
index += 1
fields_count = int(f.read(2).hex(), 16)
fields = list()
index = 0
while index < fields_count:
fields.append(read_field(f))
index += 1
methods_count = int(f.read(2).hex(), 16)
methods = list()
index = 0
while index < methods_count:
methods.append(read_method(f))
index += 1
attributes_count = int(f.read(2).hex(), 16)
attributes = list()
index = 0
while index < attributes_count:
attribute_name_index = int(f.read(2).hex(), 16)
attributes.append(read_attribute(f, attribute_name_index))
index += 1
if __name__ == '__main__':
main('Main.class') |
'''
Leetcode
7. Reverse Integer
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Note:
The input is assumed to be a 32-bit signed integer.
Your function should return 0 when the reversed integer overflows.
'''
def reverse(p):
"""
:type x: int
:rtype: int
"""
if p > 0:
x = p
else:
x = -p
y = 0
while x != 0:
n = x % 10
y = y * 10 + n
x = x // 10
if p > 0:
retu = y
else:
retu = -y
if retu > 2147483647 or retu < -2147483648:
return 0
else:
return retu
if __name__ == '__main__':
print(reverse(123))
| """
Leetcode
7. Reverse Integer
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Note:
The input is assumed to be a 32-bit signed integer.
Your function should return 0 when the reversed integer overflows.
"""
def reverse(p):
"""
:type x: int
:rtype: int
"""
if p > 0:
x = p
else:
x = -p
y = 0
while x != 0:
n = x % 10
y = y * 10 + n
x = x // 10
if p > 0:
retu = y
else:
retu = -y
if retu > 2147483647 or retu < -2147483648:
return 0
else:
return retu
if __name__ == '__main__':
print(reverse(123)) |
"""
This package contains the sphinx extensions used by barak.
The `numpydoc` module is derived from the documentation tools numpy
and scipy use to parse docstrings in the numpy/scipy format. The
other modules are dependencies for `numpydoc`.
"""
| """
This package contains the sphinx extensions used by barak.
The `numpydoc` module is derived from the documentation tools numpy
and scipy use to parse docstrings in the numpy/scipy format. The
other modules are dependencies for `numpydoc`.
""" |
# key = DB quest string, value = quest timer in days
quests = {
'AugmentationBlankGemAcquired': ('Aug Gem: Bellas', 6),
'BlankAugLuminanceTimer_0511': ('Aug Gem: Luminance', 14),
'PickedUpMarkerBoss10x': ('Aug Gem: Diemos', 6),
'SocietyMasterStipendCollectionTimer': ('Stipend - Society', 6),
'StipendTimer_0812': ('Stipend - General', 6),
}
| quests = {'AugmentationBlankGemAcquired': ('Aug Gem: Bellas', 6), 'BlankAugLuminanceTimer_0511': ('Aug Gem: Luminance', 14), 'PickedUpMarkerBoss10x': ('Aug Gem: Diemos', 6), 'SocietyMasterStipendCollectionTimer': ('Stipend - Society', 6), 'StipendTimer_0812': ('Stipend - General', 6)} |
# Initialization of n*n grid
def create_grid():
global n
n = int(input("Enter grid size: "))
global grids
grids = []
for i in range(0, n):
grids.append([])
for i in range(0, n):
for j in range(0, n):
grids[i].append(j)
grids[i][j] = - 1
grid_def()
# Displays the current state of the grid
def grid_def():
grid = []
for i in range(0, n):
grid.append([])
for i in range(0, n):
for j in range(0, n):
grid[i].append(j)
grid[i][j] = " "
for i in range(0, n):
for j in range(0, n):
if grids[i][j] == 1:
grid[i][j] = " X "
elif grids[i][j] == 2:
grid[i][j] = " O "
e = "\n", "--- " * n, "\n"
print(("".join(str(i) for i in e).join("|".join(str(x) for x in row) for row in grid)))
def user_def():
global user
if user < 2:
user = 2
else:
user = 1
def slot_full_def():
if grids[0][userInput - 1] != -1:
complete_slot_full()
print("Slot is full try again!!!")
confirm_def()
def confirm_def():
loop_2 = True
while loop_2:
try:
global userInput
userInput = int(input("\nInput a slot player " + str(user) + " from 1 to " + str(n) + ":\n"))
if (n + 1) > userInput > 0:
loop_2 = False
else:
print("Invalid integer value")
except ValueError:
print("Invalid Input")
def placement_def():
counter = 0
for i in range(n - 1, -1, -1):
slot_full_def()
if grids[i][userInput - 1] == -1:
if user == 1:
grids[i][userInput - 1] = 1
elif user == 2:
grids[i][userInput - 1] = 2
grid_def()
break
# prints who has won
def hasWon_def():
print("Player " + str(user) + " has won!!!\nCongrats")
play_again()
# checks if there is a winner
def check_Win():
if user == 1:
tile = 1
elif user == 2:
tile = 2
# check horizontal spaces
for y in range(n):
for x in range(n - 3):
if grids[x][y] == tile and grids[x + 1][y] == tile and grids[x + 2][y] == tile and grids[x + 3][y] == tile:
hasWon_def()
return False
# check vertical spaces
for x in range(n):
for y in range(n - 3):
if grids[x][y] == tile and grids[x][y + 1] == tile and grids[x][y + 2] == tile and grids[x][y + 3] == tile:
hasWon_def()
return False
# check / diagonal spaces
for x in range(n - 3):
for y in range(3, n):
if grids[x][y] == tile and grids[x + 1][y - 1] == tile and grids[x + 2][y - 2] == tile and grids[x + 3][y - 3] == tile:
hasWon_def()
return False
# check \ diagonal spaces
for x in range(n - 3):
for y in range(n - 3):
if grids[x][y] == tile and grids[x + 1][y + 1] == tile and grids[x + 2][y + 2] == tile and grids[x + 3][y + 3] == tile:
hasWon_def()
return False
return True
def checkEmpty_def():
global check
for i in range(n - 1, -1, -1):
for a in range(n - 1, -1, -1):
check.append(grids[i][a])
if -1 not in check:
print("Full")
def checks_def():
check_Win()
checkEmpty_def()
def play_again():
ch = input("Do you want to play again??(Y/N)")
if ch.upper() == "YES" or ch.upper() == 'Y':
menu()
elif ch.upper() == "NO" or ch.upper() == 'N':
print("Thank You!!!")
exit()
else:
print("Invalid Input")
play_again()
def complete_slot_full():
count=0
for i in range(0, n):
if grids[userInput - 1][i] != -1:
count=count+1
if count == n:
print("The complete slot is full,\n The game is a Tie.")
play_again()
exit()
def rotate90clockwise(k):
for l in range(0,k):
m = len(grids[0])
for i in range(m // 2):
for j in range(i, m - i - 1):
temp = grids[i][j]
grids[i][j] = grids[m - 1 - j][i]
grids[m - 1 - j][i] = grids[m - 1 - i][m - 1 - j]
grids[m - 1 - i][m - 1 - j] = grids[j][m - 1 - i]
grids[j][m - 1 - i] = temp
grid_def()
fall()
def fall():
print("After rotation: ")
for k in range (n):
for i in range(n-1):
for j in range(n):
if grids[i+1][j] == -1:
grids[i+1][j] = grids[i][j]
grids[i][j] = -1
grid_def()
def play_c1():
global user
global check
global loop
create_grid()
check = []
user = 1
loop = True
while loop is True:
loop = check_Win()
if not loop:
break
confirm_def()
placement_def()
checks_def()
user_def()
grid_def()
def play_c2():
global user
global check
global loop
create_grid()
check = []
user = 1
loop = True
while loop:
loop = check_Win()
if not loop:
break
confirm_def()
placement_def()
checks_def()
user_def()
print("By how many times do you wan to rotate the grid")
k = int(input())
if k > 0:
rotate90clockwise(k)
grid_def()
def menu():
print("n===MENU===")
print("1.Play Without Rotation.")
print("2.Play with Rotation.")
cho=int(input("please enter 1 or 2 as per your choice."))
if(cho==1):
play_c1()
elif (cho==2):
play_c2()
else:
print("Invalid Input")
menu()
menu()
close
| def create_grid():
global n
n = int(input('Enter grid size: '))
global grids
grids = []
for i in range(0, n):
grids.append([])
for i in range(0, n):
for j in range(0, n):
grids[i].append(j)
grids[i][j] = -1
grid_def()
def grid_def():
grid = []
for i in range(0, n):
grid.append([])
for i in range(0, n):
for j in range(0, n):
grid[i].append(j)
grid[i][j] = ' '
for i in range(0, n):
for j in range(0, n):
if grids[i][j] == 1:
grid[i][j] = ' X '
elif grids[i][j] == 2:
grid[i][j] = ' O '
e = ('\n', '--- ' * n, '\n')
print(''.join((str(i) for i in e)).join(('|'.join((str(x) for x in row)) for row in grid)))
def user_def():
global user
if user < 2:
user = 2
else:
user = 1
def slot_full_def():
if grids[0][userInput - 1] != -1:
complete_slot_full()
print('Slot is full try again!!!')
confirm_def()
def confirm_def():
loop_2 = True
while loop_2:
try:
global userInput
user_input = int(input('\nInput a slot player ' + str(user) + ' from 1 to ' + str(n) + ':\n'))
if n + 1 > userInput > 0:
loop_2 = False
else:
print('Invalid integer value')
except ValueError:
print('Invalid Input')
def placement_def():
counter = 0
for i in range(n - 1, -1, -1):
slot_full_def()
if grids[i][userInput - 1] == -1:
if user == 1:
grids[i][userInput - 1] = 1
elif user == 2:
grids[i][userInput - 1] = 2
grid_def()
break
def has_won_def():
print('Player ' + str(user) + ' has won!!!\nCongrats')
play_again()
def check__win():
if user == 1:
tile = 1
elif user == 2:
tile = 2
for y in range(n):
for x in range(n - 3):
if grids[x][y] == tile and grids[x + 1][y] == tile and (grids[x + 2][y] == tile) and (grids[x + 3][y] == tile):
has_won_def()
return False
for x in range(n):
for y in range(n - 3):
if grids[x][y] == tile and grids[x][y + 1] == tile and (grids[x][y + 2] == tile) and (grids[x][y + 3] == tile):
has_won_def()
return False
for x in range(n - 3):
for y in range(3, n):
if grids[x][y] == tile and grids[x + 1][y - 1] == tile and (grids[x + 2][y - 2] == tile) and (grids[x + 3][y - 3] == tile):
has_won_def()
return False
for x in range(n - 3):
for y in range(n - 3):
if grids[x][y] == tile and grids[x + 1][y + 1] == tile and (grids[x + 2][y + 2] == tile) and (grids[x + 3][y + 3] == tile):
has_won_def()
return False
return True
def check_empty_def():
global check
for i in range(n - 1, -1, -1):
for a in range(n - 1, -1, -1):
check.append(grids[i][a])
if -1 not in check:
print('Full')
def checks_def():
check__win()
check_empty_def()
def play_again():
ch = input('Do you want to play again??(Y/N)')
if ch.upper() == 'YES' or ch.upper() == 'Y':
menu()
elif ch.upper() == 'NO' or ch.upper() == 'N':
print('Thank You!!!')
exit()
else:
print('Invalid Input')
play_again()
def complete_slot_full():
count = 0
for i in range(0, n):
if grids[userInput - 1][i] != -1:
count = count + 1
if count == n:
print('The complete slot is full,\n The game is a Tie.')
play_again()
exit()
def rotate90clockwise(k):
for l in range(0, k):
m = len(grids[0])
for i in range(m // 2):
for j in range(i, m - i - 1):
temp = grids[i][j]
grids[i][j] = grids[m - 1 - j][i]
grids[m - 1 - j][i] = grids[m - 1 - i][m - 1 - j]
grids[m - 1 - i][m - 1 - j] = grids[j][m - 1 - i]
grids[j][m - 1 - i] = temp
grid_def()
fall()
def fall():
print('After rotation: ')
for k in range(n):
for i in range(n - 1):
for j in range(n):
if grids[i + 1][j] == -1:
grids[i + 1][j] = grids[i][j]
grids[i][j] = -1
grid_def()
def play_c1():
global user
global check
global loop
create_grid()
check = []
user = 1
loop = True
while loop is True:
loop = check__win()
if not loop:
break
confirm_def()
placement_def()
checks_def()
user_def()
grid_def()
def play_c2():
global user
global check
global loop
create_grid()
check = []
user = 1
loop = True
while loop:
loop = check__win()
if not loop:
break
confirm_def()
placement_def()
checks_def()
user_def()
print('By how many times do you wan to rotate the grid')
k = int(input())
if k > 0:
rotate90clockwise(k)
grid_def()
def menu():
print('n===MENU===')
print('1.Play Without Rotation.')
print('2.Play with Rotation.')
cho = int(input('please enter 1 or 2 as per your choice.'))
if cho == 1:
play_c1()
elif cho == 2:
play_c2()
else:
print('Invalid Input')
menu()
menu()
close |
'''
By a length in meters you can check how it is in kilometer, hectometer
decimeter, centimeter and millimeter
'''
m = float(input('Type a length in meters: '))
km = m / 1000
hm = m / 100
dam = m / 10
dm = m * 10
cm = m * 100
mm = m * 1000
print('The value in kilometer is {:.3f}. \nThe value in hectometer is {:.2f}. \nThe value in decameter is {:.2f}.'.format(km, hm, dam))
print('The value in decimeter is 25.5{:.2f}. \nThe value in centimeter is {:.2f}. \nThe value in millimeter is {:.2f}.'.format(dm, cm, mm))
| """
By a length in meters you can check how it is in kilometer, hectometer
decimeter, centimeter and millimeter
"""
m = float(input('Type a length in meters: '))
km = m / 1000
hm = m / 100
dam = m / 10
dm = m * 10
cm = m * 100
mm = m * 1000
print('The value in kilometer is {:.3f}. \nThe value in hectometer is {:.2f}. \nThe value in decameter is {:.2f}.'.format(km, hm, dam))
print('The value in decimeter is 25.5{:.2f}. \nThe value in centimeter is {:.2f}. \nThe value in millimeter is {:.2f}.'.format(dm, cm, mm)) |
glob_cnt = {}
def key_or_incr(word):
if glob_cnt.has_key(word):
glob_cnt[word]+=1
else:
glob_cnt.update({word:1})
if __name__=='__main__':
# Reads a paragraph of text
para = open("para.txt","r")
word_list = para.read().split(" ")
# update the count entries for each word
for word in word_list:
key_or_incr(word.lower())
# Display the word with their count
for k,v in glob_cnt.items():
print (k,v)
| glob_cnt = {}
def key_or_incr(word):
if glob_cnt.has_key(word):
glob_cnt[word] += 1
else:
glob_cnt.update({word: 1})
if __name__ == '__main__':
para = open('para.txt', 'r')
word_list = para.read().split(' ')
for word in word_list:
key_or_incr(word.lower())
for (k, v) in glob_cnt.items():
print(k, v) |
MODEL_EXTENSIONS = (
'.egg',
'.bam',
'.pz',
'.obj',
)
PANDA_3D_RUNTIME_PATH = r'C:\Panda3D-1.10.9-x64' | model_extensions = ('.egg', '.bam', '.pz', '.obj')
panda_3_d_runtime_path = 'C:\\Panda3D-1.10.9-x64' |
class Key:
def __init__(self, m, e):
self.modulus = m
self.exponent = e
def set_modulus(self, m):
self.modulus = m
def set_exponent(self, e):
self.exponent = e
def get_modulus(self):
return self.modulus
def get_exponent(self):
return self.exponent
| class Key:
def __init__(self, m, e):
self.modulus = m
self.exponent = e
def set_modulus(self, m):
self.modulus = m
def set_exponent(self, e):
self.exponent = e
def get_modulus(self):
return self.modulus
def get_exponent(self):
return self.exponent |
# 13. Write a program that asks the user to enter two strings of the same length. The program
# should then check to see if the strings are of the same length. If they are not, the program
# should print an appropriate message and exit. If they are of the same length, the program
# should alternate the characters of the two strings. For example, if the user enters abcde and
# ABCDE the program should print out AaBbCcDdEe .
first_string = input('Enter a string: ')
second_string = input('Enter another string: ')
if len(first_string) != len(second_string):
print('The strings are not the same length.')
else:
for i in range(len(first_string)):
print(second_string[i] + first_string[i], end='')
| first_string = input('Enter a string: ')
second_string = input('Enter another string: ')
if len(first_string) != len(second_string):
print('The strings are not the same length.')
else:
for i in range(len(first_string)):
print(second_string[i] + first_string[i], end='') |
#!/usr/bin/env python
# table auto-generator for zling.
# author: Zhang Li <zhangli10@baidu.com>
kBucketItemSize = 4096
matchidx_blen = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7] + [8] * 1024
matchidx_code = []
matchidx_bits = []
matchidx_base = []
while len(matchidx_code) < kBucketItemSize:
for bits in range(2 ** matchidx_blen[len(matchidx_base)]):
matchidx_code.append(len(matchidx_base))
matchidx_base.append(len(matchidx_code) - 2 ** matchidx_blen[len(matchidx_base)])
f_blen = open("ztable_matchidx_blen.inc", "w")
f_base = open("ztable_matchidx_base.inc", "w")
f_code = open("ztable_matchidx_code.inc", "w")
for i in range(0, matchidx_base.__len__()):
f_blen.write("%4u," % matchidx_blen[i] + "\n\x20" [int(i % 16 != 15)])
f_base.write("%4u," % matchidx_base[i] + "\n\x20" [int(i % 16 != 15)])
for i in range(0, matchidx_code.__len__()):
f_code.write("%4u," % matchidx_code[i] + "\n\x20" [int(i % 16 != 15)])
| k_bucket_item_size = 4096
matchidx_blen = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7] + [8] * 1024
matchidx_code = []
matchidx_bits = []
matchidx_base = []
while len(matchidx_code) < kBucketItemSize:
for bits in range(2 ** matchidx_blen[len(matchidx_base)]):
matchidx_code.append(len(matchidx_base))
matchidx_base.append(len(matchidx_code) - 2 ** matchidx_blen[len(matchidx_base)])
f_blen = open('ztable_matchidx_blen.inc', 'w')
f_base = open('ztable_matchidx_base.inc', 'w')
f_code = open('ztable_matchidx_code.inc', 'w')
for i in range(0, matchidx_base.__len__()):
f_blen.write('%4u,' % matchidx_blen[i] + '\n '[int(i % 16 != 15)])
f_base.write('%4u,' % matchidx_base[i] + '\n '[int(i % 16 != 15)])
for i in range(0, matchidx_code.__len__()):
f_code.write('%4u,' % matchidx_code[i] + '\n '[int(i % 16 != 15)]) |
# NOTE: the agent holds items as a list where
# items[idx] is the number of items collected of type 'idx'
# IMPORTANT: if the original item config is changed/reodered, this file will
# likely have to be updated to reflect new item positions.
def all_item_reward(ai_r=1):
# awards +ai_r for every new item collected
def reward_calc(prev_items, items):
# hardcoded based on config specification
return (sum(items)-sum(prev_items))*ai_r
return reward_calc
def r_jellybean(jb_r=1):
# rewards +jb_r for every jellybean collected
def reward_calc(prev_items, items):
# hardcoded based on config specification
JB_IDX = 2
return (items[JB_IDX]-prev_items[JB_IDX])*jb_r
return reward_calc
def r_onion(on_r=1):
# rewards +on_r for every onion collected
def reward_calc(prev_items, items):
# hardcoded based on config specification
ON_IDX = 1
return (items[ON_IDX]-prev_items[ON_IDX])*on_r
return reward_calc
def r_banana(ban_r=1):
# rewards +ban_r for every banana collected
def reward_calc(prev_items, items):
# hardcoded based on config specification
BAN_IDX = 0
return (items[BAN_IDX]-prev_items[BAN_IDX])*ban_r
return reward_calc
def avoid_onion():
LIVING_REWARD = -0.005
# LIVING_REWARD = -0.00
ONION_PENALTY = -1
SUCCESS_REWARD = +10
def reward_calc(prev_items, items):
if sum(prev_items)==sum(items):
# implies no items were found
return LIVING_REWARD
onion_penalty = r_onion(ONION_PENALTY)(prev_items, items)
if onion_penalty == 0:
# implies item picked up wasn't an onion
return all_item_reward(SUCCESS_REWARD)(prev_items, items)
return onion_penalty
return reward_calc
| def all_item_reward(ai_r=1):
def reward_calc(prev_items, items):
return (sum(items) - sum(prev_items)) * ai_r
return reward_calc
def r_jellybean(jb_r=1):
def reward_calc(prev_items, items):
jb_idx = 2
return (items[JB_IDX] - prev_items[JB_IDX]) * jb_r
return reward_calc
def r_onion(on_r=1):
def reward_calc(prev_items, items):
on_idx = 1
return (items[ON_IDX] - prev_items[ON_IDX]) * on_r
return reward_calc
def r_banana(ban_r=1):
def reward_calc(prev_items, items):
ban_idx = 0
return (items[BAN_IDX] - prev_items[BAN_IDX]) * ban_r
return reward_calc
def avoid_onion():
living_reward = -0.005
onion_penalty = -1
success_reward = +10
def reward_calc(prev_items, items):
if sum(prev_items) == sum(items):
return LIVING_REWARD
onion_penalty = r_onion(ONION_PENALTY)(prev_items, items)
if onion_penalty == 0:
return all_item_reward(SUCCESS_REWARD)(prev_items, items)
return onion_penalty
return reward_calc |
"""
Given a positive integer n and you can do operations as follow:
If n is even, replace n with n/2.
If n is odd, you can replace n with either n + 1 or n - 1.
What is the minimum number of replacements needed for n to become 1?
Example 1:
Input:
8
Output:
3
Explanation:
8 -> 4 -> 2 -> 1
Example 2:
Input:
7
Output:
4
Explanation:
7 -> 8 -> 4 -> 2 -> 1
or
7 -> 6 -> 3 -> 2 -> 1
"""
class Solution(object):
def integerReplacement(self, n):
"""
:type n: int
:rtype: int
"""
return self.replace(n, 0)
def replace(self, n, step):
if n == 1:
return step
if n % 2 == 0:
return self.replace(n // 2, step + 1)
else:
return min(self.replace(n + 1, step + 1),
self.replace(n - 1, step + 1))
a = Solution()
print(a.integerReplacement(8) == 3)
print(a.integerReplacement(7) == 4)
| """
Given a positive integer n and you can do operations as follow:
If n is even, replace n with n/2.
If n is odd, you can replace n with either n + 1 or n - 1.
What is the minimum number of replacements needed for n to become 1?
Example 1:
Input:
8
Output:
3
Explanation:
8 -> 4 -> 2 -> 1
Example 2:
Input:
7
Output:
4
Explanation:
7 -> 8 -> 4 -> 2 -> 1
or
7 -> 6 -> 3 -> 2 -> 1
"""
class Solution(object):
def integer_replacement(self, n):
"""
:type n: int
:rtype: int
"""
return self.replace(n, 0)
def replace(self, n, step):
if n == 1:
return step
if n % 2 == 0:
return self.replace(n // 2, step + 1)
else:
return min(self.replace(n + 1, step + 1), self.replace(n - 1, step + 1))
a = solution()
print(a.integerReplacement(8) == 3)
print(a.integerReplacement(7) == 4) |
tuplas = (1,2,3,4,5,6,7,8,9,0)
print(tuplas[0])
# seleccion invertida
print(tuplas[-1])
# sub tuplas
sub = tuplas[:9:2]
print(sub)
# no puede ser modificada, por lo que
sub[1] = 30
| tuplas = (1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
print(tuplas[0])
print(tuplas[-1])
sub = tuplas[:9:2]
print(sub)
sub[1] = 30 |
# Define a Python subroutine to colour atoms by B-factor, using predefined intervals
def colour_consurf(selection="all"):
# Colour other chains gray, while maintaining
# oxygen in red, nitrogen in blue and hydrogen in white
cmd.color("gray", selection)
cmd.util.cnc()
# These are constants
minimum = 0.0
maximum = 9.0
n_colours = 9
# Colours are calculated by dividing the RGB colours by 255
# RGB = [[16,200,209],[140,255,255],[215,255,255],[234,255,255],[255,255,255],
# [252,237,244],[250,201,222],[240,125,171],[160,37,96]]
colours = [
[0.039215686, 0.490196078, 0.509803922],
[0.294117647, 0.68627451, 0.745098039],
[0.647058824, 0.862745098, 0.901960784],
[0.843137255, 0.941176471, 0.941176471],
[1, 1, 1],
[0.980392157, 0.921568627, 0.960784314],
[0.980392157, 0.784313725, 0.862745098],
[0.941176471, 0.490196078, 0.666666667],
[0.62745098, 0.156862745, 0.37254902]]
bin_size = (maximum - minimum) / n_colours
# Loop through colour intervals
for i in range(n_colours):
lower = minimum + (i + 1) * bin_size
upper = lower + bin_size
colour = colours[i]
# Print out B-factor limits and the colour for this group
print(lower, " - ", upper, " = ", colour)
# Define a unique name for the atoms which fall into this group
group = selection + "_group_" + str(i + 1)
# Compose a selection command which will select all atoms which are
# a) in the original selection, AND
# b) have B factor in range lower <= b < upper
sel_string = selection + " & ! b < " + str(lower)
if(i < n_colours):
sel_string += " & b < " + str(upper)
else:
sel_string += " & ! b > " + str(upper)
# Select the atoms
cmd.select(group, sel_string)
# Create a new colour
colour_name = "colour_" + str(i + 1)
cmd.set_color(colour_name, colour)
# Colour them
cmd.color(colour_name, group)
# Create new colour for insufficient sequences
# RGB_colour = [255,255,150]
insuf_colour = [1, 1, 0.588235294]
cmd.set_color("insufficient_colour", insuf_colour)
# Colour atoms with B-factor of 10 using the new colour
cmd.select("insufficient", selection + " & b = 10")
cmd.color("insufficient_colour", "insufficient")
# Make command available in PyMOL
cmd.extend("colour_consurf", colour_consurf)
colour_consurf()
# Make all groups unselected
cmd.deselect() | def colour_consurf(selection='all'):
cmd.color('gray', selection)
cmd.util.cnc()
minimum = 0.0
maximum = 9.0
n_colours = 9
colours = [[0.039215686, 0.490196078, 0.509803922], [0.294117647, 0.68627451, 0.745098039], [0.647058824, 0.862745098, 0.901960784], [0.843137255, 0.941176471, 0.941176471], [1, 1, 1], [0.980392157, 0.921568627, 0.960784314], [0.980392157, 0.784313725, 0.862745098], [0.941176471, 0.490196078, 0.666666667], [0.62745098, 0.156862745, 0.37254902]]
bin_size = (maximum - minimum) / n_colours
for i in range(n_colours):
lower = minimum + (i + 1) * bin_size
upper = lower + bin_size
colour = colours[i]
print(lower, ' - ', upper, ' = ', colour)
group = selection + '_group_' + str(i + 1)
sel_string = selection + ' & ! b < ' + str(lower)
if i < n_colours:
sel_string += ' & b < ' + str(upper)
else:
sel_string += ' & ! b > ' + str(upper)
cmd.select(group, sel_string)
colour_name = 'colour_' + str(i + 1)
cmd.set_color(colour_name, colour)
cmd.color(colour_name, group)
insuf_colour = [1, 1, 0.588235294]
cmd.set_color('insufficient_colour', insuf_colour)
cmd.select('insufficient', selection + ' & b = 10')
cmd.color('insufficient_colour', 'insufficient')
cmd.extend('colour_consurf', colour_consurf)
colour_consurf()
cmd.deselect() |
"""
Module: 'flowlib.units._makey' on M5 FlowUI v1.4.0-beta
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32')
# Stubber: 1.3.1
MAKEY_I2C_ADDR = 81
class Makey:
''
def _available():
pass
def _updateValue():
pass
def deinit():
pass
value = None
valueAll = None
i2c_bus = None
unit = None
| """
Module: 'flowlib.units._makey' on M5 FlowUI v1.4.0-beta
"""
makey_i2_c_addr = 81
class Makey:
""""""
def _available():
pass
def _update_value():
pass
def deinit():
pass
value = None
value_all = None
i2c_bus = None
unit = None |
fName = input("\nwhat is your first name? ").strip().capitalize()
mName = input("\nwhat is your middle name? ").strip().capitalize()
lName = input("\nwhat is your last name? ").strip().capitalize()
print(f"\nHello World, My name is {fName:s} {mName:.1s} {lName:s}, Happy to see you.")
| f_name = input('\nwhat is your first name? ').strip().capitalize()
m_name = input('\nwhat is your middle name? ').strip().capitalize()
l_name = input('\nwhat is your last name? ').strip().capitalize()
print(f'\nHello World, My name is {fName:s} {mName:.1s} {lName:s}, Happy to see you.') |
class Player:
def __init__(self, amount):
if amount < 1:
print('You do not have money')
self.amount = 100
self.hand_bet = None
self.suit_bet = 0
self.amount_bet = 0
self.sinput = None
self.binput = None
self.badb_bet = 0
def amount(self):
if(amount>0):
return self.amount
else:
print("You have no money")
return self.amount
def hand_bet(self, hand):
self.hand_bet = hand
def amount_bet(self):
return self.amount_bet
def sinput(self):
return self.sinput
def binput(self):
return self.binput
def suit_bet(self):
return self.suit_bet
def badb_bet(self):
return self.badb_bet
#if player wins suit bet:
def bad_beats(self, t=0):
if t==1:
print("you won the bad beats bet!")
self.amount += int(self.badb_bet * 40)#3rd card 9,8
print(self.amount)
elif t ==2:
print("you won the bad beats bet!")
self.amount += int(self.badb_bet * 10) #Natural 9,8
print(self.amount)
elif t == 3:
print("you won the bad beats bet!")
self.amount += int(self.badb_bet * 6)#8, 7
print(self.amount)
elif t == 4:
print("you won the bad beats bet!")
self.amount += int(self.badb_bet * 4)#7, 6
print(self.amount)
elif t == 5:
print("you won the bad beats bet!")
self.amount += int(self.badb_bet * 1)#-1
print(self.amount)
elif t == 6:
print("you did not win the bad beats bet!")
self.amount -= int(self.badb_bet)#N/A
print(self.amount)
def same_suit(self, u=0):
if u==1:
print("you won the same suit bet!")
self.amount += int(self.suit_bet * 25)
print(self.amount)
elif u ==2:
print("you won the double same suit bet!")
self.amount += int(self.suit_bet * 250)
print(self.amount)
elif u ==3:
print("you lost the same suit bet!")
self.amount -= int(self.suit_bet)
print(self.amount)
#if player wins bet:
def win(self):
if self.hand_bet == 'player':
self.amount += int(self.amount_bet * 1)
elif self.hand_bet == 'banker':
self.amount += int(self.amount_bet * 0.95) #Read that the commision only applies to bets placed on banker
elif self.hand_bet == 'tie':
self.amount += int(self.amount_bet * 8)
self.hand_bet = None
print(self.amount)
def tied(self):
print(self.amount)
#if the player lost their bet
def lose(self):
self.amount = (self.amount)-(self.amount_bet)
self.hand_bet = None
| class Player:
def __init__(self, amount):
if amount < 1:
print('You do not have money')
self.amount = 100
self.hand_bet = None
self.suit_bet = 0
self.amount_bet = 0
self.sinput = None
self.binput = None
self.badb_bet = 0
def amount(self):
if amount > 0:
return self.amount
else:
print('You have no money')
return self.amount
def hand_bet(self, hand):
self.hand_bet = hand
def amount_bet(self):
return self.amount_bet
def sinput(self):
return self.sinput
def binput(self):
return self.binput
def suit_bet(self):
return self.suit_bet
def badb_bet(self):
return self.badb_bet
def bad_beats(self, t=0):
if t == 1:
print('you won the bad beats bet!')
self.amount += int(self.badb_bet * 40)
print(self.amount)
elif t == 2:
print('you won the bad beats bet!')
self.amount += int(self.badb_bet * 10)
print(self.amount)
elif t == 3:
print('you won the bad beats bet!')
self.amount += int(self.badb_bet * 6)
print(self.amount)
elif t == 4:
print('you won the bad beats bet!')
self.amount += int(self.badb_bet * 4)
print(self.amount)
elif t == 5:
print('you won the bad beats bet!')
self.amount += int(self.badb_bet * 1)
print(self.amount)
elif t == 6:
print('you did not win the bad beats bet!')
self.amount -= int(self.badb_bet)
print(self.amount)
def same_suit(self, u=0):
if u == 1:
print('you won the same suit bet!')
self.amount += int(self.suit_bet * 25)
print(self.amount)
elif u == 2:
print('you won the double same suit bet!')
self.amount += int(self.suit_bet * 250)
print(self.amount)
elif u == 3:
print('you lost the same suit bet!')
self.amount -= int(self.suit_bet)
print(self.amount)
def win(self):
if self.hand_bet == 'player':
self.amount += int(self.amount_bet * 1)
elif self.hand_bet == 'banker':
self.amount += int(self.amount_bet * 0.95)
elif self.hand_bet == 'tie':
self.amount += int(self.amount_bet * 8)
self.hand_bet = None
print(self.amount)
def tied(self):
print(self.amount)
def lose(self):
self.amount = self.amount - self.amount_bet
self.hand_bet = None |
#!/usr/bin/env python
# -*- coding: utf-8 -*
ONION_ADDR = {
"patient": "xwjtp3mj427zdp4tljiiivg2l5ijfvmt5lcsfaygtpp6cw254kykvpyd.onion"
}
# TODO:
LOGGER = {
"user": {
"password": "",
"rooms": [] # rooms are mapped to topics in mqtt
}
}
LOGGER = {
"!qKGqWURPTdcyFQHFjJ:casper.magi.sys": {
"user": "patient",
"password": "MDTweSomWY"
}
}
| onion_addr = {'patient': 'xwjtp3mj427zdp4tljiiivg2l5ijfvmt5lcsfaygtpp6cw254kykvpyd.onion'}
logger = {'user': {'password': '', 'rooms': []}}
logger = {'!qKGqWURPTdcyFQHFjJ:casper.magi.sys': {'user': 'patient', 'password': 'MDTweSomWY'}} |
host = 'localhost'
user = 'dongeonguard'
password = 'SuchWow'
db = 'imagedongeon'
| host = 'localhost'
user = 'dongeonguard'
password = 'SuchWow'
db = 'imagedongeon' |
def myfunction1():
x = 60 # This is local variable
print("Welcome to Fucntions")
print("x value from func1: ", x)
myfunction2()
return None
def myfunction2():
print("Thank you!!")
print("x value form fucn2:", x)
return None
x = 10 # This is global variable
myfunction1()
# Note : Priority is given to Local variable
'''
def myfunction1():
x = 60 # This is local variable
print("Welcome to Fucntions")
print("x value from func1: ", x)
def myfunction2():
print("Thank you!!")
print("x value form fucn2:", x)
myfunction2()
return None
x = 10 # This is global variable
myfunction1()
''' | def myfunction1():
x = 60
print('Welcome to Fucntions')
print('x value from func1: ', x)
myfunction2()
return None
def myfunction2():
print('Thank you!!')
print('x value form fucn2:', x)
return None
x = 10
myfunction1()
'\ndef myfunction1():\n\tx = 60 # This is local variable\n\tprint("Welcome to Fucntions")\n\tprint("x value from func1: ", x)\n\tdef myfunction2():\n\t\tprint("Thank you!!")\n\t\tprint("x value form fucn2:", x)\n\tmyfunction2()\n\treturn None\n\n\nx = 10 # This is global variable\nmyfunction1()\n' |
frase = input('Digite a frase: ').strip()
print(frase.lower().count('a'))
print(frase.lower().find('a'))
print(frase.lower().rfind('a')) | frase = input('Digite a frase: ').strip()
print(frase.lower().count('a'))
print(frase.lower().find('a'))
print(frase.lower().rfind('a')) |
'''
@Date: 2019-12-22 20:33:28
@Author: ywyz
@LastModifiedBy: ywyz
@Github: https://github.com/ywyz
@LastEditors : ywyz
@LastEditTime : 2019-12-22 20:38:20
'''
strings = input("Enter the first 9 digits of an ISBN-10 as a string: ")
temp = 1
total = 0
for i in strings:
total += int(i) * temp
temp += 1
total %= 11
if total == 10:
strings += 'X'
else:
strings += str(total)
print("The ISBN-10 number is ", strings)
| """
@Date: 2019-12-22 20:33:28
@Author: ywyz
@LastModifiedBy: ywyz
@Github: https://github.com/ywyz
@LastEditors : ywyz
@LastEditTime : 2019-12-22 20:38:20
"""
strings = input('Enter the first 9 digits of an ISBN-10 as a string: ')
temp = 1
total = 0
for i in strings:
total += int(i) * temp
temp += 1
total %= 11
if total == 10:
strings += 'X'
else:
strings += str(total)
print('The ISBN-10 number is ', strings) |
"""
This test package was created separately to see the behavior of retrieving the
Override rules declared on a registry where @handle_urls is defined on another
package.
"""
| """
This test package was created separately to see the behavior of retrieving the
Override rules declared on a registry where @handle_urls is defined on another
package.
""" |
def solution(num):
answer = 0
while num != 1:
if num % 2 == 0:
num = int(num // 2)
else:
num = num * 3 + 1
answer += 1
if answer >= 500:
return -1
return answer
print(solution(626331)) | def solution(num):
answer = 0
while num != 1:
if num % 2 == 0:
num = int(num // 2)
else:
num = num * 3 + 1
answer += 1
if answer >= 500:
return -1
return answer
print(solution(626331)) |
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class CircularLinkedList:
def __init__(self):
self.head = None
def insertAtHead(self, x):
if self.head is None:
self.head = ListNode(x)
self.head.next = self.head
else:
node = ListNode(x)
curr = self.head
while curr.next != self.head:
curr = curr.next
node.next = self.head
curr.next = node
self.head = node
def insertAtTail(self, x):
if self.head is None:
self.head = ListNode(x)
self.head.next = self.head
else:
node = ListNode(x)
curr = self.head
while curr.next != self.head:
curr = curr.next
curr.next = node
node.next = self.head
def printList(self):
curr_node = self.head
while curr_node:
print(curr_node.val, end=' -> ')
curr_node = curr_node.next
if curr_node == self.head:
break
print()
link = CircularLinkedList()
link.insertAtHead(9)
link.insertAtHead(11)
link.insertAtHead(4)
link.insertAtTail(15)
link.printList()
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Circularlinkedlist:
def __init__(self):
self.head = None
def insert_at_head(self, x):
if self.head is None:
self.head = list_node(x)
self.head.next = self.head
else:
node = list_node(x)
curr = self.head
while curr.next != self.head:
curr = curr.next
node.next = self.head
curr.next = node
self.head = node
def insert_at_tail(self, x):
if self.head is None:
self.head = list_node(x)
self.head.next = self.head
else:
node = list_node(x)
curr = self.head
while curr.next != self.head:
curr = curr.next
curr.next = node
node.next = self.head
def print_list(self):
curr_node = self.head
while curr_node:
print(curr_node.val, end=' -> ')
curr_node = curr_node.next
if curr_node == self.head:
break
print()
link = circular_linked_list()
link.insertAtHead(9)
link.insertAtHead(11)
link.insertAtHead(4)
link.insertAtTail(15)
link.printList() |
#T# opposite numbers are calculated with the minus - operator
#T# create a number and find its opposite
num1 = 5
num2 = -num1 # -5
num1 = -5
num2 = -num1 # 5 | num1 = 5
num2 = -num1
num1 = -5
num2 = -num1 |
class Vector2D(object):
def __init__(self, vec2d):
"""
Initialize your data structure here.
:type vec2d: List[List[int]]
[
[1,2],
[10],
[4,5,6]
]
"""
self.lists = vec2d
self.curr_list = None
self.curr_elem = None
def next(self):
"""
:rtype: int
"""
if self.curr_list is not None and self.curr_list < len(self.lists):
return self.lists[self.curr_list][self.curr_elem]
return None
def hasNext(self):
"""
:rtype: bool
"""
self._inc_pointers()
return self.curr_list < len(self.lists)
def _inc_pointers(self):
if self.curr_list is None:
self._find_next_list(0)
if self.curr_list is not None:
self.curr_elem = 0
else:
if self.curr_elem < len(self.lists[self.curr_list]) - 1:
self.curr_elem += 1
else:
self._find_next_list(self.curr_list + 1)
if self.curr_list is not None:
self.curr_elem = 0
def _find_next_list(self, index):
while index < len(self.lists) and len(self.lists[index]) == 0:
index += 1
self.curr_list = index
'''
curr_list
None -> has not been initialized
valid index -> points to a list with elements
invalid index -> finished
'''
# Your Vector2D object will be instantiated and called as such:
# i, v = Vector2D(vec2d), []
# while i.hasNext(): v.append(i.next()) | class Vector2D(object):
def __init__(self, vec2d):
"""
Initialize your data structure here.
:type vec2d: List[List[int]]
[
[1,2],
[10],
[4,5,6]
]
"""
self.lists = vec2d
self.curr_list = None
self.curr_elem = None
def next(self):
"""
:rtype: int
"""
if self.curr_list is not None and self.curr_list < len(self.lists):
return self.lists[self.curr_list][self.curr_elem]
return None
def has_next(self):
"""
:rtype: bool
"""
self._inc_pointers()
return self.curr_list < len(self.lists)
def _inc_pointers(self):
if self.curr_list is None:
self._find_next_list(0)
if self.curr_list is not None:
self.curr_elem = 0
elif self.curr_elem < len(self.lists[self.curr_list]) - 1:
self.curr_elem += 1
else:
self._find_next_list(self.curr_list + 1)
if self.curr_list is not None:
self.curr_elem = 0
def _find_next_list(self, index):
while index < len(self.lists) and len(self.lists[index]) == 0:
index += 1
self.curr_list = index
'\ncurr_list\n None -> has not been initialized\n valid index -> points to a list with elements\n invalid index -> finished\n' |
X = int(input())
while True:
Z = int(input())
if Z > X:
break
count = 0
summ = 0
for i in range(X,Z+1):
summ += i
count += 1
if summ > Z:
break
print(count) | x = int(input())
while True:
z = int(input())
if Z > X:
break
count = 0
summ = 0
for i in range(X, Z + 1):
summ += i
count += 1
if summ > Z:
break
print(count) |
"""
File contains the constants used by the sensor modules.
"""
# Power sensor
INA219_PATH = "/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/"
INA219_CURRENT = "/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/curr1_input"
INA219_RESISTOR = "/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/shunt_resistor"
INA219_VOLTAGE = "/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/in1_input"
INA219_POWER = "/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/power1_input"
I2C_DEVICE_PATH = "/sys/class/i2c-adapter/i2c-0/new_device"
# Analog-to-digital converter
SWITCH_CURRENT_PATH = "/sys/bus/iio/devices/iio:device0/"
PAYLOAD_SWITCH_ADC_ID = 0
RADIO_SWITCH_ADC_ID = 1
# Paths for locks
PAYLOAD_LOCK = "/root/csdc3/src/utils/payloadLock.tmp"
SENSOR_LOCK = "/root/csdc3/src/utils/sensorReadingLock.tmp"
# different sensor classes (Range: 0x00 - 0x02)
I2C = 0x00
GPIO = 0x01
ONE_WIRE = 0x02
# i/o, i2c devices literals
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
NAME = 'NAME'
ADDR = 'BASE_ADDR'
REG = 'REGISTERS'
CH = 'CHANNELS'
VAL = 'VALUE'
START = 'START'
STOP = 'STOP'
CONFIG = 'CONFIG'
I2C = 'I2C'
MUX = 'MUX'
SUB = 'SUBSYSTEM'
# GPIO Status
ON = 1
OFF = 0
DIR = 'direction'
PIN = 'pin'
# One Wire Addresses
PANEL0 = 'one_wire_panel0'
PANEL1 = 'one_wire_panel1'
PANEL2 = 'one_wire_panel2'
PANEL3 = 'one_wire_panel3'
SIDE_PANEL_ONE_WIRE_DICT = {
PANEL0: '000001885520',
PANEL1: '000001aaf87d',
PANEL2: '000001aaf9e5',
PANEL3: '000001aaf1cb'
}
# i2c devices
GYRO = 'Gyroscope'
MAG = 'Magnetometer'
RTC = 'Real-time Clock'
TEMP = 'Temperature Sensor'
MUX = 'I2C Multiplexer'
ADC = 'ADC Payload'
POWER = 'Power'
W1TEMP = 'One-Wire Thermistor'
PAYLOAD_MUX = 0x70
CDH_MUX = 0x71
# Unique Sensor Identifiers
ADC_0 = 'ADC'
TEMP_PAYLOAD_A = 'TEMP_A'
TEMP_PAYLOAD_B = 'TEMP_B'
TEMP_PAYLOAD_BRD = 'TEMP_PAYLOAD_BRD'
TEMP_PWR_BRD = 'TEMP_PWR_BRD'
TEMP_BAT_1 = 'TEMP_BAT_1'
TEMP_BAT_2 = 'TEMP_BAT_2'
TEMP_BAT_3 = 'TEMP_BAT_3'
TEMP_BAT_4 = 'TEMP_BAT_4'
TEMP_EPS_BRD = 'TEMP_EPS_BRD'
TEMP_CDH_BRD = 'TEMP_CDH_BRD'
RTC_0 = 'RTC_0'
RTC_1 = 'RTC_1'
GYRO_0 = 'GYRO_0'
GYRO_1 = 'GYRO_1'
GYRO_2 = 'GYRO_2'
MAG_0 = 'MAG_0'
MAG_1 = 'MAG_1'
MAG_2 = 'MAG_2'
POWER_0 = 'POWER'
# GPIO Identifiers
PSS_HTR_STAT_1_GPIO = "PA27"
PSS_HTR_STAT_2_GPIO = "PA26"
PSS_HTR_STAT_3_GPIO = "PA25"
PSS_HTR_STAT_4_GPIO = "PA24"
RADIO_TX_CURR_SENSE_GPIO = "PB11"
PAYLOAD_CURR_SENSE_GPIO = "PB12"
PSS_HTR_MUX_SEL_GPIO = "PA7"
I2C_MUX_RESET_GPIO = "PA28"
DEPLOYMENT_SW_A_GPIO = "PA22"
DEPLOYMENT_SW_B_GPIO = "PA21"
RADIO_EN_GPIO = "PA5"
PAYLOAD_HTR_A_GPIO = "PC31"
PAYLOAD_HTR_B_GPIO = "PC27"
PAYLOAD_EN_GPIO = "PC3"
PSS_HTR_EN_1_GPIO = "PC4"
PSS_HTR_EN_2_GPIO = "PC28"
PSS_HTR_EN_3_GPIO = "PA6"
PSS_HTR_EN_4_GPIO = "PA8"
WATCHDOG_GPIO = "PA23"
SENSORS_EN_GPIO = "PB14"
"""
---- New CDH PCB ----
PAYLOAD_HTR_A_GPIO = "PB14"
PAYLOAD_HTR_B_GPIO = "PB13"
SENSORS_EN_GPIO = "PC27"
RTC_INT_GPIO = "PC31"
ADC_INT_GPIO = "PA29"
SENSORS_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.30'}
PAYLOAD_HTR_A_GPIO: {DIR: OUTPUT, PIN: 'J4.40'},
PAYLOAD_HTR_B_GPIO: {DIR: OUTPUT, PIN: 'J4.38'},
RTC_INT_GPIO : {DIR: OUTPUT, PIN: 'J4.32'},
ADC_INT_GPIO : {DIR: OUTPUT, PIN: 'J4.21'},
"""
GPIO_LOOKUP_TABLE = {
PSS_HTR_STAT_1_GPIO: {DIR: INPUT, PIN: 'J4.17'},
PSS_HTR_STAT_2_GPIO: {DIR: INPUT, PIN: 'J4.15'},
PSS_HTR_STAT_3_GPIO: {DIR: INPUT, PIN: 'J4.13'},
PSS_HTR_STAT_4_GPIO: {DIR: INPUT, PIN: 'J4.11'},
RADIO_TX_CURR_SENSE_GPIO: {DIR: INPUT, PIN: 'J4.34'},
PAYLOAD_CURR_SENSE_GPIO: {DIR: INPUT, PIN: 'J4.36'},
PSS_HTR_MUX_SEL_GPIO: {DIR: OUTPUT, PIN: 'J4.26'},
I2C_MUX_RESET_GPIO: {DIR: OUTPUT, PIN: 'J4.19'},
DEPLOYMENT_SW_A_GPIO: {DIR: OUTPUT, PIN: 'J4.8'},
DEPLOYMENT_SW_B_GPIO: {DIR: OUTPUT, PIN: 'J4.10'},
RADIO_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.28'},
PAYLOAD_HTR_A_GPIO: {DIR: OUTPUT, PIN: 'J4.32'},
PAYLOAD_HTR_B_GPIO: {DIR: OUTPUT, PIN: 'J4.30'},
PAYLOAD_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.33'},
PSS_HTR_EN_1_GPIO: {DIR: OUTPUT, PIN: 'J4.31'},
PSS_HTR_EN_2_GPIO: {DIR: OUTPUT, PIN: 'J4.29'},
PSS_HTR_EN_3_GPIO: {DIR: OUTPUT, PIN: 'J4.27'},
PSS_HTR_EN_4_GPIO: {DIR: OUTPUT, PIN: 'J4.25'},
WATCHDOG_GPIO: {DIR: OUTPUT, PIN: 'J4.7'},
SENSORS_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.40'}
}
# Subsystems
PAYLOAD = 'payload'
CDH = 'cdh'
SOFTWARE = 'software'
ACS = 'acs'
TEMP_IDENTIFIER_DICT = {
TEMP_PAYLOAD_A: {I2C: 0, MUX: PAYLOAD_MUX, CH: 0, SUB: PAYLOAD, ADDR: 0x48},
TEMP_PAYLOAD_B: {I2C: 0, MUX: PAYLOAD_MUX, CH: 0, SUB: PAYLOAD, ADDR: 0x49},
TEMP_PAYLOAD_BRD: {I2C: 0, MUX: PAYLOAD_MUX, CH: 4, SUB: PAYLOAD, ADDR: 0x48},
TEMP_PWR_BRD: {I2C: 0, MUX: PAYLOAD_MUX, CH: 4, SUB: POWER, ADDR: 0x49},
TEMP_BAT_1: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 0x4e},
TEMP_BAT_2: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 0x4f},
TEMP_BAT_3: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 0x4a},
TEMP_BAT_4: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 0x4b},
TEMP_EPS_BRD: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 0x4c},
TEMP_CDH_BRD: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: CDH, ADDR: 0x4d}
}
RTC_IDENTIFIER_DICT = {
RTC_0: {I2C: 0, MUX: None, CH: None, SUB: CDH, ADDR: 0x68},
RTC_1: {I2C: 1, MUX: None, CH: None, SUB: CDH, ADDR: 0x68}
}
GYRO_IDENTIFIER_DICT = {
GYRO_0: {I2C: 0, MUX: 0x71, CH: 1, SUB: ACS, ADDR: 0x68},
GYRO_1: {I2C: 0, MUX: 0x71, CH: 1, SUB: ACS, ADDR: 0x68},
GYRO_2: {I2C: 0, MUX: 0x71, CH: 1, SUB: ACS, ADDR: 0x68}
}
MAG_IDENTIFIER_DICT = {
MAG_0: {I2C: 0, MUX: 0x71, CH: 1, SUB: ACS, ADDR: 0x1E},
MAG_1: {I2C: 0, MUX: 0x71, CH: 2, SUB: ACS, ADDR: 0x1E},
MAG_2: {I2C: 0, MUX: 0x71, CH: 3, SUB: ACS, ADDR: 0x1E}
}
I2C_DEVICES_LIST = [GYRO, MAG, RTC, TEMP, MUX, ADC, POWER]
I2C_DEVICES_LOOKUP_TABLE = {
GYRO: {
NAME: 'ITG3400',
ADDR: 0x68,
REG: {
'X-H': 0x1D,
'X-L': 0x1E,
'Y-H': 0x1F,
'Y-L': 0x20,
'Z-H': 0x21,
'Z-L': 0x22
},
CH: [0, 1, 2]
},
MAG: {
NAME: 'HMC5883L',
ADDR: 0x1E,
REG: {
'INIT': 0x02,
'X-H': 0x03,
'X-L': 0x04,
'Y-H': 0x05,
'Y-L': 0x06,
'Z-H': 0x07,
'Z-L': 0x08
},
CH: [0, 1, 2]
},
RTC: {
NAME: 'DS3232',
ADDR: 0x68,
REG: {
'sec': 0x00,
'min': 0x01,
'hr': 0x02,
'day': 0x03,
'date': 0x04,
'month': 0x05,
'year': 0x07
},
CH: [3, 4]
},
TEMP: {
NAME: "DS1624",
ADDR: 0x48,
REG: {
VAL: 0xAA,
START: 0xEE,
STOP: 0x22,
CONFIG: 0xAC
},
CH: [0, 1, 2, 3, 4, 5, 6]
},
W1TEMP: {
NAME: "DS18B20",
ADDR: 0x48,
REG: {
},
CH: []
},
MUX: {
NAME: 'TCA9548A',
ADDR: 0x70,
REG: {},
CH: [0]
},
ADC: {
NAME: 'AD128D818',
ADDR: 0x1D,
MUX: 0x70,
REG: {
'REG_CONFIG' : 0x00,
'REG_CONV_RATE' : 0x07,
'REG_CHANNEL_DISABLE' : 0x08,
'REG_ADV_CONFIG' : 0x0B,
'REG_BUSY_STATUS' : 0x0C,
'READ_REG_BASE' : 0x20,
'REG_LIMIT_BASE' : 0x2A,
'REG_LIMIT_BASE2' : 0x2C,
'REG_TEMP' : 0x27,
'CONFIG_INTERNAL_VREF': 0x04,
'CONFIG_EXTERNAL_VREF': 0x05,
'CONFIG_LIMIT_BASE' : 0x05,
'CONFIG_CONTINUOUS' : 0x01,
'CONFIG_ENABLE_ALL_CHANNELS' : 0x0,
'CONFIG_NO_INTERRUPTS': 0x01
},
CH: [0]
},
POWER: {
NAME: 'INA219',
ADDR: 0x40,
MUX: 0x71,
CH: [4]
}
}
| """
File contains the constants used by the sensor modules.
"""
ina219_path = '/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/'
ina219_current = '/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/curr1_input'
ina219_resistor = '/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/shunt_resistor'
ina219_voltage = '/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/in1_input'
ina219_power = '/sys/class/i2c-dev/i2c-0/device/i2c-dev/i2c-0/device/0-0040/hwmon/hwmon0/power1_input'
i2_c_device_path = '/sys/class/i2c-adapter/i2c-0/new_device'
switch_current_path = '/sys/bus/iio/devices/iio:device0/'
payload_switch_adc_id = 0
radio_switch_adc_id = 1
payload_lock = '/root/csdc3/src/utils/payloadLock.tmp'
sensor_lock = '/root/csdc3/src/utils/sensorReadingLock.tmp'
i2_c = 0
gpio = 1
one_wire = 2
input = 'INPUT'
output = 'OUTPUT'
name = 'NAME'
addr = 'BASE_ADDR'
reg = 'REGISTERS'
ch = 'CHANNELS'
val = 'VALUE'
start = 'START'
stop = 'STOP'
config = 'CONFIG'
i2_c = 'I2C'
mux = 'MUX'
sub = 'SUBSYSTEM'
on = 1
off = 0
dir = 'direction'
pin = 'pin'
panel0 = 'one_wire_panel0'
panel1 = 'one_wire_panel1'
panel2 = 'one_wire_panel2'
panel3 = 'one_wire_panel3'
side_panel_one_wire_dict = {PANEL0: '000001885520', PANEL1: '000001aaf87d', PANEL2: '000001aaf9e5', PANEL3: '000001aaf1cb'}
gyro = 'Gyroscope'
mag = 'Magnetometer'
rtc = 'Real-time Clock'
temp = 'Temperature Sensor'
mux = 'I2C Multiplexer'
adc = 'ADC Payload'
power = 'Power'
w1_temp = 'One-Wire Thermistor'
payload_mux = 112
cdh_mux = 113
adc_0 = 'ADC'
temp_payload_a = 'TEMP_A'
temp_payload_b = 'TEMP_B'
temp_payload_brd = 'TEMP_PAYLOAD_BRD'
temp_pwr_brd = 'TEMP_PWR_BRD'
temp_bat_1 = 'TEMP_BAT_1'
temp_bat_2 = 'TEMP_BAT_2'
temp_bat_3 = 'TEMP_BAT_3'
temp_bat_4 = 'TEMP_BAT_4'
temp_eps_brd = 'TEMP_EPS_BRD'
temp_cdh_brd = 'TEMP_CDH_BRD'
rtc_0 = 'RTC_0'
rtc_1 = 'RTC_1'
gyro_0 = 'GYRO_0'
gyro_1 = 'GYRO_1'
gyro_2 = 'GYRO_2'
mag_0 = 'MAG_0'
mag_1 = 'MAG_1'
mag_2 = 'MAG_2'
power_0 = 'POWER'
pss_htr_stat_1_gpio = 'PA27'
pss_htr_stat_2_gpio = 'PA26'
pss_htr_stat_3_gpio = 'PA25'
pss_htr_stat_4_gpio = 'PA24'
radio_tx_curr_sense_gpio = 'PB11'
payload_curr_sense_gpio = 'PB12'
pss_htr_mux_sel_gpio = 'PA7'
i2_c_mux_reset_gpio = 'PA28'
deployment_sw_a_gpio = 'PA22'
deployment_sw_b_gpio = 'PA21'
radio_en_gpio = 'PA5'
payload_htr_a_gpio = 'PC31'
payload_htr_b_gpio = 'PC27'
payload_en_gpio = 'PC3'
pss_htr_en_1_gpio = 'PC4'
pss_htr_en_2_gpio = 'PC28'
pss_htr_en_3_gpio = 'PA6'
pss_htr_en_4_gpio = 'PA8'
watchdog_gpio = 'PA23'
sensors_en_gpio = 'PB14'
'\n---- New CDH PCB ----\nPAYLOAD_HTR_A_GPIO = "PB14"\nPAYLOAD_HTR_B_GPIO = "PB13"\nSENSORS_EN_GPIO = "PC27"\nRTC_INT_GPIO = "PC31"\nADC_INT_GPIO = "PA29"\nSENSORS_EN_GPIO: {DIR: OUTPUT, PIN: \'J4.30\'}\nPAYLOAD_HTR_A_GPIO: {DIR: OUTPUT, PIN: \'J4.40\'},\nPAYLOAD_HTR_B_GPIO: {DIR: OUTPUT, PIN: \'J4.38\'},\nRTC_INT_GPIO : {DIR: OUTPUT, PIN: \'J4.32\'},\nADC_INT_GPIO : {DIR: OUTPUT, PIN: \'J4.21\'},\n'
gpio_lookup_table = {PSS_HTR_STAT_1_GPIO: {DIR: INPUT, PIN: 'J4.17'}, PSS_HTR_STAT_2_GPIO: {DIR: INPUT, PIN: 'J4.15'}, PSS_HTR_STAT_3_GPIO: {DIR: INPUT, PIN: 'J4.13'}, PSS_HTR_STAT_4_GPIO: {DIR: INPUT, PIN: 'J4.11'}, RADIO_TX_CURR_SENSE_GPIO: {DIR: INPUT, PIN: 'J4.34'}, PAYLOAD_CURR_SENSE_GPIO: {DIR: INPUT, PIN: 'J4.36'}, PSS_HTR_MUX_SEL_GPIO: {DIR: OUTPUT, PIN: 'J4.26'}, I2C_MUX_RESET_GPIO: {DIR: OUTPUT, PIN: 'J4.19'}, DEPLOYMENT_SW_A_GPIO: {DIR: OUTPUT, PIN: 'J4.8'}, DEPLOYMENT_SW_B_GPIO: {DIR: OUTPUT, PIN: 'J4.10'}, RADIO_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.28'}, PAYLOAD_HTR_A_GPIO: {DIR: OUTPUT, PIN: 'J4.32'}, PAYLOAD_HTR_B_GPIO: {DIR: OUTPUT, PIN: 'J4.30'}, PAYLOAD_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.33'}, PSS_HTR_EN_1_GPIO: {DIR: OUTPUT, PIN: 'J4.31'}, PSS_HTR_EN_2_GPIO: {DIR: OUTPUT, PIN: 'J4.29'}, PSS_HTR_EN_3_GPIO: {DIR: OUTPUT, PIN: 'J4.27'}, PSS_HTR_EN_4_GPIO: {DIR: OUTPUT, PIN: 'J4.25'}, WATCHDOG_GPIO: {DIR: OUTPUT, PIN: 'J4.7'}, SENSORS_EN_GPIO: {DIR: OUTPUT, PIN: 'J4.40'}}
payload = 'payload'
cdh = 'cdh'
software = 'software'
acs = 'acs'
temp_identifier_dict = {TEMP_PAYLOAD_A: {I2C: 0, MUX: PAYLOAD_MUX, CH: 0, SUB: PAYLOAD, ADDR: 72}, TEMP_PAYLOAD_B: {I2C: 0, MUX: PAYLOAD_MUX, CH: 0, SUB: PAYLOAD, ADDR: 73}, TEMP_PAYLOAD_BRD: {I2C: 0, MUX: PAYLOAD_MUX, CH: 4, SUB: PAYLOAD, ADDR: 72}, TEMP_PWR_BRD: {I2C: 0, MUX: PAYLOAD_MUX, CH: 4, SUB: POWER, ADDR: 73}, TEMP_BAT_1: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 78}, TEMP_BAT_2: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 79}, TEMP_BAT_3: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 74}, TEMP_BAT_4: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 75}, TEMP_EPS_BRD: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: POWER, ADDR: 76}, TEMP_CDH_BRD: {I2C: 0, MUX: CDH_MUX, CH: 4, SUB: CDH, ADDR: 77}}
rtc_identifier_dict = {RTC_0: {I2C: 0, MUX: None, CH: None, SUB: CDH, ADDR: 104}, RTC_1: {I2C: 1, MUX: None, CH: None, SUB: CDH, ADDR: 104}}
gyro_identifier_dict = {GYRO_0: {I2C: 0, MUX: 113, CH: 1, SUB: ACS, ADDR: 104}, GYRO_1: {I2C: 0, MUX: 113, CH: 1, SUB: ACS, ADDR: 104}, GYRO_2: {I2C: 0, MUX: 113, CH: 1, SUB: ACS, ADDR: 104}}
mag_identifier_dict = {MAG_0: {I2C: 0, MUX: 113, CH: 1, SUB: ACS, ADDR: 30}, MAG_1: {I2C: 0, MUX: 113, CH: 2, SUB: ACS, ADDR: 30}, MAG_2: {I2C: 0, MUX: 113, CH: 3, SUB: ACS, ADDR: 30}}
i2_c_devices_list = [GYRO, MAG, RTC, TEMP, MUX, ADC, POWER]
i2_c_devices_lookup_table = {GYRO: {NAME: 'ITG3400', ADDR: 104, REG: {'X-H': 29, 'X-L': 30, 'Y-H': 31, 'Y-L': 32, 'Z-H': 33, 'Z-L': 34}, CH: [0, 1, 2]}, MAG: {NAME: 'HMC5883L', ADDR: 30, REG: {'INIT': 2, 'X-H': 3, 'X-L': 4, 'Y-H': 5, 'Y-L': 6, 'Z-H': 7, 'Z-L': 8}, CH: [0, 1, 2]}, RTC: {NAME: 'DS3232', ADDR: 104, REG: {'sec': 0, 'min': 1, 'hr': 2, 'day': 3, 'date': 4, 'month': 5, 'year': 7}, CH: [3, 4]}, TEMP: {NAME: 'DS1624', ADDR: 72, REG: {VAL: 170, START: 238, STOP: 34, CONFIG: 172}, CH: [0, 1, 2, 3, 4, 5, 6]}, W1TEMP: {NAME: 'DS18B20', ADDR: 72, REG: {}, CH: []}, MUX: {NAME: 'TCA9548A', ADDR: 112, REG: {}, CH: [0]}, ADC: {NAME: 'AD128D818', ADDR: 29, MUX: 112, REG: {'REG_CONFIG': 0, 'REG_CONV_RATE': 7, 'REG_CHANNEL_DISABLE': 8, 'REG_ADV_CONFIG': 11, 'REG_BUSY_STATUS': 12, 'READ_REG_BASE': 32, 'REG_LIMIT_BASE': 42, 'REG_LIMIT_BASE2': 44, 'REG_TEMP': 39, 'CONFIG_INTERNAL_VREF': 4, 'CONFIG_EXTERNAL_VREF': 5, 'CONFIG_LIMIT_BASE': 5, 'CONFIG_CONTINUOUS': 1, 'CONFIG_ENABLE_ALL_CHANNELS': 0, 'CONFIG_NO_INTERRUPTS': 1}, CH: [0]}, POWER: {NAME: 'INA219', ADDR: 64, MUX: 113, CH: [4]}} |
# Copyright (c) 2021, Omid Erfanmanesh, All rights reserved.
class EncoderTypes:
CUSTOM = 0
LABEL = 1
ORDINAL = 2
ONE_HOT = 3
BINARY = 4
| class Encodertypes:
custom = 0
label = 1
ordinal = 2
one_hot = 3
binary = 4 |
# 1
#1 1
#1 1 1
p = int(input("Ingrese un numero: "))
for n in range(1,p):
print(" "*(p-1) + "1")
if(p != 1):
print(" 1 1 ") | p = int(input('Ingrese un numero: '))
for n in range(1, p):
print(' ' * (p - 1) + '1')
if p != 1:
print(' 1 1 ') |
# Copyright 2021 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""apple_universal_binary Starlark tests."""
load(
":rules/analysis_target_outputs_test.bzl",
"analysis_target_outputs_test",
)
load(
":rules/common_verification_tests.bzl",
"binary_contents_test",
)
def apple_universal_binary_test_suite(name):
"""Test suite for apple_universal_binary.
Args:
name: the base name to be used in things created by this macro
"""
test_target = "//test/starlark_tests/targets_under_test/apple:multi_arch_cc_binary"
analysis_target_outputs_test(
name = "{}_output_test".format(name),
target_under_test = test_target,
expected_outputs = ["multi_arch_cc_binary"],
tags = [name],
)
binary_contents_test(
name = "{}_x86_binary_contents_test".format(name),
build_type = "device",
macos_cpus = ["x86_64", "arm64"],
target_under_test = test_target,
binary_test_file = "$BINARY",
binary_test_architecture = "x86_64",
binary_contains_symbols = ["__Z19function_for_x86_64v"],
binary_not_contains_symbols = ["__Z19function_for_arch64v"],
tags = [name],
)
binary_contents_test(
name = "{}_arm64_binary_contents_test".format(name),
build_type = "device",
macos_cpus = ["x86_64", "arm64"],
target_under_test = test_target,
binary_test_file = "$BINARY",
binary_test_architecture = "arm64",
binary_contains_symbols = ["__Z19function_for_arch64v"],
binary_not_contains_symbols = ["__Z19function_for_x86_64v"],
tags = [name],
)
| """apple_universal_binary Starlark tests."""
load(':rules/analysis_target_outputs_test.bzl', 'analysis_target_outputs_test')
load(':rules/common_verification_tests.bzl', 'binary_contents_test')
def apple_universal_binary_test_suite(name):
"""Test suite for apple_universal_binary.
Args:
name: the base name to be used in things created by this macro
"""
test_target = '//test/starlark_tests/targets_under_test/apple:multi_arch_cc_binary'
analysis_target_outputs_test(name='{}_output_test'.format(name), target_under_test=test_target, expected_outputs=['multi_arch_cc_binary'], tags=[name])
binary_contents_test(name='{}_x86_binary_contents_test'.format(name), build_type='device', macos_cpus=['x86_64', 'arm64'], target_under_test=test_target, binary_test_file='$BINARY', binary_test_architecture='x86_64', binary_contains_symbols=['__Z19function_for_x86_64v'], binary_not_contains_symbols=['__Z19function_for_arch64v'], tags=[name])
binary_contents_test(name='{}_arm64_binary_contents_test'.format(name), build_type='device', macos_cpus=['x86_64', 'arm64'], target_under_test=test_target, binary_test_file='$BINARY', binary_test_architecture='arm64', binary_contains_symbols=['__Z19function_for_arch64v'], binary_not_contains_symbols=['__Z19function_for_x86_64v'], tags=[name]) |
# first_list_example.py
#
# Illustrates two ways to iterate through a list (examine every
# element in a list).
# CSC 110
# Fall 2011
stuff = [7, 17, -4, 0.5] # create a list filled with integers
print(stuff) # prints in "list" form (with square brackets and commas)
# This loop visits every element of the list, by index number.
for index in range(len(stuff)):
print('Index', index, 'has value', stuff[index])
print()
# This loop displays the squares of the values in the list
# and then then the sum of the squares.
# Since the algorithm doesn't need index numbers, we can just use the
# natural behavior of the 'for' loop to visit every element in the list.
sqSum = 0 # initialize accumulator
for value in stuff:
sq = value ** 2
print('The number', value, 'squared =', sq)
sqSum += sq
print('The sum of the squares =', sqSum)
| stuff = [7, 17, -4, 0.5]
print(stuff)
for index in range(len(stuff)):
print('Index', index, 'has value', stuff[index])
print()
sq_sum = 0
for value in stuff:
sq = value ** 2
print('The number', value, 'squared =', sq)
sq_sum += sq
print('The sum of the squares =', sqSum) |
# other column settings -> http://bootstrap-table.wenzhixin.net.cn/documentation/#column-options
columns_criar_eleicao = [
{
"field": "pessoa", # which is the field's name of data key
"title": "Pessoa", # display as the table header's name]
"sortable":True
},
{
"field": "login", # which is the field's name of data key
"title": "Login", # display as the table header's name]
"sortable": True
},
{
"field": "select", # which is the field's name of data key
# display as the table header's name
"checkbox": True
}
]
# other column settings -> http://bootstrap-table.wenzhixin.net.cn/documentation/#column-options
columns_abrir_eleicao = [
{
"field": "eleicao", # which is the field's name of data key
"title": "Titulo", # display as the table header's name]
"sortable":True
},
{
"field": "select", # which is the field's name of data key
# display as the table header's name
"checkbox": True
}
]
columns_fechar_eleicao = [
{
"field": "eleicao", # which is the field's name of data key
"title": "Titulo", # display as the table header's name]
"sortable":True
},
{
"field": "select", # which is the field's name of data key
# display as the table header's name
"checkbox": True
}
]
columns_apurar_eleicao = [
{
"field": "eleicao", # which is the field's name of data key
"title": "Titulo", # display as the table header's name]
"sortable":True
},
{
"field": "select", # which is the field's name of data key
# display as the table header's name
"checkbox": True
}
]
| columns_criar_eleicao = [{'field': 'pessoa', 'title': 'Pessoa', 'sortable': True}, {'field': 'login', 'title': 'Login', 'sortable': True}, {'field': 'select', 'checkbox': True}]
columns_abrir_eleicao = [{'field': 'eleicao', 'title': 'Titulo', 'sortable': True}, {'field': 'select', 'checkbox': True}]
columns_fechar_eleicao = [{'field': 'eleicao', 'title': 'Titulo', 'sortable': True}, {'field': 'select', 'checkbox': True}]
columns_apurar_eleicao = [{'field': 'eleicao', 'title': 'Titulo', 'sortable': True}, {'field': 'select', 'checkbox': True}] |
class cell:
def __init__(self, y, x, icon, cellnum, board):
self.chricon = icon
self.coords = [y, x]
self.evopoints = 0
self.idnum = cellnum
self.playable = False
self.learnedmutations = {
'move' : False,
'sight' : False,
'strike' : True, #Basic damaging strike
'wall' : False, #Passes turn but doubles def
'leap' : True #Moves you two spaces in any direction
}
self.buffs = {
'alive' : True,
'phased' : False,
'wall' : False,
'hurt' : False,
'paralyzed' : False,
'move' : False
}
self.directionIDs = {
'north' : 0,
'south' : 1,
'east' : 2,
'west' : 3,
'NE' : 4,
'NW' : 5,
'SE' : 6,
'SW' : 7
}
#Stat variables
self.level = 1
self.hp = 10
self.maxhp = 10
self.damage = 1
self.attack = 1 #% damage increase
self.defense = 1 #% damage reduction
self.agility = 1 #Affects dodge chance and crit damage
self.critchance = 25 #% chance to crit
self.critdamage = 200 #% increase to base damage when critting
self.healmult = 100 #% effectiveness of healing
#TODO: Learn mutation functions
#Will take the form "self.learnfoo"
#Where "foo" is the same word used in the flag
#Set spawned tile as occupied
self.updateLocation(self.coords,board)
def learnMove(self):
self.mutmove = True
if not self.buffs['paralyzed']:
self.setBuff('move', True)
#TODO: Dodge chance
def hurt(self,amt,board):
dmg = amt / (1 + (self.defense / 100.0))
if dmg >= self.hp:
self.kill(board)
self.hp = 0
elif dmg > 0:
self.hp -= dmg
self.setBuff('hurt', True)
def heal(self,amt,healmult):
healamt = amt * (healmult / 100)
if (self.hp + healamt) > self.maxhp:
self.hp = self.maxhp
elif healamt > 0:
self.hp += healamt
#TODO: Status effects
def setParalyzed(self):
self.setBuff('move', False)
self.setBuff('paralyzed', True)
#TODO: Active Ability Effects
#Just processes effects, doesn't check for range or anything else
def doStrike(self, targetcells, board):
amt = self.damage * (1 + (self.attack / 100))
for i in targetcells:
if self.checkCrit:
amt *= (self.critdamage / 100.0)
i.hurt(amt,board)
def doWall(self):
self.defense *= 2
self.setBuff('wall', True)
def doLeap(self,board,direction):
if direction == 0:
self.moveNorth(board,2)
elif direction == 1:
self.moveSouth(board,2)
elif direction == 2:
self.moveEast(board,2)
elif direction == 3:
self.moveWest(board,2)
elif direction == 4:
self.moveNE(board,2)
elif direction == 5:
self.moveNW(board,2)
elif direction == 6:
self.moveSE(board,2)
elif direction == 7:
self.moveSW(board,2)
def checkCrit(self):
#TODO: Critical strikes
return False
def kill(self, board):
self.setBuff('alive', False)
tile = board.getTile(self.coords)
tile.setOccupied(False)
def clearStatus(self):
if self.mutmove and not self.buffs['move']:
self.setBuff('move', True)
self.setBuff('paralyzed', False)
def isPlayable(self):
return self.playable
def isAlive(self):
return self.buffs['alive']
def getIcon(self):
return self.chricon
#Returns a list of form [y, x, icon], also referred to as a cell type
def getFormattedList(self):
return [self.coords[0], self.coords[1], self.chricon]
#Returns list of coordinates in form [y, x]
def getCoords(self):
return self.coords
def updateLocation(self, dest, board):
tileprev = board.getTile(self.coords)
tilenew = board.getTile(dest)
tileprev.occupied = False
#if not self.buffs['phased']:
self.coords = dest
tilenew.occupied = True
def checkCollision(self, dest, board):
oldtile = board.getTile(self.coords)
tile = board.getTile(dest)
passable = tile.isPassable()
if passable:
self.updateLocation(dest, board)
def moveNorth(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1]]
self.checkCollision(dest, board)
def moveSouth(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1]]
self.checkCollision(dest, board)
def moveEast(self, board, amt=1):
dest = [self.coords[0], self.coords[1] + amt]
self.checkCollision(dest, board)
def moveWest(self, board, amt=1):
dest = [self.coords[0], self.coords[1] - amt]
self.checkCollision(dest, board)
def moveNE(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1] + amt]
self.checkCollision(dest, board)
def moveNW(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1] - amt]
self.checkCollision(dest, board)
def moveSE(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1] + amt]
self.checkCollision(dest, board)
def moveSW(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1] - amt]
self.checkCollision(dest, board)
#Helper functions
def calcDist(self, y1, x1, y2, x2):
y3 = pow(y2 - y1, 2)
x3 = pow(x2 - x1, 2)
ret = pow(x3 + y3, 0.5)
return ret
def isWithinRange(self, y1, x1, y2, x2, _range):
dist = calcDist(y1, x1, y2, x2)
if dist <= _range:
return True
else:
return False
def setBuff(self, buff, status):
self.buffs[buff] = status
def startOfTurn(self):
if self.buffs['wall']:
self.setBuff('wall', False)
if self.buffs['hurt']:
self.setBuff('hurt', False)
def getCoordinateOffset(self,direction,amt):
if direction == 0: #North
return [self.coords[0] - amt, self.coords[1]]
elif direction == 1: #South
return [self.coords[0] + amt, self.coords[1]]
elif direction == 2: #East
return [self.coords[0], self.coords[1] + amt]
elif direction == 3: #West
return [self.coords[0], self.coords[1] - amt]
elif direction == 4: #North East
return [self.coords[0] - amt, self.coords[1] + amt]
elif direction == 5: #North West
return [self.coords[0] - amt, self.coords[1] - amt]
elif direction == 6: #South East
return [self.coords[0] + amt, self.coords[1] + amt]
elif direction == 7: #South West
return [self.coords[0] + amt, self.coords[1] - amt]
class player(cell):
def __init__(self, y, x, icon, cellnum, board):
cell.__init__(self, y, x, icon, cellnum, board)
self.playable = True
#Key definitions
self.movekeys = {
'north': 'w',
'south': 'x',
'east': 's',
'west': 'a',
'NE': 'f',
'NW': 'q',
'SE': 'c',
'SW': 'z'
}
self.activekeys = {
'strike': 'p',
'leap': 't',
'wall': 'v'
}
self.waitkey = 'r'
def getInput(self, board, window, inpt):
if inpt == self.waitkey:
pass
elif self.buffs['move']:
self.move(self.pickDirection(inpt),board)
if self.learnedmutations['strike']:
if inpt == self.activekeys['strike']:
#TODO: Call strike function
dirinpt = window.getkey()
direction = self.pickDirection(dirinpt)
target = self.getCoordinateOffset(direction,1)
cellList = board.getCells(target)
self.doStrike(cellList, board)
elif self.learnedmutations['leap']:
if inpt == self.activekeys['leap']:
leapinpt = window.getkey()
direction = self.pickDirection(leapinpt)
self.doLeap(board,direction)
elif self.learnedmutations['wall']:
if inpt == self.activekeys['wall']:
self.doWall()
def pickDirection(self, inpt):
if inpt == self.movekeys['north']:
return self.directionIDs['north']
elif inpt == self.movekeys['south']:
return self.directionIDs['south']
elif inpt == self.movekeys['east']:
return self.directionIDs['east']
elif inpt == self.movekeys['west']:
return self.directionIDs['west']
elif inpt == self.movekeys['NE']:
return self.directionIDs['NE']
elif inpt == self.movekeys['NW']:
return self.directionIDs['NW']
elif inpt == self.movekeys['SE']:
return self.directionIDs['SE']
elif inpt == self.movekeys['SW']:
return self.directionIDs['SW']
def move(self, direction, board):
if direction == 0:
self.moveNorth(board, 1)
elif direction == 1:
self.moveSouth(board, 1)
elif direction == 2:
self.moveEast(board, 1)
elif direction == 3:
self.moveWest(board, 1)
elif direction == 4:
self.moveNE(board, 1)
elif direction == 5:
self.moveNW(board, 1)
elif direction == 6:
self.moveSE(board, 1)
elif direction == 7:
self.moveSW(board, 1)
| class Cell:
def __init__(self, y, x, icon, cellnum, board):
self.chricon = icon
self.coords = [y, x]
self.evopoints = 0
self.idnum = cellnum
self.playable = False
self.learnedmutations = {'move': False, 'sight': False, 'strike': True, 'wall': False, 'leap': True}
self.buffs = {'alive': True, 'phased': False, 'wall': False, 'hurt': False, 'paralyzed': False, 'move': False}
self.directionIDs = {'north': 0, 'south': 1, 'east': 2, 'west': 3, 'NE': 4, 'NW': 5, 'SE': 6, 'SW': 7}
self.level = 1
self.hp = 10
self.maxhp = 10
self.damage = 1
self.attack = 1
self.defense = 1
self.agility = 1
self.critchance = 25
self.critdamage = 200
self.healmult = 100
self.updateLocation(self.coords, board)
def learn_move(self):
self.mutmove = True
if not self.buffs['paralyzed']:
self.setBuff('move', True)
def hurt(self, amt, board):
dmg = amt / (1 + self.defense / 100.0)
if dmg >= self.hp:
self.kill(board)
self.hp = 0
elif dmg > 0:
self.hp -= dmg
self.setBuff('hurt', True)
def heal(self, amt, healmult):
healamt = amt * (healmult / 100)
if self.hp + healamt > self.maxhp:
self.hp = self.maxhp
elif healamt > 0:
self.hp += healamt
def set_paralyzed(self):
self.setBuff('move', False)
self.setBuff('paralyzed', True)
def do_strike(self, targetcells, board):
amt = self.damage * (1 + self.attack / 100)
for i in targetcells:
if self.checkCrit:
amt *= self.critdamage / 100.0
i.hurt(amt, board)
def do_wall(self):
self.defense *= 2
self.setBuff('wall', True)
def do_leap(self, board, direction):
if direction == 0:
self.moveNorth(board, 2)
elif direction == 1:
self.moveSouth(board, 2)
elif direction == 2:
self.moveEast(board, 2)
elif direction == 3:
self.moveWest(board, 2)
elif direction == 4:
self.moveNE(board, 2)
elif direction == 5:
self.moveNW(board, 2)
elif direction == 6:
self.moveSE(board, 2)
elif direction == 7:
self.moveSW(board, 2)
def check_crit(self):
return False
def kill(self, board):
self.setBuff('alive', False)
tile = board.getTile(self.coords)
tile.setOccupied(False)
def clear_status(self):
if self.mutmove and (not self.buffs['move']):
self.setBuff('move', True)
self.setBuff('paralyzed', False)
def is_playable(self):
return self.playable
def is_alive(self):
return self.buffs['alive']
def get_icon(self):
return self.chricon
def get_formatted_list(self):
return [self.coords[0], self.coords[1], self.chricon]
def get_coords(self):
return self.coords
def update_location(self, dest, board):
tileprev = board.getTile(self.coords)
tilenew = board.getTile(dest)
tileprev.occupied = False
self.coords = dest
tilenew.occupied = True
def check_collision(self, dest, board):
oldtile = board.getTile(self.coords)
tile = board.getTile(dest)
passable = tile.isPassable()
if passable:
self.updateLocation(dest, board)
def move_north(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1]]
self.checkCollision(dest, board)
def move_south(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1]]
self.checkCollision(dest, board)
def move_east(self, board, amt=1):
dest = [self.coords[0], self.coords[1] + amt]
self.checkCollision(dest, board)
def move_west(self, board, amt=1):
dest = [self.coords[0], self.coords[1] - amt]
self.checkCollision(dest, board)
def move_ne(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1] + amt]
self.checkCollision(dest, board)
def move_nw(self, board, amt=1):
dest = [self.coords[0] - amt, self.coords[1] - amt]
self.checkCollision(dest, board)
def move_se(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1] + amt]
self.checkCollision(dest, board)
def move_sw(self, board, amt=1):
dest = [self.coords[0] + amt, self.coords[1] - amt]
self.checkCollision(dest, board)
def calc_dist(self, y1, x1, y2, x2):
y3 = pow(y2 - y1, 2)
x3 = pow(x2 - x1, 2)
ret = pow(x3 + y3, 0.5)
return ret
def is_within_range(self, y1, x1, y2, x2, _range):
dist = calc_dist(y1, x1, y2, x2)
if dist <= _range:
return True
else:
return False
def set_buff(self, buff, status):
self.buffs[buff] = status
def start_of_turn(self):
if self.buffs['wall']:
self.setBuff('wall', False)
if self.buffs['hurt']:
self.setBuff('hurt', False)
def get_coordinate_offset(self, direction, amt):
if direction == 0:
return [self.coords[0] - amt, self.coords[1]]
elif direction == 1:
return [self.coords[0] + amt, self.coords[1]]
elif direction == 2:
return [self.coords[0], self.coords[1] + amt]
elif direction == 3:
return [self.coords[0], self.coords[1] - amt]
elif direction == 4:
return [self.coords[0] - amt, self.coords[1] + amt]
elif direction == 5:
return [self.coords[0] - amt, self.coords[1] - amt]
elif direction == 6:
return [self.coords[0] + amt, self.coords[1] + amt]
elif direction == 7:
return [self.coords[0] + amt, self.coords[1] - amt]
class Player(cell):
def __init__(self, y, x, icon, cellnum, board):
cell.__init__(self, y, x, icon, cellnum, board)
self.playable = True
self.movekeys = {'north': 'w', 'south': 'x', 'east': 's', 'west': 'a', 'NE': 'f', 'NW': 'q', 'SE': 'c', 'SW': 'z'}
self.activekeys = {'strike': 'p', 'leap': 't', 'wall': 'v'}
self.waitkey = 'r'
def get_input(self, board, window, inpt):
if inpt == self.waitkey:
pass
elif self.buffs['move']:
self.move(self.pickDirection(inpt), board)
if self.learnedmutations['strike']:
if inpt == self.activekeys['strike']:
dirinpt = window.getkey()
direction = self.pickDirection(dirinpt)
target = self.getCoordinateOffset(direction, 1)
cell_list = board.getCells(target)
self.doStrike(cellList, board)
elif self.learnedmutations['leap']:
if inpt == self.activekeys['leap']:
leapinpt = window.getkey()
direction = self.pickDirection(leapinpt)
self.doLeap(board, direction)
elif self.learnedmutations['wall']:
if inpt == self.activekeys['wall']:
self.doWall()
def pick_direction(self, inpt):
if inpt == self.movekeys['north']:
return self.directionIDs['north']
elif inpt == self.movekeys['south']:
return self.directionIDs['south']
elif inpt == self.movekeys['east']:
return self.directionIDs['east']
elif inpt == self.movekeys['west']:
return self.directionIDs['west']
elif inpt == self.movekeys['NE']:
return self.directionIDs['NE']
elif inpt == self.movekeys['NW']:
return self.directionIDs['NW']
elif inpt == self.movekeys['SE']:
return self.directionIDs['SE']
elif inpt == self.movekeys['SW']:
return self.directionIDs['SW']
def move(self, direction, board):
if direction == 0:
self.moveNorth(board, 1)
elif direction == 1:
self.moveSouth(board, 1)
elif direction == 2:
self.moveEast(board, 1)
elif direction == 3:
self.moveWest(board, 1)
elif direction == 4:
self.moveNE(board, 1)
elif direction == 5:
self.moveNW(board, 1)
elif direction == 6:
self.moveSE(board, 1)
elif direction == 7:
self.moveSW(board, 1) |
#
# PySNMP MIB module A3COM-HUAWEI-ACL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-ACL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:03: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)
#
h3cCommon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "h3cCommon")
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint")
InetAddress, InetAddressPrefixLength, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressPrefixLength", "InetAddressType")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Bits, TimeTicks, Unsigned32, IpAddress, ObjectIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Integer32, NotificationType, Counter64, Gauge32, ModuleIdentity, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "TimeTicks", "Unsigned32", "IpAddress", "ObjectIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Integer32", "NotificationType", "Counter64", "Gauge32", "ModuleIdentity", "Counter32")
TruthValue, MacAddress, RowStatus, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "MacAddress", "RowStatus", "TextualConvention", "DisplayString")
h3cAcl = ModuleIdentity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8))
if mibBuilder.loadTexts: h3cAcl.setLastUpdated('200409211936Z')
if mibBuilder.loadTexts: h3cAcl.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: h3cAcl.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085')
if mibBuilder.loadTexts: h3cAcl.setDescription('ACL management information base for managing devices that support access control list and packet filtering. ')
class RuleAction(TextualConvention, Integer32):
description = "The value of rule's action. permit: The packet matching the rule will be permitted to forward. deny: The packet matching the rule will be denied. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("invalid", 1), ("permit", 2), ("deny", 3))
class CounterClear(TextualConvention, Integer32):
description = "cleared: Reset the value of the rule's counter. nouse: 'nouse' will be returned when getting. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("cleared", 1), ("nouse", 2))
class PortOp(TextualConvention, Integer32):
description = "The operation type of TCP and UDP. lt : Less than given port number. eq : Equal to given port number. gt : Greater than given port number. neq : Not equal to given port number. range : Between two port numbers. Default value is 'invalid'. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))
namedValues = NamedValues(("invalid", 0), ("lt", 1), ("eq", 2), ("gt", 3), ("neq", 4), ("range", 5))
class DSCPValue(TextualConvention, Integer32):
description = 'The value of DSCP. <0-63> Value of DSCP af11 Specify Assured Forwarding 11 service(10) af12 Specify Assured Forwarding 12 service(12) af13 Specify Assured Forwarding 13 service(14) af21 Specify Assured Forwarding 21 service(18) af22 Specify Assured Forwarding 22 service(20) af23 Specify Assured Forwarding 23 service(22) af31 Specify Assured Forwarding 31 service(26) af32 Specify Assured Forwarding 32 service(28) af33 Specify Assured Forwarding 33 service(30) af41 Specify Assured Forwarding 41 service(34) af42 Specify Assured Forwarding 42 service(36) af43 Specify Assured Forwarding 43 service(38) be Specify Best Effort service(0) cs1 Specify Class Selector 1 service(8) cs2 Specify Class Selector 2 service(16) cs3 Specify Class Selector 3 service(24) cs4 Specify Class Selector 4 service(32) cs5 Specify Class Selector 5 service(40) cs6 Specify Class Selector 6 service(48) cs7 Specify Class Selector 7 service(56) ef Specify Expedited Forwarding service(46) '
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 63), ValueRangeConstraint(255, 255), )
class TCPFlag(TextualConvention, Integer32):
description = "Type of TCP. invalid(0) tcpack(1) TCP protocol ACK Packet tcpfin(2) TCP protocol PIN Packet tcppsh(3) TCP protocol PUSH Packet tcprst(4) TCP protocol RST Packet tcpsyn(5) TCP protocol SYN Packet tcpurg(6) TCP protocol URG Packet Default value is 'invalid'. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("invalid", 0), ("tcpack", 1), ("tcpfin", 2), ("tcppsh", 3), ("tcprst", 4), ("tcpsyn", 5), ("tcpurg", 6))
class FragmentFlag(TextualConvention, Integer32):
description = "Type of fragment. invalid(0) fragment(1) Frag-Type Fragment fragmentSubseq(2) Frag-Type Fragment-subsequent nonFragment(3) Frag-Type non-Fragment nonSubseq(4) Frag-Type non-subsequent Default value is 'invalid'. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))
namedValues = NamedValues(("invalid", 0), ("fragment", 1), ("fragmentSubseq", 2), ("nonFragment", 3), ("nonSubseq", 4))
class AddressFlag(TextualConvention, Integer32):
description = "Address flag to select IPv6 Address. Default value is 'invalid'. t64SrcAddrPre64DestAddrPre(1): The mean of the enumeration 't64SrcAddrPre64DestAddrPre' is that system gets the 64 bits prefix of source address and the 64 bits prefix of destination address. t64SrcAddrPre64DestAddrSuf(2): The mean of the enumeration 't64SrcAddrPre64DestAddrSuf' is that system gets the 64 bits prefix of source address and the 64 bits suffix of destination address. t64SrcAddrSuf64DestAddrPre(3): The mean of the enumeration 't64SrcAddrSuf64DestAddrPre' is that system gets the 64 bits suffix of source address and the 64 bits prefix of destination address. t64SrcAddrSuf64DestAddrSuf(4): The mean of the enumeration 't64SrcAddrSuf64DestAddrSuf' is that system gets the 64 bits suffix of source address and the 64 bits suffix of destination address. t128SourceAddress(5): The mean of the enumeration 't128SourceAddress' is that system gets the 128 bits of source address. t128DestinationAddress(6): The mean of the enumeration 't128SourceAddress' is that system gets the 128 bits of destination address. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("invalid", 0), ("t64SrcAddrPre64DestAddrPre", 1), ("t64SrcAddrPre64DestAddrSuf", 2), ("t64SrcAddrSuf64DestAddrPre", 3), ("t64SrcAddrSuf64DestAddrSuf", 4), ("t128SourceAddress", 5), ("t128DestinationAddress", 6))
class DirectionType(TextualConvention, Integer32):
description = 'The direction: inbound or outbound.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("inbound", 1), ("outbound", 2))
h3cAclMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1))
h3cAclMode = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("linkBased", 1), ("ipBased", 2))).clone('ipBased')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclMode.setStatus('current')
if mibBuilder.loadTexts: h3cAclMode.setDescription('Access-list mode.')
h3cAclNumGroupTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2), )
if mibBuilder.loadTexts: h3cAclNumGroupTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupTable.setDescription('Configure the match-order of number-acl group.')
h3cAclNumGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumGroupAclNum"))
if mibBuilder.loadTexts: h3cAclNumGroupEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupEntry.setDescription('Define the index of h3cAclNumGroupTable.')
h3cAclNumGroupAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1000, 5999)))
if mibBuilder.loadTexts: h3cAclNumGroupAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupAclNum.setDescription('The index of number-acl group Interface type:1000..1999 Basic type:2000..2999 Advance type:3000..3999 Link type:4000..4999 User type:5000..5999')
h3cAclNumGroupMatchOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("config", 1), ("auto", 2))).clone('config')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupMatchOrder.setDescription('The match-order of number-acl group.')
h3cAclNumGroupSubitemNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclNumGroupSubitemNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupSubitemNum.setDescription("The number of number-acl group's node.")
h3cAclNumGroupDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclNumGroupDescription.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupDescription.setDescription('The description of this acl group.')
h3cAclNumGroupCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cleared", 1), ("nouse", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumGroupCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupCountClear.setDescription("Reset the value of rules' counter, which belong to this group.")
h3cAclNumGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumGroupRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclNameGroupTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3), )
if mibBuilder.loadTexts: h3cAclNameGroupTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupTable.setDescription('Create acl-group that identified by name.')
h3cAclNameGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNameGroupIndex"))
if mibBuilder.loadTexts: h3cAclNameGroupEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupEntry.setDescription('Define the index of h3cAclNameGroupTable.')
h3cAclNameGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10000, 12999)))
if mibBuilder.loadTexts: h3cAclNameGroupIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupIndex.setDescription('The index of name-acl group.')
h3cAclNameGroupCreateName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNameGroupCreateName.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupCreateName.setDescription('The name of name-acl group.')
h3cAclNameGroupTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("basic", 1), ("advanced", 2), ("ifBased", 3), ("link", 4), ("user", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNameGroupTypes.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupTypes.setDescription('The type of name-acl group.')
h3cAclNameGroupMatchOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("config", 1), ("auto", 2))).clone('config')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNameGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupMatchOrder.setDescription('The match-order of name-acl group.')
h3cAclNameGroupSubitemNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclNameGroupSubitemNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupSubitemNum.setDescription("The number of name-acl group's node.")
h3cAclNameGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNameGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclNameGroupRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclBasicRuleTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4), )
if mibBuilder.loadTexts: h3cAclBasicRuleTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicRuleTable.setDescription('Configure the rule for basic acl group.')
h3cAclBasicRuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclBasicAclNum"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclBasicSubitem"))
if mibBuilder.loadTexts: h3cAclBasicRuleEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicRuleEntry.setDescription('Define the index of h3cAclBasicRuleTable.')
h3cAclBasicAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2000, 2999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclBasicAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicAclNum.setDescription('The index of basic acl group.')
h3cAclBasicSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: h3cAclBasicSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicSubitem.setDescription('The subindex of basic acl group.')
h3cAclBasicAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicAct.setDescription('The action of basic acl rule.')
h3cAclBasicSrcIp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 4), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicSrcIp.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicSrcIp.setDescription('Source IP-address of basic acl rule.')
h3cAclBasicSrcWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 5), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicSrcWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicSrcWild.setDescription('Source IP-address wild of basic acl rule.')
h3cAclBasicTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicTimeRangeName.setDescription('The Time-range of basic acl rule.')
h3cAclBasicFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 7), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicFragments.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicFragments.setDescription('The flag of matching fragmented packet.')
h3cAclBasicLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 8), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicLog.setDescription('The flag of log.')
h3cAclBasicEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclBasicEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclBasicCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclBasicCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicCount.setDescription('The count of matched by basic rule.')
h3cAclBasicCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cleared", 1), ("nouse", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicCountClear.setDescription('Reset the value of counter.')
h3cAclBasicRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 12), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclBasicRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclBasicRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclAdvancedRuleTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5), )
if mibBuilder.loadTexts: h3cAclAdvancedRuleTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedRuleTable.setDescription('Configure the rule for advanced acl group.')
h3cAclAdvancedRuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclAdvancedAclNum"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclAdvancedSubitem"))
if mibBuilder.loadTexts: h3cAclAdvancedRuleEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedRuleEntry.setDescription('Define the index of h3cAclAdvancedRuleTable.')
h3cAclAdvancedAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(3000, 3999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclAdvancedAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedAclNum.setDescription('The index of advanced acl group.')
h3cAclAdvancedSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: h3cAclAdvancedSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSubitem.setDescription('The subindex of advanced acl group.')
h3cAclAdvancedAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedAct.setDescription('The action of Advance acl rule.')
h3cAclAdvancedProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedProtocol.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) igmp Internet Group Management Protocol(2) ip Any IP protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17)')
h3cAclAdvancedSrcIp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 5), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedSrcIp.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSrcIp.setDescription('Source IP-address of advanced acl group.')
h3cAclAdvancedSrcWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 6), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedSrcWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSrcWild.setDescription('Source IP-address wild of advanced acl group.')
h3cAclAdvancedSrcOp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("invalid", 0), ("lt", 1), ("eq", 2), ("gt", 3), ("neq", 4), ("range", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedSrcOp.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSrcOp.setDescription("The source IP-address's operator of advanced acl group.")
h3cAclAdvancedSrcPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedSrcPort1.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSrcPort1.setDescription('The fourth layer source port1.')
h3cAclAdvancedSrcPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedSrcPort2.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedSrcPort2.setDescription('The fourth layer source port2.')
h3cAclAdvancedDestIp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 10), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDestIp.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDestIp.setDescription('Destination IP-address of advanced acl group.')
h3cAclAdvancedDestWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 11), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDestWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDestWild.setDescription('Destination IP-address wild of advanced acl group.')
h3cAclAdvancedDestOp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("invalid", 0), ("lt", 1), ("eq", 2), ("gt", 3), ("neq", 4), ("range", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDestOp.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDestOp.setDescription("The destination IP-address's operator of advanced acl group.")
h3cAclAdvancedDestPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDestPort1.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDestPort1.setDescription('The fourth layer destination port1.')
h3cAclAdvancedDestPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDestPort2.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDestPort2.setDescription('The fourth layer destination port2.')
h3cAclAdvancedPrecedence = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedPrecedence.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedPrecedence.setDescription("The value of IP-packet's precedence. <0-7> Value of precedence routine Specify routine precedence(0) priority Specify priority precedence(1) immediate Specify immediate precedence(2) flash Specify flash precedence(3) flash-override Specify flash-override precedence(4) critical Specify critical precedence(5) internet Specify internetwork control precedence(6) network Specify network control precedence(7) ")
h3cAclAdvancedTos = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 15), ValueRangeConstraint(255, 255), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedTos.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedTos.setDescription("The value of IP-packet's TOS. <0-15> Value of TOS(type of service) max-reliability Match packets with max reliable TOS(2) max-throughput Match packets with max throughput TOS(4) min-delay Match packets with min delay TOS(8) min-monetary-cost Match packets with min monetary cost TOS(1) normal Match packets with normal TOS(0) ")
h3cAclAdvancedDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 63), ValueRangeConstraint(255, 255), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedDscp.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedDscp.setDescription('The value of DSCP. <0-63> Value of DSCP af11 Specify Assured Forwarding 11 service(10) af12 Specify Assured Forwarding 12 service(12) af13 Specify Assured Forwarding 13 service(14) af21 Specify Assured Forwarding 21 service(18) af22 Specify Assured Forwarding 22 service(20) af23 Specify Assured Forwarding 23 service(22) af31 Specify Assured Forwarding 31 service(26) af32 Specify Assured Forwarding 32 service(28) af33 Specify Assured Forwarding 33 service(30) af41 Specify Assured Forwarding 41 service(34) af42 Specify Assured Forwarding 42 service(36) af43 Specify Assured Forwarding 43 service(38) be Specify Best Effort service(0) cs1 Specify Class Selector 1 service(8) cs2 Specify Class Selector 2 service(16) cs3 Specify Class Selector 3 service(24) cs4 Specify Class Selector 4 service(32) cs5 Specify Class Selector 5 service(40) cs6 Specify Class Selector 6 service(48) cs7 Specify Class Selector 7 service(56) ef Specify Expedited Forwarding service(46)')
h3cAclAdvancedEstablish = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 18), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedEstablish.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedEstablish.setDescription('Establish flag.')
h3cAclAdvancedTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedTimeRangeName.setDescription('The Time-range of advanced acl rule.')
h3cAclAdvancedIcmpType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedIcmpType.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedIcmpType.setDescription('The type of ICMP packet. Integer32 ICMP type echo Type=8, Code=0 echo-reply Type=0, Code=0 fragmentneed-DFset Type=3, Code=4 host-redirect Type=5, Code=1 host-tos-redirect Type=5, Code=3 host-unreachable Type=3, Code=1 information-reply Type=16, Code=0 information-request Type=15, Code=0 net-redirect Type=5, Code=0 net-tos-redirect Type=5, Code=2 net-unreachable Type=3, Code=0 parameter-problem Type=12, Code=0 port-unreachable Type=3, Code=3 protocol-unreachable Type=3, Code=2 reassembly-timeout Type=11, Code=1 source-quench Type=4, Code=0 source-route-failed Type=3, Code=5 timestamp-reply Type=14, Code=0 timestamp-request Type=13, Code=0 ttl-exceeded Type=11, Code=0 ')
h3cAclAdvancedIcmpCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedIcmpCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedIcmpCode.setDescription('The code of ICMP packet.')
h3cAclAdvancedFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 22), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedFragments.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedFragments.setDescription('The flag of matching fragmented packet.')
h3cAclAdvancedLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 23), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedLog.setDescription('The flag of log.')
h3cAclAdvancedEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 24), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclAdvancedEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclAdvancedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclAdvancedCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedCount.setDescription('The count of matched by advanced rule.')
h3cAclAdvancedCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cleared", 1), ("nouse", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedCountClear.setDescription('Reset the value of counter.')
h3cAclAdvancedRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 27), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclAdvancedRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclAdvancedRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclIfRuleTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6), )
if mibBuilder.loadTexts: h3cAclIfRuleTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfRuleTable.setDescription('Configure the rule for interface-based acl group.')
h3cAclIfRuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclIfAclNum"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclIfSubitem"))
if mibBuilder.loadTexts: h3cAclIfRuleEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfRuleEntry.setDescription('Define the index of h3cAclIfRuleTable.')
h3cAclIfAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1000, 1999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclIfAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfAclNum.setDescription('The index of interface-based acl group.')
h3cAclIfSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: h3cAclIfSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfSubitem.setDescription('The subindex of interface-based acl group.')
h3cAclIfAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfAct.setDescription('The action of interface-based acl group.')
h3cAclIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfIndex.setDescription('The index of interface.')
h3cAclIfAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 5), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfAny.setDescription('The flag of matching any interface.')
h3cAclIfTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfTimeRangeName.setDescription('The Time-range of interface-based acl rule.')
h3cAclIfLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 7), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfLog.setDescription('The flag of log.')
h3cAclIfEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIfEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclIfCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIfCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfCount.setDescription('The count of matched by basic rule.')
h3cAclIfCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cleared", 1), ("nouse", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfCountClear.setDescription("Reset the value of the rule's counter.")
h3cAclIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 11), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIfRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclIfRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclLinkTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7), )
if mibBuilder.loadTexts: h3cAclLinkTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkTable.setDescription('Create link acl.')
h3cAclLinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclLinkAclNum"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclLinkSubitem"))
if mibBuilder.loadTexts: h3cAclLinkEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkEntry.setDescription('The entry of the link acl table.')
h3cAclLinkAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(4000, 4999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclLinkAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkAclNum.setDescription('The index of link-based acl group.')
h3cAclLinkSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: h3cAclLinkSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSubitem.setDescription('The subindex of link-based acl group.')
h3cAclLinkAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkAct.setDescription('The action of link-based acl group.')
h3cAclLinkProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2048, 2054, 32821, 34915, 34916, 34887))).clone(namedValues=NamedValues(("invalid", 0), ("ip", 2048), ("arp", 2054), ("rarp", 32821), ("pppoeControl", 34915), ("pppoeData", 34916), ("mpls", 34887))).clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkProtocol.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkProtocol.setDescription('The layer 2 protocol-type of link acl rule.')
h3cAclLinkFormatType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("invalid", 0), ("ethernetII", 1), ("snap", 2), ("ieee802Dot3And2", 3), ("ieee802Dot3", 4)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkFormatType.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkFormatType.setDescription('Format type of link acl rule.')
h3cAclLinkVlanTag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("invalid", 0), ("tagged", 1), ("untagged", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkVlanTag.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkVlanTag.setDescription('The flag of vlan tag of link acl rule.')
h3cAclLinkVlanPri = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkVlanPri.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkVlanPri.setDescription('Vlan priority of link acl rule.')
h3cAclLinkSrcVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkSrcVlanId.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSrcVlanId.setDescription('Source vlan ID of link acl rule.')
h3cAclLinkSrcMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 9), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkSrcMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSrcMac.setDescription('Source mac of link acl rule.')
h3cAclLinkSrcMacWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 10), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkSrcMacWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSrcMacWild.setDescription('Source mac wildzard of link acl rule.')
h3cAclLinkSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkSrcIfIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSrcIfIndex.setDescription('Source IfIndex of link acl rule.')
h3cAclLinkSrcAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 12), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkSrcAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkSrcAny.setDescription('The flag of matching any source.')
h3cAclLinkDestVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkDestVlanId.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkDestVlanId.setDescription('Destination vlan ID of link acl rule.')
h3cAclLinkDestMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 14), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkDestMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkDestMac.setDescription('Destination mac of link acl rule.')
h3cAclLinkDestMacWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 15), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkDestMacWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkDestMacWild.setDescription('Destination mac wildzard of link acl rule.')
h3cAclLinkDestIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkDestIfIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkDestIfIndex.setDescription('Destination IfIndex of link acl rule.')
h3cAclLinkDestAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 17), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkDestAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkDestAny.setDescription('The flag of matching any destination.')
h3cAclLinkTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 18), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkTimeRangeName.setDescription('The Time-range of link-based acl rule.')
h3cAclLinkEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 19), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclLinkEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclLinkRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 20), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclLinkTypeCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 21), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkTypeCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkTypeCode.setDescription('The type of layer 2 protocol.0x0000...0xffff.')
h3cAclLinkTypeMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 22), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkTypeMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkTypeMask.setDescription('The mask of layer 2 protocol.0x0000...0xffff.')
h3cAclLinkLsapCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 23), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkLsapCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkLsapCode.setDescription('The type of LSAP.0x0000...0xffff.')
h3cAclLinkLsapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkLsapMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkLsapMask.setDescription('The mask of LSAP.0x0000...0xffff.')
h3cAclLinkL2LabelRangeOp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("invalid", 0), ("lt", 1), ("eq", 2), ("gt", 3), ("neq", 4), ("range", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeOp.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeOp.setDescription('Operation symbol of the MPLS label. If the symbol is range(5), the objects h3cAclLinkL2LabelRangeBegin and h3cAclLinkL2LabelRangeEnd should have different values indicating a range. Otherwise, only h3cAclLinkL2LabelRangeBegin counts, object h3cAclLinkL2LabelRangeEnd is ignored. invalid(0) -- unavailable lt(1) -- less than eq(2) -- equal gt(3) -- great than neq(4) -- not equal range(5) -- a range with two ends included ')
h3cAclLinkL2LabelRangeBegin = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 26), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeBegin.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeBegin.setDescription('The beginning of VPLS VC label.')
h3cAclLinkL2LabelRangeEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 27), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeEnd.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkL2LabelRangeEnd.setDescription('The end of VPLS VC label.')
h3cAclLinkMplsExp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 28), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclLinkMplsExp.setStatus('current')
if mibBuilder.loadTexts: h3cAclLinkMplsExp.setDescription("The value of MPLS-packet's Exp.")
h3cAclUserTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8), )
if mibBuilder.loadTexts: h3cAclUserTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserTable.setDescription('Create user acl.')
h3cAclUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclUserAclNum"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclUserSubitem"))
if mibBuilder.loadTexts: h3cAclUserEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserEntry.setDescription('The entry of user acl table.')
h3cAclUserAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(5000, 5999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclUserAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserAclNum.setDescription('The number of the user acl.')
h3cAclUserSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: h3cAclUserSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserSubitem.setDescription('The subitem of the user acl.')
h3cAclUserAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserAct.setDescription('The action of the user acl.')
h3cAclUserFormatType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("invalid", 0), ("ethernetII", 1), ("snap", 2), ("ieee802Dot2And3", 3), ("ieee802Dot4", 4))).clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserFormatType.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserFormatType.setDescription('Format type.')
h3cAclUserVlanTag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 0))).clone(namedValues=NamedValues(("tagged", 1), ("untagged", 2), ("invalid", 0))).clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserVlanTag.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserVlanTag.setDescription('Vlan tag exits or not.')
h3cAclUserRuleStr = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserRuleStr.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserRuleStr.setDescription('Rule string.')
h3cAclUserRuleMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserRuleMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserRuleMask.setDescription('Rule mask.')
h3cAclUserTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserTimeRangeName.setDescription('The Time-range of the user defined acl.')
h3cAclUserEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclUserEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclUserRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclUserRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclUserRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclActiveTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9), )
if mibBuilder.loadTexts: h3cAclActiveTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveTable.setDescription('Active acl.')
h3cAclActiveEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclActiveAclIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclActiveIfIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclActiveVlanID"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclActiveDirection"))
if mibBuilder.loadTexts: h3cAclActiveEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveEntry.setDescription('The entry of active acl table.')
h3cAclActiveAclIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 5999), ValueRangeConstraint(10000, 12999), )))
if mibBuilder.loadTexts: h3cAclActiveAclIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveAclIndex.setDescription('Acl index.')
h3cAclActiveIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)))
if mibBuilder.loadTexts: h3cAclActiveIfIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveIfIndex.setDescription('IfIndex.')
h3cAclActiveVlanID = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 3), Integer32())
if mibBuilder.loadTexts: h3cAclActiveVlanID.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveVlanID.setDescription('The lower 16 bits is Vlan ID, the higher 16 bits, if not zero, it describes the slot ID of the L3plus board. ')
h3cAclActiveDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 0))).clone(namedValues=NamedValues(("input", 1), ("output", 2), ("both", 3), ("invalid", 0))))
if mibBuilder.loadTexts: h3cAclActiveDirection.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveDirection.setDescription('Direction.')
h3cAclActiveUserAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(5000, 5999), ValueRangeConstraint(10000, 12999), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveUserAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveUserAclNum.setDescription('The number of the user acl.')
h3cAclActiveUserAclSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveUserAclSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveUserAclSubitem.setDescription('The subitem of the user acl.')
h3cAclActiveIpAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2000, 3999), ValueRangeConstraint(10000, 12999), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveIpAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveIpAclNum.setDescription('The number of the IP acl.')
h3cAclActiveIpAclSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveIpAclSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveIpAclSubitem.setDescription('The subitem of the IP acl.')
h3cAclActiveLinkAclNum = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(4000, 4999), ValueRangeConstraint(10000, 12999), ))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveLinkAclNum.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveLinkAclNum.setDescription('The num of the link acl.')
h3cAclActiveLinkAclSubitem = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveLinkAclSubitem.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveLinkAclSubitem.setDescription('The subitem of the link acl.')
h3cAclActiveRuntime = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclActiveRuntime.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveRuntime.setDescription('Is run or not.')
h3cAclActiveRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 12), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclActiveRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclActiveRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3cAclIDSTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10), )
if mibBuilder.loadTexts: h3cAclIDSTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSTable.setDescription('Configure the rule for IDS.')
h3cAclIDSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1), ).setIndexNames((1, "A3COM-HUAWEI-ACL-MIB", "h3cAclIDSName"))
if mibBuilder.loadTexts: h3cAclIDSEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSEntry.setDescription('The entry of acl ids table.')
h3cAclIDSName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: h3cAclIDSName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSName.setDescription('The name index of the IDS table.')
h3cAclIDSSrcMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 2), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSSrcMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSSrcMac.setDescription('Source mac of IDS acl rule.')
h3cAclIDSDestMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 3), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSDestMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSDestMac.setDescription('Destination mac of IDS acl rule.')
h3cAclIDSSrcIp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 4), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSSrcIp.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSSrcIp.setDescription('Source IP-address of IDS acl rule.')
h3cAclIDSSrcWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 5), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSSrcWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSSrcWild.setDescription('Source IP-address wild of IDS acl rule.')
h3cAclIDSDestIp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 6), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSDestIp.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSDestIp.setDescription('Destination IP-address of IDS acl rule.')
h3cAclIDSDestWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 7), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSDestWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSDestWild.setDescription('Destination IP-address wild of IDS acl rule.')
h3cAclIDSSrcPort = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSSrcPort.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSSrcPort.setDescription('The fourth layer source port.')
h3cAclIDSDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSDestPort.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSDestPort.setDescription('The fourth layer destination port.')
h3cAclIDSProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSProtocol.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) igmp Internet Group Management Protocol(2) ip Any IP protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17) ')
h3cAclIDSDenyTime = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 11), Unsigned32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSDenyTime.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSDenyTime.setDescription('The maximum number of seconds which deny for this acl rule.')
h3cAclIDSAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSAct.setDescription('The action of IDS acl rule.')
h3cAclIDSRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 13), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIDSRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclIDSRowStatus.setDescription('RowStatus, now supports three states: CreateAndGo, Active, and Destroy.')
h3cAclMib2Objects = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2))
h3cAclMib2GlobalGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1))
h3cAclMib2NodesGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1))
h3cAclMib2Mode = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("linkBased", 1), ("ipBased", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclMib2Mode.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2Mode.setDescription('The applying mode of ACL.')
h3cAclMib2Version = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMib2Version.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2Version.setDescription("The version of this file. The output value has the format of 'xx'or 'xxx'. For example: 10 means 1.0; 125 means 12.5. ")
h3cAclMib2ObjectsCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 3), Bits().clone(namedValues=NamedValues(("h3cAclMib2Mode", 0), ("h3cAclVersion", 1), ("h3cAclMib2ObjectsCapabilities", 2), ("h3cAclMib2CapabilityTable", 3), ("h3cAclNumberGroupTable", 4), ("h3cAclIPAclBasicTable", 5), ("h3cAclIPAclAdvancedTable", 6), ("h3cAclMACTable", 7), ("h3cAclEnUserTable", 8), ("h3cAclMib2ProcessingStatus", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMib2ObjectsCapabilities.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2ObjectsCapabilities.setDescription('The objects of h3cAclMib2Objects.')
h3cAclMib2ProcessingStatus = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("processing", 1), ("done", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMib2ProcessingStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2ProcessingStatus.setDescription('The processing status of ACL operation.')
h3cAclMib2CapabilityTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2), )
if mibBuilder.loadTexts: h3cAclMib2CapabilityTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2CapabilityTable.setDescription('The capability of mib2.')
h3cAclMib2CapabilityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclMib2EntityType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclMib2EntityIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclMib2ModuleIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclMib2CharacteristicsIndex"))
if mibBuilder.loadTexts: h3cAclMib2CapabilityEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2CapabilityEntry.setDescription('The information of Capability of mib2.')
h3cAclMib2EntityType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("system", 1), ("interface", 2))))
if mibBuilder.loadTexts: h3cAclMib2EntityType.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2EntityType.setDescription('The type of entity . system: The entity is systemic level. interface: The entity is interface level. ')
h3cAclMib2EntityIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 2), Integer32())
if mibBuilder.loadTexts: h3cAclMib2EntityIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2EntityIndex.setDescription("The index of entity. If h3cAclMib2EntityType is system, the value of this object is 0. If h3cAclMib2EntityType is interface, the value of this object is equal to 'ifIndex'. ")
h3cAclMib2ModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("layer3", 1), ("layer2", 2), ("userDefined", 3))))
if mibBuilder.loadTexts: h3cAclMib2ModuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2ModuleIndex.setDescription('The module index of ACL.')
h3cAclMib2CharacteristicsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 4), Integer32())
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsIndex.setDescription('The characteristics index of mib2. See DESCRIPTION of h3cAclMib2CharacteristicsValue to get detail information about the value of this object. ')
h3cAclMib2CharacteristicsDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsDesc.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsDesc.setDescription('The description of characteristics.')
h3cAclMib2CharacteristicsValue = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsValue.setStatus('current')
if mibBuilder.loadTexts: h3cAclMib2CharacteristicsValue.setDescription("The value of capability of this object. TypeOfRuleStringValue : notSupport(0) and the length of RuleString. TypeOfCodeValue : OnlyOneNotSupport(0), MoreThanOneNotSupport(1) If h3cAclMib2CharacteristicsValue is 'moreThanOneNotSupport', h3cAclMib2CharacteristicsDesc must be used to depict which protocols are not supported. The output value of h3cAclMib2CharacteristicsDesc has the format of 'a,b'. For example, 'ip,rarp'. layer3 Module: Index Characteristics value 1 SourceIPAddress notSupport(0) 2 DestinationIPAddress notSupport(0) 3 SourcePort notSupport(0) 4 DestinationPort notSupport(0) 5 IPPrecedence notSupport(0) 6 TOS notSupport(0) 7 DSCP notSupport(0) 8 TCPFlag notSupport(0) 9 FragmentFlag notSupport(0) 10 Log notSupport(0) 11 RuleMatchCounter notSupport(0) 12 ResetRuleMatchCounter notSupport(0) 13 VPN notSupport(0) 15 protocol notSupport(0) 16 AddressFlag notSupport(0) layer2 Module: Index Characteristics value 1 ProtocolType TypeOfCodeValue 2 SourceMAC notSupport(0) 3 DestinationMAC notSupport(0) 4 LSAPType TypeOfCodeValue 5 CoS notSupport(0) UserDefined Module: Index Characteristics value 1 UserDefaultOffset TypeOfRuleStringValue 2 UserL2RuleOffset TypeOfRuleStringValue 3 UserMplsOffset TypeOfRuleStringValue 4 UserIPv4Offset TypeOfRuleStringValue 5 UserIPv6Offset TypeOfRuleStringValue 6 UserL4Offset TypeOfRuleStringValue 7 UserL5Offset TypeOfRuleStringValue ")
h3cAclNumberGroupTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3), )
if mibBuilder.loadTexts: h3cAclNumberGroupTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupTable.setDescription('A table of the number acl group information.')
h3cAclNumberGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupIndex"))
if mibBuilder.loadTexts: h3cAclNumberGroupEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupEntry.setDescription('Number acl group information entry.')
h3cAclNumberGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ipv4", 1), ("ipv6", 2))).clone('ipv4'))
if mibBuilder.loadTexts: h3cAclNumberGroupType.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupType.setDescription('The type of number group. Basic ACL and Advanced ACL support ipv4 and ipv6. The range of Basic ACL is from 2000 to 2999. The range of Advanced ACL is from 3000 to 3999. Simple ACL supports ipv6 only. The range of Simple ACL is from 10000 to 42767. MAC ACL and User ACL support ipv4 only. The range of MAC ACL is from 4000 to 4999. The range of User ACL is from 5000 to 5999. ')
h3cAclNumberGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(2000, 5999), ValueRangeConstraint(10000, 42767), )))
if mibBuilder.loadTexts: h3cAclNumberGroupIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupIndex.setDescription('The group index of number acl. Basic type:2000..2999 Advanced type:3000..3999 MAC type:4000..4999 User type:5000..5999 Simple type:10000..42767 ')
h3cAclNumberGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumberGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupRowStatus.setDescription('RowStatus.')
h3cAclNumberGroupMatchOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("config", 1), ("auto", 2))).clone('config')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumberGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupMatchOrder.setDescription('The match-order of number acl group.')
h3cAclNumberGroupStep = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(5)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumberGroupStep.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupStep.setDescription('The step of rule index.')
h3cAclNumberGroupDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumberGroupDescription.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupDescription.setDescription('Description of this acl group.')
h3cAclNumberGroupCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 7), CounterClear().clone('nouse')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclNumberGroupCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupCountClear.setDescription('Reset the value of counters of this group.')
h3cAclNumberGroupRuleCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclNumberGroupRuleCounter.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupRuleCounter.setDescription('The rule count of number acl group.')
h3cAclNumberGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclNumberGroupName.setStatus('current')
if mibBuilder.loadTexts: h3cAclNumberGroupName.setDescription('Name of this acl group.')
h3cAclIPAclGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2))
h3cAclIPAclBasicTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2), )
if mibBuilder.loadTexts: h3cAclIPAclBasicTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicTable.setDescription("A table of basic rule group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3cAclIPAclBasicEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclIPAclBasicRuleIndex"))
if mibBuilder.loadTexts: h3cAclIPAclBasicEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicEntry.setDescription('Basic rule group information.')
h3cAclIPAclBasicRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cAclIPAclBasicRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicRuleIndex.setDescription('The rule index of basic acl group.')
h3cAclIPAclBasicRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicRowStatus.setDescription('RowStatus.')
h3cAclIPAclBasicAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 3), RuleAction()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicAct.setDescription('The action of basic acl rule.')
h3cAclIPAclBasicSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAddrType.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAddrType.setDescription('The IP addresses type of IP pool.')
h3cAclIPAclBasicSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAddr.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAddr.setDescription('The value of a local IP address is available for this association. The type of this address is determined by the value of h3cAclIPAclBasicSrcAddrType. ')
h3cAclIPAclBasicSrcPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 6), InetAddressPrefixLength()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcPrefix.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3cAclIPAclBasicSrcAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 7), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcAny.setDescription('The flag of matching any IP address.')
h3cAclIPAclBasicSrcWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 8), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicSrcWild.setDescription("Source IPv4 address wild. Only IPv4 Basic Rule support this object. Default value is '0.0.0.0'. ")
h3cAclIPAclBasicTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicTimeRangeName.setDescription('The Time-range of basic acl rule. Default value is null. ')
h3cAclIPAclBasicFragmentFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 10), FragmentFlag()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicFragmentFlag.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicFragmentFlag.setDescription('The flag of matching fragmented packets.')
h3cAclIPAclBasicLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 11), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicLog.setDescription('The packet will be logged when it matches the rule.')
h3cAclIPAclBasicCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIPAclBasicCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicCount.setDescription('The count of matched by the rule.')
h3cAclIPAclBasicCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 13), CounterClear()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclIPAclBasicCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicCountClear.setDescription('Reset the value of counter.')
h3cAclIPAclBasicEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 14), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIPAclBasicEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclIPAclBasicVpnInstanceName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicVpnInstanceName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicVpnInstanceName.setDescription('The VPN name, which the rule will be applied. Default value is null. ')
h3cAclIPAclBasicComment = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicComment.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3cAclIPAclBasicCounting = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 17), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicCounting.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3cAclIPAclBasicRouteTypeAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 18), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicRouteTypeAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicRouteTypeAny.setDescription('The flag of matching any type of routing header of IPv6 packet. ')
h3cAclIPAclBasicRouteTypeValue = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), )).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclBasicRouteTypeValue.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclBasicRouteTypeValue.setDescription('Match specify type of routing header of IPv6 packet.')
h3cAclIPAclAdvancedTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3), )
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTable.setDescription("A table of advanced and simple acl group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3cAclIPAclAdvancedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclIPAclAdvancedRuleIndex"))
if mibBuilder.loadTexts: h3cAclIPAclAdvancedEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedEntry.setDescription('Advanced acl group information.')
h3cAclIPAclAdvancedRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRuleIndex.setDescription('The rule index of advanced acl group. As a Simple ACL group, the value of this object must be 0. As an Advanced ACL group, the value of this object is ranging from 0 to 65534. ')
h3cAclIPAclAdvancedRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRowStatus.setDescription('RowStatus.')
h3cAclIPAclAdvancedAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 3), RuleAction()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedAct.setDescription('The action of advanced acl rule.')
h3cAclIPAclAdvancedProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedProtocol.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) icmpv6 Internet Control Message Protocol6(58) igmp Internet Group Management Protocol(2) ip Any IPv4 protocol ipv6 Any IPv6 protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17) ipv6-ah IPv6 Authentication Header(51) ipv6-esp IPv6 Encapsulating Security Payload(50) ')
h3cAclIPAclAdvancedAddrFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 5), AddressFlag().clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedAddrFlag.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedAddrFlag.setDescription('Address flag to select address.')
h3cAclIPAclAdvancedSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 6), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAddrType.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAddrType.setDescription('The IP addresses type of IP pool.')
h3cAclIPAclAdvancedSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 7), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAddr.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAddr.setDescription('The value of a local IP address available for this association. The type of this address is determined by the value of h3cAclIPAclAdvancedSrcAddrType. ')
h3cAclIPAclAdvancedSrcPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 8), InetAddressPrefixLength()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPrefix.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3cAclIPAclAdvancedSrcAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 9), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcAny.setDescription('The flag of matching any IP address.')
h3cAclIPAclAdvancedSrcWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 10), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcWild.setDescription("Source IPv4 address wild. Only IPv4 Advanced Rule supports this object. Default value is '0.0.0.0'. ")
h3cAclIPAclAdvancedSrcOp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 11), PortOp()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcOp.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcOp.setDescription('Source port operation symbol of advanced acl group.')
h3cAclIPAclAdvancedSrcPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPort1.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPort1.setDescription('The fourth layer source port1.')
h3cAclIPAclAdvancedSrcPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPort2.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedSrcPort2.setDescription('The fourth layer source port2.')
h3cAclIPAclAdvancedDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 14), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAddrType.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAddrType.setDescription('The IP addresses type of IP pool.')
h3cAclIPAclAdvancedDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 15), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAddr.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAddr.setDescription('The value of a local IP address available for this association. The type of this address is determined by the value of h3cAclIPAclAdvancedDestAddrType. ')
h3cAclIPAclAdvancedDestPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 16), InetAddressPrefixLength()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPrefix.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3cAclIPAclAdvancedDestAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 17), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestAny.setDescription('The flag of matching any IP address.')
h3cAclIPAclAdvancedDestWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 18), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestWild.setDescription("Destination IPv4 address wild. Only IPv4 Advanced Rule supports this object. Default value is '0.0.0.0'. ")
h3cAclIPAclAdvancedDestOp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 19), PortOp()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestOp.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestOp.setDescription('Destination port operation symbol of advanced acl group.')
h3cAclIPAclAdvancedDestPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPort1.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPort1.setDescription('The fourth layer destination port1.')
h3cAclIPAclAdvancedDestPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPort2.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDestPort2.setDescription('The fourth layer destination port2.')
h3cAclIPAclAdvancedIcmpType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), )).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedIcmpType.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedIcmpType.setDescription('The type of ICMP packet.')
h3cAclIPAclAdvancedIcmpCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), )).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedIcmpCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedIcmpCode.setDescription('The code of ICMP packet.')
h3cAclIPAclAdvancedPrecedence = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), )).clone(255)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedPrecedence.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedPrecedence.setDescription("The value of IP-packet's precedence. <0-7> Value of precedence routine Specify routine precedence(0) priority Specify priority precedence(1) immediate Specify immediate precedence(2) flash Specify flash precedence(3) flash-override Specify flash-override precedence(4) critical Specify critical precedence(5) internet Specify internetwork control precedence(6) network Specify network control precedence(7) ")
h3cAclIPAclAdvancedTos = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 15), ValueRangeConstraint(255, 255), )).clone(255)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTos.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTos.setDescription("The value of IP-packet's TOS. <0-15> Value of TOS(type of service) max-reliability Match packets with max reliable TOS(2) max-throughput Match packets with max throughput TOS(4) min-delay Match packets with min delay TOS(8) min-monetary-cost Match packets with min monetary cost TOS(1) normal Match packets with normal TOS(0) ")
h3cAclIPAclAdvancedDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 26), DSCPValue().clone(255)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDscp.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedDscp.setDescription('The value of DSCP of IP packet.')
h3cAclIPAclAdvancedTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 27), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTimeRangeName.setDescription('The Time-range of advanced acl rule. Default value is null. ')
h3cAclIPAclAdvancedTCPFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 28), TCPFlag().clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlag.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlag.setDescription('The packet type of TCP protocol.')
h3cAclIPAclAdvancedFragmentFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 29), FragmentFlag().clone('invalid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedFragmentFlag.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedFragmentFlag.setDescription('The flag of matching fragmented packet, and now support two value: 0 or 2 .')
h3cAclIPAclAdvancedLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 30), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedLog.setDescription('Log matched packets.')
h3cAclIPAclAdvancedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 31), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCount.setDescription('The count of matched by the rule.')
h3cAclIPAclAdvancedCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 32), CounterClear().clone('nouse')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCountClear.setDescription('Reset the value of counter.')
h3cAclIPAclAdvancedEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 33), TruthValue().clone('false')).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclIPAclAdvancedVpnInstanceName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 34), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedVpnInstanceName.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedVpnInstanceName.setDescription('The VPN name that the rule will be applied. Default value is null. ')
h3cAclIPAclAdvancedComment = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 35), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedComment.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3cAclIPAclAdvancedReflective = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 36), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedReflective.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedReflective.setDescription('The flag of reflective.')
h3cAclIPAclAdvancedCounting = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 37), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCounting.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3cAclIPAclAdvancedTCPFlagMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 38), Bits().clone(namedValues=NamedValues(("tcpack", 0), ("tcpfin", 1), ("tcppsh", 2), ("tcprst", 3), ("tcpsyn", 4), ("tcpurg", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlagMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlagMask.setDescription('The TCP Flag Mask. This is a bit-map of possible conditions. The various bit positions are: |0 |tcpack | |1 |tcpfin | |2 |tcppsh | |3 |tcprst | |4 |tcpsyn | |5 |tcpurg | ')
h3cAclIPAclAdvancedTCPFlagValue = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 39), Bits().clone(namedValues=NamedValues(("tcpack", 0), ("tcpfin", 1), ("tcppsh", 2), ("tcprst", 3), ("tcpsyn", 4), ("tcpurg", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlagValue.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedTCPFlagValue.setDescription('The TCP Flag Value. This is a bit-map of possible conditions. The various bit positions are: |0 |tcpack | |1 |tcpfin | |2 |tcppsh | |3 |tcprst | |4 |tcpsyn | |5 |tcpurg | ')
h3cAclIPAclAdvancedRouteTypeAny = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 40), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRouteTypeAny.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRouteTypeAny.setDescription('The flag of matching any type of routing header of IPv6 packet. ')
h3cAclIPAclAdvancedRouteTypeValue = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 255), ValueRangeConstraint(65535, 65535), )).clone(65535)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRouteTypeValue.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedRouteTypeValue.setDescription('The type of routing header of IPv6 packet.')
h3cAclIPAclAdvancedFlowLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 42), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 1048575), ValueRangeConstraint(4294967295, 4294967295), )).clone(4294967295)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclIPAclAdvancedFlowLabel.setStatus('current')
if mibBuilder.loadTexts: h3cAclIPAclAdvancedFlowLabel.setDescription('The value of flow label of IPv6 packet header.')
h3cAclMACAclGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3))
h3cAclMACTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1), )
if mibBuilder.loadTexts: h3cAclMACTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACTable.setDescription("A table of MAC acl group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3cAclMACEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclMACRuleIndex"))
if mibBuilder.loadTexts: h3cAclMACEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACEntry.setDescription('MAC acl group information.')
h3cAclMACRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cAclMACRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACRuleIndex.setDescription('The rule index of MAC-based acl group.')
h3cAclMACRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACRowStatus.setDescription('RowStatus.')
h3cAclMACAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 3), RuleAction()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACAct.setDescription('The action of MAC acl rule.')
h3cAclMACTypeCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACTypeCode.setReference('rfc894, rfc1010.')
if mibBuilder.loadTexts: h3cAclMACTypeCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACTypeCode.setDescription('The type of protocol.')
h3cAclMACTypeMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACTypeMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACTypeMask.setDescription('The mask of protocol.')
h3cAclMACSrcMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 6), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACSrcMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACSrcMac.setDescription("Source MAC of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3cAclMACSrcMacWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 7), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACSrcMacWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACSrcMacWild.setDescription("Source MAC wildzard of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3cAclMACDestMac = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 8), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACDestMac.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACDestMac.setDescription("Destination MAC of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3cAclMACDestMacWild = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 9), MacAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACDestMacWild.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACDestMacWild.setDescription("Destination MAC wildzard of MAC acl rule. Default value is '00:00:00:00:00:00' ")
h3cAclMACLsapCode = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACLsapCode.setReference('ANSI/IEEE Std 802.3')
if mibBuilder.loadTexts: h3cAclMACLsapCode.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACLsapCode.setDescription('The type of LSAP.')
h3cAclMACLsapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACLsapMask.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACLsapMask.setDescription('The mask of LSAP.')
h3cAclMACCos = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 12), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACCos.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACCos.setDescription('Vlan priority of MAC acl rule.')
h3cAclMACTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 13), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACTimeRangeName.setDescription('The Time-range of MAC acl rule. Default value is null. ')
h3cAclMACCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 14), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMACCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACCount.setDescription('The count of matched frame by the rule.')
h3cAclMACCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 15), CounterClear()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclMACCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACCountClear.setDescription('Reset the value of counter.')
h3cAclMACEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 16), TruthValue().clone('false')).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclMACEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclMACComment = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 17), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACComment.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3cAclMACLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 18), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACLog.setDescription('The packet will be logged when it matches the rule. It is disabled by default. ')
h3cAclMACCounting = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 19), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclMACCounting.setStatus('current')
if mibBuilder.loadTexts: h3cAclMACCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3cAclEnUserAclGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4))
h3cAclEnUserTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3), )
if mibBuilder.loadTexts: h3cAclEnUserTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserTable.setDescription("A table of user acl group information. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3cAclEnUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclNumberGroupIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclEnUserRuleIndex"))
if mibBuilder.loadTexts: h3cAclEnUserEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserEntry.setDescription('User defined acl group entry.')
h3cAclEnUserRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cAclEnUserRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserRuleIndex.setDescription('The subitem of the user acl.')
h3cAclEnUserRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserRowStatus.setDescription('RowStatus.')
h3cAclEnUserAct = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 3), RuleAction()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserAct.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserAct.setDescription('The action of user defined acl rule.')
h3cAclEnUserStartString = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserStartString.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserStartString.setDescription("The rule, matching packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value of this object is defined by product and it indicates the offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: 10,10af,ffff. Default value is null. ")
h3cAclEnUserL2String = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserL2String.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserL2String.setDescription("The rule, matching layer 2 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserMplsString = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserMplsString.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserMplsString.setDescription("The rule, matching mpls packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserIPv4String = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserIPv4String.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserIPv4String.setDescription("The rule, matching IPv4 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserIPv6String = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserIPv6String.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserIPv6String.setDescription("The rule, matching IPv6 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserL4String = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserL4String.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserL4String.setDescription("The rule, matching layer 4 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserL5String = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserL5String.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserL5String.setDescription("The rule, matching layer 5 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3cAclEnUserTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserTimeRangeName.setDescription('The Time-range of user acl rule. Default value is null.')
h3cAclEnUserCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclEnUserCount.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserCount.setDescription('The count of matched by the rule.')
h3cAclEnUserCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 13), CounterClear()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cAclEnUserCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserCountClear.setDescription('Reset the value of counter.')
h3cAclEnUserEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 14), TruthValue().clone('false')).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclEnUserEnable.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3cAclEnUserComment = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserComment.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3cAclEnUserLog = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 16), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserLog.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserLog.setDescription('The packet will be logged when it matches the rule. It is disabled by default. ')
h3cAclEnUserCounting = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 17), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cAclEnUserCounting.setStatus('current')
if mibBuilder.loadTexts: h3cAclEnUserCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3cAclResourceGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5))
h3cAclResourceUsageTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1), )
if mibBuilder.loadTexts: h3cAclResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceUsageTable.setDescription('The table shows ACL resource usage information. Support for resource types that are denoted by h3cAclResourceType object varies with products. If a type is not supported, the corresponding row for the type will not be instantiated in this table. ')
h3cAclResourceUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cAclResourceChassis"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclResourceSlot"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclResourceChip"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cAclResourceType"))
if mibBuilder.loadTexts: h3cAclResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceUsageEntry.setDescription('Each row contains a brief description of the resource type, a port range associated with the chip, total, reserved, and configured amount of resource of this type, the percent of resource that has been allocated, and so on. ')
h3cAclResourceChassis = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 1), Unsigned32())
if mibBuilder.loadTexts: h3cAclResourceChassis.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceChassis.setDescription('The chassis number. On a centralized or distributed device, the value for this node is always zero. ')
h3cAclResourceSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 2), Unsigned32())
if mibBuilder.loadTexts: h3cAclResourceSlot.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceSlot.setDescription('The slot number. On a centralized device, the value for this node is always zero.')
h3cAclResourceChip = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 3), Unsigned32())
if mibBuilder.loadTexts: h3cAclResourceChip.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceChip.setDescription('The chip number. On a single chip device, the value for this node is always zero.')
h3cAclResourceType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: h3cAclResourceType.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceType.setDescription('The resource type.')
h3cAclPortRange = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 5), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclPortRange.setStatus('current')
if mibBuilder.loadTexts: h3cAclPortRange.setDescription('The port range associated with the chip. Commas are used to separate multiple port ranges, for example, Ethernet1/2 to Ethernet1/12, Ethernet1/31 to Ethernet1/48. ')
h3cAclResourceTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclResourceTotal.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceTotal.setDescription('Total TCAM entries of the resource type.')
h3cAclResourceReserved = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclResourceReserved.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceReserved.setDescription('The amount of reserved TCAM entries of the resource type.')
h3cAclResourceConfigured = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclResourceConfigured.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceConfigured.setDescription('The amount of configured TCAM entries of the resource type.')
h3cAclResourceUsagePercent = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclResourceUsagePercent.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceUsagePercent.setDescription('The percent of TCAM entries that have been used for this resource type. ')
h3cAclResourceTypeDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cAclResourceTypeDescription.setStatus('current')
if mibBuilder.loadTexts: h3cAclResourceTypeDescription.setDescription('The description of this resource type.')
h3cAclPacketFilterObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3))
h3cPfilterScalarGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1))
h3cPfilterDefaultAction = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("permit", 1), ("deny", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cPfilterDefaultAction.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterDefaultAction.setDescription('The default action of packet filter. By default, the packet filter permits packets that do not match any ACL rule to pass. ')
h3cPfilterProcessingStatus = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("processing", 1), ("done", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterProcessingStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterProcessingStatus.setDescription('This object shows the status of the system when applying packet filter. It is forbidden to set or read in h3cAclPacketFilterObjects MIB module when the value is processing. ')
h3cPfilterApplyTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2), )
if mibBuilder.loadTexts: h3cPfilterApplyTable.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyTable.setDescription("A table of packet filter application. It's not supported to set default action on an entity, but supported to enable hardware count of default action on an entity. ")
h3cPfilterApplyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyDirection"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclIndex"))
if mibBuilder.loadTexts: h3cPfilterApplyEntry.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyEntry.setDescription('Packet filter application information entry.')
h3cPfilterApplyObjType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("interface", 1), ("vlan", 2), ("global", 3))))
if mibBuilder.loadTexts: h3cPfilterApplyObjType.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyObjType.setDescription('The object type of packet filter application. interface: Apply an ACL to the interface to filter packets. vlan: Apply an ACL to the VLAN to filter packets. global: Apply an ACL globally to filter packets. ')
h3cPfilterApplyObjIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)))
if mibBuilder.loadTexts: h3cPfilterApplyObjIndex.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyObjIndex.setDescription('The object ID of packet filter application. Interface: interface index, equal to ifIndex VLAN: VLAN ID, 1..4094 Global: 0 ')
h3cPfilterApplyDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 3), DirectionType())
if mibBuilder.loadTexts: h3cPfilterApplyDirection.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyDirection.setDescription('The direction of packet filter application.')
h3cPfilterApplyAclType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ipv4", 1), ("ipv6", 2), ("default", 3))))
if mibBuilder.loadTexts: h3cPfilterApplyAclType.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyAclType.setDescription('ACL Type: IPv4, IPv6, default action. Take default action as a special ACL group. ')
h3cPfilterApplyAclIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2000, 5999), )))
if mibBuilder.loadTexts: h3cPfilterApplyAclIndex.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyAclIndex.setDescription('The ACL group index. Basic type: 2000..2999 Advanced type: 3000..3999 MAC type: 4000..4999 User type: 5000..5999 Default action type: 0 ')
h3cPfilterApplyHardCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 6), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cPfilterApplyHardCount.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyHardCount.setDescription('Hardware count flag. true: enable hardware count false: disable hardware count ')
h3cPfilterApplySequence = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterApplySequence.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplySequence.setDescription('The configure sequence of packet filter application.')
h3cPfilterApplyCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 8), CounterClear()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: h3cPfilterApplyCountClear.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyCountClear.setDescription('Clear the value of counters.')
h3cPfilterApplyRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 9), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: h3cPfilterApplyRowStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterApplyRowStatus.setDescription('RowStatus.')
h3cPfilterAclGroupRunInfoTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3), )
if mibBuilder.loadTexts: h3cPfilterAclGroupRunInfoTable.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupRunInfoTable.setDescription('A table of group running information of ACLs for packet filtering. If hardware count function is not supported or not enabled to the packet filter application, the statistics entry will be zero. ')
h3cPfilterAclGroupRunInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyDirection"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclIndex"))
if mibBuilder.loadTexts: h3cPfilterAclGroupRunInfoEntry.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupRunInfoEntry.setDescription('ACL group running information entry for packet filtering.')
h3cPfilterAclGroupStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("success", 1), ("failed", 2), ("partialSuccess", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupStatus.setDescription('The status of ACL group applied. success: ACL applied successfully on all slots failed: failed to apply ACL on all slots partialSuccess: failed to apply ACL on some slots ')
h3cPfilterAclGroupCountStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("success", 1), ("failed", 2), ("partialSuccess", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupCountStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupCountStatus.setDescription('The status of enabling hardware count. If hardware count is not enabled, it returns success. success: enable hardware count successfully on all slots failed: failed to enable hardware count on all slots partialSuccess: failed to enable hardware count on some slots ')
h3cPfilterAclGroupPermitPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupPermitPkts.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupPermitPkts.setDescription('The number of packets permitted.')
h3cPfilterAclGroupPermitBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupPermitBytes.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupPermitBytes.setDescription('The number of bytes permitted.')
h3cPfilterAclGroupDenyPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupDenyPkts.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupDenyPkts.setDescription('The number of packets denied.')
h3cPfilterAclGroupDenyBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclGroupDenyBytes.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclGroupDenyBytes.setDescription('The number of bytes denied.')
h3cPfilterAclRuleRunInfoTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4), )
if mibBuilder.loadTexts: h3cPfilterAclRuleRunInfoTable.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleRunInfoTable.setDescription("A table of rule's running information of ACLs for packet filtering. If hardware count function is not supported or not enabled to the packet filter application, the h3cPfilterAclRuleMatchPackets and h3cPfilterAclRuleMatchBytes will be zero. ")
h3cPfilterAclRuleRunInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyObjIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyDirection"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterApplyAclIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterAclRuleIndex"))
if mibBuilder.loadTexts: h3cPfilterAclRuleRunInfoEntry.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleRunInfoEntry.setDescription("ACL rule's running information entry.")
h3cPfilterAclRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cPfilterAclRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleIndex.setDescription('The ACL rule index.')
h3cPfilterAclRuleStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("success", 1), ("failed", 2), ("partialSuccess", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclRuleStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleStatus.setDescription('The status of rule application. success: rule applied successfully on all slots failed: failed to apply rule on all slots partialSuccess: failed to apply rule on some slots ')
h3cPfilterAclRuleCountStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("success", 1), ("failed", 2), ("partialSuccess", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclRuleCountStatus.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleCountStatus.setDescription("The status of enabling rule's hardware count. If hardware count is not enabled, it returns success. success: enable hardware count successfully on all slots failed: failed to enable hardware count on all slots partialSuccess: failed to enable hardware count on some slots ")
h3cPfilterAclRuleMatchPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclRuleMatchPackets.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleMatchPackets.setDescription('The number of packets matched.')
h3cPfilterAclRuleMatchBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterAclRuleMatchBytes.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAclRuleMatchBytes.setDescription('The number of bytes matched.')
h3cPfilterStatisticSumTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5), )
if mibBuilder.loadTexts: h3cPfilterStatisticSumTable.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterStatisticSumTable.setDescription("A table of ACL rule's sum statistics information, accumulated by all entity application on all slots. ")
h3cPfilterStatisticSumEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1), ).setIndexNames((0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterSumDirection"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterSumAclType"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterSumAclIndex"), (0, "A3COM-HUAWEI-ACL-MIB", "h3cPfilterSumRuleIndex"))
if mibBuilder.loadTexts: h3cPfilterStatisticSumEntry.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterStatisticSumEntry.setDescription("ACL rule's sum statistics information entry.")
h3cPfilterSumDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 1), DirectionType())
if mibBuilder.loadTexts: h3cPfilterSumDirection.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumDirection.setDescription('The direction of application.')
h3cPfilterSumAclType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ipv4", 1), ("ipv6", 2))))
if mibBuilder.loadTexts: h3cPfilterSumAclType.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumAclType.setDescription('ACL type, IPv4 or IPv6.')
h3cPfilterSumAclIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2000, 5999)))
if mibBuilder.loadTexts: h3cPfilterSumAclIndex.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumAclIndex.setDescription('The ACL group index. Basic type: 2000..2999 Advanced type: 3000..3999 MAC type: 4000..4999 User type: 5000..5999 ')
h3cPfilterSumRuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534)))
if mibBuilder.loadTexts: h3cPfilterSumRuleIndex.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumRuleIndex.setDescription('The ACL rule index.')
h3cPfilterSumRuleMatchPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterSumRuleMatchPackets.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumRuleMatchPackets.setDescription('The sum number of packets matched the ACL rule.')
h3cPfilterSumRuleMatchBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: h3cPfilterSumRuleMatchBytes.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterSumRuleMatchBytes.setDescription('The sum number of bytes matched the ACL rule.')
h3cAclPacketfilterTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4))
h3cPfilterInterface = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 1), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterInterface.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterInterface.setDescription('The interface which policy apply.')
h3cPfilterDirection = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 2), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterDirection.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterDirection.setDescription('Inbound or outbound.')
h3cPfilterACLNumber = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 3), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterACLNumber.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterACLNumber.setDescription('ACL number.')
h3cPfilterAction = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 4), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterAction.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterAction.setDescription('Permit or deny.')
h3cMACfilterSourceMac = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 5), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cMACfilterSourceMac.setStatus('current')
if mibBuilder.loadTexts: h3cMACfilterSourceMac.setDescription('Source MAC address.')
h3cMACfilterDestinationMac = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 6), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cMACfilterDestinationMac.setStatus('current')
if mibBuilder.loadTexts: h3cMACfilterDestinationMac.setDescription('Destination MAC address.')
h3cPfilterPacketNumber = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 7), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterPacketNumber.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterPacketNumber.setDescription('The number of packets permitted or denied by ACL.')
h3cPfilterReceiveInterface = MibScalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 8), OctetString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: h3cPfilterReceiveInterface.setStatus('current')
if mibBuilder.loadTexts: h3cPfilterReceiveInterface.setDescription('The interface where packet come from.')
h3cAclPacketfilterTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5))
h3cPfilterTrapPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5, 0))
h3cMACfilterTrap = NotificationType((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5, 0, 1)).setObjects(("A3COM-HUAWEI-ACL-MIB", "h3cPfilterInterface"), ("A3COM-HUAWEI-ACL-MIB", "h3cPfilterDirection"), ("A3COM-HUAWEI-ACL-MIB", "h3cPfilterACLNumber"), ("A3COM-HUAWEI-ACL-MIB", "h3cPfilterAction"), ("A3COM-HUAWEI-ACL-MIB", "h3cMACfilterSourceMac"), ("A3COM-HUAWEI-ACL-MIB", "h3cMACfilterDestinationMac"), ("A3COM-HUAWEI-ACL-MIB", "h3cPfilterPacketNumber"), ("A3COM-HUAWEI-ACL-MIB", "h3cPfilterReceiveInterface"))
if mibBuilder.loadTexts: h3cMACfilterTrap.setStatus('current')
if mibBuilder.loadTexts: h3cMACfilterTrap.setDescription('This notification is generated when a packet was processed by MAC address filter, but not every packet will generate one notification, the same notification only generate once in 30 seconds.')
mibBuilder.exportSymbols("A3COM-HUAWEI-ACL-MIB", h3cPfilterAclRuleRunInfoTable=h3cPfilterAclRuleRunInfoTable, h3cAclNameGroupEntry=h3cAclNameGroupEntry, h3cPfilterAclGroupPermitBytes=h3cPfilterAclGroupPermitBytes, h3cAclUserRuleMask=h3cAclUserRuleMask, h3cAclAdvancedAclNum=h3cAclAdvancedAclNum, h3cAclActiveRuntime=h3cAclActiveRuntime, h3cAclLinkMplsExp=h3cAclLinkMplsExp, h3cAclIfSubitem=h3cAclIfSubitem, h3cAclResourceGroup=h3cAclResourceGroup, h3cPfilterDefaultAction=h3cPfilterDefaultAction, h3cPfilterSumAclIndex=h3cPfilterSumAclIndex, h3cAclIPAclAdvancedSrcWild=h3cAclIPAclAdvancedSrcWild, h3cAclBasicEnable=h3cAclBasicEnable, h3cAclActiveLinkAclSubitem=h3cAclActiveLinkAclSubitem, h3cAclAdvancedFragments=h3cAclAdvancedFragments, AddressFlag=AddressFlag, h3cAclResourceUsagePercent=h3cAclResourceUsagePercent, h3cPfilterSumRuleIndex=h3cPfilterSumRuleIndex, h3cAclUserAct=h3cAclUserAct, h3cAclMib2Mode=h3cAclMib2Mode, h3cAclResourceConfigured=h3cAclResourceConfigured, h3cAclResourceChip=h3cAclResourceChip, h3cAclMACTypeCode=h3cAclMACTypeCode, h3cPfilterApplyRowStatus=h3cPfilterApplyRowStatus, h3cAclLinkL2LabelRangeOp=h3cAclLinkL2LabelRangeOp, h3cAclLinkEnable=h3cAclLinkEnable, h3cAclPacketfilterTrapObjects=h3cAclPacketfilterTrapObjects, h3cAclNumberGroupMatchOrder=h3cAclNumberGroupMatchOrder, h3cMACfilterSourceMac=h3cMACfilterSourceMac, h3cAclActiveUserAclSubitem=h3cAclActiveUserAclSubitem, h3cAclIPAclBasicCountClear=h3cAclIPAclBasicCountClear, h3cAclIPAclAdvancedSrcPort1=h3cAclIPAclAdvancedSrcPort1, h3cAclNameGroupTable=h3cAclNameGroupTable, h3cAclIPAclAdvancedCounting=h3cAclIPAclAdvancedCounting, h3cAclNameGroupSubitemNum=h3cAclNameGroupSubitemNum, h3cAclMACCount=h3cAclMACCount, h3cAclMib2CapabilityTable=h3cAclMib2CapabilityTable, h3cPfilterApplyHardCount=h3cPfilterApplyHardCount, h3cAclAdvancedSrcWild=h3cAclAdvancedSrcWild, h3cAclBasicFragments=h3cAclBasicFragments, h3cAclNumberGroupStep=h3cAclNumberGroupStep, h3cAclIDSTable=h3cAclIDSTable, h3cAclEnUserTimeRangeName=h3cAclEnUserTimeRangeName, h3cAclIDSRowStatus=h3cAclIDSRowStatus, h3cPfilterApplyDirection=h3cPfilterApplyDirection, h3cAclIPAclAdvancedSrcAny=h3cAclIPAclAdvancedSrcAny, FragmentFlag=FragmentFlag, h3cAclAdvancedDestPort1=h3cAclAdvancedDestPort1, h3cAclNameGroupIndex=h3cAclNameGroupIndex, h3cPfilterApplyObjIndex=h3cPfilterApplyObjIndex, h3cAclAdvancedEnable=h3cAclAdvancedEnable, h3cAclUserEnable=h3cAclUserEnable, h3cAclIDSSrcMac=h3cAclIDSSrcMac, h3cAclIPAclAdvancedIcmpType=h3cAclIPAclAdvancedIcmpType, h3cAclAdvancedDestOp=h3cAclAdvancedDestOp, h3cAclResourceTotal=h3cAclResourceTotal, DirectionType=DirectionType, h3cAclEnUserRowStatus=h3cAclEnUserRowStatus, h3cAclActiveTable=h3cAclActiveTable, h3cAclIPAclAdvancedDestPort1=h3cAclIPAclAdvancedDestPort1, h3cAclResourceUsageEntry=h3cAclResourceUsageEntry, h3cAclIPAclAdvancedFragmentFlag=h3cAclIPAclAdvancedFragmentFlag, h3cAcl=h3cAcl, h3cPfilterStatisticSumEntry=h3cPfilterStatisticSumEntry, h3cAclIPAclAdvancedDestAny=h3cAclIPAclAdvancedDestAny, h3cAclAdvancedEstablish=h3cAclAdvancedEstablish, h3cPfilterSumDirection=h3cPfilterSumDirection, h3cAclLinkTypeCode=h3cAclLinkTypeCode, h3cAclLinkSrcMac=h3cAclLinkSrcMac, h3cAclIDSAct=h3cAclIDSAct, h3cAclIPAclAdvancedTable=h3cAclIPAclAdvancedTable, h3cAclIPAclAdvancedAct=h3cAclIPAclAdvancedAct, h3cAclIPAclAdvancedSrcPrefix=h3cAclIPAclAdvancedSrcPrefix, h3cAclEnUserIPv4String=h3cAclEnUserIPv4String, h3cAclPortRange=h3cAclPortRange, h3cAclEnUserL2String=h3cAclEnUserL2String, h3cAclAdvancedCountClear=h3cAclAdvancedCountClear, h3cAclUserAclNum=h3cAclUserAclNum, h3cAclIDSEntry=h3cAclIDSEntry, h3cAclIPAclBasicSrcAddr=h3cAclIPAclBasicSrcAddr, h3cAclIPAclBasicSrcPrefix=h3cAclIPAclBasicSrcPrefix, h3cAclIPAclAdvancedTos=h3cAclIPAclAdvancedTos, h3cAclLinkTimeRangeName=h3cAclLinkTimeRangeName, h3cAclAdvancedIcmpType=h3cAclAdvancedIcmpType, h3cPfilterDirection=h3cPfilterDirection, h3cPfilterTrapPrefix=h3cPfilterTrapPrefix, h3cPfilterApplyEntry=h3cPfilterApplyEntry, h3cAclBasicSrcWild=h3cAclBasicSrcWild, h3cAclIPAclAdvancedEnable=h3cAclIPAclAdvancedEnable, h3cAclIPAclBasicRuleIndex=h3cAclIPAclBasicRuleIndex, h3cAclMACCos=h3cAclMACCos, h3cAclIPAclAdvancedSrcPort2=h3cAclIPAclAdvancedSrcPort2, RuleAction=RuleAction, h3cAclLinkProtocol=h3cAclLinkProtocol, h3cAclMACCounting=h3cAclMACCounting, h3cAclResourceTypeDescription=h3cAclResourceTypeDescription, h3cAclBasicTimeRangeName=h3cAclBasicTimeRangeName, h3cAclBasicLog=h3cAclBasicLog, h3cAclNumGroupTable=h3cAclNumGroupTable, h3cPfilterInterface=h3cPfilterInterface, h3cAclMACSrcMac=h3cAclMACSrcMac, h3cAclIPAclBasicEntry=h3cAclIPAclBasicEntry, h3cAclNumberGroupType=h3cAclNumberGroupType, h3cPfilterSumAclType=h3cPfilterSumAclType, h3cAclLinkDestVlanId=h3cAclLinkDestVlanId, h3cAclUserRuleStr=h3cAclUserRuleStr, h3cAclIPAclAdvancedComment=h3cAclIPAclAdvancedComment, h3cAclIPAclAdvancedAddrFlag=h3cAclIPAclAdvancedAddrFlag, h3cAclIPAclBasicCounting=h3cAclIPAclBasicCounting, h3cAclAdvancedTimeRangeName=h3cAclAdvancedTimeRangeName, h3cAclIfIndex=h3cAclIfIndex, h3cAclMACLog=h3cAclMACLog, h3cPfilterAclRuleIndex=h3cPfilterAclRuleIndex, h3cAclIDSProtocol=h3cAclIDSProtocol, h3cAclUserTable=h3cAclUserTable, h3cAclMib2CharacteristicsValue=h3cAclMib2CharacteristicsValue, h3cAclIPAclBasicTable=h3cAclIPAclBasicTable, h3cAclMACDestMacWild=h3cAclMACDestMacWild, h3cAclEnUserCount=h3cAclEnUserCount, h3cAclNumGroupEntry=h3cAclNumGroupEntry, CounterClear=CounterClear, h3cAclIPAclBasicTimeRangeName=h3cAclIPAclBasicTimeRangeName, h3cAclBasicSubitem=h3cAclBasicSubitem, h3cAclIfRuleEntry=h3cAclIfRuleEntry, h3cAclIPAclBasicSrcAny=h3cAclIPAclBasicSrcAny, h3cPfilterProcessingStatus=h3cPfilterProcessingStatus, DSCPValue=DSCPValue, h3cAclAdvancedAct=h3cAclAdvancedAct, h3cAclNumGroupDescription=h3cAclNumGroupDescription, h3cAclUserVlanTag=h3cAclUserVlanTag, h3cPfilterApplyTable=h3cPfilterApplyTable, TCPFlag=TCPFlag, h3cPfilterAclRuleMatchBytes=h3cPfilterAclRuleMatchBytes, h3cAclEnUserStartString=h3cAclEnUserStartString, h3cAclIfRuleTable=h3cAclIfRuleTable, h3cAclActiveIpAclSubitem=h3cAclActiveIpAclSubitem, h3cAclMib2GlobalGroup=h3cAclMib2GlobalGroup, h3cAclIPAclAdvancedCountClear=h3cAclIPAclAdvancedCountClear, h3cAclIPAclAdvancedVpnInstanceName=h3cAclIPAclAdvancedVpnInstanceName, h3cAclMib2NodesGroup=h3cAclMib2NodesGroup, PYSNMP_MODULE_ID=h3cAcl, h3cAclIPAclAdvancedRowStatus=h3cAclIPAclAdvancedRowStatus, h3cAclLinkDestMacWild=h3cAclLinkDestMacWild, h3cAclActiveEntry=h3cAclActiveEntry, h3cPfilterApplyObjType=h3cPfilterApplyObjType, h3cAclAdvancedSrcPort2=h3cAclAdvancedSrcPort2, h3cAclMACDestMac=h3cAclMACDestMac, h3cPfilterAclGroupDenyPkts=h3cPfilterAclGroupDenyPkts, h3cAclEnUserComment=h3cAclEnUserComment, h3cAclUserRowStatus=h3cAclUserRowStatus, h3cAclIPAclAdvancedEntry=h3cAclIPAclAdvancedEntry, h3cAclEnUserMplsString=h3cAclEnUserMplsString, h3cAclLinkAclNum=h3cAclLinkAclNum, h3cPfilterAclGroupRunInfoEntry=h3cPfilterAclGroupRunInfoEntry, h3cAclAdvancedPrecedence=h3cAclAdvancedPrecedence, h3cAclEnUserEnable=h3cAclEnUserEnable, h3cAclIPAclAdvancedTCPFlagMask=h3cAclIPAclAdvancedTCPFlagMask, h3cAclBasicAclNum=h3cAclBasicAclNum, h3cAclIfEnable=h3cAclIfEnable, h3cAclUserSubitem=h3cAclUserSubitem, h3cAclMibObjects=h3cAclMibObjects, h3cAclMib2EntityIndex=h3cAclMib2EntityIndex, h3cAclBasicCountClear=h3cAclBasicCountClear, h3cAclBasicRowStatus=h3cAclBasicRowStatus, h3cAclMACRowStatus=h3cAclMACRowStatus, h3cAclLinkTable=h3cAclLinkTable, h3cAclMACAct=h3cAclMACAct, h3cAclIPAclBasicRowStatus=h3cAclIPAclBasicRowStatus, h3cAclIPAclBasicLog=h3cAclIPAclBasicLog, h3cAclEnUserEntry=h3cAclEnUserEntry, h3cAclIPAclAdvancedDestPort2=h3cAclIPAclAdvancedDestPort2, h3cAclIPAclAdvancedCount=h3cAclIPAclAdvancedCount, h3cAclLinkSubitem=h3cAclLinkSubitem, h3cAclActiveIfIndex=h3cAclActiveIfIndex, h3cAclAdvancedRuleEntry=h3cAclAdvancedRuleEntry, h3cAclMib2ObjectsCapabilities=h3cAclMib2ObjectsCapabilities, h3cAclLinkL2LabelRangeBegin=h3cAclLinkL2LabelRangeBegin, h3cAclAdvancedCount=h3cAclAdvancedCount, h3cAclLinkFormatType=h3cAclLinkFormatType, h3cAclIPAclBasicVpnInstanceName=h3cAclIPAclBasicVpnInstanceName, h3cAclNameGroupRowStatus=h3cAclNameGroupRowStatus, h3cAclNumGroupCountClear=h3cAclNumGroupCountClear, h3cAclIfLog=h3cAclIfLog, h3cAclActiveAclIndex=h3cAclActiveAclIndex, h3cAclIPAclGroup=h3cAclIPAclGroup, h3cAclAdvancedRuleTable=h3cAclAdvancedRuleTable, h3cAclNumberGroupEntry=h3cAclNumberGroupEntry, h3cAclEnUserIPv6String=h3cAclEnUserIPv6String, h3cAclEnUserL4String=h3cAclEnUserL4String, h3cAclNumberGroupTable=h3cAclNumberGroupTable, h3cAclIfAny=h3cAclIfAny, h3cAclActiveUserAclNum=h3cAclActiveUserAclNum, h3cAclAdvancedDestIp=h3cAclAdvancedDestIp, h3cAclLinkEntry=h3cAclLinkEntry, h3cAclMACSrcMacWild=h3cAclMACSrcMacWild, h3cAclIPAclAdvancedTCPFlagValue=h3cAclIPAclAdvancedTCPFlagValue, h3cAclIPAclAdvancedDestPrefix=h3cAclIPAclAdvancedDestPrefix, h3cAclMib2CapabilityEntry=h3cAclMib2CapabilityEntry, h3cAclLinkAct=h3cAclLinkAct, h3cAclLinkVlanTag=h3cAclLinkVlanTag, h3cAclNumGroupMatchOrder=h3cAclNumGroupMatchOrder, h3cAclEnUserLog=h3cAclEnUserLog, h3cAclIPAclAdvancedIcmpCode=h3cAclIPAclAdvancedIcmpCode, h3cAclMACCountClear=h3cAclMACCountClear, h3cAclIPAclBasicEnable=h3cAclIPAclBasicEnable, h3cPfilterSumRuleMatchPackets=h3cPfilterSumRuleMatchPackets, h3cAclMib2CharacteristicsIndex=h3cAclMib2CharacteristicsIndex, h3cAclEnUserTable=h3cAclEnUserTable, h3cAclIPAclBasicSrcWild=h3cAclIPAclBasicSrcWild, h3cAclActiveIpAclNum=h3cAclActiveIpAclNum, h3cAclMACComment=h3cAclMACComment, h3cAclIPAclBasicSrcAddrType=h3cAclIPAclBasicSrcAddrType, h3cAclUserTimeRangeName=h3cAclUserTimeRangeName, h3cAclMib2EntityType=h3cAclMib2EntityType, h3cAclIDSDestWild=h3cAclIDSDestWild, h3cAclResourceType=h3cAclResourceType, h3cAclMib2Version=h3cAclMib2Version, h3cAclAdvancedProtocol=h3cAclAdvancedProtocol, h3cAclUserFormatType=h3cAclUserFormatType, h3cAclIfRowStatus=h3cAclIfRowStatus, h3cAclIPAclBasicFragmentFlag=h3cAclIPAclBasicFragmentFlag, h3cAclMACRuleIndex=h3cAclMACRuleIndex, h3cPfilterApplyCountClear=h3cPfilterApplyCountClear, h3cAclIfCount=h3cAclIfCount, h3cAclLinkSrcMacWild=h3cAclLinkSrcMacWild, h3cAclUserEntry=h3cAclUserEntry, h3cAclNumGroupSubitemNum=h3cAclNumGroupSubitemNum, h3cAclResourceReserved=h3cAclResourceReserved, h3cAclLinkDestAny=h3cAclLinkDestAny, h3cAclLinkLsapMask=h3cAclLinkLsapMask, h3cAclAdvancedSrcPort1=h3cAclAdvancedSrcPort1, h3cAclIPAclAdvancedTimeRangeName=h3cAclIPAclAdvancedTimeRangeName, h3cAclIDSDestPort=h3cAclIDSDestPort, h3cAclIPAclAdvancedFlowLabel=h3cAclIPAclAdvancedFlowLabel, h3cAclAdvancedDestWild=h3cAclAdvancedDestWild, h3cPfilterSumRuleMatchBytes=h3cPfilterSumRuleMatchBytes, h3cAclNameGroupCreateName=h3cAclNameGroupCreateName, h3cAclIPAclAdvancedSrcAddrType=h3cAclIPAclAdvancedSrcAddrType, h3cAclEnUserL5String=h3cAclEnUserL5String, h3cAclIPAclBasicCount=h3cAclIPAclBasicCount, h3cAclNumberGroupIndex=h3cAclNumberGroupIndex, h3cAclAdvancedDestPort2=h3cAclAdvancedDestPort2, h3cAclIPAclAdvancedSrcAddr=h3cAclIPAclAdvancedSrcAddr, h3cMACfilterDestinationMac=h3cMACfilterDestinationMac, h3cAclIPAclAdvancedLog=h3cAclIPAclAdvancedLog, PortOp=PortOp, h3cPfilterAclGroupRunInfoTable=h3cPfilterAclGroupRunInfoTable, h3cPfilterStatisticSumTable=h3cPfilterStatisticSumTable, h3cPfilterACLNumber=h3cPfilterACLNumber, h3cAclIfCountClear=h3cAclIfCountClear, h3cAclIfAct=h3cAclIfAct, h3cAclLinkSrcVlanId=h3cAclLinkSrcVlanId, h3cAclAdvancedTos=h3cAclAdvancedTos, h3cAclActiveVlanID=h3cAclActiveVlanID)
mibBuilder.exportSymbols("A3COM-HUAWEI-ACL-MIB", h3cPfilterScalarGroup=h3cPfilterScalarGroup, h3cAclResourceSlot=h3cAclResourceSlot, h3cPfilterAclGroupPermitPkts=h3cPfilterAclGroupPermitPkts, h3cAclIDSDestMac=h3cAclIDSDestMac, h3cAclIDSSrcPort=h3cAclIDSSrcPort, h3cAclMACAclGroup=h3cAclMACAclGroup, h3cAclActiveLinkAclNum=h3cAclActiveLinkAclNum, h3cAclActiveDirection=h3cAclActiveDirection, h3cAclIDSSrcWild=h3cAclIDSSrcWild, h3cAclLinkDestMac=h3cAclLinkDestMac, h3cAclAdvancedRowStatus=h3cAclAdvancedRowStatus, h3cAclLinkRowStatus=h3cAclLinkRowStatus, h3cAclMib2CharacteristicsDesc=h3cAclMib2CharacteristicsDesc, h3cPfilterAclRuleStatus=h3cPfilterAclRuleStatus, h3cPfilterAclGroupCountStatus=h3cPfilterAclGroupCountStatus, h3cAclMACTable=h3cAclMACTable, h3cAclBasicAct=h3cAclBasicAct, h3cPfilterApplySequence=h3cPfilterApplySequence, h3cAclNumberGroupRuleCounter=h3cAclNumberGroupRuleCounter, h3cAclIPAclAdvancedPrecedence=h3cAclIPAclAdvancedPrecedence, h3cAclEnUserAct=h3cAclEnUserAct, h3cAclIPAclAdvancedRouteTypeAny=h3cAclIPAclAdvancedRouteTypeAny, h3cAclLinkDestIfIndex=h3cAclLinkDestIfIndex, h3cAclLinkVlanPri=h3cAclLinkVlanPri, h3cAclIPAclAdvancedRuleIndex=h3cAclIPAclAdvancedRuleIndex, h3cAclIPAclAdvancedDestOp=h3cAclIPAclAdvancedDestOp, h3cAclEnUserAclGroup=h3cAclEnUserAclGroup, h3cAclLinkSrcIfIndex=h3cAclLinkSrcIfIndex, h3cMACfilterTrap=h3cMACfilterTrap, h3cAclEnUserRuleIndex=h3cAclEnUserRuleIndex, h3cAclEnUserCounting=h3cAclEnUserCounting, h3cAclIPAclAdvancedDestAddr=h3cAclIPAclAdvancedDestAddr, h3cPfilterAclRuleMatchPackets=h3cPfilterAclRuleMatchPackets, h3cAclMACLsapCode=h3cAclMACLsapCode, h3cAclIfTimeRangeName=h3cAclIfTimeRangeName, h3cAclAdvancedSubitem=h3cAclAdvancedSubitem, h3cAclNumGroupAclNum=h3cAclNumGroupAclNum, h3cAclResourceUsageTable=h3cAclResourceUsageTable, h3cAclIDSSrcIp=h3cAclIDSSrcIp, h3cAclIDSName=h3cAclIDSName, h3cAclIPAclBasicRouteTypeValue=h3cAclIPAclBasicRouteTypeValue, h3cAclNameGroupMatchOrder=h3cAclNameGroupMatchOrder, h3cPfilterAction=h3cPfilterAction, h3cAclActiveRowStatus=h3cAclActiveRowStatus, h3cAclIfAclNum=h3cAclIfAclNum, h3cAclIDSDestIp=h3cAclIDSDestIp, h3cAclAdvancedDscp=h3cAclAdvancedDscp, h3cAclResourceChassis=h3cAclResourceChassis, h3cAclIPAclAdvancedTCPFlag=h3cAclIPAclAdvancedTCPFlag, h3cPfilterAclRuleCountStatus=h3cPfilterAclRuleCountStatus, h3cAclIPAclAdvancedProtocol=h3cAclIPAclAdvancedProtocol, h3cPfilterAclGroupStatus=h3cPfilterAclGroupStatus, h3cAclIPAclBasicRouteTypeAny=h3cAclIPAclBasicRouteTypeAny, h3cAclNumberGroupCountClear=h3cAclNumberGroupCountClear, h3cPfilterAclGroupDenyBytes=h3cPfilterAclGroupDenyBytes, h3cAclNumGroupRowStatus=h3cAclNumGroupRowStatus, h3cAclNumberGroupName=h3cAclNumberGroupName, h3cAclMib2ProcessingStatus=h3cAclMib2ProcessingStatus, h3cAclIPAclAdvancedDestWild=h3cAclIPAclAdvancedDestWild, h3cAclIPAclAdvancedDestAddrType=h3cAclIPAclAdvancedDestAddrType, h3cAclAdvancedSrcOp=h3cAclAdvancedSrcOp, h3cAclLinkLsapCode=h3cAclLinkLsapCode, h3cAclIPAclAdvancedSrcOp=h3cAclIPAclAdvancedSrcOp, h3cAclBasicRuleEntry=h3cAclBasicRuleEntry, h3cAclMACEnable=h3cAclMACEnable, h3cAclIPAclBasicComment=h3cAclIPAclBasicComment, h3cAclAdvancedLog=h3cAclAdvancedLog, h3cAclPacketfilterTrap=h3cAclPacketfilterTrap, h3cAclEnUserCountClear=h3cAclEnUserCountClear, h3cAclAdvancedIcmpCode=h3cAclAdvancedIcmpCode, h3cAclLinkSrcAny=h3cAclLinkSrcAny, h3cAclIPAclAdvancedDscp=h3cAclIPAclAdvancedDscp, h3cAclLinkL2LabelRangeEnd=h3cAclLinkL2LabelRangeEnd, h3cAclPacketFilterObjects=h3cAclPacketFilterObjects, h3cPfilterReceiveInterface=h3cPfilterReceiveInterface, h3cAclMode=h3cAclMode, h3cAclMACEntry=h3cAclMACEntry, h3cAclBasicSrcIp=h3cAclBasicSrcIp, h3cAclMib2Objects=h3cAclMib2Objects, h3cAclIPAclBasicAct=h3cAclIPAclBasicAct, h3cAclIDSDenyTime=h3cAclIDSDenyTime, h3cAclNameGroupTypes=h3cAclNameGroupTypes, h3cAclBasicRuleTable=h3cAclBasicRuleTable, h3cAclAdvancedSrcIp=h3cAclAdvancedSrcIp, h3cPfilterApplyAclType=h3cPfilterApplyAclType, h3cAclMACTypeMask=h3cAclMACTypeMask, h3cPfilterPacketNumber=h3cPfilterPacketNumber, h3cAclIPAclAdvancedRouteTypeValue=h3cAclIPAclAdvancedRouteTypeValue, h3cAclBasicCount=h3cAclBasicCount, h3cAclMACLsapMask=h3cAclMACLsapMask, h3cPfilterAclRuleRunInfoEntry=h3cPfilterAclRuleRunInfoEntry, h3cAclLinkTypeMask=h3cAclLinkTypeMask, h3cAclMib2ModuleIndex=h3cAclMib2ModuleIndex, h3cAclNumberGroupRowStatus=h3cAclNumberGroupRowStatus, h3cAclIPAclAdvancedReflective=h3cAclIPAclAdvancedReflective, h3cAclMACTimeRangeName=h3cAclMACTimeRangeName, h3cAclNumberGroupDescription=h3cAclNumberGroupDescription, h3cPfilterApplyAclIndex=h3cPfilterApplyAclIndex)
| (h3c_common,) = mibBuilder.importSymbols('A3COM-HUAWEI-OID-MIB', 'h3cCommon')
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, value_size_constraint, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint')
(inet_address, inet_address_prefix_length, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressPrefixLength', 'InetAddressType')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(bits, time_ticks, unsigned32, ip_address, object_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, integer32, notification_type, counter64, gauge32, module_identity, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'TimeTicks', 'Unsigned32', 'IpAddress', 'ObjectIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Integer32', 'NotificationType', 'Counter64', 'Gauge32', 'ModuleIdentity', 'Counter32')
(truth_value, mac_address, row_status, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'MacAddress', 'RowStatus', 'TextualConvention', 'DisplayString')
h3c_acl = module_identity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8))
if mibBuilder.loadTexts:
h3cAcl.setLastUpdated('200409211936Z')
if mibBuilder.loadTexts:
h3cAcl.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts:
h3cAcl.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085')
if mibBuilder.loadTexts:
h3cAcl.setDescription('ACL management information base for managing devices that support access control list and packet filtering. ')
class Ruleaction(TextualConvention, Integer32):
description = "The value of rule's action. permit: The packet matching the rule will be permitted to forward. deny: The packet matching the rule will be denied. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('invalid', 1), ('permit', 2), ('deny', 3))
class Counterclear(TextualConvention, Integer32):
description = "cleared: Reset the value of the rule's counter. nouse: 'nouse' will be returned when getting. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('cleared', 1), ('nouse', 2))
class Portop(TextualConvention, Integer32):
description = "The operation type of TCP and UDP. lt : Less than given port number. eq : Equal to given port number. gt : Greater than given port number. neq : Not equal to given port number. range : Between two port numbers. Default value is 'invalid'. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))
named_values = named_values(('invalid', 0), ('lt', 1), ('eq', 2), ('gt', 3), ('neq', 4), ('range', 5))
class Dscpvalue(TextualConvention, Integer32):
description = 'The value of DSCP. <0-63> Value of DSCP af11 Specify Assured Forwarding 11 service(10) af12 Specify Assured Forwarding 12 service(12) af13 Specify Assured Forwarding 13 service(14) af21 Specify Assured Forwarding 21 service(18) af22 Specify Assured Forwarding 22 service(20) af23 Specify Assured Forwarding 23 service(22) af31 Specify Assured Forwarding 31 service(26) af32 Specify Assured Forwarding 32 service(28) af33 Specify Assured Forwarding 33 service(30) af41 Specify Assured Forwarding 41 service(34) af42 Specify Assured Forwarding 42 service(36) af43 Specify Assured Forwarding 43 service(38) be Specify Best Effort service(0) cs1 Specify Class Selector 1 service(8) cs2 Specify Class Selector 2 service(16) cs3 Specify Class Selector 3 service(24) cs4 Specify Class Selector 4 service(32) cs5 Specify Class Selector 5 service(40) cs6 Specify Class Selector 6 service(48) cs7 Specify Class Selector 7 service(56) ef Specify Expedited Forwarding service(46) '
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 63), value_range_constraint(255, 255))
class Tcpflag(TextualConvention, Integer32):
description = "Type of TCP. invalid(0) tcpack(1) TCP protocol ACK Packet tcpfin(2) TCP protocol PIN Packet tcppsh(3) TCP protocol PUSH Packet tcprst(4) TCP protocol RST Packet tcpsyn(5) TCP protocol SYN Packet tcpurg(6) TCP protocol URG Packet Default value is 'invalid'. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))
named_values = named_values(('invalid', 0), ('tcpack', 1), ('tcpfin', 2), ('tcppsh', 3), ('tcprst', 4), ('tcpsyn', 5), ('tcpurg', 6))
class Fragmentflag(TextualConvention, Integer32):
description = "Type of fragment. invalid(0) fragment(1) Frag-Type Fragment fragmentSubseq(2) Frag-Type Fragment-subsequent nonFragment(3) Frag-Type non-Fragment nonSubseq(4) Frag-Type non-subsequent Default value is 'invalid'. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4))
named_values = named_values(('invalid', 0), ('fragment', 1), ('fragmentSubseq', 2), ('nonFragment', 3), ('nonSubseq', 4))
class Addressflag(TextualConvention, Integer32):
description = "Address flag to select IPv6 Address. Default value is 'invalid'. t64SrcAddrPre64DestAddrPre(1): The mean of the enumeration 't64SrcAddrPre64DestAddrPre' is that system gets the 64 bits prefix of source address and the 64 bits prefix of destination address. t64SrcAddrPre64DestAddrSuf(2): The mean of the enumeration 't64SrcAddrPre64DestAddrSuf' is that system gets the 64 bits prefix of source address and the 64 bits suffix of destination address. t64SrcAddrSuf64DestAddrPre(3): The mean of the enumeration 't64SrcAddrSuf64DestAddrPre' is that system gets the 64 bits suffix of source address and the 64 bits prefix of destination address. t64SrcAddrSuf64DestAddrSuf(4): The mean of the enumeration 't64SrcAddrSuf64DestAddrSuf' is that system gets the 64 bits suffix of source address and the 64 bits suffix of destination address. t128SourceAddress(5): The mean of the enumeration 't128SourceAddress' is that system gets the 128 bits of source address. t128DestinationAddress(6): The mean of the enumeration 't128SourceAddress' is that system gets the 128 bits of destination address. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))
named_values = named_values(('invalid', 0), ('t64SrcAddrPre64DestAddrPre', 1), ('t64SrcAddrPre64DestAddrSuf', 2), ('t64SrcAddrSuf64DestAddrPre', 3), ('t64SrcAddrSuf64DestAddrSuf', 4), ('t128SourceAddress', 5), ('t128DestinationAddress', 6))
class Directiontype(TextualConvention, Integer32):
description = 'The direction: inbound or outbound.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('inbound', 1), ('outbound', 2))
h3c_acl_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1))
h3c_acl_mode = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('linkBased', 1), ('ipBased', 2))).clone('ipBased')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclMode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMode.setDescription('Access-list mode.')
h3c_acl_num_group_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2))
if mibBuilder.loadTexts:
h3cAclNumGroupTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupTable.setDescription('Configure the match-order of number-acl group.')
h3c_acl_num_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumGroupAclNum'))
if mibBuilder.loadTexts:
h3cAclNumGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupEntry.setDescription('Define the index of h3cAclNumGroupTable.')
h3c_acl_num_group_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1000, 5999)))
if mibBuilder.loadTexts:
h3cAclNumGroupAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupAclNum.setDescription('The index of number-acl group Interface type:1000..1999 Basic type:2000..2999 Advance type:3000..3999 Link type:4000..4999 User type:5000..5999')
h3c_acl_num_group_match_order = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('config', 1), ('auto', 2))).clone('config')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupMatchOrder.setDescription('The match-order of number-acl group.')
h3c_acl_num_group_subitem_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclNumGroupSubitemNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupSubitemNum.setDescription("The number of number-acl group's node.")
h3c_acl_num_group_description = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclNumGroupDescription.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupDescription.setDescription('The description of this acl group.')
h3c_acl_num_group_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cleared', 1), ('nouse', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumGroupCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupCountClear.setDescription("Reset the value of rules' counter, which belong to this group.")
h3c_acl_num_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 2, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumGroupRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_name_group_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3))
if mibBuilder.loadTexts:
h3cAclNameGroupTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupTable.setDescription('Create acl-group that identified by name.')
h3c_acl_name_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNameGroupIndex'))
if mibBuilder.loadTexts:
h3cAclNameGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupEntry.setDescription('Define the index of h3cAclNameGroupTable.')
h3c_acl_name_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(10000, 12999)))
if mibBuilder.loadTexts:
h3cAclNameGroupIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupIndex.setDescription('The index of name-acl group.')
h3c_acl_name_group_create_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNameGroupCreateName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupCreateName.setDescription('The name of name-acl group.')
h3c_acl_name_group_types = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('basic', 1), ('advanced', 2), ('ifBased', 3), ('link', 4), ('user', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNameGroupTypes.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupTypes.setDescription('The type of name-acl group.')
h3c_acl_name_group_match_order = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('config', 1), ('auto', 2))).clone('config')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNameGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupMatchOrder.setDescription('The match-order of name-acl group.')
h3c_acl_name_group_subitem_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclNameGroupSubitemNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupSubitemNum.setDescription("The number of name-acl group's node.")
h3c_acl_name_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 3, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNameGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNameGroupRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_basic_rule_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4))
if mibBuilder.loadTexts:
h3cAclBasicRuleTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicRuleTable.setDescription('Configure the rule for basic acl group.')
h3c_acl_basic_rule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclBasicAclNum'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclBasicSubitem'))
if mibBuilder.loadTexts:
h3cAclBasicRuleEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicRuleEntry.setDescription('Define the index of h3cAclBasicRuleTable.')
h3c_acl_basic_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2000, 2999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclBasicAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicAclNum.setDescription('The index of basic acl group.')
h3c_acl_basic_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
h3cAclBasicSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicSubitem.setDescription('The subindex of basic acl group.')
h3c_acl_basic_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicAct.setDescription('The action of basic acl rule.')
h3c_acl_basic_src_ip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 4), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicSrcIp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicSrcIp.setDescription('Source IP-address of basic acl rule.')
h3c_acl_basic_src_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 5), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicSrcWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicSrcWild.setDescription('Source IP-address wild of basic acl rule.')
h3c_acl_basic_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicTimeRangeName.setDescription('The Time-range of basic acl rule.')
h3c_acl_basic_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 7), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicFragments.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicFragments.setDescription('The flag of matching fragmented packet.')
h3c_acl_basic_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 8), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicLog.setDescription('The flag of log.')
h3c_acl_basic_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 9), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclBasicEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_basic_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclBasicCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicCount.setDescription('The count of matched by basic rule.')
h3c_acl_basic_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cleared', 1), ('nouse', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicCountClear.setDescription('Reset the value of counter.')
h3c_acl_basic_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 4, 1, 12), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclBasicRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclBasicRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_advanced_rule_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5))
if mibBuilder.loadTexts:
h3cAclAdvancedRuleTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedRuleTable.setDescription('Configure the rule for advanced acl group.')
h3c_acl_advanced_rule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclAdvancedAclNum'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclAdvancedSubitem'))
if mibBuilder.loadTexts:
h3cAclAdvancedRuleEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedRuleEntry.setDescription('Define the index of h3cAclAdvancedRuleTable.')
h3c_acl_advanced_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(3000, 3999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclAdvancedAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedAclNum.setDescription('The index of advanced acl group.')
h3c_acl_advanced_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
h3cAclAdvancedSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSubitem.setDescription('The subindex of advanced acl group.')
h3c_acl_advanced_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedAct.setDescription('The action of Advance acl rule.')
h3c_acl_advanced_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedProtocol.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) igmp Internet Group Management Protocol(2) ip Any IP protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17)')
h3c_acl_advanced_src_ip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 5), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcIp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcIp.setDescription('Source IP-address of advanced acl group.')
h3c_acl_advanced_src_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 6), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcWild.setDescription('Source IP-address wild of advanced acl group.')
h3c_acl_advanced_src_op = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('invalid', 0), ('lt', 1), ('eq', 2), ('gt', 3), ('neq', 4), ('range', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcOp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcOp.setDescription("The source IP-address's operator of advanced acl group.")
h3c_acl_advanced_src_port1 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcPort1.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcPort1.setDescription('The fourth layer source port1.')
h3c_acl_advanced_src_port2 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcPort2.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedSrcPort2.setDescription('The fourth layer source port2.')
h3c_acl_advanced_dest_ip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 10), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDestIp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDestIp.setDescription('Destination IP-address of advanced acl group.')
h3c_acl_advanced_dest_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 11), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDestWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDestWild.setDescription('Destination IP-address wild of advanced acl group.')
h3c_acl_advanced_dest_op = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('invalid', 0), ('lt', 1), ('eq', 2), ('gt', 3), ('neq', 4), ('range', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDestOp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDestOp.setDescription("The destination IP-address's operator of advanced acl group.")
h3c_acl_advanced_dest_port1 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDestPort1.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDestPort1.setDescription('The fourth layer destination port1.')
h3c_acl_advanced_dest_port2 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDestPort2.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDestPort2.setDescription('The fourth layer destination port2.')
h3c_acl_advanced_precedence = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 15), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 7), value_range_constraint(255, 255)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedPrecedence.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedPrecedence.setDescription("The value of IP-packet's precedence. <0-7> Value of precedence routine Specify routine precedence(0) priority Specify priority precedence(1) immediate Specify immediate precedence(2) flash Specify flash precedence(3) flash-override Specify flash-override precedence(4) critical Specify critical precedence(5) internet Specify internetwork control precedence(6) network Specify network control precedence(7) ")
h3c_acl_advanced_tos = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 16), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 15), value_range_constraint(255, 255)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedTos.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedTos.setDescription("The value of IP-packet's TOS. <0-15> Value of TOS(type of service) max-reliability Match packets with max reliable TOS(2) max-throughput Match packets with max throughput TOS(4) min-delay Match packets with min delay TOS(8) min-monetary-cost Match packets with min monetary cost TOS(1) normal Match packets with normal TOS(0) ")
h3c_acl_advanced_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 17), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 63), value_range_constraint(255, 255)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedDscp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedDscp.setDescription('The value of DSCP. <0-63> Value of DSCP af11 Specify Assured Forwarding 11 service(10) af12 Specify Assured Forwarding 12 service(12) af13 Specify Assured Forwarding 13 service(14) af21 Specify Assured Forwarding 21 service(18) af22 Specify Assured Forwarding 22 service(20) af23 Specify Assured Forwarding 23 service(22) af31 Specify Assured Forwarding 31 service(26) af32 Specify Assured Forwarding 32 service(28) af33 Specify Assured Forwarding 33 service(30) af41 Specify Assured Forwarding 41 service(34) af42 Specify Assured Forwarding 42 service(36) af43 Specify Assured Forwarding 43 service(38) be Specify Best Effort service(0) cs1 Specify Class Selector 1 service(8) cs2 Specify Class Selector 2 service(16) cs3 Specify Class Selector 3 service(24) cs4 Specify Class Selector 4 service(32) cs5 Specify Class Selector 5 service(40) cs6 Specify Class Selector 6 service(48) cs7 Specify Class Selector 7 service(56) ef Specify Expedited Forwarding service(46)')
h3c_acl_advanced_establish = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 18), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedEstablish.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedEstablish.setDescription('Establish flag.')
h3c_acl_advanced_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedTimeRangeName.setDescription('The Time-range of advanced acl rule.')
h3c_acl_advanced_icmp_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 20), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedIcmpType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedIcmpType.setDescription('The type of ICMP packet. Integer32 ICMP type echo Type=8, Code=0 echo-reply Type=0, Code=0 fragmentneed-DFset Type=3, Code=4 host-redirect Type=5, Code=1 host-tos-redirect Type=5, Code=3 host-unreachable Type=3, Code=1 information-reply Type=16, Code=0 information-request Type=15, Code=0 net-redirect Type=5, Code=0 net-tos-redirect Type=5, Code=2 net-unreachable Type=3, Code=0 parameter-problem Type=12, Code=0 port-unreachable Type=3, Code=3 protocol-unreachable Type=3, Code=2 reassembly-timeout Type=11, Code=1 source-quench Type=4, Code=0 source-route-failed Type=3, Code=5 timestamp-reply Type=14, Code=0 timestamp-request Type=13, Code=0 ttl-exceeded Type=11, Code=0 ')
h3c_acl_advanced_icmp_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 21), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedIcmpCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedIcmpCode.setDescription('The code of ICMP packet.')
h3c_acl_advanced_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 22), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedFragments.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedFragments.setDescription('The flag of matching fragmented packet.')
h3c_acl_advanced_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 23), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedLog.setDescription('The flag of log.')
h3c_acl_advanced_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 24), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclAdvancedEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_advanced_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclAdvancedCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedCount.setDescription('The count of matched by advanced rule.')
h3c_acl_advanced_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cleared', 1), ('nouse', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedCountClear.setDescription('Reset the value of counter.')
h3c_acl_advanced_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 5, 1, 27), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclAdvancedRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclAdvancedRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_if_rule_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6))
if mibBuilder.loadTexts:
h3cAclIfRuleTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfRuleTable.setDescription('Configure the rule for interface-based acl group.')
h3c_acl_if_rule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclIfAclNum'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclIfSubitem'))
if mibBuilder.loadTexts:
h3cAclIfRuleEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfRuleEntry.setDescription('Define the index of h3cAclIfRuleTable.')
h3c_acl_if_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(1000, 1999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclIfAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfAclNum.setDescription('The index of interface-based acl group.')
h3c_acl_if_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
h3cAclIfSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfSubitem.setDescription('The subindex of interface-based acl group.')
h3c_acl_if_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfAct.setDescription('The action of interface-based acl group.')
h3c_acl_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfIndex.setDescription('The index of interface.')
h3c_acl_if_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 5), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfAny.setDescription('The flag of matching any interface.')
h3c_acl_if_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfTimeRangeName.setDescription('The Time-range of interface-based acl rule.')
h3c_acl_if_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 7), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfLog.setDescription('The flag of log.')
h3c_acl_if_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIfEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_if_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIfCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfCount.setDescription('The count of matched by basic rule.')
h3c_acl_if_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cleared', 1), ('nouse', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfCountClear.setDescription("Reset the value of the rule's counter.")
h3c_acl_if_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 6, 1, 11), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIfRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIfRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_link_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7))
if mibBuilder.loadTexts:
h3cAclLinkTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkTable.setDescription('Create link acl.')
h3c_acl_link_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclLinkAclNum'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclLinkSubitem'))
if mibBuilder.loadTexts:
h3cAclLinkEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkEntry.setDescription('The entry of the link acl table.')
h3c_acl_link_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(4000, 4999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclLinkAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkAclNum.setDescription('The index of link-based acl group.')
h3c_acl_link_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
h3cAclLinkSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSubitem.setDescription('The subindex of link-based acl group.')
h3c_acl_link_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkAct.setDescription('The action of link-based acl group.')
h3c_acl_link_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2048, 2054, 32821, 34915, 34916, 34887))).clone(namedValues=named_values(('invalid', 0), ('ip', 2048), ('arp', 2054), ('rarp', 32821), ('pppoeControl', 34915), ('pppoeData', 34916), ('mpls', 34887))).clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkProtocol.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkProtocol.setDescription('The layer 2 protocol-type of link acl rule.')
h3c_acl_link_format_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('invalid', 0), ('ethernetII', 1), ('snap', 2), ('ieee802Dot3And2', 3), ('ieee802Dot3', 4)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkFormatType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkFormatType.setDescription('Format type of link acl rule.')
h3c_acl_link_vlan_tag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('invalid', 0), ('tagged', 1), ('untagged', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkVlanTag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkVlanTag.setDescription('The flag of vlan tag of link acl rule.')
h3c_acl_link_vlan_pri = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 7), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 7), value_range_constraint(255, 255)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkVlanPri.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkVlanPri.setDescription('Vlan priority of link acl rule.')
h3c_acl_link_src_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 4094))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkSrcVlanId.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSrcVlanId.setDescription('Source vlan ID of link acl rule.')
h3c_acl_link_src_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 9), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkSrcMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSrcMac.setDescription('Source mac of link acl rule.')
h3c_acl_link_src_mac_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 10), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkSrcMacWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSrcMacWild.setDescription('Source mac wildzard of link acl rule.')
h3c_acl_link_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkSrcIfIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSrcIfIndex.setDescription('Source IfIndex of link acl rule.')
h3c_acl_link_src_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 12), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkSrcAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkSrcAny.setDescription('The flag of matching any source.')
h3c_acl_link_dest_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 4094))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkDestVlanId.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkDestVlanId.setDescription('Destination vlan ID of link acl rule.')
h3c_acl_link_dest_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 14), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkDestMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkDestMac.setDescription('Destination mac of link acl rule.')
h3c_acl_link_dest_mac_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 15), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkDestMacWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkDestMacWild.setDescription('Destination mac wildzard of link acl rule.')
h3c_acl_link_dest_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkDestIfIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkDestIfIndex.setDescription('Destination IfIndex of link acl rule.')
h3c_acl_link_dest_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 17), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkDestAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkDestAny.setDescription('The flag of matching any destination.')
h3c_acl_link_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 18), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkTimeRangeName.setDescription('The Time-range of link-based acl rule.')
h3c_acl_link_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 19), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclLinkEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_link_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 20), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_link_type_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 21), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkTypeCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkTypeCode.setDescription('The type of layer 2 protocol.0x0000...0xffff.')
h3c_acl_link_type_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 22), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkTypeMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkTypeMask.setDescription('The mask of layer 2 protocol.0x0000...0xffff.')
h3c_acl_link_lsap_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 23), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkLsapCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkLsapCode.setDescription('The type of LSAP.0x0000...0xffff.')
h3c_acl_link_lsap_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 24), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkLsapMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkLsapMask.setDescription('The mask of LSAP.0x0000...0xffff.')
h3c_acl_link_l2_label_range_op = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('invalid', 0), ('lt', 1), ('eq', 2), ('gt', 3), ('neq', 4), ('range', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeOp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeOp.setDescription('Operation symbol of the MPLS label. If the symbol is range(5), the objects h3cAclLinkL2LabelRangeBegin and h3cAclLinkL2LabelRangeEnd should have different values indicating a range. Otherwise, only h3cAclLinkL2LabelRangeBegin counts, object h3cAclLinkL2LabelRangeEnd is ignored. invalid(0) -- unavailable lt(1) -- less than eq(2) -- equal gt(3) -- great than neq(4) -- not equal range(5) -- a range with two ends included ')
h3c_acl_link_l2_label_range_begin = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 26), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeBegin.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeBegin.setDescription('The beginning of VPLS VC label.')
h3c_acl_link_l2_label_range_end = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 27), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeEnd.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkL2LabelRangeEnd.setDescription('The end of VPLS VC label.')
h3c_acl_link_mpls_exp = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 7, 1, 28), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclLinkMplsExp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclLinkMplsExp.setDescription("The value of MPLS-packet's Exp.")
h3c_acl_user_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8))
if mibBuilder.loadTexts:
h3cAclUserTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserTable.setDescription('Create user acl.')
h3c_acl_user_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclUserAclNum'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclUserSubitem'))
if mibBuilder.loadTexts:
h3cAclUserEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserEntry.setDescription('The entry of user acl table.')
h3c_acl_user_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(5000, 5999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclUserAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserAclNum.setDescription('The number of the user acl.')
h3c_acl_user_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
h3cAclUserSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserSubitem.setDescription('The subitem of the user acl.')
h3c_acl_user_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserAct.setDescription('The action of the user acl.')
h3c_acl_user_format_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('invalid', 0), ('ethernetII', 1), ('snap', 2), ('ieee802Dot2And3', 3), ('ieee802Dot4', 4))).clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserFormatType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserFormatType.setDescription('Format type.')
h3c_acl_user_vlan_tag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 0))).clone(namedValues=named_values(('tagged', 1), ('untagged', 2), ('invalid', 0))).clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserVlanTag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserVlanTag.setDescription('Vlan tag exits or not.')
h3c_acl_user_rule_str = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserRuleStr.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserRuleStr.setDescription('Rule string.')
h3c_acl_user_rule_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(1, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserRuleMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserRuleMask.setDescription('Rule mask.')
h3c_acl_user_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserTimeRangeName.setDescription('The Time-range of the user defined acl.')
h3c_acl_user_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 9), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclUserEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_user_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 8, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclUserRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclUserRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_active_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9))
if mibBuilder.loadTexts:
h3cAclActiveTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveTable.setDescription('Active acl.')
h3c_acl_active_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclActiveAclIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclActiveIfIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclActiveVlanID'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclActiveDirection'))
if mibBuilder.loadTexts:
h3cAclActiveEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveEntry.setDescription('The entry of active acl table.')
h3c_acl_active_acl_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 1), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 5999), value_range_constraint(10000, 12999))))
if mibBuilder.loadTexts:
h3cAclActiveAclIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveAclIndex.setDescription('Acl index.')
h3c_acl_active_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)))
if mibBuilder.loadTexts:
h3cAclActiveIfIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveIfIndex.setDescription('IfIndex.')
h3c_acl_active_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 3), integer32())
if mibBuilder.loadTexts:
h3cAclActiveVlanID.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveVlanID.setDescription('The lower 16 bits is Vlan ID, the higher 16 bits, if not zero, it describes the slot ID of the L3plus board. ')
h3c_acl_active_direction = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 0))).clone(namedValues=named_values(('input', 1), ('output', 2), ('both', 3), ('invalid', 0))))
if mibBuilder.loadTexts:
h3cAclActiveDirection.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveDirection.setDescription('Direction.')
h3c_acl_active_user_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 5), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(5000, 5999), value_range_constraint(10000, 12999)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveUserAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveUserAclNum.setDescription('The number of the user acl.')
h3c_acl_active_user_acl_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveUserAclSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveUserAclSubitem.setDescription('The subitem of the user acl.')
h3c_acl_active_ip_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 7), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2000, 3999), value_range_constraint(10000, 12999)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveIpAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveIpAclNum.setDescription('The number of the IP acl.')
h3c_acl_active_ip_acl_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveIpAclSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveIpAclSubitem.setDescription('The subitem of the IP acl.')
h3c_acl_active_link_acl_num = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 9), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(4000, 4999), value_range_constraint(10000, 12999)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveLinkAclNum.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveLinkAclNum.setDescription('The num of the link acl.')
h3c_acl_active_link_acl_subitem = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveLinkAclSubitem.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveLinkAclSubitem.setDescription('The subitem of the link acl.')
h3c_acl_active_runtime = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 11), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclActiveRuntime.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveRuntime.setDescription('Is run or not.')
h3c_acl_active_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 9, 1, 12), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclActiveRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclActiveRowStatus.setDescription('RowStatus, now support three state: CreateAndGo, Active, Destroy.')
h3c_acl_ids_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10))
if mibBuilder.loadTexts:
h3cAclIDSTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSTable.setDescription('Configure the rule for IDS.')
h3c_acl_ids_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1)).setIndexNames((1, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclIDSName'))
if mibBuilder.loadTexts:
h3cAclIDSEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSEntry.setDescription('The entry of acl ids table.')
h3c_acl_ids_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
h3cAclIDSName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSName.setDescription('The name index of the IDS table.')
h3c_acl_ids_src_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 2), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSSrcMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSSrcMac.setDescription('Source mac of IDS acl rule.')
h3c_acl_ids_dest_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 3), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSDestMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSDestMac.setDescription('Destination mac of IDS acl rule.')
h3c_acl_ids_src_ip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 4), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSSrcIp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSSrcIp.setDescription('Source IP-address of IDS acl rule.')
h3c_acl_ids_src_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 5), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSSrcWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSSrcWild.setDescription('Source IP-address wild of IDS acl rule.')
h3c_acl_ids_dest_ip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 6), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSDestIp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSDestIp.setDescription('Destination IP-address of IDS acl rule.')
h3c_acl_ids_dest_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 7), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSDestWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSDestWild.setDescription('Destination IP-address wild of IDS acl rule.')
h3c_acl_ids_src_port = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSSrcPort.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSSrcPort.setDescription('The fourth layer source port.')
h3c_acl_ids_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSDestPort.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSDestPort.setDescription('The fourth layer destination port.')
h3c_acl_ids_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSProtocol.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) igmp Internet Group Management Protocol(2) ip Any IP protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17) ')
h3c_acl_ids_deny_time = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 11), unsigned32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSDenyTime.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSDenyTime.setDescription('The maximum number of seconds which deny for this acl rule.')
h3c_acl_ids_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSAct.setDescription('The action of IDS acl rule.')
h3c_acl_ids_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 1, 10, 1, 13), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIDSRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIDSRowStatus.setDescription('RowStatus, now supports three states: CreateAndGo, Active, and Destroy.')
h3c_acl_mib2_objects = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2))
h3c_acl_mib2_global_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1))
h3c_acl_mib2_nodes_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1))
h3c_acl_mib2_mode = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('linkBased', 1), ('ipBased', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclMib2Mode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2Mode.setDescription('The applying mode of ACL.')
h3c_acl_mib2_version = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMib2Version.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2Version.setDescription("The version of this file. The output value has the format of 'xx'or 'xxx'. For example: 10 means 1.0; 125 means 12.5. ")
h3c_acl_mib2_objects_capabilities = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 3), bits().clone(namedValues=named_values(('h3cAclMib2Mode', 0), ('h3cAclVersion', 1), ('h3cAclMib2ObjectsCapabilities', 2), ('h3cAclMib2CapabilityTable', 3), ('h3cAclNumberGroupTable', 4), ('h3cAclIPAclBasicTable', 5), ('h3cAclIPAclAdvancedTable', 6), ('h3cAclMACTable', 7), ('h3cAclEnUserTable', 8), ('h3cAclMib2ProcessingStatus', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMib2ObjectsCapabilities.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2ObjectsCapabilities.setDescription('The objects of h3cAclMib2Objects.')
h3c_acl_mib2_processing_status = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('processing', 1), ('done', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMib2ProcessingStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2ProcessingStatus.setDescription('The processing status of ACL operation.')
h3c_acl_mib2_capability_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2))
if mibBuilder.loadTexts:
h3cAclMib2CapabilityTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2CapabilityTable.setDescription('The capability of mib2.')
h3c_acl_mib2_capability_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclMib2EntityType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclMib2EntityIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclMib2ModuleIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclMib2CharacteristicsIndex'))
if mibBuilder.loadTexts:
h3cAclMib2CapabilityEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2CapabilityEntry.setDescription('The information of Capability of mib2.')
h3c_acl_mib2_entity_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('system', 1), ('interface', 2))))
if mibBuilder.loadTexts:
h3cAclMib2EntityType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2EntityType.setDescription('The type of entity . system: The entity is systemic level. interface: The entity is interface level. ')
h3c_acl_mib2_entity_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 2), integer32())
if mibBuilder.loadTexts:
h3cAclMib2EntityIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2EntityIndex.setDescription("The index of entity. If h3cAclMib2EntityType is system, the value of this object is 0. If h3cAclMib2EntityType is interface, the value of this object is equal to 'ifIndex'. ")
h3c_acl_mib2_module_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('layer3', 1), ('layer2', 2), ('userDefined', 3))))
if mibBuilder.loadTexts:
h3cAclMib2ModuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2ModuleIndex.setDescription('The module index of ACL.')
h3c_acl_mib2_characteristics_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 4), integer32())
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsIndex.setDescription('The characteristics index of mib2. See DESCRIPTION of h3cAclMib2CharacteristicsValue to get detail information about the value of this object. ')
h3c_acl_mib2_characteristics_desc = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsDesc.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsDesc.setDescription('The description of characteristics.')
h3c_acl_mib2_characteristics_value = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 2, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsValue.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMib2CharacteristicsValue.setDescription("The value of capability of this object. TypeOfRuleStringValue : notSupport(0) and the length of RuleString. TypeOfCodeValue : OnlyOneNotSupport(0), MoreThanOneNotSupport(1) If h3cAclMib2CharacteristicsValue is 'moreThanOneNotSupport', h3cAclMib2CharacteristicsDesc must be used to depict which protocols are not supported. The output value of h3cAclMib2CharacteristicsDesc has the format of 'a,b'. For example, 'ip,rarp'. layer3 Module: Index Characteristics value 1 SourceIPAddress notSupport(0) 2 DestinationIPAddress notSupport(0) 3 SourcePort notSupport(0) 4 DestinationPort notSupport(0) 5 IPPrecedence notSupport(0) 6 TOS notSupport(0) 7 DSCP notSupport(0) 8 TCPFlag notSupport(0) 9 FragmentFlag notSupport(0) 10 Log notSupport(0) 11 RuleMatchCounter notSupport(0) 12 ResetRuleMatchCounter notSupport(0) 13 VPN notSupport(0) 15 protocol notSupport(0) 16 AddressFlag notSupport(0) layer2 Module: Index Characteristics value 1 ProtocolType TypeOfCodeValue 2 SourceMAC notSupport(0) 3 DestinationMAC notSupport(0) 4 LSAPType TypeOfCodeValue 5 CoS notSupport(0) UserDefined Module: Index Characteristics value 1 UserDefaultOffset TypeOfRuleStringValue 2 UserL2RuleOffset TypeOfRuleStringValue 3 UserMplsOffset TypeOfRuleStringValue 4 UserIPv4Offset TypeOfRuleStringValue 5 UserIPv6Offset TypeOfRuleStringValue 6 UserL4Offset TypeOfRuleStringValue 7 UserL5Offset TypeOfRuleStringValue ")
h3c_acl_number_group_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3))
if mibBuilder.loadTexts:
h3cAclNumberGroupTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupTable.setDescription('A table of the number acl group information.')
h3c_acl_number_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupIndex'))
if mibBuilder.loadTexts:
h3cAclNumberGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupEntry.setDescription('Number acl group information entry.')
h3c_acl_number_group_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ipv4', 1), ('ipv6', 2))).clone('ipv4'))
if mibBuilder.loadTexts:
h3cAclNumberGroupType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupType.setDescription('The type of number group. Basic ACL and Advanced ACL support ipv4 and ipv6. The range of Basic ACL is from 2000 to 2999. The range of Advanced ACL is from 3000 to 3999. Simple ACL supports ipv6 only. The range of Simple ACL is from 10000 to 42767. MAC ACL and User ACL support ipv4 only. The range of MAC ACL is from 4000 to 4999. The range of User ACL is from 5000 to 5999. ')
h3c_acl_number_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(2000, 5999), value_range_constraint(10000, 42767))))
if mibBuilder.loadTexts:
h3cAclNumberGroupIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupIndex.setDescription('The group index of number acl. Basic type:2000..2999 Advanced type:3000..3999 MAC type:4000..4999 User type:5000..5999 Simple type:10000..42767 ')
h3c_acl_number_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumberGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupRowStatus.setDescription('RowStatus.')
h3c_acl_number_group_match_order = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('config', 1), ('auto', 2))).clone('config')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumberGroupMatchOrder.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupMatchOrder.setDescription('The match-order of number acl group.')
h3c_acl_number_group_step = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(5)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumberGroupStep.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupStep.setDescription('The step of rule index.')
h3c_acl_number_group_description = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumberGroupDescription.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupDescription.setDescription('Description of this acl group.')
h3c_acl_number_group_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 7), counter_clear().clone('nouse')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclNumberGroupCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupCountClear.setDescription('Reset the value of counters of this group.')
h3c_acl_number_group_rule_counter = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclNumberGroupRuleCounter.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupRuleCounter.setDescription('The rule count of number acl group.')
h3c_acl_number_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 1, 3, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclNumberGroupName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclNumberGroupName.setDescription('Name of this acl group.')
h3c_acl_ip_acl_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2))
h3c_acl_ip_acl_basic_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2))
if mibBuilder.loadTexts:
h3cAclIPAclBasicTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicTable.setDescription("A table of basic rule group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3c_acl_ip_acl_basic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclIPAclBasicRuleIndex'))
if mibBuilder.loadTexts:
h3cAclIPAclBasicEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicEntry.setDescription('Basic rule group information.')
h3c_acl_ip_acl_basic_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cAclIPAclBasicRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRuleIndex.setDescription('The rule index of basic acl group.')
h3c_acl_ip_acl_basic_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRowStatus.setDescription('RowStatus.')
h3c_acl_ip_acl_basic_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 3), rule_action()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicAct.setDescription('The action of basic acl rule.')
h3c_acl_ip_acl_basic_src_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAddrType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAddrType.setDescription('The IP addresses type of IP pool.')
h3c_acl_ip_acl_basic_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAddr.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAddr.setDescription('The value of a local IP address is available for this association. The type of this address is determined by the value of h3cAclIPAclBasicSrcAddrType. ')
h3c_acl_ip_acl_basic_src_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 6), inet_address_prefix_length()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcPrefix.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3c_acl_ip_acl_basic_src_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 7), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcAny.setDescription('The flag of matching any IP address.')
h3c_acl_ip_acl_basic_src_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 8), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicSrcWild.setDescription("Source IPv4 address wild. Only IPv4 Basic Rule support this object. Default value is '0.0.0.0'. ")
h3c_acl_ip_acl_basic_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicTimeRangeName.setDescription('The Time-range of basic acl rule. Default value is null. ')
h3c_acl_ip_acl_basic_fragment_flag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 10), fragment_flag()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicFragmentFlag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicFragmentFlag.setDescription('The flag of matching fragmented packets.')
h3c_acl_ip_acl_basic_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 11), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicLog.setDescription('The packet will be logged when it matches the rule.')
h3c_acl_ip_acl_basic_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 12), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCount.setDescription('The count of matched by the rule.')
h3c_acl_ip_acl_basic_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 13), counter_clear()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCountClear.setDescription('Reset the value of counter.')
h3c_acl_ip_acl_basic_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 14), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIPAclBasicEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_ip_acl_basic_vpn_instance_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 15), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicVpnInstanceName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicVpnInstanceName.setDescription('The VPN name, which the rule will be applied. Default value is null. ')
h3c_acl_ip_acl_basic_comment = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 16), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicComment.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3c_acl_ip_acl_basic_counting = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 17), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCounting.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3c_acl_ip_acl_basic_route_type_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 18), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRouteTypeAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRouteTypeAny.setDescription('The flag of matching any type of routing header of IPv6 packet. ')
h3c_acl_ip_acl_basic_route_type_value = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535))).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRouteTypeValue.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclBasicRouteTypeValue.setDescription('Match specify type of routing header of IPv6 packet.')
h3c_acl_ip_acl_advanced_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3))
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTable.setDescription("A table of advanced and simple acl group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3c_acl_ip_acl_advanced_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclIPAclAdvancedRuleIndex'))
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedEntry.setDescription('Advanced acl group information.')
h3c_acl_ip_acl_advanced_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRuleIndex.setDescription('The rule index of advanced acl group. As a Simple ACL group, the value of this object must be 0. As an Advanced ACL group, the value of this object is ranging from 0 to 65534. ')
h3c_acl_ip_acl_advanced_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRowStatus.setDescription('RowStatus.')
h3c_acl_ip_acl_advanced_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 3), rule_action()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedAct.setDescription('The action of advanced acl rule.')
h3c_acl_ip_acl_advanced_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedProtocol.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedProtocol.setDescription('The protocol-type of advanced acl group. <1-255> Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) icmpv6 Internet Control Message Protocol6(58) igmp Internet Group Management Protocol(2) ip Any IPv4 protocol ipv6 Any IPv6 protocol ipinip IP in IP tunneling(4) ospf OSPF routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17) ipv6-ah IPv6 Authentication Header(51) ipv6-esp IPv6 Encapsulating Security Payload(50) ')
h3c_acl_ip_acl_advanced_addr_flag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 5), address_flag().clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedAddrFlag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedAddrFlag.setDescription('Address flag to select address.')
h3c_acl_ip_acl_advanced_src_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 6), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAddrType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAddrType.setDescription('The IP addresses type of IP pool.')
h3c_acl_ip_acl_advanced_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 7), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAddr.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAddr.setDescription('The value of a local IP address available for this association. The type of this address is determined by the value of h3cAclIPAclAdvancedSrcAddrType. ')
h3c_acl_ip_acl_advanced_src_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 8), inet_address_prefix_length()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPrefix.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3c_acl_ip_acl_advanced_src_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 9), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcAny.setDescription('The flag of matching any IP address.')
h3c_acl_ip_acl_advanced_src_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 10), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcWild.setDescription("Source IPv4 address wild. Only IPv4 Advanced Rule supports this object. Default value is '0.0.0.0'. ")
h3c_acl_ip_acl_advanced_src_op = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 11), port_op()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcOp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcOp.setDescription('Source port operation symbol of advanced acl group.')
h3c_acl_ip_acl_advanced_src_port1 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPort1.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPort1.setDescription('The fourth layer source port1.')
h3c_acl_ip_acl_advanced_src_port2 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPort2.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedSrcPort2.setDescription('The fourth layer source port2.')
h3c_acl_ip_acl_advanced_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 14), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAddrType.setDescription('The IP addresses type of IP pool.')
h3c_acl_ip_acl_advanced_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 15), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAddr.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAddr.setDescription('The value of a local IP address available for this association. The type of this address is determined by the value of h3cAclIPAclAdvancedDestAddrType. ')
h3c_acl_ip_acl_advanced_dest_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 16), inet_address_prefix_length()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPrefix.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPrefix.setDescription('Denotes the length of a generic Internet network address prefix. A value of n corresponds to an IP address mask which has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0. ')
h3c_acl_ip_acl_advanced_dest_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 17), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestAny.setDescription('The flag of matching any IP address.')
h3c_acl_ip_acl_advanced_dest_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 18), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestWild.setDescription("Destination IPv4 address wild. Only IPv4 Advanced Rule supports this object. Default value is '0.0.0.0'. ")
h3c_acl_ip_acl_advanced_dest_op = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 19), port_op()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestOp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestOp.setDescription('Destination port operation symbol of advanced acl group.')
h3c_acl_ip_acl_advanced_dest_port1 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPort1.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPort1.setDescription('The fourth layer destination port1.')
h3c_acl_ip_acl_advanced_dest_port2 = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPort2.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDestPort2.setDescription('The fourth layer destination port2.')
h3c_acl_ip_acl_advanced_icmp_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 22), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535))).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedIcmpType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedIcmpType.setDescription('The type of ICMP packet.')
h3c_acl_ip_acl_advanced_icmp_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 23), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535))).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedIcmpCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedIcmpCode.setDescription('The code of ICMP packet.')
h3c_acl_ip_acl_advanced_precedence = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 24), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 7), value_range_constraint(255, 255))).clone(255)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedPrecedence.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedPrecedence.setDescription("The value of IP-packet's precedence. <0-7> Value of precedence routine Specify routine precedence(0) priority Specify priority precedence(1) immediate Specify immediate precedence(2) flash Specify flash precedence(3) flash-override Specify flash-override precedence(4) critical Specify critical precedence(5) internet Specify internetwork control precedence(6) network Specify network control precedence(7) ")
h3c_acl_ip_acl_advanced_tos = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 25), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 15), value_range_constraint(255, 255))).clone(255)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTos.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTos.setDescription("The value of IP-packet's TOS. <0-15> Value of TOS(type of service) max-reliability Match packets with max reliable TOS(2) max-throughput Match packets with max throughput TOS(4) min-delay Match packets with min delay TOS(8) min-monetary-cost Match packets with min monetary cost TOS(1) normal Match packets with normal TOS(0) ")
h3c_acl_ip_acl_advanced_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 26), dscp_value().clone(255)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDscp.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedDscp.setDescription('The value of DSCP of IP packet.')
h3c_acl_ip_acl_advanced_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 27), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTimeRangeName.setDescription('The Time-range of advanced acl rule. Default value is null. ')
h3c_acl_ip_acl_advanced_tcp_flag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 28), tcp_flag().clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlag.setDescription('The packet type of TCP protocol.')
h3c_acl_ip_acl_advanced_fragment_flag = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 29), fragment_flag().clone('invalid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedFragmentFlag.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedFragmentFlag.setDescription('The flag of matching fragmented packet, and now support two value: 0 or 2 .')
h3c_acl_ip_acl_advanced_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 30), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedLog.setDescription('Log matched packets.')
h3c_acl_ip_acl_advanced_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 31), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCount.setDescription('The count of matched by the rule.')
h3c_acl_ip_acl_advanced_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 32), counter_clear().clone('nouse')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCountClear.setDescription('Reset the value of counter.')
h3c_acl_ip_acl_advanced_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 33), truth_value().clone('false')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_ip_acl_advanced_vpn_instance_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 34), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedVpnInstanceName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedVpnInstanceName.setDescription('The VPN name that the rule will be applied. Default value is null. ')
h3c_acl_ip_acl_advanced_comment = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 35), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedComment.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3c_acl_ip_acl_advanced_reflective = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 36), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedReflective.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedReflective.setDescription('The flag of reflective.')
h3c_acl_ip_acl_advanced_counting = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 37), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCounting.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3c_acl_ip_acl_advanced_tcp_flag_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 38), bits().clone(namedValues=named_values(('tcpack', 0), ('tcpfin', 1), ('tcppsh', 2), ('tcprst', 3), ('tcpsyn', 4), ('tcpurg', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlagMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlagMask.setDescription('The TCP Flag Mask. This is a bit-map of possible conditions. The various bit positions are: |0 |tcpack | |1 |tcpfin | |2 |tcppsh | |3 |tcprst | |4 |tcpsyn | |5 |tcpurg | ')
h3c_acl_ip_acl_advanced_tcp_flag_value = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 39), bits().clone(namedValues=named_values(('tcpack', 0), ('tcpfin', 1), ('tcppsh', 2), ('tcprst', 3), ('tcpsyn', 4), ('tcpurg', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlagValue.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedTCPFlagValue.setDescription('The TCP Flag Value. This is a bit-map of possible conditions. The various bit positions are: |0 |tcpack | |1 |tcpfin | |2 |tcppsh | |3 |tcprst | |4 |tcpsyn | |5 |tcpurg | ')
h3c_acl_ip_acl_advanced_route_type_any = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 40), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRouteTypeAny.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRouteTypeAny.setDescription('The flag of matching any type of routing header of IPv6 packet. ')
h3c_acl_ip_acl_advanced_route_type_value = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 41), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 255), value_range_constraint(65535, 65535))).clone(65535)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRouteTypeValue.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedRouteTypeValue.setDescription('The type of routing header of IPv6 packet.')
h3c_acl_ip_acl_advanced_flow_label = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 2, 3, 1, 42), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 1048575), value_range_constraint(4294967295, 4294967295))).clone(4294967295)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedFlowLabel.setStatus('current')
if mibBuilder.loadTexts:
h3cAclIPAclAdvancedFlowLabel.setDescription('The value of flow label of IPv6 packet header.')
h3c_acl_mac_acl_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3))
h3c_acl_mac_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1))
if mibBuilder.loadTexts:
h3cAclMACTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACTable.setDescription("A table of MAC acl group. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3c_acl_mac_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclMACRuleIndex'))
if mibBuilder.loadTexts:
h3cAclMACEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACEntry.setDescription('MAC acl group information.')
h3c_acl_mac_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cAclMACRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACRuleIndex.setDescription('The rule index of MAC-based acl group.')
h3c_acl_mac_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACRowStatus.setDescription('RowStatus.')
h3c_acl_mac_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 3), rule_action()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACAct.setDescription('The action of MAC acl rule.')
h3c_acl_mac_type_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACTypeCode.setReference('rfc894, rfc1010.')
if mibBuilder.loadTexts:
h3cAclMACTypeCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACTypeCode.setDescription('The type of protocol.')
h3c_acl_mac_type_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACTypeMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACTypeMask.setDescription('The mask of protocol.')
h3c_acl_mac_src_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 6), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACSrcMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACSrcMac.setDescription("Source MAC of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3c_acl_mac_src_mac_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 7), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACSrcMacWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACSrcMacWild.setDescription("Source MAC wildzard of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3c_acl_mac_dest_mac = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 8), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACDestMac.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACDestMac.setDescription("Destination MAC of MAC acl rule. Default value is '00:00:00:00:00:00'. ")
h3c_acl_mac_dest_mac_wild = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 9), mac_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACDestMacWild.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACDestMacWild.setDescription("Destination MAC wildzard of MAC acl rule. Default value is '00:00:00:00:00:00' ")
h3c_acl_mac_lsap_code = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACLsapCode.setReference('ANSI/IEEE Std 802.3')
if mibBuilder.loadTexts:
h3cAclMACLsapCode.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACLsapCode.setDescription('The type of LSAP.')
h3c_acl_mac_lsap_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACLsapMask.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACLsapMask.setDescription('The mask of LSAP.')
h3c_acl_mac_cos = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 12), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACCos.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACCos.setDescription('Vlan priority of MAC acl rule.')
h3c_acl_mac_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 13), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACTimeRangeName.setDescription('The Time-range of MAC acl rule. Default value is null. ')
h3c_acl_mac_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 14), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMACCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACCount.setDescription('The count of matched frame by the rule.')
h3c_acl_mac_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 15), counter_clear()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclMACCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACCountClear.setDescription('Reset the value of counter.')
h3c_acl_mac_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 16), truth_value().clone('false')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclMACEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_mac_comment = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 17), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACComment.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3c_acl_mac_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 18), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACLog.setDescription('The packet will be logged when it matches the rule. It is disabled by default. ')
h3c_acl_mac_counting = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 3, 1, 1, 19), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclMACCounting.setStatus('current')
if mibBuilder.loadTexts:
h3cAclMACCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3c_acl_en_user_acl_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4))
h3c_acl_en_user_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3))
if mibBuilder.loadTexts:
h3cAclEnUserTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserTable.setDescription("A table of user acl group information. If some objects of this table are not supported by some products, these objects can't be created, changed and applied. Default value of these objects will be returned when they are read. ")
h3c_acl_en_user_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclNumberGroupIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclEnUserRuleIndex'))
if mibBuilder.loadTexts:
h3cAclEnUserEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserEntry.setDescription('User defined acl group entry.')
h3c_acl_en_user_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cAclEnUserRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserRuleIndex.setDescription('The subitem of the user acl.')
h3c_acl_en_user_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserRowStatus.setDescription('RowStatus.')
h3c_acl_en_user_act = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 3), rule_action()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserAct.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserAct.setDescription('The action of user defined acl rule.')
h3c_acl_en_user_start_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserStartString.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserStartString.setDescription("The rule, matching packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value of this object is defined by product and it indicates the offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: 10,10af,ffff. Default value is null. ")
h3c_acl_en_user_l2_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserL2String.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserL2String.setDescription("The rule, matching layer 2 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_mpls_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserMplsString.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserMplsString.setDescription("The rule, matching mpls packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_i_pv4_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserIPv4String.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserIPv4String.setDescription("The rule, matching IPv4 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_i_pv6_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserIPv6String.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserIPv6String.setDescription("The rule, matching IPv6 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_l4_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserL4String.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserL4String.setDescription("The rule, matching layer 4 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_l5_string = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserL5String.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserL5String.setDescription("The rule, matching layer 5 packets, input like this: 'RuleOffset','RuleString','RuleMask'. RuleOffset: The value is defined by product and it indicates offset of the rule mask in the packet(unit: byte). RuleString: The length of RuleString is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. RuleMask: The length of RuleMask is defined by product. The string must be hexadecimal. The length of string must be multiple of 2. For example: '10','10af','ffff'. Default value is null. ")
h3c_acl_en_user_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserTimeRangeName.setDescription('The Time-range of user acl rule. Default value is null.')
h3c_acl_en_user_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 12), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclEnUserCount.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserCount.setDescription('The count of matched by the rule.')
h3c_acl_en_user_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 13), counter_clear()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cAclEnUserCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserCountClear.setDescription('Reset the value of counter.')
h3c_acl_en_user_enable = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 14), truth_value().clone('false')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclEnUserEnable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserEnable.setDescription('The rule is active or not. true : active false : inactive ')
h3c_acl_en_user_comment = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 15), octet_string().subtype(subtypeSpec=value_size_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserComment.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserComment.setDescription('The description of ACL rule. Default value is Zero-length String. ')
h3c_acl_en_user_log = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 16), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserLog.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserLog.setDescription('The packet will be logged when it matches the rule. It is disabled by default. ')
h3c_acl_en_user_counting = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 4, 3, 1, 17), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cAclEnUserCounting.setStatus('current')
if mibBuilder.loadTexts:
h3cAclEnUserCounting.setDescription('The packet will be counted when it matches the rule. It is disabled by default. ')
h3c_acl_resource_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5))
h3c_acl_resource_usage_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1))
if mibBuilder.loadTexts:
h3cAclResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceUsageTable.setDescription('The table shows ACL resource usage information. Support for resource types that are denoted by h3cAclResourceType object varies with products. If a type is not supported, the corresponding row for the type will not be instantiated in this table. ')
h3c_acl_resource_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclResourceChassis'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclResourceSlot'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclResourceChip'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cAclResourceType'))
if mibBuilder.loadTexts:
h3cAclResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceUsageEntry.setDescription('Each row contains a brief description of the resource type, a port range associated with the chip, total, reserved, and configured amount of resource of this type, the percent of resource that has been allocated, and so on. ')
h3c_acl_resource_chassis = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 1), unsigned32())
if mibBuilder.loadTexts:
h3cAclResourceChassis.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceChassis.setDescription('The chassis number. On a centralized or distributed device, the value for this node is always zero. ')
h3c_acl_resource_slot = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 2), unsigned32())
if mibBuilder.loadTexts:
h3cAclResourceSlot.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceSlot.setDescription('The slot number. On a centralized device, the value for this node is always zero.')
h3c_acl_resource_chip = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 3), unsigned32())
if mibBuilder.loadTexts:
h3cAclResourceChip.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceChip.setDescription('The chip number. On a single chip device, the value for this node is always zero.')
h3c_acl_resource_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 255)))
if mibBuilder.loadTexts:
h3cAclResourceType.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceType.setDescription('The resource type.')
h3c_acl_port_range = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 5), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclPortRange.setStatus('current')
if mibBuilder.loadTexts:
h3cAclPortRange.setDescription('The port range associated with the chip. Commas are used to separate multiple port ranges, for example, Ethernet1/2 to Ethernet1/12, Ethernet1/31 to Ethernet1/48. ')
h3c_acl_resource_total = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclResourceTotal.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceTotal.setDescription('Total TCAM entries of the resource type.')
h3c_acl_resource_reserved = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclResourceReserved.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceReserved.setDescription('The amount of reserved TCAM entries of the resource type.')
h3c_acl_resource_configured = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclResourceConfigured.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceConfigured.setDescription('The amount of configured TCAM entries of the resource type.')
h3c_acl_resource_usage_percent = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclResourceUsagePercent.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceUsagePercent.setDescription('The percent of TCAM entries that have been used for this resource type. ')
h3c_acl_resource_type_description = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 2, 5, 1, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cAclResourceTypeDescription.setStatus('current')
if mibBuilder.loadTexts:
h3cAclResourceTypeDescription.setDescription('The description of this resource type.')
h3c_acl_packet_filter_objects = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3))
h3c_pfilter_scalar_group = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1))
h3c_pfilter_default_action = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('permit', 1), ('deny', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cPfilterDefaultAction.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterDefaultAction.setDescription('The default action of packet filter. By default, the packet filter permits packets that do not match any ACL rule to pass. ')
h3c_pfilter_processing_status = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('processing', 1), ('done', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterProcessingStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterProcessingStatus.setDescription('This object shows the status of the system when applying packet filter. It is forbidden to set or read in h3cAclPacketFilterObjects MIB module when the value is processing. ')
h3c_pfilter_apply_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2))
if mibBuilder.loadTexts:
h3cPfilterApplyTable.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyTable.setDescription("A table of packet filter application. It's not supported to set default action on an entity, but supported to enable hardware count of default action on an entity. ")
h3c_pfilter_apply_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyDirection'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclIndex'))
if mibBuilder.loadTexts:
h3cPfilterApplyEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyEntry.setDescription('Packet filter application information entry.')
h3c_pfilter_apply_obj_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('interface', 1), ('vlan', 2), ('global', 3))))
if mibBuilder.loadTexts:
h3cPfilterApplyObjType.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyObjType.setDescription('The object type of packet filter application. interface: Apply an ACL to the interface to filter packets. vlan: Apply an ACL to the VLAN to filter packets. global: Apply an ACL globally to filter packets. ')
h3c_pfilter_apply_obj_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)))
if mibBuilder.loadTexts:
h3cPfilterApplyObjIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyObjIndex.setDescription('The object ID of packet filter application. Interface: interface index, equal to ifIndex VLAN: VLAN ID, 1..4094 Global: 0 ')
h3c_pfilter_apply_direction = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 3), direction_type())
if mibBuilder.loadTexts:
h3cPfilterApplyDirection.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyDirection.setDescription('The direction of packet filter application.')
h3c_pfilter_apply_acl_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ipv4', 1), ('ipv6', 2), ('default', 3))))
if mibBuilder.loadTexts:
h3cPfilterApplyAclType.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyAclType.setDescription('ACL Type: IPv4, IPv6, default action. Take default action as a special ACL group. ')
h3c_pfilter_apply_acl_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2000, 5999))))
if mibBuilder.loadTexts:
h3cPfilterApplyAclIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyAclIndex.setDescription('The ACL group index. Basic type: 2000..2999 Advanced type: 3000..3999 MAC type: 4000..4999 User type: 5000..5999 Default action type: 0 ')
h3c_pfilter_apply_hard_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 6), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cPfilterApplyHardCount.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyHardCount.setDescription('Hardware count flag. true: enable hardware count false: disable hardware count ')
h3c_pfilter_apply_sequence = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterApplySequence.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplySequence.setDescription('The configure sequence of packet filter application.')
h3c_pfilter_apply_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 8), counter_clear()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
h3cPfilterApplyCountClear.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyCountClear.setDescription('Clear the value of counters.')
h3c_pfilter_apply_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 2, 1, 9), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
h3cPfilterApplyRowStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterApplyRowStatus.setDescription('RowStatus.')
h3c_pfilter_acl_group_run_info_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3))
if mibBuilder.loadTexts:
h3cPfilterAclGroupRunInfoTable.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupRunInfoTable.setDescription('A table of group running information of ACLs for packet filtering. If hardware count function is not supported or not enabled to the packet filter application, the statistics entry will be zero. ')
h3c_pfilter_acl_group_run_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyDirection'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclIndex'))
if mibBuilder.loadTexts:
h3cPfilterAclGroupRunInfoEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupRunInfoEntry.setDescription('ACL group running information entry for packet filtering.')
h3c_pfilter_acl_group_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('success', 1), ('failed', 2), ('partialSuccess', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupStatus.setDescription('The status of ACL group applied. success: ACL applied successfully on all slots failed: failed to apply ACL on all slots partialSuccess: failed to apply ACL on some slots ')
h3c_pfilter_acl_group_count_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('success', 1), ('failed', 2), ('partialSuccess', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupCountStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupCountStatus.setDescription('The status of enabling hardware count. If hardware count is not enabled, it returns success. success: enable hardware count successfully on all slots failed: failed to enable hardware count on all slots partialSuccess: failed to enable hardware count on some slots ')
h3c_pfilter_acl_group_permit_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupPermitPkts.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupPermitPkts.setDescription('The number of packets permitted.')
h3c_pfilter_acl_group_permit_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupPermitBytes.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupPermitBytes.setDescription('The number of bytes permitted.')
h3c_pfilter_acl_group_deny_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupDenyPkts.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupDenyPkts.setDescription('The number of packets denied.')
h3c_pfilter_acl_group_deny_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 3, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclGroupDenyBytes.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclGroupDenyBytes.setDescription('The number of bytes denied.')
h3c_pfilter_acl_rule_run_info_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4))
if mibBuilder.loadTexts:
h3cPfilterAclRuleRunInfoTable.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleRunInfoTable.setDescription("A table of rule's running information of ACLs for packet filtering. If hardware count function is not supported or not enabled to the packet filter application, the h3cPfilterAclRuleMatchPackets and h3cPfilterAclRuleMatchBytes will be zero. ")
h3c_pfilter_acl_rule_run_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyObjIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyDirection'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterApplyAclIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterAclRuleIndex'))
if mibBuilder.loadTexts:
h3cPfilterAclRuleRunInfoEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleRunInfoEntry.setDescription("ACL rule's running information entry.")
h3c_pfilter_acl_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cPfilterAclRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleIndex.setDescription('The ACL rule index.')
h3c_pfilter_acl_rule_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('success', 1), ('failed', 2), ('partialSuccess', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclRuleStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleStatus.setDescription('The status of rule application. success: rule applied successfully on all slots failed: failed to apply rule on all slots partialSuccess: failed to apply rule on some slots ')
h3c_pfilter_acl_rule_count_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('success', 1), ('failed', 2), ('partialSuccess', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclRuleCountStatus.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleCountStatus.setDescription("The status of enabling rule's hardware count. If hardware count is not enabled, it returns success. success: enable hardware count successfully on all slots failed: failed to enable hardware count on all slots partialSuccess: failed to enable hardware count on some slots ")
h3c_pfilter_acl_rule_match_packets = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclRuleMatchPackets.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleMatchPackets.setDescription('The number of packets matched.')
h3c_pfilter_acl_rule_match_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 4, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterAclRuleMatchBytes.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAclRuleMatchBytes.setDescription('The number of bytes matched.')
h3c_pfilter_statistic_sum_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5))
if mibBuilder.loadTexts:
h3cPfilterStatisticSumTable.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterStatisticSumTable.setDescription("A table of ACL rule's sum statistics information, accumulated by all entity application on all slots. ")
h3c_pfilter_statistic_sum_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1)).setIndexNames((0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterSumDirection'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterSumAclType'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterSumAclIndex'), (0, 'A3COM-HUAWEI-ACL-MIB', 'h3cPfilterSumRuleIndex'))
if mibBuilder.loadTexts:
h3cPfilterStatisticSumEntry.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterStatisticSumEntry.setDescription("ACL rule's sum statistics information entry.")
h3c_pfilter_sum_direction = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 1), direction_type())
if mibBuilder.loadTexts:
h3cPfilterSumDirection.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumDirection.setDescription('The direction of application.')
h3c_pfilter_sum_acl_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ipv4', 1), ('ipv6', 2))))
if mibBuilder.loadTexts:
h3cPfilterSumAclType.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumAclType.setDescription('ACL type, IPv4 or IPv6.')
h3c_pfilter_sum_acl_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(2000, 5999)))
if mibBuilder.loadTexts:
h3cPfilterSumAclIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumAclIndex.setDescription('The ACL group index. Basic type: 2000..2999 Advanced type: 3000..3999 MAC type: 4000..4999 User type: 5000..5999 ')
h3c_pfilter_sum_rule_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65534)))
if mibBuilder.loadTexts:
h3cPfilterSumRuleIndex.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumRuleIndex.setDescription('The ACL rule index.')
h3c_pfilter_sum_rule_match_packets = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterSumRuleMatchPackets.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumRuleMatchPackets.setDescription('The sum number of packets matched the ACL rule.')
h3c_pfilter_sum_rule_match_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 3, 5, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
h3cPfilterSumRuleMatchBytes.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterSumRuleMatchBytes.setDescription('The sum number of bytes matched the ACL rule.')
h3c_acl_packetfilter_trap_objects = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4))
h3c_pfilter_interface = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 1), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterInterface.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterInterface.setDescription('The interface which policy apply.')
h3c_pfilter_direction = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 2), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterDirection.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterDirection.setDescription('Inbound or outbound.')
h3c_pfilter_acl_number = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 3), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterACLNumber.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterACLNumber.setDescription('ACL number.')
h3c_pfilter_action = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 4), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterAction.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterAction.setDescription('Permit or deny.')
h3c_ma_cfilter_source_mac = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 5), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cMACfilterSourceMac.setStatus('current')
if mibBuilder.loadTexts:
h3cMACfilterSourceMac.setDescription('Source MAC address.')
h3c_ma_cfilter_destination_mac = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 6), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cMACfilterDestinationMac.setStatus('current')
if mibBuilder.loadTexts:
h3cMACfilterDestinationMac.setDescription('Destination MAC address.')
h3c_pfilter_packet_number = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 7), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterPacketNumber.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterPacketNumber.setDescription('The number of packets permitted or denied by ACL.')
h3c_pfilter_receive_interface = mib_scalar((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 4, 8), octet_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
h3cPfilterReceiveInterface.setStatus('current')
if mibBuilder.loadTexts:
h3cPfilterReceiveInterface.setDescription('The interface where packet come from.')
h3c_acl_packetfilter_trap = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5))
h3c_pfilter_trap_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5, 0))
h3c_ma_cfilter_trap = notification_type((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 8, 5, 0, 1)).setObjects(('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterInterface'), ('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterDirection'), ('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterACLNumber'), ('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterAction'), ('A3COM-HUAWEI-ACL-MIB', 'h3cMACfilterSourceMac'), ('A3COM-HUAWEI-ACL-MIB', 'h3cMACfilterDestinationMac'), ('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterPacketNumber'), ('A3COM-HUAWEI-ACL-MIB', 'h3cPfilterReceiveInterface'))
if mibBuilder.loadTexts:
h3cMACfilterTrap.setStatus('current')
if mibBuilder.loadTexts:
h3cMACfilterTrap.setDescription('This notification is generated when a packet was processed by MAC address filter, but not every packet will generate one notification, the same notification only generate once in 30 seconds.')
mibBuilder.exportSymbols('A3COM-HUAWEI-ACL-MIB', h3cPfilterAclRuleRunInfoTable=h3cPfilterAclRuleRunInfoTable, h3cAclNameGroupEntry=h3cAclNameGroupEntry, h3cPfilterAclGroupPermitBytes=h3cPfilterAclGroupPermitBytes, h3cAclUserRuleMask=h3cAclUserRuleMask, h3cAclAdvancedAclNum=h3cAclAdvancedAclNum, h3cAclActiveRuntime=h3cAclActiveRuntime, h3cAclLinkMplsExp=h3cAclLinkMplsExp, h3cAclIfSubitem=h3cAclIfSubitem, h3cAclResourceGroup=h3cAclResourceGroup, h3cPfilterDefaultAction=h3cPfilterDefaultAction, h3cPfilterSumAclIndex=h3cPfilterSumAclIndex, h3cAclIPAclAdvancedSrcWild=h3cAclIPAclAdvancedSrcWild, h3cAclBasicEnable=h3cAclBasicEnable, h3cAclActiveLinkAclSubitem=h3cAclActiveLinkAclSubitem, h3cAclAdvancedFragments=h3cAclAdvancedFragments, AddressFlag=AddressFlag, h3cAclResourceUsagePercent=h3cAclResourceUsagePercent, h3cPfilterSumRuleIndex=h3cPfilterSumRuleIndex, h3cAclUserAct=h3cAclUserAct, h3cAclMib2Mode=h3cAclMib2Mode, h3cAclResourceConfigured=h3cAclResourceConfigured, h3cAclResourceChip=h3cAclResourceChip, h3cAclMACTypeCode=h3cAclMACTypeCode, h3cPfilterApplyRowStatus=h3cPfilterApplyRowStatus, h3cAclLinkL2LabelRangeOp=h3cAclLinkL2LabelRangeOp, h3cAclLinkEnable=h3cAclLinkEnable, h3cAclPacketfilterTrapObjects=h3cAclPacketfilterTrapObjects, h3cAclNumberGroupMatchOrder=h3cAclNumberGroupMatchOrder, h3cMACfilterSourceMac=h3cMACfilterSourceMac, h3cAclActiveUserAclSubitem=h3cAclActiveUserAclSubitem, h3cAclIPAclBasicCountClear=h3cAclIPAclBasicCountClear, h3cAclIPAclAdvancedSrcPort1=h3cAclIPAclAdvancedSrcPort1, h3cAclNameGroupTable=h3cAclNameGroupTable, h3cAclIPAclAdvancedCounting=h3cAclIPAclAdvancedCounting, h3cAclNameGroupSubitemNum=h3cAclNameGroupSubitemNum, h3cAclMACCount=h3cAclMACCount, h3cAclMib2CapabilityTable=h3cAclMib2CapabilityTable, h3cPfilterApplyHardCount=h3cPfilterApplyHardCount, h3cAclAdvancedSrcWild=h3cAclAdvancedSrcWild, h3cAclBasicFragments=h3cAclBasicFragments, h3cAclNumberGroupStep=h3cAclNumberGroupStep, h3cAclIDSTable=h3cAclIDSTable, h3cAclEnUserTimeRangeName=h3cAclEnUserTimeRangeName, h3cAclIDSRowStatus=h3cAclIDSRowStatus, h3cPfilterApplyDirection=h3cPfilterApplyDirection, h3cAclIPAclAdvancedSrcAny=h3cAclIPAclAdvancedSrcAny, FragmentFlag=FragmentFlag, h3cAclAdvancedDestPort1=h3cAclAdvancedDestPort1, h3cAclNameGroupIndex=h3cAclNameGroupIndex, h3cPfilterApplyObjIndex=h3cPfilterApplyObjIndex, h3cAclAdvancedEnable=h3cAclAdvancedEnable, h3cAclUserEnable=h3cAclUserEnable, h3cAclIDSSrcMac=h3cAclIDSSrcMac, h3cAclIPAclAdvancedIcmpType=h3cAclIPAclAdvancedIcmpType, h3cAclAdvancedDestOp=h3cAclAdvancedDestOp, h3cAclResourceTotal=h3cAclResourceTotal, DirectionType=DirectionType, h3cAclEnUserRowStatus=h3cAclEnUserRowStatus, h3cAclActiveTable=h3cAclActiveTable, h3cAclIPAclAdvancedDestPort1=h3cAclIPAclAdvancedDestPort1, h3cAclResourceUsageEntry=h3cAclResourceUsageEntry, h3cAclIPAclAdvancedFragmentFlag=h3cAclIPAclAdvancedFragmentFlag, h3cAcl=h3cAcl, h3cPfilterStatisticSumEntry=h3cPfilterStatisticSumEntry, h3cAclIPAclAdvancedDestAny=h3cAclIPAclAdvancedDestAny, h3cAclAdvancedEstablish=h3cAclAdvancedEstablish, h3cPfilterSumDirection=h3cPfilterSumDirection, h3cAclLinkTypeCode=h3cAclLinkTypeCode, h3cAclLinkSrcMac=h3cAclLinkSrcMac, h3cAclIDSAct=h3cAclIDSAct, h3cAclIPAclAdvancedTable=h3cAclIPAclAdvancedTable, h3cAclIPAclAdvancedAct=h3cAclIPAclAdvancedAct, h3cAclIPAclAdvancedSrcPrefix=h3cAclIPAclAdvancedSrcPrefix, h3cAclEnUserIPv4String=h3cAclEnUserIPv4String, h3cAclPortRange=h3cAclPortRange, h3cAclEnUserL2String=h3cAclEnUserL2String, h3cAclAdvancedCountClear=h3cAclAdvancedCountClear, h3cAclUserAclNum=h3cAclUserAclNum, h3cAclIDSEntry=h3cAclIDSEntry, h3cAclIPAclBasicSrcAddr=h3cAclIPAclBasicSrcAddr, h3cAclIPAclBasicSrcPrefix=h3cAclIPAclBasicSrcPrefix, h3cAclIPAclAdvancedTos=h3cAclIPAclAdvancedTos, h3cAclLinkTimeRangeName=h3cAclLinkTimeRangeName, h3cAclAdvancedIcmpType=h3cAclAdvancedIcmpType, h3cPfilterDirection=h3cPfilterDirection, h3cPfilterTrapPrefix=h3cPfilterTrapPrefix, h3cPfilterApplyEntry=h3cPfilterApplyEntry, h3cAclBasicSrcWild=h3cAclBasicSrcWild, h3cAclIPAclAdvancedEnable=h3cAclIPAclAdvancedEnable, h3cAclIPAclBasicRuleIndex=h3cAclIPAclBasicRuleIndex, h3cAclMACCos=h3cAclMACCos, h3cAclIPAclAdvancedSrcPort2=h3cAclIPAclAdvancedSrcPort2, RuleAction=RuleAction, h3cAclLinkProtocol=h3cAclLinkProtocol, h3cAclMACCounting=h3cAclMACCounting, h3cAclResourceTypeDescription=h3cAclResourceTypeDescription, h3cAclBasicTimeRangeName=h3cAclBasicTimeRangeName, h3cAclBasicLog=h3cAclBasicLog, h3cAclNumGroupTable=h3cAclNumGroupTable, h3cPfilterInterface=h3cPfilterInterface, h3cAclMACSrcMac=h3cAclMACSrcMac, h3cAclIPAclBasicEntry=h3cAclIPAclBasicEntry, h3cAclNumberGroupType=h3cAclNumberGroupType, h3cPfilterSumAclType=h3cPfilterSumAclType, h3cAclLinkDestVlanId=h3cAclLinkDestVlanId, h3cAclUserRuleStr=h3cAclUserRuleStr, h3cAclIPAclAdvancedComment=h3cAclIPAclAdvancedComment, h3cAclIPAclAdvancedAddrFlag=h3cAclIPAclAdvancedAddrFlag, h3cAclIPAclBasicCounting=h3cAclIPAclBasicCounting, h3cAclAdvancedTimeRangeName=h3cAclAdvancedTimeRangeName, h3cAclIfIndex=h3cAclIfIndex, h3cAclMACLog=h3cAclMACLog, h3cPfilterAclRuleIndex=h3cPfilterAclRuleIndex, h3cAclIDSProtocol=h3cAclIDSProtocol, h3cAclUserTable=h3cAclUserTable, h3cAclMib2CharacteristicsValue=h3cAclMib2CharacteristicsValue, h3cAclIPAclBasicTable=h3cAclIPAclBasicTable, h3cAclMACDestMacWild=h3cAclMACDestMacWild, h3cAclEnUserCount=h3cAclEnUserCount, h3cAclNumGroupEntry=h3cAclNumGroupEntry, CounterClear=CounterClear, h3cAclIPAclBasicTimeRangeName=h3cAclIPAclBasicTimeRangeName, h3cAclBasicSubitem=h3cAclBasicSubitem, h3cAclIfRuleEntry=h3cAclIfRuleEntry, h3cAclIPAclBasicSrcAny=h3cAclIPAclBasicSrcAny, h3cPfilterProcessingStatus=h3cPfilterProcessingStatus, DSCPValue=DSCPValue, h3cAclAdvancedAct=h3cAclAdvancedAct, h3cAclNumGroupDescription=h3cAclNumGroupDescription, h3cAclUserVlanTag=h3cAclUserVlanTag, h3cPfilterApplyTable=h3cPfilterApplyTable, TCPFlag=TCPFlag, h3cPfilterAclRuleMatchBytes=h3cPfilterAclRuleMatchBytes, h3cAclEnUserStartString=h3cAclEnUserStartString, h3cAclIfRuleTable=h3cAclIfRuleTable, h3cAclActiveIpAclSubitem=h3cAclActiveIpAclSubitem, h3cAclMib2GlobalGroup=h3cAclMib2GlobalGroup, h3cAclIPAclAdvancedCountClear=h3cAclIPAclAdvancedCountClear, h3cAclIPAclAdvancedVpnInstanceName=h3cAclIPAclAdvancedVpnInstanceName, h3cAclMib2NodesGroup=h3cAclMib2NodesGroup, PYSNMP_MODULE_ID=h3cAcl, h3cAclIPAclAdvancedRowStatus=h3cAclIPAclAdvancedRowStatus, h3cAclLinkDestMacWild=h3cAclLinkDestMacWild, h3cAclActiveEntry=h3cAclActiveEntry, h3cPfilterApplyObjType=h3cPfilterApplyObjType, h3cAclAdvancedSrcPort2=h3cAclAdvancedSrcPort2, h3cAclMACDestMac=h3cAclMACDestMac, h3cPfilterAclGroupDenyPkts=h3cPfilterAclGroupDenyPkts, h3cAclEnUserComment=h3cAclEnUserComment, h3cAclUserRowStatus=h3cAclUserRowStatus, h3cAclIPAclAdvancedEntry=h3cAclIPAclAdvancedEntry, h3cAclEnUserMplsString=h3cAclEnUserMplsString, h3cAclLinkAclNum=h3cAclLinkAclNum, h3cPfilterAclGroupRunInfoEntry=h3cPfilterAclGroupRunInfoEntry, h3cAclAdvancedPrecedence=h3cAclAdvancedPrecedence, h3cAclEnUserEnable=h3cAclEnUserEnable, h3cAclIPAclAdvancedTCPFlagMask=h3cAclIPAclAdvancedTCPFlagMask, h3cAclBasicAclNum=h3cAclBasicAclNum, h3cAclIfEnable=h3cAclIfEnable, h3cAclUserSubitem=h3cAclUserSubitem, h3cAclMibObjects=h3cAclMibObjects, h3cAclMib2EntityIndex=h3cAclMib2EntityIndex, h3cAclBasicCountClear=h3cAclBasicCountClear, h3cAclBasicRowStatus=h3cAclBasicRowStatus, h3cAclMACRowStatus=h3cAclMACRowStatus, h3cAclLinkTable=h3cAclLinkTable, h3cAclMACAct=h3cAclMACAct, h3cAclIPAclBasicRowStatus=h3cAclIPAclBasicRowStatus, h3cAclIPAclBasicLog=h3cAclIPAclBasicLog, h3cAclEnUserEntry=h3cAclEnUserEntry, h3cAclIPAclAdvancedDestPort2=h3cAclIPAclAdvancedDestPort2, h3cAclIPAclAdvancedCount=h3cAclIPAclAdvancedCount, h3cAclLinkSubitem=h3cAclLinkSubitem, h3cAclActiveIfIndex=h3cAclActiveIfIndex, h3cAclAdvancedRuleEntry=h3cAclAdvancedRuleEntry, h3cAclMib2ObjectsCapabilities=h3cAclMib2ObjectsCapabilities, h3cAclLinkL2LabelRangeBegin=h3cAclLinkL2LabelRangeBegin, h3cAclAdvancedCount=h3cAclAdvancedCount, h3cAclLinkFormatType=h3cAclLinkFormatType, h3cAclIPAclBasicVpnInstanceName=h3cAclIPAclBasicVpnInstanceName, h3cAclNameGroupRowStatus=h3cAclNameGroupRowStatus, h3cAclNumGroupCountClear=h3cAclNumGroupCountClear, h3cAclIfLog=h3cAclIfLog, h3cAclActiveAclIndex=h3cAclActiveAclIndex, h3cAclIPAclGroup=h3cAclIPAclGroup, h3cAclAdvancedRuleTable=h3cAclAdvancedRuleTable, h3cAclNumberGroupEntry=h3cAclNumberGroupEntry, h3cAclEnUserIPv6String=h3cAclEnUserIPv6String, h3cAclEnUserL4String=h3cAclEnUserL4String, h3cAclNumberGroupTable=h3cAclNumberGroupTable, h3cAclIfAny=h3cAclIfAny, h3cAclActiveUserAclNum=h3cAclActiveUserAclNum, h3cAclAdvancedDestIp=h3cAclAdvancedDestIp, h3cAclLinkEntry=h3cAclLinkEntry, h3cAclMACSrcMacWild=h3cAclMACSrcMacWild, h3cAclIPAclAdvancedTCPFlagValue=h3cAclIPAclAdvancedTCPFlagValue, h3cAclIPAclAdvancedDestPrefix=h3cAclIPAclAdvancedDestPrefix, h3cAclMib2CapabilityEntry=h3cAclMib2CapabilityEntry, h3cAclLinkAct=h3cAclLinkAct, h3cAclLinkVlanTag=h3cAclLinkVlanTag, h3cAclNumGroupMatchOrder=h3cAclNumGroupMatchOrder, h3cAclEnUserLog=h3cAclEnUserLog, h3cAclIPAclAdvancedIcmpCode=h3cAclIPAclAdvancedIcmpCode, h3cAclMACCountClear=h3cAclMACCountClear, h3cAclIPAclBasicEnable=h3cAclIPAclBasicEnable, h3cPfilterSumRuleMatchPackets=h3cPfilterSumRuleMatchPackets, h3cAclMib2CharacteristicsIndex=h3cAclMib2CharacteristicsIndex, h3cAclEnUserTable=h3cAclEnUserTable, h3cAclIPAclBasicSrcWild=h3cAclIPAclBasicSrcWild, h3cAclActiveIpAclNum=h3cAclActiveIpAclNum, h3cAclMACComment=h3cAclMACComment, h3cAclIPAclBasicSrcAddrType=h3cAclIPAclBasicSrcAddrType, h3cAclUserTimeRangeName=h3cAclUserTimeRangeName, h3cAclMib2EntityType=h3cAclMib2EntityType, h3cAclIDSDestWild=h3cAclIDSDestWild, h3cAclResourceType=h3cAclResourceType, h3cAclMib2Version=h3cAclMib2Version, h3cAclAdvancedProtocol=h3cAclAdvancedProtocol, h3cAclUserFormatType=h3cAclUserFormatType, h3cAclIfRowStatus=h3cAclIfRowStatus, h3cAclIPAclBasicFragmentFlag=h3cAclIPAclBasicFragmentFlag, h3cAclMACRuleIndex=h3cAclMACRuleIndex, h3cPfilterApplyCountClear=h3cPfilterApplyCountClear, h3cAclIfCount=h3cAclIfCount, h3cAclLinkSrcMacWild=h3cAclLinkSrcMacWild, h3cAclUserEntry=h3cAclUserEntry, h3cAclNumGroupSubitemNum=h3cAclNumGroupSubitemNum, h3cAclResourceReserved=h3cAclResourceReserved, h3cAclLinkDestAny=h3cAclLinkDestAny, h3cAclLinkLsapMask=h3cAclLinkLsapMask, h3cAclAdvancedSrcPort1=h3cAclAdvancedSrcPort1, h3cAclIPAclAdvancedTimeRangeName=h3cAclIPAclAdvancedTimeRangeName, h3cAclIDSDestPort=h3cAclIDSDestPort, h3cAclIPAclAdvancedFlowLabel=h3cAclIPAclAdvancedFlowLabel, h3cAclAdvancedDestWild=h3cAclAdvancedDestWild, h3cPfilterSumRuleMatchBytes=h3cPfilterSumRuleMatchBytes, h3cAclNameGroupCreateName=h3cAclNameGroupCreateName, h3cAclIPAclAdvancedSrcAddrType=h3cAclIPAclAdvancedSrcAddrType, h3cAclEnUserL5String=h3cAclEnUserL5String, h3cAclIPAclBasicCount=h3cAclIPAclBasicCount, h3cAclNumberGroupIndex=h3cAclNumberGroupIndex, h3cAclAdvancedDestPort2=h3cAclAdvancedDestPort2, h3cAclIPAclAdvancedSrcAddr=h3cAclIPAclAdvancedSrcAddr, h3cMACfilterDestinationMac=h3cMACfilterDestinationMac, h3cAclIPAclAdvancedLog=h3cAclIPAclAdvancedLog, PortOp=PortOp, h3cPfilterAclGroupRunInfoTable=h3cPfilterAclGroupRunInfoTable, h3cPfilterStatisticSumTable=h3cPfilterStatisticSumTable, h3cPfilterACLNumber=h3cPfilterACLNumber, h3cAclIfCountClear=h3cAclIfCountClear, h3cAclIfAct=h3cAclIfAct, h3cAclLinkSrcVlanId=h3cAclLinkSrcVlanId, h3cAclAdvancedTos=h3cAclAdvancedTos, h3cAclActiveVlanID=h3cAclActiveVlanID)
mibBuilder.exportSymbols('A3COM-HUAWEI-ACL-MIB', h3cPfilterScalarGroup=h3cPfilterScalarGroup, h3cAclResourceSlot=h3cAclResourceSlot, h3cPfilterAclGroupPermitPkts=h3cPfilterAclGroupPermitPkts, h3cAclIDSDestMac=h3cAclIDSDestMac, h3cAclIDSSrcPort=h3cAclIDSSrcPort, h3cAclMACAclGroup=h3cAclMACAclGroup, h3cAclActiveLinkAclNum=h3cAclActiveLinkAclNum, h3cAclActiveDirection=h3cAclActiveDirection, h3cAclIDSSrcWild=h3cAclIDSSrcWild, h3cAclLinkDestMac=h3cAclLinkDestMac, h3cAclAdvancedRowStatus=h3cAclAdvancedRowStatus, h3cAclLinkRowStatus=h3cAclLinkRowStatus, h3cAclMib2CharacteristicsDesc=h3cAclMib2CharacteristicsDesc, h3cPfilterAclRuleStatus=h3cPfilterAclRuleStatus, h3cPfilterAclGroupCountStatus=h3cPfilterAclGroupCountStatus, h3cAclMACTable=h3cAclMACTable, h3cAclBasicAct=h3cAclBasicAct, h3cPfilterApplySequence=h3cPfilterApplySequence, h3cAclNumberGroupRuleCounter=h3cAclNumberGroupRuleCounter, h3cAclIPAclAdvancedPrecedence=h3cAclIPAclAdvancedPrecedence, h3cAclEnUserAct=h3cAclEnUserAct, h3cAclIPAclAdvancedRouteTypeAny=h3cAclIPAclAdvancedRouteTypeAny, h3cAclLinkDestIfIndex=h3cAclLinkDestIfIndex, h3cAclLinkVlanPri=h3cAclLinkVlanPri, h3cAclIPAclAdvancedRuleIndex=h3cAclIPAclAdvancedRuleIndex, h3cAclIPAclAdvancedDestOp=h3cAclIPAclAdvancedDestOp, h3cAclEnUserAclGroup=h3cAclEnUserAclGroup, h3cAclLinkSrcIfIndex=h3cAclLinkSrcIfIndex, h3cMACfilterTrap=h3cMACfilterTrap, h3cAclEnUserRuleIndex=h3cAclEnUserRuleIndex, h3cAclEnUserCounting=h3cAclEnUserCounting, h3cAclIPAclAdvancedDestAddr=h3cAclIPAclAdvancedDestAddr, h3cPfilterAclRuleMatchPackets=h3cPfilterAclRuleMatchPackets, h3cAclMACLsapCode=h3cAclMACLsapCode, h3cAclIfTimeRangeName=h3cAclIfTimeRangeName, h3cAclAdvancedSubitem=h3cAclAdvancedSubitem, h3cAclNumGroupAclNum=h3cAclNumGroupAclNum, h3cAclResourceUsageTable=h3cAclResourceUsageTable, h3cAclIDSSrcIp=h3cAclIDSSrcIp, h3cAclIDSName=h3cAclIDSName, h3cAclIPAclBasicRouteTypeValue=h3cAclIPAclBasicRouteTypeValue, h3cAclNameGroupMatchOrder=h3cAclNameGroupMatchOrder, h3cPfilterAction=h3cPfilterAction, h3cAclActiveRowStatus=h3cAclActiveRowStatus, h3cAclIfAclNum=h3cAclIfAclNum, h3cAclIDSDestIp=h3cAclIDSDestIp, h3cAclAdvancedDscp=h3cAclAdvancedDscp, h3cAclResourceChassis=h3cAclResourceChassis, h3cAclIPAclAdvancedTCPFlag=h3cAclIPAclAdvancedTCPFlag, h3cPfilterAclRuleCountStatus=h3cPfilterAclRuleCountStatus, h3cAclIPAclAdvancedProtocol=h3cAclIPAclAdvancedProtocol, h3cPfilterAclGroupStatus=h3cPfilterAclGroupStatus, h3cAclIPAclBasicRouteTypeAny=h3cAclIPAclBasicRouteTypeAny, h3cAclNumberGroupCountClear=h3cAclNumberGroupCountClear, h3cPfilterAclGroupDenyBytes=h3cPfilterAclGroupDenyBytes, h3cAclNumGroupRowStatus=h3cAclNumGroupRowStatus, h3cAclNumberGroupName=h3cAclNumberGroupName, h3cAclMib2ProcessingStatus=h3cAclMib2ProcessingStatus, h3cAclIPAclAdvancedDestWild=h3cAclIPAclAdvancedDestWild, h3cAclIPAclAdvancedDestAddrType=h3cAclIPAclAdvancedDestAddrType, h3cAclAdvancedSrcOp=h3cAclAdvancedSrcOp, h3cAclLinkLsapCode=h3cAclLinkLsapCode, h3cAclIPAclAdvancedSrcOp=h3cAclIPAclAdvancedSrcOp, h3cAclBasicRuleEntry=h3cAclBasicRuleEntry, h3cAclMACEnable=h3cAclMACEnable, h3cAclIPAclBasicComment=h3cAclIPAclBasicComment, h3cAclAdvancedLog=h3cAclAdvancedLog, h3cAclPacketfilterTrap=h3cAclPacketfilterTrap, h3cAclEnUserCountClear=h3cAclEnUserCountClear, h3cAclAdvancedIcmpCode=h3cAclAdvancedIcmpCode, h3cAclLinkSrcAny=h3cAclLinkSrcAny, h3cAclIPAclAdvancedDscp=h3cAclIPAclAdvancedDscp, h3cAclLinkL2LabelRangeEnd=h3cAclLinkL2LabelRangeEnd, h3cAclPacketFilterObjects=h3cAclPacketFilterObjects, h3cPfilterReceiveInterface=h3cPfilterReceiveInterface, h3cAclMode=h3cAclMode, h3cAclMACEntry=h3cAclMACEntry, h3cAclBasicSrcIp=h3cAclBasicSrcIp, h3cAclMib2Objects=h3cAclMib2Objects, h3cAclIPAclBasicAct=h3cAclIPAclBasicAct, h3cAclIDSDenyTime=h3cAclIDSDenyTime, h3cAclNameGroupTypes=h3cAclNameGroupTypes, h3cAclBasicRuleTable=h3cAclBasicRuleTable, h3cAclAdvancedSrcIp=h3cAclAdvancedSrcIp, h3cPfilterApplyAclType=h3cPfilterApplyAclType, h3cAclMACTypeMask=h3cAclMACTypeMask, h3cPfilterPacketNumber=h3cPfilterPacketNumber, h3cAclIPAclAdvancedRouteTypeValue=h3cAclIPAclAdvancedRouteTypeValue, h3cAclBasicCount=h3cAclBasicCount, h3cAclMACLsapMask=h3cAclMACLsapMask, h3cPfilterAclRuleRunInfoEntry=h3cPfilterAclRuleRunInfoEntry, h3cAclLinkTypeMask=h3cAclLinkTypeMask, h3cAclMib2ModuleIndex=h3cAclMib2ModuleIndex, h3cAclNumberGroupRowStatus=h3cAclNumberGroupRowStatus, h3cAclIPAclAdvancedReflective=h3cAclIPAclAdvancedReflective, h3cAclMACTimeRangeName=h3cAclMACTimeRangeName, h3cAclNumberGroupDescription=h3cAclNumberGroupDescription, h3cPfilterApplyAclIndex=h3cPfilterApplyAclIndex) |
#
# PySNMP MIB module VMWARE-ESX-AGENTCAP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VMWARE-ESX-AGENTCAP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:34:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion")
ModuleCompliance, NotificationGroup, AgentCapabilities = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "AgentCapabilities")
Counter64, ModuleIdentity, IpAddress, MibIdentifier, Unsigned32, iso, NotificationType, Gauge32, Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, TimeTicks, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ModuleIdentity", "IpAddress", "MibIdentifier", "Unsigned32", "iso", "NotificationType", "Gauge32", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "TimeTicks", "ObjectIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
vmwareAgentCapabilities, = mibBuilder.importSymbols("VMWARE-ROOT-MIB", "vmwareAgentCapabilities")
vmwAgentCapabilityMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6876, 70, 1))
vmwAgentCapabilityMIB.setRevisions(('2015-01-12 00:00', '2014-08-02 00:00', '2012-10-03 00:00', '2012-07-13 00:00', '2010-10-18 00:00', '2008-10-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: vmwAgentCapabilityMIB.setRevisionsDescriptions(('Renamed mib module to reflect this contains only the VMware ESX agent.', 'Capabilities for VMware VSphere ESXi 2015 added.', 'Capabilities for VMware ESX 5.5 agent added.', 'Capabilities for VMware ESX 5.1 agent added.', 'Capabilities for VMware ESX 5.0 added.', 'Capabilities for VMware ESX 4.0 added.',))
if mibBuilder.loadTexts: vmwAgentCapabilityMIB.setLastUpdated('201501120000Z')
if mibBuilder.loadTexts: vmwAgentCapabilityMIB.setOrganization('VMware, Inc')
if mibBuilder.loadTexts: vmwAgentCapabilityMIB.setContactInfo('VMware, Inc 3401 Hillview Ave Palo Alto, CA 94304 Tel: 1-877-486-9273 or 650-427-5000 Fax: 650-427-5001 Web: http://communities.vmware.com/community/developer/forums/managementapi ')
if mibBuilder.loadTexts: vmwAgentCapabilityMIB.setDescription('This module defines agent capabilities for deployed VMware ESX agents by release. ')
vmwEsxCapability = MibIdentifier((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1))
vmwESX60x = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 10))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX60x = vmwESX60x.setProductRelease('6.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX60x = vmwESX60x.setStatus('current')
if mibBuilder.loadTexts: vmwESX60x.setDescription('Release 6.0 for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. Only Minor changes and bug fixes in this release of the SNMP Agent. No vDR instrumentation is yet available. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. The SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or vCenter Server host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ')
vmwESX60x.setReference('http://www.vmware.com/products')
vmwESX55 = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 5))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX55 = vmwESX55.setProductRelease('5.5.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX55 = vmwESX55.setStatus('current')
if mibBuilder.loadTexts: vmwESX55.setDescription("Release 5.5 for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. This release features support for monitoring multiple IP Stacks. The standard IP-MIB, UDP-MIB, and TCP-MIB may be used with a context set to the IP Stack Name as found in ENTITY-MIB entLogicalTable or via command: esxcli network ip netstack list An example using net-snmp's snmpwalk command:: snmpwalk -v2c -n defaultTcpipStack ip No vDR instrumentation is yet available. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. The SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or vCenter Server host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ")
vmwESX55.setReference('http://www.vmware.com/products')
vmwESX51x = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 4))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX51x = vmwESX51x.setProductRelease('5.1.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX51x = vmwESX51x.setStatus('current')
if mibBuilder.loadTexts: vmwESX51x.setDescription('Release 5.1.x for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ')
vmwESX51x.setReference('http://www.vmware.com/products')
vmwESX50x = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 3))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX50x = vmwESX50x.setProductRelease('5.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX50x = vmwESX50x.setStatus('current')
if mibBuilder.loadTexts: vmwESX50x.setDescription('Release 5.0.x for VMware ESXi. The SNMPv1/v2c agent is a subsystem in the hostd process')
vmwESX50x.setReference('http://www.vmware.com/products')
vmwESX41x = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 2))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX41x = vmwESX41x.setProductRelease('4.1.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX41x = vmwESX41x.setStatus('current')
if mibBuilder.loadTexts: vmwESX41x.setDescription('Release 4.1.x for VMware ESX, the SNMP agent is now a subsystem in the hostd process on ESXi.')
vmwESX41x.setReference('http://www.vmware.com/products')
vmwESX40x = AgentCapabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX40x = vmwESX40x.setProductRelease('4.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmwESX40x = vmwESX40x.setStatus('current')
if mibBuilder.loadTexts: vmwESX40x.setDescription('Release 4.0.x for VMware ESX. The SNMP agent is now part of the hostd process')
vmwESX40x.setReference('http://www.vmware.com/products')
mibBuilder.exportSymbols("VMWARE-ESX-AGENTCAP-MIB", vmwESX60x=vmwESX60x, vmwESX50x=vmwESX50x, PYSNMP_MODULE_ID=vmwAgentCapabilityMIB, vmwESX55=vmwESX55, vmwEsxCapability=vmwEsxCapability, vmwESX41x=vmwESX41x, vmwESX51x=vmwESX51x, vmwESX40x=vmwESX40x, vmwAgentCapabilityMIB=vmwAgentCapabilityMIB)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, single_value_constraint, constraints_intersection, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion')
(module_compliance, notification_group, agent_capabilities) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'AgentCapabilities')
(counter64, module_identity, ip_address, mib_identifier, unsigned32, iso, notification_type, gauge32, bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, time_ticks, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'ModuleIdentity', 'IpAddress', 'MibIdentifier', 'Unsigned32', 'iso', 'NotificationType', 'Gauge32', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'TimeTicks', 'ObjectIdentity')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(vmware_agent_capabilities,) = mibBuilder.importSymbols('VMWARE-ROOT-MIB', 'vmwareAgentCapabilities')
vmw_agent_capability_mib = module_identity((1, 3, 6, 1, 4, 1, 6876, 70, 1))
vmwAgentCapabilityMIB.setRevisions(('2015-01-12 00:00', '2014-08-02 00:00', '2012-10-03 00:00', '2012-07-13 00:00', '2010-10-18 00:00', '2008-10-27 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
vmwAgentCapabilityMIB.setRevisionsDescriptions(('Renamed mib module to reflect this contains only the VMware ESX agent.', 'Capabilities for VMware VSphere ESXi 2015 added.', 'Capabilities for VMware ESX 5.5 agent added.', 'Capabilities for VMware ESX 5.1 agent added.', 'Capabilities for VMware ESX 5.0 added.', 'Capabilities for VMware ESX 4.0 added.'))
if mibBuilder.loadTexts:
vmwAgentCapabilityMIB.setLastUpdated('201501120000Z')
if mibBuilder.loadTexts:
vmwAgentCapabilityMIB.setOrganization('VMware, Inc')
if mibBuilder.loadTexts:
vmwAgentCapabilityMIB.setContactInfo('VMware, Inc 3401 Hillview Ave Palo Alto, CA 94304 Tel: 1-877-486-9273 or 650-427-5000 Fax: 650-427-5001 Web: http://communities.vmware.com/community/developer/forums/managementapi ')
if mibBuilder.loadTexts:
vmwAgentCapabilityMIB.setDescription('This module defines agent capabilities for deployed VMware ESX agents by release. ')
vmw_esx_capability = mib_identifier((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1))
vmw_esx60x = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 10))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx60x = vmwESX60x.setProductRelease('6.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx60x = vmwESX60x.setStatus('current')
if mibBuilder.loadTexts:
vmwESX60x.setDescription('Release 6.0 for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. Only Minor changes and bug fixes in this release of the SNMP Agent. No vDR instrumentation is yet available. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. The SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or vCenter Server host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ')
vmwESX60x.setReference('http://www.vmware.com/products')
vmw_esx55 = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 5))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx55 = vmwESX55.setProductRelease('5.5.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx55 = vmwESX55.setStatus('current')
if mibBuilder.loadTexts:
vmwESX55.setDescription("Release 5.5 for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. This release features support for monitoring multiple IP Stacks. The standard IP-MIB, UDP-MIB, and TCP-MIB may be used with a context set to the IP Stack Name as found in ENTITY-MIB entLogicalTable or via command: esxcli network ip netstack list An example using net-snmp's snmpwalk command:: snmpwalk -v2c -n defaultTcpipStack ip No vDR instrumentation is yet available. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. The SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or vCenter Server host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ")
vmwESX55.setReference('http://www.vmware.com/products')
vmw_esx51x = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 4))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx51x = vmwESX51x.setProductRelease('5.1.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx51x = vmwESX51x.setStatus('current')
if mibBuilder.loadTexts:
vmwESX51x.setDescription('Release 5.1.x for VMware ESXi supports SNMPv1, SNMPv2c, and SNMPv3 with a stand-alone snmpd process. This agent supports read-only protocol operations. This implies that configuring the SNMPv3 Agent can not be done via SET operations. Hence IETF standard SNMPv3 agent configuration mibs are not provided. SNMPv3 protocol is fully supported once configured via the CLI command interface (esxcli system snmp) command set or host profiles. Lastly this SNMP agent provides one read-only view of the entire system to which all SNMPv3 users configured are assigned. ')
vmwESX51x.setReference('http://www.vmware.com/products')
vmw_esx50x = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 3))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx50x = vmwESX50x.setProductRelease('5.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx50x = vmwESX50x.setStatus('current')
if mibBuilder.loadTexts:
vmwESX50x.setDescription('Release 5.0.x for VMware ESXi. The SNMPv1/v2c agent is a subsystem in the hostd process')
vmwESX50x.setReference('http://www.vmware.com/products')
vmw_esx41x = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 2))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx41x = vmwESX41x.setProductRelease('4.1.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx41x = vmwESX41x.setStatus('current')
if mibBuilder.loadTexts:
vmwESX41x.setDescription('Release 4.1.x for VMware ESX, the SNMP agent is now a subsystem in the hostd process on ESXi.')
vmwESX41x.setReference('http://www.vmware.com/products')
vmw_esx40x = agent_capabilities((1, 3, 6, 1, 4, 1, 6876, 70, 1, 1, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx40x = vmwESX40x.setProductRelease('4.0.x')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vmw_esx40x = vmwESX40x.setStatus('current')
if mibBuilder.loadTexts:
vmwESX40x.setDescription('Release 4.0.x for VMware ESX. The SNMP agent is now part of the hostd process')
vmwESX40x.setReference('http://www.vmware.com/products')
mibBuilder.exportSymbols('VMWARE-ESX-AGENTCAP-MIB', vmwESX60x=vmwESX60x, vmwESX50x=vmwESX50x, PYSNMP_MODULE_ID=vmwAgentCapabilityMIB, vmwESX55=vmwESX55, vmwEsxCapability=vmwEsxCapability, vmwESX41x=vmwESX41x, vmwESX51x=vmwESX51x, vmwESX40x=vmwESX40x, vmwAgentCapabilityMIB=vmwAgentCapabilityMIB) |
def test(seq, target_seq):
scorer = CodonFreqScorer()
scorer.set_codon_freqs_from_seq(target_seq)
print(scorer.score(seq))
| def test(seq, target_seq):
scorer = codon_freq_scorer()
scorer.set_codon_freqs_from_seq(target_seq)
print(scorer.score(seq)) |
#!/usr/bin/env python3
class State():
def __init__(self, e, pos, dist=float('inf'), prev=None):
self.e = e
self.pos = pos
self.dist = dist
self.prev = prev
# we need a good hash that is the same for all (g,m)-pair permutations
# this hash will be used to index the dictionary of states
def __hash__(self):
l = []
for i in range(int(len(self.pos)/2)):
l += [(self.pos[2*i], self.pos[2*i+1])]
l.sort() # (g,m) pairs are indistinguishable!
return hash(tuple([self.e] + l))
def possible_moves(state):
n = int(len(state.pos)/2)
def is_good(pos):
for m in range(n):
if pos[2*m+1] == pos[2*m]:
continue # safe
for g in range(n):
if pos[2*g] == pos[2*m+1]:
return False
return True
for i in range(2*n):
for j in range(i, 2*n):
if state.pos[j] == state.pos[i] == state.e:
if state.e < 3:
new_pos = list(state.pos)
new_pos[i] += 1
if i != j:
new_pos[j] +=1
if is_good(new_pos):
yield State(state.e+1, new_pos)
if state.e > 0:
new_pos = list(state.pos)
new_pos[i] -= 1
if i != j:
new_pos[j] -= 1
if is_good(new_pos):
yield State(state.e-1, new_pos)
def solve(pos): # Do a BFS search
start = State(0, pos, 0)
endhash = hash(State(3, [3]*len(pos)))
queue = [start]
d_states = {start: start}
while len(queue) > 0:
state = queue.pop(0)
for s_next in possible_moves(state):
h = hash(s_next)
if h not in d_states:
d_states[h] = s_next
if d_states[h].dist > state.dist+1:
d_states[h].dist = state.dist+1
d_states[h].prev = state
queue.append(d_states[h])
if h == endhash:
return state.dist+1
print(solve([0, 0, 0, 0, 1, 2, 1, 1, 1, 1]))
print(solve([0, 0, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0]))
| class State:
def __init__(self, e, pos, dist=float('inf'), prev=None):
self.e = e
self.pos = pos
self.dist = dist
self.prev = prev
def __hash__(self):
l = []
for i in range(int(len(self.pos) / 2)):
l += [(self.pos[2 * i], self.pos[2 * i + 1])]
l.sort()
return hash(tuple([self.e] + l))
def possible_moves(state):
n = int(len(state.pos) / 2)
def is_good(pos):
for m in range(n):
if pos[2 * m + 1] == pos[2 * m]:
continue
for g in range(n):
if pos[2 * g] == pos[2 * m + 1]:
return False
return True
for i in range(2 * n):
for j in range(i, 2 * n):
if state.pos[j] == state.pos[i] == state.e:
if state.e < 3:
new_pos = list(state.pos)
new_pos[i] += 1
if i != j:
new_pos[j] += 1
if is_good(new_pos):
yield state(state.e + 1, new_pos)
if state.e > 0:
new_pos = list(state.pos)
new_pos[i] -= 1
if i != j:
new_pos[j] -= 1
if is_good(new_pos):
yield state(state.e - 1, new_pos)
def solve(pos):
start = state(0, pos, 0)
endhash = hash(state(3, [3] * len(pos)))
queue = [start]
d_states = {start: start}
while len(queue) > 0:
state = queue.pop(0)
for s_next in possible_moves(state):
h = hash(s_next)
if h not in d_states:
d_states[h] = s_next
if d_states[h].dist > state.dist + 1:
d_states[h].dist = state.dist + 1
d_states[h].prev = state
queue.append(d_states[h])
if h == endhash:
return state.dist + 1
print(solve([0, 0, 0, 0, 1, 2, 1, 1, 1, 1]))
print(solve([0, 0, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0])) |
################
# 66. Plus One
################
class Solution:
def plusOne(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
digits = digits[::-1]
last = 1
for i in range(len(digits)):
digits[i], last = (digits[i] + last) % 10, int(digits[i]+last-10>=0)
if i==len(digits)-1 and last==1:
digits.append(1)
return digits[::-1]
digits = []
solu = Solution()
print (solu.plusOne(digits))
| class Solution:
def plus_one(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
digits = digits[::-1]
last = 1
for i in range(len(digits)):
(digits[i], last) = ((digits[i] + last) % 10, int(digits[i] + last - 10 >= 0))
if i == len(digits) - 1 and last == 1:
digits.append(1)
return digits[::-1]
digits = []
solu = solution()
print(solu.plusOne(digits)) |
def sum_numbers(numbers=None):
if numbers == None:
return sum(range(101))
else:
return sum(numbers)
| def sum_numbers(numbers=None):
if numbers == None:
return sum(range(101))
else:
return sum(numbers) |
"""A RESTful Wagtail enclosure"""
__version__ = '0.2.2'
default_app_config = 'wagtailnest.apps.WagtailnestConfig'
| """A RESTful Wagtail enclosure"""
__version__ = '0.2.2'
default_app_config = 'wagtailnest.apps.WagtailnestConfig' |
class Task():
def __init__(self, target=None, args=[], kwargs={}):
self.target = target
self.args = args
self.kwargs = kwargs
def execute_task(self):
return self.target(*self.args, **self.kwargs)
class TaskManager():
def __init__(self, tasks):
"""Add tasks in reverse
tasks: arrays of Task
"""
self.stack = list(reversed(tasks))
def push_task(self, task):
self.stack.append(task)
def push_tasks_in_reverse(self, tasks):
self.stack += list(reversed(tasks))
# print(self.stack)
def next_task(self):
"""Pops the task from the list of tasks and executes the next task"""
# print(self.stack)
if self.stack == []:
return False
task = self.stack.pop()
# Execute task and push back to stack if not completed
if not task.execute_task():
self.stack.append(task)
return True
| class Task:
def __init__(self, target=None, args=[], kwargs={}):
self.target = target
self.args = args
self.kwargs = kwargs
def execute_task(self):
return self.target(*self.args, **self.kwargs)
class Taskmanager:
def __init__(self, tasks):
"""Add tasks in reverse
tasks: arrays of Task
"""
self.stack = list(reversed(tasks))
def push_task(self, task):
self.stack.append(task)
def push_tasks_in_reverse(self, tasks):
self.stack += list(reversed(tasks))
def next_task(self):
"""Pops the task from the list of tasks and executes the next task"""
if self.stack == []:
return False
task = self.stack.pop()
if not task.execute_task():
self.stack.append(task)
return True |
COLUMNS = [
'EventId',
'DER_mass_MMC',
'DER_mass_transverse_met_lep',
'DER_mass_vis',
'DER_pt_h',
'DER_deltaeta_jet_jet',
'DER_mass_jet_jet',
'DER_prodeta_jet_jet',
'DER_deltar_tau_lep',
'DER_pt_tot',
'DER_sum_pt',
'DER_pt_ratio_lep_tau',
'DER_met_phi_centrality',
'DER_lep_eta_centrality',
'PRI_tau_pt',
'PRI_tau_eta',
'PRI_tau_phi',
'PRI_lep_pt',
'PRI_lep_eta',
'PRI_lep_phi',
'PRI_met',
'PRI_met_phi',
'PRI_met_sumet',
'PRI_jet_num',
'PRI_jet_leading_pt',
'PRI_jet_leading_eta',
'PRI_jet_leading_phi',
'PRI_jet_subleading_pt',
'PRI_jet_subleading_eta',
'PRI_jet_subleading_phi',
'PRI_jet_all_pt',
'Weight',
'Label',
'KaggleSet',
'KaggleWeight'
]
DEFAULT_DATA_PATH = 'data/atlas-higgs/atlas-higgs-challenge-2014-v2.csv'
DEFAULT_SUBMISSION_PATH = './submissions/atlas_higgs.csv' | columns = ['EventId', 'DER_mass_MMC', 'DER_mass_transverse_met_lep', 'DER_mass_vis', 'DER_pt_h', 'DER_deltaeta_jet_jet', 'DER_mass_jet_jet', 'DER_prodeta_jet_jet', 'DER_deltar_tau_lep', 'DER_pt_tot', 'DER_sum_pt', 'DER_pt_ratio_lep_tau', 'DER_met_phi_centrality', 'DER_lep_eta_centrality', 'PRI_tau_pt', 'PRI_tau_eta', 'PRI_tau_phi', 'PRI_lep_pt', 'PRI_lep_eta', 'PRI_lep_phi', 'PRI_met', 'PRI_met_phi', 'PRI_met_sumet', 'PRI_jet_num', 'PRI_jet_leading_pt', 'PRI_jet_leading_eta', 'PRI_jet_leading_phi', 'PRI_jet_subleading_pt', 'PRI_jet_subleading_eta', 'PRI_jet_subleading_phi', 'PRI_jet_all_pt', 'Weight', 'Label', 'KaggleSet', 'KaggleWeight']
default_data_path = 'data/atlas-higgs/atlas-higgs-challenge-2014-v2.csv'
default_submission_path = './submissions/atlas_higgs.csv' |
class MetadataError(Exception):
pass
class CopyError(RuntimeError):
pass
class _BaseZarrError(ValueError):
_msg = ""
def __init__(self, *args):
super().__init__(self._msg.format(*args))
class ContainsGroupError(_BaseZarrError):
_msg = "path {0!r} contains a group"
def err_contains_group(path):
raise ContainsGroupError(path) # pragma: no cover
class ContainsArrayError(_BaseZarrError):
_msg = "path {0!r} contains an array"
def err_contains_array(path):
raise ContainsArrayError(path) # pragma: no cover
class ArrayNotFoundError(_BaseZarrError):
_msg = "array not found at path %r' {0!r}"
def err_array_not_found(path):
raise ArrayNotFoundError(path) # pragma: no cover
class GroupNotFoundError(_BaseZarrError):
_msg = "group not found at path {0!r}"
def err_group_not_found(path):
raise GroupNotFoundError(path) # pragma: no cover
class PathNotFoundError(_BaseZarrError):
_msg = "nothing found at path {0!r}"
def err_path_not_found(path):
raise PathNotFoundError(path) # pragma: no cover
def err_bad_compressor(compressor):
raise ValueError('bad compressor; expected Codec object, found %r' %
compressor)
class FSPathExistNotDir(GroupNotFoundError):
_msg = "path exists but is not a directory: %r"
class ReadOnlyError(PermissionError):
def __init__(self):
super().__init__("object is read-only")
def err_read_only():
raise ReadOnlyError() # pragma: no cover
def err_boundscheck(dim_len):
raise IndexError('index out of bounds for dimension with length {}'
.format(dim_len))
def err_negative_step():
raise IndexError('only slices with step >= 1 are supported')
def err_too_many_indices(selection, shape):
raise IndexError('too many indices for array; expected {}, got {}'
.format(len(shape), len(selection)))
def err_vindex_invalid_selection(selection):
raise IndexError('unsupported selection type for vectorized indexing; only '
'coordinate selection (tuple of integer arrays) and mask selection '
'(single Boolean array) are supported; got {!r}'.format(selection))
| class Metadataerror(Exception):
pass
class Copyerror(RuntimeError):
pass
class _Basezarrerror(ValueError):
_msg = ''
def __init__(self, *args):
super().__init__(self._msg.format(*args))
class Containsgrouperror(_BaseZarrError):
_msg = 'path {0!r} contains a group'
def err_contains_group(path):
raise contains_group_error(path)
class Containsarrayerror(_BaseZarrError):
_msg = 'path {0!r} contains an array'
def err_contains_array(path):
raise contains_array_error(path)
class Arraynotfounderror(_BaseZarrError):
_msg = "array not found at path %r' {0!r}"
def err_array_not_found(path):
raise array_not_found_error(path)
class Groupnotfounderror(_BaseZarrError):
_msg = 'group not found at path {0!r}'
def err_group_not_found(path):
raise group_not_found_error(path)
class Pathnotfounderror(_BaseZarrError):
_msg = 'nothing found at path {0!r}'
def err_path_not_found(path):
raise path_not_found_error(path)
def err_bad_compressor(compressor):
raise value_error('bad compressor; expected Codec object, found %r' % compressor)
class Fspathexistnotdir(GroupNotFoundError):
_msg = 'path exists but is not a directory: %r'
class Readonlyerror(PermissionError):
def __init__(self):
super().__init__('object is read-only')
def err_read_only():
raise read_only_error()
def err_boundscheck(dim_len):
raise index_error('index out of bounds for dimension with length {}'.format(dim_len))
def err_negative_step():
raise index_error('only slices with step >= 1 are supported')
def err_too_many_indices(selection, shape):
raise index_error('too many indices for array; expected {}, got {}'.format(len(shape), len(selection)))
def err_vindex_invalid_selection(selection):
raise index_error('unsupported selection type for vectorized indexing; only coordinate selection (tuple of integer arrays) and mask selection (single Boolean array) are supported; got {!r}'.format(selection)) |
class Solution:
def longestStrChain(self, words: List[str]) -> int:
dp = {}
for word in sorted(words, key=len):
dp[word] = max(dp.get(word[:i] + word[i + 1:], 0) +
1 for i in range(len(word)))
return max(dp.values())
| class Solution:
def longest_str_chain(self, words: List[str]) -> int:
dp = {}
for word in sorted(words, key=len):
dp[word] = max((dp.get(word[:i] + word[i + 1:], 0) + 1 for i in range(len(word))))
return max(dp.values()) |
# Integer Break
class Solution:
def integerBreak(self, n):
dp = [0] * (max(7, n + 1))
dp[2] = 1
dp[3] = 2
dp[4] = 4
dp[5] = 6
dp[6] = 9
if n <= 6:
return dp[n]
mod = n % 3
if mod == 0:
return dp[6] * 3 ** ((n - 6) // 3)
elif mod == 1:
return dp[4] * 3 ** ((n - 4) // 3)
else:
return dp[5] * 3 ** ((n - 5) // 3)
if __name__ == "__main__":
sol = Solution()
n = 10
print(sol.integerBreak(n))
| class Solution:
def integer_break(self, n):
dp = [0] * max(7, n + 1)
dp[2] = 1
dp[3] = 2
dp[4] = 4
dp[5] = 6
dp[6] = 9
if n <= 6:
return dp[n]
mod = n % 3
if mod == 0:
return dp[6] * 3 ** ((n - 6) // 3)
elif mod == 1:
return dp[4] * 3 ** ((n - 4) // 3)
else:
return dp[5] * 3 ** ((n - 5) // 3)
if __name__ == '__main__':
sol = solution()
n = 10
print(sol.integerBreak(n)) |
class ParseError(Exception):
def __init__(self,mes:str="")->None:
super().__init__()
self.mes = mes
def __str__(self)->str:
return f"ParseError: {self.mes}"
class Flag:
def __init__(self,flag:str,options:int,second_flag:str=None,flag_symbol:str="-")->None:
self.flag=flag
self.second_flag=second_flag
self.options=options
self.symbol=flag_symbol
def check(self,to_check:str)->bool:
if to_check==self.symbol*((len(self.flag)>1)+1)+self.flag:
return True
elif self.second_flag!=None and to_check==self.symbol*((len(self.second_flag)>1)+1)+self.second_flag:
return True
else:
return False
def __str__(self)->None:
return self.symbol*((len(self.flag)>1)+1)+self.flag
class Command:
def __init__(self,command,options):
self.command=command
self.options=options
def check(self,to_check):
if to_check==self.command:
return True
else:
return False
class ArgummentParser:
def __init__(self)->None:
self.commands=[]
self.flags=[]
def add_flag(self,flag:str,options:int,second_flag:str=None)->None:
self.flags.append(Flag(flag,options,second_flag))
def add_command(self,command,options=0):
self.commands.append(Command(command,options))
def parse(self,to_parse:list):
x=0
ret_command=None
ret_flags={}
while x<len(to_parse):
aktuell_arg=to_parse[x]
valid=False
for command in self.commands:
if command.check(aktuell_arg) and ret_command==None:
ret_command=aktuell_arg
command_args=to_parse[x+1:x+2+command.options]
x=x+1+command.options
valid=True
break
for flag in self.flags:
if flag.check(aktuell_arg):
ret_flags.update({str(flag):to_parse[x+1:x+2+flag.options]})
x=x+1+flag.options
valid=True
break
if valid:
pass
else:
raise ParseError(f"can't parse argument {to_parse[x]}")
if ret_command == None:
raise ParseError("no command")
return ret_command,command_args,ret_flags
| class Parseerror(Exception):
def __init__(self, mes: str='') -> None:
super().__init__()
self.mes = mes
def __str__(self) -> str:
return f'ParseError: {self.mes}'
class Flag:
def __init__(self, flag: str, options: int, second_flag: str=None, flag_symbol: str='-') -> None:
self.flag = flag
self.second_flag = second_flag
self.options = options
self.symbol = flag_symbol
def check(self, to_check: str) -> bool:
if to_check == self.symbol * ((len(self.flag) > 1) + 1) + self.flag:
return True
elif self.second_flag != None and to_check == self.symbol * ((len(self.second_flag) > 1) + 1) + self.second_flag:
return True
else:
return False
def __str__(self) -> None:
return self.symbol * ((len(self.flag) > 1) + 1) + self.flag
class Command:
def __init__(self, command, options):
self.command = command
self.options = options
def check(self, to_check):
if to_check == self.command:
return True
else:
return False
class Argummentparser:
def __init__(self) -> None:
self.commands = []
self.flags = []
def add_flag(self, flag: str, options: int, second_flag: str=None) -> None:
self.flags.append(flag(flag, options, second_flag))
def add_command(self, command, options=0):
self.commands.append(command(command, options))
def parse(self, to_parse: list):
x = 0
ret_command = None
ret_flags = {}
while x < len(to_parse):
aktuell_arg = to_parse[x]
valid = False
for command in self.commands:
if command.check(aktuell_arg) and ret_command == None:
ret_command = aktuell_arg
command_args = to_parse[x + 1:x + 2 + command.options]
x = x + 1 + command.options
valid = True
break
for flag in self.flags:
if flag.check(aktuell_arg):
ret_flags.update({str(flag): to_parse[x + 1:x + 2 + flag.options]})
x = x + 1 + flag.options
valid = True
break
if valid:
pass
else:
raise parse_error(f"can't parse argument {to_parse[x]}")
if ret_command == None:
raise parse_error('no command')
return (ret_command, command_args, ret_flags) |
RUNNING_NODE_CONFIG = {
"pid": 58701,
"version": "main",
"network": "localnet"
}
LOG_PATH = "{}/forge/localnet/main/logs/2021-12-22-10:21:00.884707.txt"
MNEMONIC_INFO = """
name: validator
type: local
address: pb14rclwq9xych9t0vqzdf7flw2dmhmqv3sxjjru8
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AgElKM8a4Tw6JNJkx7t2+HZ8p3OTtIpJ+/NE18sSH6vc"}'
mnemonic: ""
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
tester1 tester2 tester3 tester4 tester5 tester6 tester7 tester8 tester9 tester10 tester11 tester12 tester13 tester14 tester15 tester16 tester17 tester18 tester19 tester20 tester21 tester22 tester23 tester24
"""
CONFIG = """
{{
"saveDir": "{}/",
"running-node": true,
"localnet": {{
"v1.7.5": {{
"moniker": "test1",
"chainId": "test1",
"mnemonic": [
"testy1",
"testy2",
"testy3",
"testy4",
"testy5",
"testy6",
"testy7",
"testy8",
"testy9",
"testy10",
"testy11",
"testy12",
"testy13",
"testy14",
"testy15",
"testy16",
"testy17",
"testy18",
"testy19",
"testy20",
"testy21",
"testy22",
"testy23",
"testy24"
],
"validator-information": [
{{
"name": "validator",
"type": "local",
"address": "pb1zamg2vejk48z8pma0thgxy50dhy3nr30el8pck",
"pubkey": {{
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AuFzQYjwynoayJksWfilPjS0D0/ehoMSdwkX3AFucIPG"
}},
"mnemonic": ""
}}
],
"run-command": [
"{}/forge/localnet/v1.7.5/bin/provenanced",
"start",
"--home",
"{}/forge/localnet/v1.7.5"
],
"log-path": "{}/forge/localnet/v1.7.5/logs/2021-12-22-14:51:55.204496.txt"
}},
"main": {{
"moniker": "localnet-main",
"chainId": "localnet-main",
"mnemonic": [
"test1",
"test2",
"test3",
"test4",
"test5",
"test6",
"test7",
"test8",
"test9",
"test10",
"test11",
"test12",
"test13",
"test14",
"test15",
"test16",
"test17",
"test18",
"test19",
"test20",
"test21",
"test22",
"test23",
"test24"
],
"validator-information": [
{{
"name": "validator",
"type": "local",
"address": "pb1555t6m6f7653jd8ht2mz6q5kfe0u2lf8xd9yrm",
"pubkey": {{
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AllqA0+Q/WI2N1yuy4LGBHgMLIEQDyL7cbOsdBbVIpr+"
}},
"mnemonic": ""
}}
],
"run-command": [
"{}/forge/localnet/main/bin/provenanced",
"start",
"--home",
"{}/forge/localnet/main"
],
"log-path": "{}/forge/localnet/main/logs/2021-12-22-10:21:00.884707.txt"
}}
}},
"running-node-info": {{
"pid": 58701,
"version": "main",
"network": "localnet"
}}
}}""" | running_node_config = {'pid': 58701, 'version': 'main', 'network': 'localnet'}
log_path = '{}/forge/localnet/main/logs/2021-12-22-10:21:00.884707.txt'
mnemonic_info = '\nname: validator\n type: local\n address: pb14rclwq9xych9t0vqzdf7flw2dmhmqv3sxjjru8\n pubkey: \'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AgElKM8a4Tw6JNJkx7t2+HZ8p3OTtIpJ+/NE18sSH6vc"}\'\n mnemonic: ""\n\n\n**Important** write this mnemonic phrase in a safe place.\nIt is the only way to recover your account if you ever forget your password.\n\ntester1 tester2 tester3 tester4 tester5 tester6 tester7 tester8 tester9 tester10 tester11 tester12 tester13 tester14 tester15 tester16 tester17 tester18 tester19 tester20 tester21 tester22 tester23 tester24\n'
config = '\n{{\n "saveDir": "{}/",\n "running-node": true,\n "localnet": {{\n "v1.7.5": {{\n "moniker": "test1",\n "chainId": "test1",\n "mnemonic": [\n "testy1",\n "testy2",\n "testy3",\n "testy4",\n "testy5",\n "testy6",\n "testy7",\n "testy8",\n "testy9",\n "testy10",\n "testy11",\n "testy12",\n "testy13",\n "testy14",\n "testy15",\n "testy16",\n "testy17",\n "testy18",\n "testy19",\n "testy20",\n "testy21",\n "testy22",\n "testy23",\n "testy24"\n ],\n "validator-information": [\n {{\n "name": "validator",\n "type": "local",\n "address": "pb1zamg2vejk48z8pma0thgxy50dhy3nr30el8pck",\n "pubkey": {{\n "@type": "/cosmos.crypto.secp256k1.PubKey",\n "key": "AuFzQYjwynoayJksWfilPjS0D0/ehoMSdwkX3AFucIPG"\n }},\n "mnemonic": ""\n }}\n ],\n "run-command": [\n "{}/forge/localnet/v1.7.5/bin/provenanced",\n "start",\n "--home",\n "{}/forge/localnet/v1.7.5"\n ],\n "log-path": "{}/forge/localnet/v1.7.5/logs/2021-12-22-14:51:55.204496.txt"\n }},\n "main": {{\n "moniker": "localnet-main",\n "chainId": "localnet-main",\n "mnemonic": [\n "test1",\n "test2",\n "test3",\n "test4",\n "test5",\n "test6",\n "test7",\n "test8",\n "test9",\n "test10",\n "test11",\n "test12",\n "test13",\n "test14",\n "test15",\n "test16",\n "test17",\n "test18",\n "test19",\n "test20",\n "test21",\n "test22",\n "test23",\n "test24"\n ],\n "validator-information": [\n {{\n "name": "validator",\n "type": "local",\n "address": "pb1555t6m6f7653jd8ht2mz6q5kfe0u2lf8xd9yrm",\n "pubkey": {{\n "@type": "/cosmos.crypto.secp256k1.PubKey",\n "key": "AllqA0+Q/WI2N1yuy4LGBHgMLIEQDyL7cbOsdBbVIpr+"\n }},\n "mnemonic": ""\n }}\n ],\n "run-command": [\n "{}/forge/localnet/main/bin/provenanced",\n "start",\n "--home",\n "{}/forge/localnet/main"\n ],\n "log-path": "{}/forge/localnet/main/logs/2021-12-22-10:21:00.884707.txt"\n }}\n }},\n "running-node-info": {{\n "pid": 58701,\n "version": "main",\n "network": "localnet"\n }}\n}}' |
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the OpenTimelineIO project
VIEW_STYLESHEET = """
QMainWindow {
background-color: rgb(27, 27, 27);
}
QScrollBar:horizontal {
background: rgb(21, 21, 21);
height: 15px;
margin: 0px 20px 0 20px;
}
QScrollBar::handle:horizontal {
background: rgb(255, 83, 112);
min-width: 20px;
}
QScrollBar::add-line:horizontal {
background: rgb(33, 33, 33);
width: 20px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::sub-line:horizontal {
background: rgb(33, 33, 33);
width: 20px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
width: 3px;
height: 3px;
background: transparent;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
QScrollBar:vertical {
background: rgb(21, 21, 21);
width: 15px;
margin: 22px 0 22px 0;
}
QScrollBar::handle:vertical {
background: rgb(255, 83, 112);
min-height: 20px;
}
QScrollBar::add-line:vertical {
background: rgb(33, 33, 33);
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
background: rgb(33, 33, 33);
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
width: 3px;
height: 3px;
background: transparent;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
"""
| view_stylesheet = '\nQMainWindow {\n background-color: rgb(27, 27, 27);\n}\n\nQScrollBar:horizontal {\n background: rgb(21, 21, 21);\n height: 15px;\n margin: 0px 20px 0 20px;\n}\n\nQScrollBar::handle:horizontal {\n background: rgb(255, 83, 112);\n min-width: 20px;\n}\n\nQScrollBar::add-line:horizontal {\n background: rgb(33, 33, 33);\n width: 20px;\n subcontrol-position: right;\n subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n background: rgb(33, 33, 33);\n width: 20px;\n subcontrol-position: left;\n subcontrol-origin: margin;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {\n width: 3px;\n height: 3px;\n background: transparent;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n background: none;\n}\n\nQScrollBar:vertical {\n background: rgb(21, 21, 21);\n width: 15px;\n margin: 22px 0 22px 0;\n}\n\nQScrollBar::handle:vertical {\n background: rgb(255, 83, 112);\n min-height: 20px;\n}\n\nQScrollBar::add-line:vertical {\n background: rgb(33, 33, 33);\n height: 20px;\n subcontrol-position: bottom;\n subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n background: rgb(33, 33, 33);\n height: 20px;\n subcontrol-position: top;\n subcontrol-origin: margin;\n}\n\nQScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {\n width: 3px;\n height: 3px;\n background: transparent;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n background: none;\n}\n' |
'''
u are given pointer to the root of the binary search tree and two values and . You need to return the lowest common ancestor (LCA) of and in the binary search tree.
image
In the diagram above, the lowest common ancestor of the nodes and is the node . Node is the lowest node which has nodes and as descendants.
Function Description
Complete the function lca in the editor below. It should return a pointer to the lowest common ancestor node of the two values given.
lca has the following parameters:
- root: a pointer to the root node of a binary search tree
- v1: a node.data value
- v2: a node.data value
Input Format
The first line contains an integer, , the number of nodes in the tree.
The second line contains space-separated integers representing values.
The third line contains two space-separated integers, and .
To use the test data, you will have to create the binary search tree yourself. Here on the platform, the tree will be created for you.
Constraints
The tree will contain nodes with data equal to and .
Output Format
Return the a pointer to the node that is the lowest common ancestor of and .
Sample Input
6
4 2 3 1 7 6
1 7
image
and .
Sample Output
[reference to node 4]
Explanation
LCA of 1 and 7 is 4, the root in this case.
Return a pointer to the node.
'''
class Node:
def __init__(self, info):
self.info = info
self.left = None
self.right = None
self.level = None
def __str__(self):
return str(self.info)
class BinarySearchTree:
def __init__(self):
self.root = None
def create(self, val):
if self.root == None:
self.root = Node(val)
else:
current = self.root
while True:
if val < current.info:
if current.left:
current = current.left
else:
current.left = Node(val)
break
elif val > current.info:
if current.right:
current = current.right
else:
current.right = Node(val)
break
else:
break
# Enter your code here. Read input from STDIN. Print output to STDOUT
'''
class Node:
def __init__(self,info):
self.info = info
self.left = None
self.right = None
// this is a node of the tree , which contains info as data, left , right
'''
# Observation based on that the LCA is always between v1 and v2
def lca(root, v1, v2):
# Enter your code here
if root.info < v1 and root.info < v2:
return lca(root.right, v1, v2)
if root.info > v1 and root.info > v2:
return lca(root.left, v1, v2)
return root
tree = BinarySearchTree()
t = int(input())
arr = list(map(int, input().split()))
for i in range(t):
tree.create(arr[i])
v = list(map(int, input().split()))
ans = lca(tree.root, v[0], v[1])
print(ans.info)
| """
u are given pointer to the root of the binary search tree and two values and . You need to return the lowest common ancestor (LCA) of and in the binary search tree.
image
In the diagram above, the lowest common ancestor of the nodes and is the node . Node is the lowest node which has nodes and as descendants.
Function Description
Complete the function lca in the editor below. It should return a pointer to the lowest common ancestor node of the two values given.
lca has the following parameters:
- root: a pointer to the root node of a binary search tree
- v1: a node.data value
- v2: a node.data value
Input Format
The first line contains an integer, , the number of nodes in the tree.
The second line contains space-separated integers representing values.
The third line contains two space-separated integers, and .
To use the test data, you will have to create the binary search tree yourself. Here on the platform, the tree will be created for you.
Constraints
The tree will contain nodes with data equal to and .
Output Format
Return the a pointer to the node that is the lowest common ancestor of and .
Sample Input
6
4 2 3 1 7 6
1 7
image
and .
Sample Output
[reference to node 4]
Explanation
LCA of 1 and 7 is 4, the root in this case.
Return a pointer to the node.
"""
class Node:
def __init__(self, info):
self.info = info
self.left = None
self.right = None
self.level = None
def __str__(self):
return str(self.info)
class Binarysearchtree:
def __init__(self):
self.root = None
def create(self, val):
if self.root == None:
self.root = node(val)
else:
current = self.root
while True:
if val < current.info:
if current.left:
current = current.left
else:
current.left = node(val)
break
elif val > current.info:
if current.right:
current = current.right
else:
current.right = node(val)
break
else:
break
'\nclass Node:\n def __init__(self,info): \n self.info = info \n self.left = None \n self.right = None \n\n\n // this is a node of the tree , which contains info as data, left , right\n'
def lca(root, v1, v2):
if root.info < v1 and root.info < v2:
return lca(root.right, v1, v2)
if root.info > v1 and root.info > v2:
return lca(root.left, v1, v2)
return root
tree = binary_search_tree()
t = int(input())
arr = list(map(int, input().split()))
for i in range(t):
tree.create(arr[i])
v = list(map(int, input().split()))
ans = lca(tree.root, v[0], v[1])
print(ans.info) |
# uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\filters\demographics_filter_term_mixin.py
# Compiled at: 2018-12-11 03:52:40
# Size of source mod 2**32: 647 bytes
class DemographicsFilterTermMixin:
def get_valid_world_ids(self):
raise NotImplementedError | class Demographicsfiltertermmixin:
def get_valid_world_ids(self):
raise NotImplementedError |
def main():
max_id = -1
with open("data.txt") as f:
for line in f:
line = line.strip()
if len(line) == 0:
continue
if len(line) != 10:
raise ValueError(f"unexpected line {line} in input file")
max_id = max(max_id, int("".join("1" if c in "BR" else "0" for c in line), 2))
print(f"Heighest seat ID: {max_id}")
if __name__ == "__main__":
main()
| def main():
max_id = -1
with open('data.txt') as f:
for line in f:
line = line.strip()
if len(line) == 0:
continue
if len(line) != 10:
raise value_error(f'unexpected line {line} in input file')
max_id = max(max_id, int(''.join(('1' if c in 'BR' else '0' for c in line)), 2))
print(f'Heighest seat ID: {max_id}')
if __name__ == '__main__':
main() |
def format_composition(attribute, features):
if attribute == 'key':
return format_key(features)
if attribute == 'tempo':
return format_tempo(features)
if attribute == 'signature':
return format_signature(features)
def format_signature(features):
return str(features['time_signature']) + "/4"
def format_tempo(features):
return str(round(features['tempo']))
def format_key(features):
key = features['key']
mode = features['mode']
keys = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
return keys[key] + ('m' if not mode else '')
def format_value(value):
return int(value * 100)
def color_from_value(value):
color_high = [255, 104, 0]
color_low = [96, 0, 255]
result = [round((h - l) * value + l) for h, l in zip(color_high, color_low)]
return f"rgb{tuple(result)}"
def uniform_title(title):
"""Does the best it can to get the actual song title from whatever the name of the track is
Track names on Spotify are riddled with information on remixes, remasters, features, live versions etc.
This function tries to remove these, but it might not work in every case, especially in languages other
than English since it works by looking for keywords
"""
keywords = ['remaster', 'delux', 'from', 'mix', 'version', 'edit', 'live', 'track', 'session', 'extend', 'feat',
'studio']
if not any(keyword in title.lower() for keyword in keywords):
return title
newtitle = title
# uses split to remove - everything after hyphen if there's a keyword there
# (doesn't separate ones without spaces since some titles are like-this)
if ' - ' in newtitle:
newtitle = newtitle.split(" - ", 1)
if any(keyword in newtitle[1].lower() for keyword in keywords):
newtitle = newtitle[0]
# removes everything in parentheses if there's a keyword inside
if '(' in newtitle:
regex = re.compile(".*?\((.*?)\)")
result = re.findall(regex, title)
if len(result) > 0:
if any(keyword in result[0].lower() for keyword in keywords):
tag = '(' + result[0] + ')'
newtitle = newtitle.replace(tag, '')
newtitle = newtitle.strip()
return newtitle
def parse_artists(artists):
"""Takes a list of artists and return a nice, comma separated, string, of their, names"""
result = ''
comma = False
for artist in artists:
if comma:
result += ', '
else:
comma = True
result += artist['name']
return result
def remove_embed(text):
"""Removes the weird string from the end of genius results"""
lyric = text.split('EmbedShare URLCopyEmbedCopy')[0]
while lyric[-1].isnumeric():
lyric = lyric[:-1]
return lyric
| def format_composition(attribute, features):
if attribute == 'key':
return format_key(features)
if attribute == 'tempo':
return format_tempo(features)
if attribute == 'signature':
return format_signature(features)
def format_signature(features):
return str(features['time_signature']) + '/4'
def format_tempo(features):
return str(round(features['tempo']))
def format_key(features):
key = features['key']
mode = features['mode']
keys = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
return keys[key] + ('m' if not mode else '')
def format_value(value):
return int(value * 100)
def color_from_value(value):
color_high = [255, 104, 0]
color_low = [96, 0, 255]
result = [round((h - l) * value + l) for (h, l) in zip(color_high, color_low)]
return f'rgb{tuple(result)}'
def uniform_title(title):
"""Does the best it can to get the actual song title from whatever the name of the track is
Track names on Spotify are riddled with information on remixes, remasters, features, live versions etc.
This function tries to remove these, but it might not work in every case, especially in languages other
than English since it works by looking for keywords
"""
keywords = ['remaster', 'delux', 'from', 'mix', 'version', 'edit', 'live', 'track', 'session', 'extend', 'feat', 'studio']
if not any((keyword in title.lower() for keyword in keywords)):
return title
newtitle = title
if ' - ' in newtitle:
newtitle = newtitle.split(' - ', 1)
if any((keyword in newtitle[1].lower() for keyword in keywords)):
newtitle = newtitle[0]
if '(' in newtitle:
regex = re.compile('.*?\\((.*?)\\)')
result = re.findall(regex, title)
if len(result) > 0:
if any((keyword in result[0].lower() for keyword in keywords)):
tag = '(' + result[0] + ')'
newtitle = newtitle.replace(tag, '')
newtitle = newtitle.strip()
return newtitle
def parse_artists(artists):
"""Takes a list of artists and return a nice, comma separated, string, of their, names"""
result = ''
comma = False
for artist in artists:
if comma:
result += ', '
else:
comma = True
result += artist['name']
return result
def remove_embed(text):
"""Removes the weird string from the end of genius results"""
lyric = text.split('EmbedShare URLCopyEmbedCopy')[0]
while lyric[-1].isnumeric():
lyric = lyric[:-1]
return lyric |
def binary_search(arr, n):
return _binary_search(sorted(arr), n, 0, len(arr) - 1)
def _binary_search(arr, n, start, end):
if start > end:
return 0
mid = int((start + end) / 2)
if n == arr[mid]:
return 1
elif n < arr[mid]:
return _binary_search(arr, n, start, mid - 1)
else:
return _binary_search(arr, n, mid + 1, end)
| def binary_search(arr, n):
return _binary_search(sorted(arr), n, 0, len(arr) - 1)
def _binary_search(arr, n, start, end):
if start > end:
return 0
mid = int((start + end) / 2)
if n == arr[mid]:
return 1
elif n < arr[mid]:
return _binary_search(arr, n, start, mid - 1)
else:
return _binary_search(arr, n, mid + 1, end) |
# URI Online Judge 1178
X = float(input())
N = [X]
print('N[{}] = {:.4f}'.format(0, N[0]))
for i in range(1, 100):
N.append(N[i-1]/2)
print('N[{}] = {:.4f}'.format(i, N[i-1]/2))
| x = float(input())
n = [X]
print('N[{}] = {:.4f}'.format(0, N[0]))
for i in range(1, 100):
N.append(N[i - 1] / 2)
print('N[{}] = {:.4f}'.format(i, N[i - 1] / 2)) |
# Global variables representing colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
# Global variable used for sizing
ICON_SIZE = 24
| white = (255, 255, 255)
black = (0, 0, 0)
icon_size = 24 |
"""
Given a non-empty, singly linked list with head node head, return a middle node of linked list.
If there are two middle nodes, return the second middle node.
Example 1:
Input: [1,2,3,4,5]
Output: Node 3 from this list (Serialization: [3,4,5])
The returned node has value 3. (The judge's serialization of this node is [3,4,5]).
Note that we returned a ListNode object ans, such that:
ans.val = 3, ans.next.val = 4, ans.next.next.val = 5, and ans.next.next.next = NULL.
Example 2:
Input: [1,2,3,4,5,6]
Output: Node 4 from this list (Serialization: [4,5,6])
Since the list has two middle nodes with values 3 and 4, we return the second one.
"""
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def middleNode(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
length = 0
curr = head
while curr is not None:
curr = curr.next
length += 1
mid = length / 2
curr = head
while mid > 0:
curr = curr.next
mid -= 1
return curr
| """
Given a non-empty, singly linked list with head node head, return a middle node of linked list.
If there are two middle nodes, return the second middle node.
Example 1:
Input: [1,2,3,4,5]
Output: Node 3 from this list (Serialization: [3,4,5])
The returned node has value 3. (The judge's serialization of this node is [3,4,5]).
Note that we returned a ListNode object ans, such that:
ans.val = 3, ans.next.val = 4, ans.next.next.val = 5, and ans.next.next.next = NULL.
Example 2:
Input: [1,2,3,4,5,6]
Output: Node 4 from this list (Serialization: [4,5,6])
Since the list has two middle nodes with values 3 and 4, we return the second one.
"""
class Solution(object):
def middle_node(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
length = 0
curr = head
while curr is not None:
curr = curr.next
length += 1
mid = length / 2
curr = head
while mid > 0:
curr = curr.next
mid -= 1
return curr |
#LeetCode problem 112: Path Sum
# 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 hasPathSum(self, root: TreeNode, sum: int) -> bool:
if root is None:
return False
if root.left is None and root.right is None:
return(root.val==sum)
res=[]
self.isTrue(root,sum,res)
print(res)
if res.count(1)>=1:
return True
return False
def isTrue(self, root: TreeNode, s: int, res) -> bool:
if root is not None:
if not root.left and not root.right and root.val == s:
res.append(1)
if root.left is not None:
self.isTrue(root.left,s-root.val,res)
if root.right is not None:
self.isTrue(root.right,s-root.val,res) | class Solution:
def has_path_sum(self, root: TreeNode, sum: int) -> bool:
if root is None:
return False
if root.left is None and root.right is None:
return root.val == sum
res = []
self.isTrue(root, sum, res)
print(res)
if res.count(1) >= 1:
return True
return False
def is_true(self, root: TreeNode, s: int, res) -> bool:
if root is not None:
if not root.left and (not root.right) and (root.val == s):
res.append(1)
if root.left is not None:
self.isTrue(root.left, s - root.val, res)
if root.right is not None:
self.isTrue(root.right, s - root.val, res) |
blacklisted_generators = [
'latitude',
'geo_coordinate',
'longitude',
'time_delta',
'date_object',
'date_time',
'date_time_between',
'date_time_ad',
'date_time_this_decade',
'date_time_between_dates',
'time_object',
'date_time_this_year',
'date_time_this_century',
'date_time_this_month',
'sentences',
'words',
'paragraphs',
'binary',
'pylist',
'pyiterable',
'pyfloat',
'pystruct',
'pyint',
'pyset',
'pydecimal',
'pydict',
'pytuple',
'pystr',
'pybool',
'profile',
]
available_generators = {
'address': [
'address',
'postcode',
'military_ship',
'country_code',
'military_state',
'postalcode_plus4',
'country',
'random_number',
'random_letter',
'military_apo',
'random_digit_or_empty',
'city_prefix',
'state_abbr',
'military_dpo',
'zipcode_plus4',
'street_name',
'random_digit',
'street_suffix',
'street_address',
'zipcode',
'secondary_address',
'random_digit_not_null',
'city',
'random_int',
'state',
'city_suffix',
'postalcode',
'building_number'
],
'barcode': [
'ean13',
'ean',
'ean8'
],
'color': [
'color_name',
'rgb_color_list',
'rgb_color',
'safe_hex_color',
'hex_color',
'rgb_css_color',
'safe_color_name'
],
'company': [
'company',
'catch_phrase',
'company_suffix',
'bs',
],
'credit_card': [
'credit_card_provider',
'credit_card_security_code',
'credit_card_full',
'credit_card_number',
'credit_card_expire'
],
'date_time': [
'day_of_month',
'timezone',
'month',
'year',
'day_of_week',
'unix_time',
'time',
'century',
'am_pm',
'month_name',
'iso8601'
],
'file': [
'file_extension',
'mime_type',
'file_path',
'file_name'
],
'internet': [
'user_name',
'email',
'image_url',
'ipv4',
'free_email_domain',
'tld',
'domain_name',
'uri_path',
'uri_extension',
'uri',
'url',
'ipv6',
'free_email',
'domain_word',
'uri_page',
'mac_address',
'company_email',
'safe_email',
'slug'
],
'isbn': [
'isbn10',
'isbn13'
],
'lorem': [
'sentence',
'text',
'paragraph',
'word'
],
'misc': [
'uuid4',
'sha256',
'locale',
'md5',
'boolean',
'language_code',
'sha1',
'password',
'ssn',
'job',
'currency_code',
'phone_number'
],
'person': [
'prefix_male',
'suffix',
'prefix_female',
'name_male',
'suffix_male',
'name',
'first_name',
'suffix_female',
'last_name_male',
'first_name_female',
'last_name',
'name_female',
'prefix',
'first_name_male',
'last_name_female'
],
'profile': [
'simple_profile'
],
'user_agent': [
'user_agent',
'safari',
'firefox',
'linux_platform_token',
'mac_platform_token',
'mac_processor',
'windows_platform_token',
'opera',
'internet_explorer',
'chrome',
'linux_processor'
]
}
# We only need this for local development.
if __name__ == '__main__':
for i in blacklisted_generators:
for k,v in available_generators.items():
assert not i in v, "Blacklisted generator %s found in available list %s" % (i,k)
| blacklisted_generators = ['latitude', 'geo_coordinate', 'longitude', 'time_delta', 'date_object', 'date_time', 'date_time_between', 'date_time_ad', 'date_time_this_decade', 'date_time_between_dates', 'time_object', 'date_time_this_year', 'date_time_this_century', 'date_time_this_month', 'sentences', 'words', 'paragraphs', 'binary', 'pylist', 'pyiterable', 'pyfloat', 'pystruct', 'pyint', 'pyset', 'pydecimal', 'pydict', 'pytuple', 'pystr', 'pybool', 'profile']
available_generators = {'address': ['address', 'postcode', 'military_ship', 'country_code', 'military_state', 'postalcode_plus4', 'country', 'random_number', 'random_letter', 'military_apo', 'random_digit_or_empty', 'city_prefix', 'state_abbr', 'military_dpo', 'zipcode_plus4', 'street_name', 'random_digit', 'street_suffix', 'street_address', 'zipcode', 'secondary_address', 'random_digit_not_null', 'city', 'random_int', 'state', 'city_suffix', 'postalcode', 'building_number'], 'barcode': ['ean13', 'ean', 'ean8'], 'color': ['color_name', 'rgb_color_list', 'rgb_color', 'safe_hex_color', 'hex_color', 'rgb_css_color', 'safe_color_name'], 'company': ['company', 'catch_phrase', 'company_suffix', 'bs'], 'credit_card': ['credit_card_provider', 'credit_card_security_code', 'credit_card_full', 'credit_card_number', 'credit_card_expire'], 'date_time': ['day_of_month', 'timezone', 'month', 'year', 'day_of_week', 'unix_time', 'time', 'century', 'am_pm', 'month_name', 'iso8601'], 'file': ['file_extension', 'mime_type', 'file_path', 'file_name'], 'internet': ['user_name', 'email', 'image_url', 'ipv4', 'free_email_domain', 'tld', 'domain_name', 'uri_path', 'uri_extension', 'uri', 'url', 'ipv6', 'free_email', 'domain_word', 'uri_page', 'mac_address', 'company_email', 'safe_email', 'slug'], 'isbn': ['isbn10', 'isbn13'], 'lorem': ['sentence', 'text', 'paragraph', 'word'], 'misc': ['uuid4', 'sha256', 'locale', 'md5', 'boolean', 'language_code', 'sha1', 'password', 'ssn', 'job', 'currency_code', 'phone_number'], 'person': ['prefix_male', 'suffix', 'prefix_female', 'name_male', 'suffix_male', 'name', 'first_name', 'suffix_female', 'last_name_male', 'first_name_female', 'last_name', 'name_female', 'prefix', 'first_name_male', 'last_name_female'], 'profile': ['simple_profile'], 'user_agent': ['user_agent', 'safari', 'firefox', 'linux_platform_token', 'mac_platform_token', 'mac_processor', 'windows_platform_token', 'opera', 'internet_explorer', 'chrome', 'linux_processor']}
if __name__ == '__main__':
for i in blacklisted_generators:
for (k, v) in available_generators.items():
assert not i in v, 'Blacklisted generator %s found in available list %s' % (i, k) |
class NoSolutionError(Exception):
"""Exception returned when a DnaOptimizationProblem aborts.
This means that the constraints are found to be unsatisfiable.
"""
def __init__(self, message, problem, constraint=None, location=None):
"""Initialize."""
Exception.__init__(self, message)
self.message = message
self.problem = problem
self.constraint = constraint
self.location = location
def __str__(self):
return self.message
| class Nosolutionerror(Exception):
"""Exception returned when a DnaOptimizationProblem aborts.
This means that the constraints are found to be unsatisfiable.
"""
def __init__(self, message, problem, constraint=None, location=None):
"""Initialize."""
Exception.__init__(self, message)
self.message = message
self.problem = problem
self.constraint = constraint
self.location = location
def __str__(self):
return self.message |
class Node:
def __init__(self,data):
self.data = data
self.next = None
class Solution:
def display(self,head):
current = head
while current:
print(current.data,end=' ')
current = current.next
def insert(self, head, data):
if head is None:
return Node(data)
current = head
while current.next is not None:
current = current.next
current.next = Node(data)
return head
| class Node:
def __init__(self, data):
self.data = data
self.next = None
class Solution:
def display(self, head):
current = head
while current:
print(current.data, end=' ')
current = current.next
def insert(self, head, data):
if head is None:
return node(data)
current = head
while current.next is not None:
current = current.next
current.next = node(data)
return head |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.