content
stringlengths 7
1.05M
|
---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: [email protected]
"""
def WriteMesh(num_f,name):
inp=open("SaveSurfaceMesh.geo",'w+')
val = str("SaveSurfaceMesh")
for i in range(int(num_f)):
inp.write(" Merge \"%s_%i.stl\"; \n" %(val,i+1))
for i in range(int(num_f)):
inp.write("Surface Loop" + "("+ str(i+1) + ")" + "={" + str(i+1) +"};\n" )
inp.write("Volume" + "("+ str(i+1) + ")" + "={" + str(i+1) +"};\n")
inp.write("Physical Volume" + "("+ str(i+1) + ")" + "={" + str(i+1) +"};\n")
inp.write("Mesh 3;\n")
inp.write("Coherence Mesh;\n")
inp.write("Mesh.Format = 1;\n")
inp.write("Save \"%s.msh\";" %name)
inp.close()
|
"""Solution to 1.6: String Compression."""
def compress(string):
"""Creates a compressed string using repeat characters.
Args:
string_one: any string to be compressed.
Returns:
A compressed version of the input based on repeat occurences
Raises:
ValueError: string input is empty.
"""
if string:
current = ''
count = 0
temp = list()
for character in string:
if count == 0:
current = character
count += 1
elif character == current:
count += 1
elif character != current:
temp.append(current + str(count))
current = character
count = 1
temp.append(current + str(count))
return ''.join(temp)
raise ValueError('empty string input given')
|
{
"targets": [
{
"target_name": "iow_sht7x",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": [ "./src/iow_sht7x.cpp", "./src/sht7x.cpp" ],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
"./src/",
"/usr/include"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
'link_settings': {'libraries': ['-liowkit']}
}
]
}
|
# Default config_dict
default_config_dict = {"MAIN": {}, "GUI": {}, "PLOT": {}}
default_config_dict["MAIN"]["MACHINE_DIR"] = ""
default_config_dict["MAIN"]["MATLIB_DIR"] = ""
default_config_dict["GUI"]["UNIT_M"] = 1 # length unit: 0 for m, 1 for mm
default_config_dict["GUI"]["UNIT_M2"] = 1 # Surface unit: 0 for m^2, 1 for mm^2
# Name of the color set to use
default_config_dict["PLOT"]["COLOR_DICT_NAME"] = "pyleecan_color.json"
default_config_dict["PLOT"]["color_dict"] = {}
|
"""
File: hailstone.py
-----------------------
This program should implement a console program that simulates
the execution of the Hailstone sequence, as defined by Douglas
Hofstadter. Output format should match what is shown in the sample
run in the Assignment 2 Handout.
"""
def main():
"""
Calculate the number of steps to make n reach 1 and show a process of calculation.
"""
print('This program computes Hailstone sequences.')
print(' ')
n=int(input('Enter a number: '))
x=0
#x stands for the number of steps to make n reach 1.
if n==1:
print('It took 0 step to reach 1.')
else:
while True:
if n==1:
break
elif n%2==1:
#n is odd.
x+=1
n=int(3*n+1)
a=int((n-1)/3)
print(str(a) + ' is odd, so I make 3n+1: ' + str(n))
else:
#n is even.
x+=1
n=int(n/2)
b=2*n
print(str(b) + ' is even, so I take half: ' + str(n))
print('It took '+str(x)+' steps to reach 1.')
###### DO NOT EDIT CODE BELOW THIS LINE ######
if __name__ == "__main__":
main()
|
# 1. --------------------------------------
# 1. 1.1 * radiance = 1.1
# 2. 1.1 - 0.5 = 0.6
# 3. min(randiance, 0.6) = 0.6
# 4. 2.0 + 0.6 = 2.6
# 5. max(2.1, 2.6) = 2.6
# 2. --------------------------------------
radiance = 1.0
radiance = max(2.1, 2.0 + min(radiance, 1.1 * radiance - 0.5))
print(radiance)
|
class Solution:
def bubble_sort(self, arr):
bub_flag = 1 # bubbling will occur until finished i.e. until flag not set
while bub_flag == 1:
bub_flag = 0 # reset flag on each pass
for i in range(0, len(arr)-1): # iterate over all elements
j = i+1
if arr[j] < arr[i]: # IF not in ascending order
arr[i], arr[j] = arr[j], arr[i] # swap pair
bub_flag = 1 # set bubble flag
return arr
obj = Solution()
x = [2,1,6,8,4,5,9]
print("Unsorted Array {}" .format(x))
obj.bubble_sort(x)
print("Sorted Array {}" .format(obj.bubble_sort(x)))
|
class Singleton( type ) :
_instances = {}
def __call__( aClass , * aArgs , **kwargs ) :
if aClass not in aClass._instances:
aClass._instances[aClass] = super(Singleton , aClass).__call__(*aArgs , **kwargs)
return aClass._instances[aClass]
|
#leia 4 valores e guarde as em uma tupla.
#mostre, qntas vezes apareceu o numero 9,
#em que posição o valor 3 apareceu e quais foram os n pares.
numeros = (int(input('Digite um número: ')), int(input('Digite um número: ')), int(input('Digite um número: ')), int(input('Digite um número: ')))
print('Números digitados: ', end='')
for i in range(0, len(numeros)):
print(numeros[i], end=' ')
print(f'\nO número 9 apareceu: {numeros.count(9)} vezes.')
if 3 in numeros:
print(f'O número três foi identificado na posição {numeros.index(3) + 1}.')
else:
print('O número 3 não foi encontrado em nenhuma posição.')
''' OU ~~
encontrado = numeros.count(3)
if encontrado == 0:
print('O número 3 não foi encontrado em nenhuma posição.')
else:
print(f'O número três foi identificado na posição {numeros.index(3)+1}.')'''
print(f'Os números PARES foram encontrados: ')
for c in range(0, len(numeros)):
if numeros[c] % 2 == 0:
print(f'Na posição {c+1}: {numeros[c]}.')
|
# coding=utf-8
#===============================================
#HOME INFORMATION
#===============================================
pd_source_dir ='/ufrc/narayanan/desika.narayanan/pd_git/'
#===============================================
#RESOLUTION KEYWORDS
#===============================================
oref = 0 #over refine factor - should typically be set to 0
n_ref = 128 #when n_particles > n_ref, octree refines further
zoom_box_len = 250 #kpc; so the box will be +/- zoom_box_len from the center
bbox_lim = 1.e5 #kpc - this is the initial bounding box of the grid (+/- bbox_lim)
#This *must* encompass all of the particles in the
#simulation.
#===============================================
#PARALLELIZATION
#===============================================
n_processes = 16 #number of pool processes to run
n_MPI_processes = 1 #number oF MPI processes to run
#===============================================
#RT INFORMATION
#===============================================
n_photons_initial = 1.e5
n_photons_imaging = 1.e5
n_photons_raytracing_sources = 1.e5
n_photons_raytracing_dust = 1.e5
FORCE_RANDOM_SEED = False
seed = -12345 #has to be an int, and negative.
#===============================================
#DUST INFORMATION
#===============================================
dustdir = '/home/desika.narayanan/hyperion-dust-0.1.0/dust_files/' #location of your dust files
dustfile = 'd03_3.1_6.0_A.hdf5'
PAH = False
dust_grid_type = 'dtm' #needs to be in ['dtm','rr','manual','li_bestfit','li_ml']
dusttometals_ratio = 0.25 #skirt assumes 0.25: see http://www.skirt.ugent.be/tutorials/_tutorial_hydro_s_p_h.html ("dust system"subheading)
enforce_energy_range = False #False is the default; ensures energy conservation
SUBLIMATION = True #do we automatically kill dust grains above the
#sublimation temperature; right now is set to fast
#mode
SUBLIMATION_TEMPERATURE = 1600. #K -- meaningliess if SUBLIMATION == False
#===============================================
#STELLAR SEDS INFO
#===============================================
FORCE_BINNED = True # If True, force all star particles to be binned for calculating SED.
# If False, all star particles below max_age_direct (next parameter) are added
# directly without binning for calculating SED
max_age_direct = 1.e-2 # Age (in Gyr) below which stars will be directly added without binning (works only if FORCE_BINNED is False)
imf_type = 1 #FSPS imf types; 0 = salpeter, 1 = chabrier; 2 = kroupa; 3 and 4 (vandokkum/dave) not currently supported
pagb = 0 #weight given to post agb stars# 1 is the default
add_agb_dust_model=False #add circumstellar AGB dust model (100%); Villaume, Conroy & Jonson 2015
#===============================================
#NEBULAR EMISSION INFO
#===============================================
add_neb_emission = False #add nebular line emission from Cloudy Lookup tables (dev. by Nell Byler)
use_cloudy_tables = True # If True, CLOUDY look up tables will be used to calculate nebular emission.
# Otherwise CLOUDY models are generated individually
# for each young star particle (under active development) (Default: True)
FORCE_gas_logu = False # If set, then we force the ionization parameter (gas_logu) of HII regions to be
# gas_logu (next parameter) else, it is taken to be variable and dependent on ionizing
# radiation from star particles. (Default: False)
gas_logu = -2. #gas ionization parameter for HII regions; only relevant
#if add_neb_emission = True default = -2
FORCE_gas_logz = False #if set, then we force the gas_logz of HII
#regions to be gas_logz (next parameter); else, it is taken to be the star particles metallicity. default is False
gas_logz = 0. #units of log(Z/Z_sun); metallicity of the HII region
#metallicity; only relevant if add_neb_emission = True;
#default is 0
FORCE_logq = False # If set, then we force the number of ionizing photons to be source_logq (next parameter)
# else, it is taken to be variable and dependent on ionizing radiation
# from star particles. (Default: False)
source_logq = 1.e47 # Number of ionizing photons emitted by the source in units of s^-1.
# Only relevant if add_neb_emission = True, use_cloudy_tables = True and
# FORCE_gas_logq = True (Default: 1.e47)
FORCE_inner_radius = False # If set, then we force the inner radius of the cloud to be inner_radius (next parameter)
# else, it is taken to be the Stromgren sphere radius. (Default: False)
inner_radius = 1.e19 # This sets the inner radius of the cloud in cm. This is used only when add_neb_emission = True,
# use_cloudy_tables = True and FORCE_inner_radius = True (Default: 1.e19)
neb_abund = "dopita" # This sets the HII region elemental abundances for generating CLOUDY models.
# Available abundaces are.
# dopita: Abundabces from Dopita (2001) with old solar abundances = 0.019 and ISM grains.
# newdopita: Abundances from Dopita (2013). Solar Abundances from Grevasse 2010 - z= 0.013
# includes smooth polynomial for N/O, C/O relationship functional form for He(z),
# new depletion and factors in ISM grains.
# gutkin: Abundabces from Gutkin (2016) and PARSEC metallicity (Bressan+2012) based on Grevesse+Sauvel (1998)
# and Caffau+2011
# This is used only when add_neb_emission = True and use_cloudy_tables = True. (Default: dopita)
use_Q = True # If True, we run CLOUDY by specifying number of ionizing photons which are calculated
# based on the input sed and the inner radius which is set to the Strömgren radius.
# else, CLOUDY is run by specifying just the ionization parameter.Only relevant if
# add_neb_emission = True and use_cloudy_tables = True (Default: True)
HII_T = 1.e4 # Ionized gas temperature in K for calculating nebular emission.
# This is used only when add_neb_emission = True (Default = 1.e4)
HII_nh = 1.e2 # Gas hydrogen density for calcualting nebular emission in units if cm^-3.
# This is used only when add_neb_emission = True (Default = 1.e2)
HII_max_age = 2.e-3 # Sets the maximum age limit for calculating nebular emission in units of Gyr.
# This is used only when add_neb_emission = True (Default = 2.e-3)
neb_file_output = True # If set to True creates an output file with ionization parameter (LogU),
# number of ionizing photons (LogQ), inner radius, stellar mass, age and
# metallicity(zmet) for each particle. (Default: True)
stellar_cluster_mass = 1.e4 # Mass of star clusters in Msun. This is used only when add_neb_emission = True (Default = 1.e4)
cloudy_cleanup = True # If set to True, all the CLOUDY files will be deleted after the source addition is complete.
# Only relevant if add_neb_emission = True and use_cloudy_tables = True (Default: True)
CF_on = False #if set to true, then we enable the Charlot & Fall birthcloud models
birth_cloud_clearing_age = 0.01 #Gyr - stars with age <
#birth_cloud_clearing_age have
#charlot&fall birthclouds meaningless
#of CF_on == False
Z_init = 0 #force a metallicity increase in the newstar particles.
#This is useful for idealized galaxies. The units for this
#are absolute (so enter 0.02 for solar). Setting to 0
#means you use the stellar metallicities as they come in
#the simulation (more likely appropriate for cosmological
#runs)
#Idealized Galaxy SED Parameters
disk_stars_age = 8 #Gyr ;meaningless if this is a cosmological simulation; note, if this is <= 7, then these will live in birth clouds
bulge_stars_age = 8 #Gyr ; meaningless if this is a cosmological simulation; note, if this is <= 7, then these will live in birth clouds
disk_stars_metals = 19 #in fsps metallicity units
bulge_stars_metals = 19 #in fsps metallicity units
#bins for binning the stellar ages and metallicities for SED
#assignments in cases of many (where many ==
#>N_METALLICITY_BINS*N_STELLAR_AGE_BINS) stars; this is necessary for
#reduction of memory load; see manual for details.
N_STELLAR_AGE_BINS = 100
metallicity_legend= "/home/desika.narayanan/fsps/ISOCHRONES/Padova/Padova2007/zlegend.dat"
#===============================================
#BLACK HOLE STUFF
#===============================================
BH_SED = False
BH_eta = 0.1 #bhluminosity = BH_eta * mdot * c**2.
BH_model = "Nenkova"
BH_modelfile = "/home/desika.narayanan/powderday/agn_models/clumpy_models_201410_tvavg.hdf5"
# The Nenkova BH_modelfile can be downloaded here:
# https://www.clumpy.org/downloads/clumpy_models_201410_tvavg.hdf5
nenkova_params = [5,30,0,1.5,30,40] #Nenkova+ (2008) model parameters
#===============================================
#IMAGES AND SED
#===============================================
NTHETA = 1
NPHI = 1
SED = True
SED_MONOCHROMATIC = False
FIX_SED_MONOCHROMATIC_WAVELENGTHS = False #if set, then we only use
#nlam wavelengths in the
#range between min_lam and
#max_lam
SED_MONOCHROMATIC_min_lam = 0.3 #micron
SED_MONOCHROMATIC_max_lam = 0.4 #micron
SED_MONOCHROMATIC_nlam = 100
IMAGING = False
filterdir = '/home/desika.narayanan/powderday/filters/'
filterfiles = [
'arbitrary.filter',
# 'ACS_F475W.filter',
# 'ACS_F606W.filter',
# 'ACS_F814W.filter',
# 'B_subaru.filter',
]
# Insert additional filter files as above. In bash, the following command
# formats the filenames for easy copying/pasting.
# $ shopt -s globstar; printf "# '%s'\n" *.filter
npix_x = 128
npix_y = 128
#experimental and under development - not advised for use
IMAGING_TRANSMISSION_FILTER = False
filter_list = ['filters/irac_ch1.filter']
TRANSMISSION_FILTER_REDSHIFT = 0.001
#===============================================
#OTHER INFORMATION
#===============================================
solar = 0.013
PAH_frac = {'usg': 0.0586, 'vsg': 0.1351, 'big': 0.8063} # values will be normalized to 1
#===============================================
#DEBUGGING
#===============================================
SOURCES_IN_CENTER = False
STELLAR_SED_WRITE = True
SKIP_RT = False #skip radiative transfer (i.e. just read in the grids and maybe write some diagnostics)
SUPER_SIMPLE_SED = False #just generate 1 oct of 100 pc on a side,
#centered on [0,0,0]. sources are added at
#random positions.
SKIP_GRID_READIN = False
CONSTANT_DUST_GRID = False #if set, then we don't create a dust grid by
#smoothing, but rather just make it the same
#size as the octree with a constant value of
#4e-20
N_MASS_BINS = 1 #this is really just a place holder that exists in
#some loops to be able to insert some code downstream
#for spatially varying IMFs. right now for speed best
#to set to 1 as it doesn't actually do anything.
FORCE_STELLAR_AGES = False
FORCE_STELLAR_AGES_VALUE = 0.05# Gyr
FORCE_STELLAR_METALLICITIES = False
FORCE_STELLAR_METALLICITIES_VALUE = 0.012 #absolute values (so 0.013 ~ solar)
|
# Krishan Patel
# Bank Account Class
"""Chaper 14: Objects
From Hello World! Computer Programming for Kids and Beginners
Copyright Warren and Carter Sande, 2009-2013
"""
# Chapter 14 - Try it out
class BankAccount:
"""Creates a bank account"""
def __init__(self, name, account_number):
self.name = name
self.account_number = account_number
self.balance = 0.0
def __str__(self):
return self.name + "\nAccount Number: %s \nBalance: %s" % \
(self.account_number, round(self.balance, 2))
def display_balance(self):
"""Displays the balance of the bank account"""
print("Balance:", self.balance)
def deposit(self, money_deposit):
"""Makes a deposit into bank account (adds more money to balance)"""
self.balance += money_deposit
def withdraw(self, money_withdraw):
"""Withdraws money from bank account (reduces balance)"""
self.balance -= money_withdraw
class InterestAccount(BankAccount):
"""Type of bank account that earns interest"""
def add_interest(self, rate):
"""Adds interest to bank account"""
interest = self.balance*rate
self.deposit(interest)
# Testing out BankAccount class
print("----------Testing BankAccount----------")
bankAccount = BankAccount("Krishan Patel", 123456)
print(bankAccount)
print()
bankAccount.display_balance()
print()
bankAccount.deposit(34.52)
print(bankAccount)
print()
bankAccount.withdraw(12.25)
print(bankAccount)
print()
bankAccount.withdraw(30.18)
print(bankAccount)
print()
# Testing out InterestAccount class
print("----------Testing InterestAccount----------")
interestAccount = InterestAccount("Krishan Patel", 234567)
print(interestAccount)
print()
interestAccount.display_balance()
print()
interestAccount.deposit(34.52)
print(interestAccount)
print()
interestAccount.add_interest(0.11)
print(interestAccount)
|
mark = float(input("Inserire voto: "))
if mark < .35:
print("F")
elif mark < .85:
print("D-")
elif mark < 1.15:
print("D")
elif mark < 1.50:
print("D+")
elif mark < 1.85:
print("C-")
elif mark < 2.15:
print("C")
elif mark < 2.50:
print("C+")
elif mark < 2.85:
print("B-")
elif mark < 3.15:
print("B")
elif mark < 3.50:
print("B+")
elif mark < 3.85:
print("A-")
elif mark < 4.15:
print("A")
else:
print("A+")
|
class Solution:
def reverseStr(self, s: str, k: int) -> str:
s = list(s)
head = 0
jump = 2*k
while head < len(s):
start, end = head, min(head + k-1, len(s)-1)
while start < end:
s[start], s[end] = s[end], s[start]
start += 1
end -= 1
head += jump
return ''.join(s)
|
class Solution:
def multiply(self, num1: str, num2: str) -> str:
n1 = len(num1)
n2 = len(num2)
if not n1 or not n2:
return ""
if n1 == 1 and num1[0] == '0':
return "0"
if n2 == 1 and num2[0] == '0':
return "0"
# arr_num1 = list(reversed(num1))
arr_num1 = list(map(lambda x: ord(x) - ord('0'), num1))
arr_num1 = list(reversed(arr_num1))
# arr_num2 = list(reversed(num2))
arr_num2 = list(map(lambda x: ord(x) - ord('0'), num2))
arr_num2 = list(reversed(arr_num2))
arr_res = [0] * (n1 + n2)
i = 0
j = 0
c = 0
res = ""
PRIME = 10
for j in range(n2):
for i in range(n1):
sum = arr_num1[i] * arr_num2[j] + arr_res[i + j]
c = sum // PRIME
arr_res[i + j] = sum % PRIME
if c != 0:
arr_res[i + j + 1] += c
res1 = map(lambda x: str(x), reversed(arr_res))
flag = 0
res_str = ""
for ch in res1:
if flag == 0:
if ch != "0":
flag = 1
res_str = ch
else:
res_str = res_str + ch
return res_str
sl = Solution()
num1 = "2"
num2 = "3"
res1 = sl.multiply(num1, num2)
print(res1)
num1 = "123"
num2 = "456"
res2 = sl.multiply(num1, num2)
print(res2)
|
c=1
menor = 9999
while True:
numero =int(input())
#condicion para obtener el menor
if numero < menor and numero != 0:
menor = numero
#condicion para detener el bucle
if numero ==0:
break
c=c+1
print("Menor:",menor)
|
#!/usr/bin/python3
"""
Say my name module
"""
def say_my_name(first_name, last_name=""):
""" Prints name """
if not isinstance(first_name, str):
raise TypeError("first_name must be a string")
if not isinstance(last_name, str):
raise TypeError("last_name must be a string")
try:
print("My name is {:s} {:s}".format(first_name, last_name))
except Exception as e:
print(e)
|
class Solution:
def rob(self, nums: List[int]) -> int:
if not nums:
raise Exception("Empty Array")
if len(nums) == 1:
return nums[0]
if len(nums) == 2:
return max(nums[0], nums[1])
# loop arr[0:N - 1]
dp_0 = [0] * len(nums)
dp_0[0] = nums[0]
dp_0[1] = max(nums[0], nums[1])
for i in range(2, len(nums) - 1):
dp_0[i] = max(dp_0[i - 1], dp_0[i - 2] + nums[i])
# loop arr[1:N]
dp_1 = [0] * len(nums)
dp_1[1] = nums[1]
dp_1[2] = max(nums[1], nums[2])
for i in range(3, len(nums)):
dp_1[i] = max(dp_1[i - 1], dp_1[i - 2] + nums[i])
return max(max(dp_0), max(dp_1))
|
numero=int(input('Diga o seu numero: '))
print('O seu numero é {} !\nO seu doblo é {} !\nOseu triplo é {}!\nA sua raiz quadrada é {} !'.format((numero), (numero*2), (numero*3), (numero**(1/2))))
#Ex Guanabara
'''
n = int(input('Digite um numero: '))
d = n*2
t = n*3
r = n ** (1/2)
print('O dobro de {} vale {}.'.format(n, d))
print('O triplo de {} vale {}.\n A raiz quadrada de {} é igual a {:.2f}.'.format(n, t, n, r))
ou tbm
print('O triplo de {} vale {}.\n A raiz quadrada de {} é igual a {:.2f}.'.format(n, t, n, pow(n,(1/2)))
'''
|
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class FreeObject(object):
pass
class Solution:
# @param {ListNode} l1
# @param {ListNode} l2
# @return {ListNode}
def addTwoNumbers(self, l1, l2):
bk = l3 = FreeObject()
rest = 0
while l1 or l2 or rest:
su = (l1.val if l1 else 0) + (l2.val if l2 else 0) + rest
l3.next = ListNode(su % 10)
rest = (0, 1)[su >= 10]
l3 = l3.next
l1 = l1.next if l1 else None
l2 = l2.next if l2 else None
return bk.next
|
# from adventofcode._2020.day11.challenge import main
def test_input():
pass
|
def largest_prime_factor(number):
factor = 2
while number != 1:
if number % factor == 0:
number /= factor
else:
factor += 1
return factor
|
class TempAndHumidityData:
""" Captures temperature and humidity data """
def __init__(self, temperature, humidity):
self.temperature = temperature
self.humidity = humidity
def __str__(self):
return 'temperature={}, humidity={}'.format(self.temperature, self.humidity)
|
class Solution:
def coinChange(self, coins, amount):
if amount == 0:
return 0
dp = [2 << 63] * (amount + 1)
for coin in coins:
if coin <= amount:
dp[coin] = 1
for i in range(1, amount + 1):
for j in range(len(coins)):
if i >= coins[j] and dp[i - coins[j]] != 2 << 63:
dp[i] = min(dp[i], dp[i - coins[j]] + 1)
if dp[amount] != 2 << 63:
return dp[amount]
return -1
|
val = input()
matsubi = val[-1:]
if matsubi == "s":
val2 = val + "es"
else:
val2 = val + "s"
print(val2)
|
"""
Write a Python program to get a string made of the first 2 and the last 2 chars from a given a string. If the string length is less than 2, return instead of the empty string.
Sample String : 'General12'
Expected Result : 'Ge12'
Sample String : 'Ka'
Expected Result : 'KaKa'
Sample String : 'K'
Expected Result : Empty String
"""
str = input("Enter a string: ")
if len(str) >= 2:
expected_str = str[0:3] + str[-3:]
else:
expected_str = "Empty String"
print(expected_str)
|
begin_unit
comment|'# Copyright 2010 United States Government as represented by the'
nl|'\n'
comment|'# Administrator of the National Aeronautics and Space Administration.'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'# a copy of the License at'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# http://www.apache.org/licenses/LICENSE-2.0'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Unless required by applicable law or agreed to in writing, software'
nl|'\n'
comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT'
nl|'\n'
comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the'
nl|'\n'
comment|'# License for the specific language governing permissions and limitations'
nl|'\n'
comment|'# under the License.'
nl|'\n'
nl|'\n'
name|'from'
name|'oslo_log'
name|'import'
name|'log'
name|'as'
name|'logging'
newline|'\n'
name|'from'
name|'oslo_utils'
name|'import'
name|'importutils'
newline|'\n'
nl|'\n'
name|'import'
name|'nova'
op|'.'
name|'conf'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'i18n'
name|'import'
name|'_LW'
newline|'\n'
nl|'\n'
DECL|variable|LOG
name|'LOG'
op|'='
name|'logging'
op|'.'
name|'getLogger'
op|'('
name|'__name__'
op|')'
newline|'\n'
nl|'\n'
DECL|variable|NOVA_NET_API
name|'NOVA_NET_API'
op|'='
string|"'nova.network.api.API'"
newline|'\n'
DECL|variable|NEUTRON_NET_API
name|'NEUTRON_NET_API'
op|'='
string|"'nova.network.neutronv2.api.API'"
newline|'\n'
nl|'\n'
nl|'\n'
DECL|variable|CONF
name|'CONF'
op|'='
name|'nova'
op|'.'
name|'conf'
op|'.'
name|'CONF'
newline|'\n'
nl|'\n'
nl|'\n'
DECL|function|is_neutron
name|'def'
name|'is_neutron'
op|'('
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Does this configuration mean we\'re neutron.\n\n This logic exists as a separate config option\n """'
newline|'\n'
name|'legacy_class'
op|'='
name|'CONF'
op|'.'
name|'network_api_class'
newline|'\n'
name|'use_neutron'
op|'='
name|'CONF'
op|'.'
name|'use_neutron'
newline|'\n'
nl|'\n'
name|'if'
name|'legacy_class'
name|'not'
name|'in'
op|'('
name|'NEUTRON_NET_API'
op|','
name|'NOVA_NET_API'
op|')'
op|':'
newline|'\n'
comment|'# Someone actually used this option, this gets a pass for now,'
nl|'\n'
comment|'# but will just go away once deleted.'
nl|'\n'
indent|' '
name|'return'
name|'None'
newline|'\n'
dedent|''
name|'elif'
name|'legacy_class'
op|'=='
name|'NEUTRON_NET_API'
name|'and'
name|'not'
name|'use_neutron'
op|':'
newline|'\n'
comment|'# If they specified neutron via class, we should respect that'
nl|'\n'
indent|' '
name|'LOG'
op|'.'
name|'warn'
op|'('
name|'_LW'
op|'('
string|'"Config mismatch. The network_api_class specifies %s, "'
nl|'\n'
string|'"however use_neutron is not set to True. Using Neutron "'
nl|'\n'
string|'"networking for now, however please set use_neutron to "'
nl|'\n'
string|'"True in your configuration as network_api_class is "'
nl|'\n'
string|'"deprecated and will be removed."'
op|')'
op|','
name|'legacy_class'
op|')'
newline|'\n'
name|'return'
name|'True'
newline|'\n'
dedent|''
name|'elif'
name|'use_neutron'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'True'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'False'
newline|'\n'
nl|'\n'
nl|'\n'
DECL|function|API
dedent|''
dedent|''
name|'def'
name|'API'
op|'('
name|'skip_policy_check'
op|'='
name|'False'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'is_neutron'
op|'('
op|')'
name|'is'
name|'None'
op|':'
newline|'\n'
indent|' '
name|'network_api_class'
op|'='
name|'CONF'
op|'.'
name|'network_api_class'
newline|'\n'
dedent|''
name|'elif'
name|'is_neutron'
op|'('
op|')'
op|':'
newline|'\n'
indent|' '
name|'network_api_class'
op|'='
name|'NEUTRON_NET_API'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'network_api_class'
op|'='
name|'NOVA_NET_API'
newline|'\n'
nl|'\n'
dedent|''
name|'cls'
op|'='
name|'importutils'
op|'.'
name|'import_class'
op|'('
name|'network_api_class'
op|')'
newline|'\n'
name|'return'
name|'cls'
op|'('
name|'skip_policy_check'
op|'='
name|'skip_policy_check'
op|')'
newline|'\n'
dedent|''
endmarker|''
end_unit
|
# -*- coding: utf-8 -*-
# @Time : 2020/8/26-19:48
# @Author : TuringEmmy
# @Email : [email protected]
# @WeChat : csy_lgy
# @File : height_weight.py
# @Project : Happy-Algorithm
def first():
times = int(input())
height = input().split()
weight = input().split()
heights = [int(i) for i in height]
weights = [int(i) for i in weight]
# data_dict = {}
# for i in range(times):
# data_dict[i] = [heights[i], weights[i]]
# sorted(data_dict[:][0])
# sorted(data_dict[:][1])
#
# print(data_dict)
# for key,value in data_dict.items():
# print(value)
data_list = [[i + 1, heights[i], weights[i]] for i in range(times)]
# print(data_list)
sor = lambda x: x[0]
sor(data_list)
print(data_list)
def second():
length = int(input())
nums = input()
nums = [int(i) for i in nums.split()]
while len(nums) > 1 and len(nums) == length:
max_num = max(nums)
min_num = min(nums)
nums.remove(max_num)
nums.remove(min_num)
temp = abs(max_num - min_num)
nums.append(temp)
if len(nums) == 1:
return nums[0]
else:
return 0
def threed():
pass
if __name__ == '__main__':
# first()
# second()
threed()
|
# Turtle topic name and type key constant
KEY_TOPIC_MSG_TYPE = 'msg_type'
KEY_TOPIC_NAME = 'name'
# Logging frequency in seconds
LOG_FREQUENCY = 10
# Publisher/Subscriber Queue size
QUEUE_SIZE = 10
# Set angle and distance thresholds
ANGULAR_DIST_THRESHOLD = 0.05
LINEAR_DIST_THRESHOLD = 0.05
|
config = {
"interfaces": {
"google.cloud.websecurityscanner.v1alpha.WebSecurityScanner": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
},
"retry_params": {
"default": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"total_timeout_millis": 600000,
}
},
"methods": {
"CreateScanConfig": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"DeleteScanConfig": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetScanConfig": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListScanConfigs": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"UpdateScanConfig": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"StartScanRun": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetScanRun": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListScanRuns": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"StopScanRun": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ListCrawledUrls": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetFinding": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListFindings": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListFindingTypeStats": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
},
}
}
}
|
infile=open('baublesin.txt','r').readline()
ro,bo,s,rp,bp=map(int,infile.split())
answer=0
r=ro-rp
b=bo-bp
if s==0:
if r<0 or b<0:
answer=0
elif r>=b:
if bo==0 or bp==0:
answer+=r+1
else:
answer+=b+1
elif b>r:
if ro==0 or rp==0:
answer+=b+1
else:
answer+=r+1
elif bo==bp==0:
if s+ro<rp:
answer=0
elif s+ro==rp:
answer=1
else:
answer=(ro+s)-rp+1
elif ro==rp==0:
if s+bo<bp:
answer=0
elif s+bo==bp:
answer=1
else:
answer=(bo+s)-bp+1
else:
min1=min(r,b)
max1=max(r,b)
if min1<0:
if r<0:
s+=r
ro=rp
if b<0:
s+=b
bo=bp
answer=s+1
if r>=0 and b>=0:
if r>b:
answer=b+s+1
else:
answer=r+s+1
if answer<0:
answer=0
elif min1==0:
answer=s+1
else:
if rp==0:
answer=(bo+s)-bp+1
elif bp==0:
answer=(ro+s)-rp+1
else:
min1+=s+1
answer=min1
outfile=open('baublesout.txt','w')
outfile.write(str(answer))
outfile.close()
|
# Symbol of circle required to show Celsius degree on display.
circle = [
[0, 0, 0, 0, 1, 1, 0, 0],
[0, 0, 0, 1, 0, 0, 1, 0],
[0, 0, 0, 1, 0, 0, 1, 0],
[0, 0, 0, 0, 1, 1, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
]
|
#
# PySNMP MIB module SONUS-NODE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SONUS-NODE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:09:55 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")
ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, Counter64, MibIdentifier, Bits, ObjectIdentity, Unsigned32, iso, Integer32, Gauge32, ModuleIdentity, IpAddress, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter64", "MibIdentifier", "Bits", "ObjectIdentity", "Unsigned32", "iso", "Integer32", "Gauge32", "ModuleIdentity", "IpAddress", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks")
TextualConvention, DateAndTime, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DateAndTime", "DisplayString", "RowStatus")
sonusSlotIndex, sonusEventLevel, sonusEventDescription, sonusPortIndex, sonusShelfIndex, sonusEventClass = mibBuilder.importSymbols("SONUS-COMMON-MIB", "sonusSlotIndex", "sonusEventLevel", "sonusEventDescription", "sonusPortIndex", "sonusShelfIndex", "sonusEventClass")
sonusSystemMIBs, = mibBuilder.importSymbols("SONUS-SMI", "sonusSystemMIBs")
SonusServiceState, SonusAdminAction, SonusSoftwareVersion, SonusName, AdapterTypeID, ServerFunctionType, ServerTypeID, SonusAdminState, SonusAccessLevel, HwTypeID = mibBuilder.importSymbols("SONUS-TC", "SonusServiceState", "SonusAdminAction", "SonusSoftwareVersion", "SonusName", "AdapterTypeID", "ServerFunctionType", "ServerTypeID", "SonusAdminState", "SonusAccessLevel", "HwTypeID")
sonusNodeMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1))
if mibBuilder.loadTexts: sonusNodeMIB.setLastUpdated('200107310000Z')
if mibBuilder.loadTexts: sonusNodeMIB.setOrganization('Sonus Networks, Inc.')
if mibBuilder.loadTexts: sonusNodeMIB.setContactInfo(' Customer Support Sonus Networks, Inc, 5 carlisle Road Westford, MA 01886 USA Tel: 978-692-8999 Fax: 978-392-9118 E-mail: [email protected]')
if mibBuilder.loadTexts: sonusNodeMIB.setDescription('The MIB Module for Node Management.')
sonusNodeMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1))
sonusNode = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1))
sonusNodeAdmnObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 1))
sonusNodeAdmnShelves = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdmnShelves.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdmnShelves.setDescription('The number of shelves configured to be present in this node.')
sonusNodeAdmnTelnetLogin = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 1, 2), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeAdmnTelnetLogin.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdmnTelnetLogin.setDescription('')
sonusNodeStatusObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 2))
sonusNodeStatShelvesPresent = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeStatShelvesPresent.setStatus('current')
if mibBuilder.loadTexts: sonusNodeStatShelvesPresent.setDescription('The number of shelves currently present in this node.')
sonusNodeStatNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeStatNextIfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeStatNextIfIndex.setDescription('This MIB object identifies the next ifIndex to use in the creation of an interface. This MIB object directly corresponds to the ifIndex MIB object in the ifTable. A value of 0 means that no next ifIndex is currently available.')
sonusNodeStatMgmtStatus = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("manageable", 1), ("softwareUpgradeInProgress", 2), ("softwareUpgradeFailed", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeStatMgmtStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeStatMgmtStatus.setDescription("Identifies if this node can be effectively managed by a network management system. A value of 'manageable' indicates that it can be; the other values indicate that a significant operation is in progress and that a network management system should minimize any requests of this node.")
sonusNodeShelfAdmnTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3), )
if mibBuilder.loadTexts: sonusNodeShelfAdmnTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnTable.setDescription("This table contains information about each shelf which is configured to be a member of the node. This table describes the configured characteristics of each shelf, including the shelve's identity (sonusNodeShelfAdmnIpaddr1 and sonusNodeShelfAdmnIpaddr2). A row must be created by the manager for every slave shelf that is to join the master shelf as part of the node. Slave shelves which do not have correct entries in this table, can not join the node. A management entity may create rows for shelves that are anticipated to join the node in the future.")
sonusNodeShelfAdmnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeShelfAdmnIndex"))
if mibBuilder.loadTexts: sonusNodeShelfAdmnEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnEntry.setDescription('This table describes the shelves that are configured as members of the GSX9000 Switch node.')
sonusNodeShelfAdmnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfAdmnIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnIndex.setDescription('Identifies the target shelf in the node. Each node may be compprised of one or more shelves. The maximum number of shelves allowed in a node is six.')
sonusNodeShelfAdmnState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 2), SonusAdminState()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmnState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnState.setDescription('The configured state of the target shelf in the node.')
sonusNodeShelfAdmnIpaddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 3), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmnIpaddr1.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnIpaddr1.setDescription("The IP Address of the shelf. This value identifies the shelf that may join the node. Each shelf has two IP addresses that it may be reached by. This is the first of those two addresses. Note that it is not possible to change this object on the master shelf. That would be tantamount to changing that shelf's IP address.")
sonusNodeShelfAdmnIpaddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 4), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmnIpaddr2.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnIpaddr2.setDescription("The IP Address of the shelf. This value identifies the shelf that may join the node. Each shelf has two IP addresses that it may be reached by. This is the second of those two addresses. Note that it is not possible to change this object on the master shelf. That would be tantamount to changing the shelf's IP address.")
sonusNodeShelfAdmn48VdcAState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 5), SonusAdminState()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmn48VdcAState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmn48VdcAState.setDescription("The configured state of the shelf's 48 VDC A-power supply. Indicates whether the A supply SHOULD be present. This object is not capable of disabling a connected supply.")
sonusNodeShelfAdmn48VdcBState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 6), SonusAdminState()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmn48VdcBState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmn48VdcBState.setDescription("The configured state of the shelf's 48 VDC B-power supply. Indicates whether the B supply SHOULD be present. This object is not capable of disabling a connected supply.")
sonusNodeShelfAdmnStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("absent", 1), ("detected", 2), ("accepted", 3), ("shuttingDown", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfAdmnStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnStatus.setDescription('The status of the indexed shelf in the GSX9000 node. If the value of this object is not accepted(3) or shuttingDown(4), then the objects in Sonus Shelf Status table are unavailable. The value of this object does not reach accepted(3) until after the slave shelf has contacted the master shelf, and has successfully joined the node. A value of shuttingDown(4) indicates the shelf will be unavailable shortly.')
sonusNodeShelfAdmnRestart = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("restart", 2), ("shutdown", 3)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmnRestart.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnRestart.setDescription('This object is used to reset a shelf in the node. The object causes the management servers on the indexed shelf to perform the indicated operation. The restart(2) operation causes the management servers to reboot. The shutdown(3) operation causes the management servers to disable power to all cards on the indexed shelf, including themselves. The shutdown(3) operation requires physical intervention to re-power the shelf. This object always reads as unknown(1).')
sonusNodeShelfAdmnRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 3, 1, 9), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: sonusNodeShelfAdmnRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfAdmnRowStatus.setDescription('This object indicates the row status for this table.')
sonusNodeShelfStatTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4), )
if mibBuilder.loadTexts: sonusNodeShelfStatTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatTable.setDescription("This table contains status information about each shelf in the GSX9000 Switch node. Shelves within the node can can be configured before they are physically attached to the node. Shelves that are attached may not be powered or correctly configured as a slave. Therefore, it is possible that a slave shelf can not be detected, and is absent. The value of sonusNodeShelfAdmnStatus indicates the availability of this shelf. If the sonusNodeShelfAdmnStatus value for the index shelf does not indicate a status value of 'accepted', then this status table is not available.")
sonusNodeShelfStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeShelfStatIndex"))
if mibBuilder.loadTexts: sonusNodeShelfStatEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatEntry.setDescription('This table describes the shelves that are configured as members of the GSX9000 Switch node.')
sonusNodeShelfStatIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatIndex.setDescription('Identifies the target shelf within the node. Returns the same value as sonusNodeShelfStatIndex, the index into this instance.')
sonusNodeShelfStatSlots = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatSlots.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatSlots.setDescription('The number of physical slots present in this shelf.')
sonusNodeShelfStatSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatSerialNumber.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatSerialNumber.setDescription('Identifies the Sonus serial number for this shelf.')
sonusNodeShelfStatType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("slave", 1), ("master", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatType.setDescription('Identifies the Sonus shelf type. A shelf may be either the master shelf for the node, or it may be one of several slave shelves in the node. Every node contains exactly one master shelf. The master shelf in the management focal point for the node.')
sonusNodeShelfStatFan = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("notPresent", 1), ("controllerFailure", 2), ("singleFailure", 3), ("multipleFailures", 4), ("powerFailure", 5), ("operational", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatFan.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatFan.setDescription("Identifies the status of the shelf's fan tray. A controllerFailure(2) indicates that the fan status can not be obtained. In that case in can not be determined if the fans are operational, or experiencing other failures as well.")
sonusNodeShelfStat48VAStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("absent", 1), ("present", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStat48VAStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStat48VAStatus.setDescription("The status of the shelf's 48 VDC A-power supply.")
sonusNodeShelfStat48VBStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("absent", 1), ("present", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStat48VBStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStat48VBStatus.setDescription("The status of the shelf's 48 VDC B-power supply.")
sonusNodeShelfStatBackplane = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 8), HwTypeID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatBackplane.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatBackplane.setDescription('The hardware type ID of the backplane in this shelf.')
sonusNodeShelfStatBootCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatBootCount.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatBootCount.setDescription('Specifies the number of times that this shelf has been booted. The boot count is specified from the perspective of the active management module running in the indexed shelf.')
sonusNodeShelfStatTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatTemperature.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatTemperature.setDescription("Indicates the temperature being sensed at this shelf's intake manifold. The temperature is indicated in Celcius.")
sonusNodeShelfStatFanSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("normal", 1), ("high", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeShelfStatFanSpeed.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfStatFanSpeed.setDescription('Indicates the speed of the fan.')
sonusNodeSrvrAdmnTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5), )
if mibBuilder.loadTexts: sonusNodeSrvrAdmnTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnTable.setDescription("The server module ADMN table describes the configuration of each server module slot in an indexed shelf. A slot in a shelf, MUST be configured to accept a particular server module HWTYPE. If the wrong type of server module is detected in the slot, that server module will not be allowed to complete its boot process. All server modules are held in the RESET state until that server module's state is set to ENABLED. A server module must have its state set to DISABLED, before the row can be deleted. The row must be deleted, and re-created in order to change the HWTYPE of the row. The server module mode must be set to OUTOFSERVICE before the row's state can be set to DISABLED. Deleting a row in this table, clears the server module hardware type association for this slot. THIS IS A MAJOR CONFIGURATION CHANGE. All configured parameters associated with this slot are permanently lost when the server module is deleted. A server module can not be deleted, until it's state has been set to DISABLED. A row's default value for state is DISABLED. The server module located in the slot is immediately placed in reset when its state is set to disabled.")
sonusNodeSrvrAdmnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeSrvrAdmnShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNodeSrvrAdmnSlotIndex"))
if mibBuilder.loadTexts: sonusNodeSrvrAdmnEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnEntry.setDescription('')
sonusNodeSrvrAdmnShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnShelfIndex.setDescription('Identifies the target shelf. Returns the same value as sonusNodeShelfStatIndex, which was used to index into this table.')
sonusNodeSrvrAdmnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusNodeSrvrAdmnHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 3), ServerTypeID()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnHwType.setDescription('Identifies the type of server module the indexed slot has been configured to accept. Server modules other than this type are rejected by the System Manager. This object is required to create a row instance.')
sonusNodeSrvrAdmnState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 4), SonusAdminState().clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnState.setDescription('A server module must be enabled before System Manager will fully recognize it. The server module must be disabled before the server module can be deleted.')
sonusNodeSrvrAdmnMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 5), SonusServiceState().clone('inService')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnMode.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnMode.setDescription('A server module which is outOfService will not accept new calls. When taken out of service, its active calls may either be dried up or terminated, depending on the action specified. Server modules are created with a mode of inService. A server module must be outOfService in order to change its state to disabled.')
sonusNodeSrvrAdmnAction = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 6), SonusAdminAction().clone('force')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnAction.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnAction.setDescription('The type of action to perform when a server module is taken out of service. The active calls on the server module can be dried up for a specified dryup limit, or they can be forced to be terminated.')
sonusNodeSrvrAdmnDryupLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnDryupLimit.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnDryupLimit.setDescription('Server module dryup limit, specified in minutes. If the server module has not dried up by the time this limit expires, the remaining active calls are abruptly terminated. A dryup limit of zero indicates that the system will wait forever for the dryup to complete.')
sonusNodeSrvrAdmnDumpState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 8), SonusAdminState().clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnDumpState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnDumpState.setDescription('Indicates if a server module will create a crashblock file when a critical error which prevents the module from continuing, has occured.')
sonusNodeSrvrAdmnRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 9), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnRowStatus.setDescription('Deleting a server module will place that slot in reset. All configuration parameters associated with the server module in this slot are destroyed.')
sonusNodeSrvrAdmnRedundancyRole = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("normal", 1), ("redundant", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnRedundancyRole.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnRedundancyRole.setDescription('Specifies the redundancy role this server module will play. This object is required to create a row instance.')
sonusNodeSrvrAdmnAdapHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 11), AdapterTypeID()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnAdapHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnAdapHwType.setDescription('Identifies the type of adapter module the indexed slot has been configured to accept. Adapter modules other than this type are rejected by the System Manager. This object is required to create a row instance.')
sonusNodeSrvrAdmnSpecialFunction = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 5, 1, 12), ServerFunctionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSrvrAdmnSpecialFunction.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrAdmnSpecialFunction.setDescription('Specifies the logical function for this server module. This object may be specified only at row creation time, but is not required. If not specified, an appropriate default value will be assigned based on the server and adapter hardware types. A value of default(1) is not accepted or used.')
sonusNodeSlotTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6), )
if mibBuilder.loadTexts: sonusNodeSlotTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotTable.setDescription('The node slot table describes')
sonusNodeSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeSlotShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNodeSlotIndex"))
if mibBuilder.loadTexts: sonusNodeSlotEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotEntry.setDescription('')
sonusNodeSlotShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotShelfIndex.setDescription('Identifies the indexed shelf. Returns the same value as sonusNodeShelfStatIndex, which is used to index into this table.')
sonusNodeSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotIndex.setDescription('Identifies the indexed slot within the shelf.')
sonusNodeSlotState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=NamedValues(("unknown", 1), ("empty", 2), ("inserted", 3), ("reset", 4), ("boot", 5), ("sonicId", 6), ("coreDump", 7), ("holdOff", 8), ("loading", 9), ("activating", 10), ("activated", 11), ("running", 12), ("faulted", 13), ("powerOff", 14), ("powerFail", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotState.setDescription('Identifies the operational state of the indexed slot in the shelf.')
sonusNodeSlotHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 4), HwTypeID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotHwType.setDescription('Identifies the hardware type of the server module which was detected in the slot. Valid only if the sonusNodeSlotState is greater than inserted(2).')
sonusNodeSlotHwTypeRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotHwTypeRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotHwTypeRev.setDescription('Identifies the hardware type revision of the server module which was detected in the slot. Valid only if the sonusNodeSlotState is greater than inserted(2).')
sonusNodeSlotPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("powerFault", 2), ("powerOK", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotPower.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotPower.setDescription('Identifies the server modules power mode. If the slot state is empty, the power status is unknown(1).')
sonusNodeSlotAdapState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("empty", 2), ("present", 3), ("faulted", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotAdapState.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdapState.setDescription('Identifies the adapter state of the indexed slot in the shelf.')
sonusNodeSlotAdapHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 6, 1, 8), HwTypeID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotAdapHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdapHwType.setDescription('Identifies the hardware type of the adapter module which was detected in the slot. Valid only if the sonusNodeSlotAdapState is present(3).')
sonusNodeSrvrStatTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7), )
if mibBuilder.loadTexts: sonusNodeSrvrStatTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatTable.setDescription("The node server status table describes the status of the indexed server module in the node. This table is unavailable if the sonusNodeShelfStatStatus object indicates that this slot is empty. If the sonusNodeSrvrStatType object returns either 'absent' or 'unknown' the value of all other objects within this table are indeterministic.")
sonusNodeSrvrStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeSrvrStatShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNodeSrvrStatSlotIndex"))
if mibBuilder.loadTexts: sonusNodeSrvrStatEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatEntry.setDescription('')
sonusNodeSrvrStatShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatShelfIndex.setDescription('Identifies the target shelf. Returns the same value as sonusNodeShelfStatIndex, which was used to index into this table.')
sonusNodeSrvrStatSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusNodeSrvrStatMiddVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatMiddVersion.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatMiddVersion.setDescription('Identifies the version of the MIDD EEPROM on this server module.')
sonusNodeSrvrStatHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 4), HwTypeID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatHwType.setDescription('Identifies the type of server module in the indexed slot.')
sonusNodeSrvrStatSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatSerialNum.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatSerialNum.setDescription('Identifies the serial number of the server module. This is the serial number assigned to the server module at manufacture.')
sonusNodeSrvrStatPartNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatPartNum.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatPartNum.setDescription('Identifies the part number of the module. This is the part number assigned to the module at manufacture.')
sonusNodeSrvrStatPartNumRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatPartNumRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatPartNumRev.setDescription('Identifies the manufacture part number revision level of the server module.')
sonusNodeSrvrStatMfgDate = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatMfgDate.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatMfgDate.setDescription('The date this server module assembly was manufactured.')
sonusNodeSrvrStatFlashVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatFlashVersion.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatFlashVersion.setDescription('Identifies the version of the firmware within the non-volatile FLASH device on this server module.')
sonusNodeSrvrStatSwVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatSwVersion.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatSwVersion.setDescription('Identifies the version of the runtime software application this is currently executing on this server module.')
sonusNodeSrvrStatBuildNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatBuildNum.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatBuildNum.setDescription('Identifies the build number of this software version.')
sonusNodeSrvrStatMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("standby", 1), ("active", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatMode.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatMode.setDescription('Identifies the operational status of the module in the indexed slot.')
sonusNodeSrvrStatTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatTemperature.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatTemperature.setDescription('Indicates the current Celcius temperature being sensed by the server module in the indexed slot.')
sonusNodeSrvrStatMemUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatMemUtilization.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatMemUtilization.setDescription('The current memory utilization of this server module. The value returned is a number from 0 to 100, representing the percentage of memory utilization. Note that this number can be somewhat misleading as many data structures are pre-allocated to ensure that the server modules maximum load capacity can be acheived and maintained. This may result is relatively high memory utilizations under fairly low load.')
sonusNodeSrvrStatCpuUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatCpuUtilization.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatCpuUtilization.setDescription('The current CPU utilization of this server module. The value returned is a number from 0 to 100, representing the percentage of CPU utilization.')
sonusNodeSrvrStatHwTypeRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatHwTypeRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatHwTypeRev.setDescription('The hardware type revision number of this server module.')
sonusNodeSrvrStatSwVersionCode = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 17), SonusSoftwareVersion()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatSwVersionCode.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatSwVersionCode.setDescription('Octet string that identifies the version of the runtime software application that is currently executing on this server module: Byte(s) Code ------- ---- 0 major version 1 minor version 2 release version 3 type (1:alpha, 2:beta, 3:release, 4:special) 4-5 type number')
sonusNodeSrvrStatEpldRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatEpldRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatEpldRev.setDescription('The EPLD revision level of this server module. An overall number which represents the total level of the server module.')
sonusNodeSrvrStatHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 19), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatHostName.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatHostName.setDescription('Identifies the host name that software load of this module had been built on.')
sonusNodeSrvrStatUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatUserName.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatUserName.setDescription('Identifies the user who builds software load of this module.')
sonusNodeSrvrStatViewName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatViewName.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatViewName.setDescription('Identifies the viewName used for software build.')
sonusNodeSrvrStatTotalMem = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatTotalMem.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatTotalMem.setDescription('Indicates the total memory size of the server module.')
sonusNodeSrvrStatFreeMem = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatFreeMem.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatFreeMem.setDescription('Indicates the total memory available on the server module.')
sonusNodeSrvrStatTotalSharedMem = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 24), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatTotalSharedMem.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatTotalSharedMem.setDescription('Indicates the total shared memory size of the server module.')
sonusNodeSrvrStatFreeSharedMem = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 7, 1, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSrvrStatFreeSharedMem.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSrvrStatFreeSharedMem.setDescription('Indicates the total shared memory available on the server module.')
sonusNodeAdapStatTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11), )
if mibBuilder.loadTexts: sonusNodeAdapStatTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatTable.setDescription('The node adapter status table describes the status of the indexed adapter module in the node. This table is unavailable if the sonusNodeSlotAdapState object indicates that this slot is unknown, empty or faulted.')
sonusNodeAdapStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeAdapStatShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNodeAdapStatSlotIndex"))
if mibBuilder.loadTexts: sonusNodeAdapStatEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatEntry.setDescription('')
sonusNodeAdapStatShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatShelfIndex.setDescription('Identifies the target shelf.')
sonusNodeAdapStatSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusNodeAdapStatMiddVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatMiddVersion.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatMiddVersion.setDescription('Identifies the version of the MIDD EEPROM on this adapter module.')
sonusNodeAdapStatHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 4), HwTypeID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatHwType.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatHwType.setDescription('Identifies the type of adapter module in the indexed slot.')
sonusNodeAdapStatHwTypeRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatHwTypeRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatHwTypeRev.setDescription('Identifies the hardware type revision of the adapter module detected in the slot.')
sonusNodeAdapStatSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatSerialNum.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatSerialNum.setDescription('Identifies the serial number of the adapter module. This is the serial number assigned to the card at manufacture.')
sonusNodeAdapStatPartNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatPartNum.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatPartNum.setDescription('Identifies the part number of the adapter module. This is the part number assigned to the card at manufacture.')
sonusNodeAdapStatPartNumRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatPartNumRev.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatPartNumRev.setDescription('Identifies the assembly revision level of the adapter module.')
sonusNodeAdapStatMfgDate = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 11, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 10))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeAdapStatMfgDate.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapStatMfgDate.setDescription('The date this adapter module was manufactured.')
sonusNodeSlotAdmnTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 12), )
if mibBuilder.loadTexts: sonusNodeSlotAdmnTable.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdmnTable.setDescription('The node slot admn table provides physical manipulation of a slot location in a shelf.')
sonusNodeSlotAdmnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 12, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNodeSlotAdmnShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNodeSlotAdmnSlotIndex"))
if mibBuilder.loadTexts: sonusNodeSlotAdmnEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdmnEntry.setDescription('')
sonusNodeSlotAdmnShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 12, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotAdmnShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdmnShelfIndex.setDescription('Identifies the target shelf.')
sonusNodeSlotAdmnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 12, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNodeSlotAdmnSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdmnSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusNodeSlotAdmnReset = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 1, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("undefined", 1), ("reset", 2), ("coredump", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNodeSlotAdmnReset.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotAdmnReset.setDescription('Setting this object to reset(2) or coredump(3), will physically reset the server module installed in the indexed slot. This object always reads as undefined(1). This object bypasses all consistency and safety checks. This object is intended for evaluation testing.')
sonusNvsConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2))
sonusNvsConfigTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1), )
if mibBuilder.loadTexts: sonusNvsConfigTable.setStatus('current')
if mibBuilder.loadTexts: sonusNvsConfigTable.setDescription('This table specifies the Boot Parameters that apply only to the MNS present in the indexed shelf and slot. The Boot Parameters can only be accessed if the shelf is actively part of the node.')
sonusNvsConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusBparamShelfIndex"))
if mibBuilder.loadTexts: sonusNvsConfigEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNvsConfigEntry.setDescription('')
sonusBparamShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusBparamShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusBparamShelfIndex.setDescription('Identifies the target shelf. This object returns the value of sonusNodeShelfStatIndex which was used to index into this table.')
sonusBparamUnused = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 2), Integer32())
if mibBuilder.loadTexts: sonusBparamUnused.setStatus('current')
if mibBuilder.loadTexts: sonusBparamUnused.setDescription('Unused')
sonusBparamPasswd = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 23))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamPasswd.setStatus('current')
if mibBuilder.loadTexts: sonusBparamPasswd.setDescription('The secure password which is used to access the Boot PROM menu subsystem. This object is not available through SNMP.')
sonusBparamIpAddrSlot1Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 4), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port0.setDescription('The IP address assigned to the field service port. This port is not intended for customer use.')
sonusBparamIpMaskSlot1Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 5), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port0.setDescription('The IP Address Mask assigned to the field service port.')
sonusBparamIpGatewaySlot1Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 6), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port0.setDescription('The default IP Gateway address used by the field service port.')
sonusBparamIfSpeedTypeSlot1Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port0.setDescription('The default link speed setting used by the field service port.')
sonusBparamIpAddrSlot1Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 8), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port1.setDescription('The IP address assigned to management port number one.')
sonusBparamIpMaskSlot1Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 9), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port1.setDescription('The IP address mask used by management port one.')
sonusBparamIpGatewaySlot1Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 10), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port1.setDescription('The default IP Gateway address used by management port one.')
sonusBparamIfSpeedTypeSlot1Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port1.setDescription('The default link speed setting used by management port one.')
sonusBparamIpAddrSlot1Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 12), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot1Port2.setDescription('The IP address assigned to management port number two.')
sonusBparamIpMaskSlot1Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 13), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot1Port2.setDescription('The IP address mask used by management port two.')
sonusBparamIpGatewaySlot1Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 14), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot1Port2.setDescription('The default gateway address used by management port two.')
sonusBparamIfSpeedTypeSlot1Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot1Port2.setDescription('The default link speed setting used by management port two.')
sonusBparamIpAddrSlot2Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 16), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port0.setDescription('The IP address assigned to the field service port. This port is not intended for customer use.')
sonusBparamIpMaskSlot2Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 17), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port0.setDescription('The IP Address Mask assigned to the field service port.')
sonusBparamIpGatewaySlot2Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 18), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port0.setDescription('The default IP Gateway address used by the field service port.')
sonusBparamIfSpeedTypeSlot2Port0 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port0.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port0.setDescription('The default link speed setting used by the field service port.')
sonusBparamIpAddrSlot2Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 20), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port1.setDescription('The IP address assigned to management port number one.')
sonusBparamIpMaskSlot2Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 21), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port1.setDescription('The IP address mask used by management port one.')
sonusBparamIpGatewaySlot2Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 22), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port1.setDescription('The default IP Gateway address used by management port one.')
sonusBparamIfSpeedTypeSlot2Port1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port1.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port1.setDescription('The default link speed setting used by management port one.')
sonusBparamIpAddrSlot2Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 24), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpAddrSlot2Port2.setDescription('The IP address assigned to management port number two.')
sonusBparamIpMaskSlot2Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 25), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpMaskSlot2Port2.setDescription('The IP address mask used by management port two.')
sonusBparamIpGatewaySlot2Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 26), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIpGatewaySlot2Port2.setDescription('The default gateway address used by management port two.')
sonusBparamIfSpeedTypeSlot2Port2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("autoNegotiate", 1), ("fullDuplex100", 2), ("halfDuplex100", 3), ("fullDuplex10", 4), ("halfDuplex10", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port2.setStatus('current')
if mibBuilder.loadTexts: sonusBparamIfSpeedTypeSlot2Port2.setDescription('The default link speed setting used by management port two.')
sonusBparamBootDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamBootDelay.setStatus('current')
if mibBuilder.loadTexts: sonusBparamBootDelay.setDescription('The amount of delay used to allow an administrator to gain access to the NVS configuration menus before the runtime software is loaded. The delay is specified in seconds. Increasing this delay, will increase the total system boot time by the same amount.')
sonusBparamCoreState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 29), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamCoreState.setStatus('current')
if mibBuilder.loadTexts: sonusBparamCoreState.setDescription('Specifies whether core dumps are enabled. If core dumps are disabled, a fatal software fault will result in a reboot without the overhead of performing the core dump operation.')
sonusBparamCoreLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("normal", 1), ("sensitive", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamCoreLevel.setStatus('current')
if mibBuilder.loadTexts: sonusBparamCoreLevel.setDescription('Specifies the type of core dump behavior the shelf will display. Under normal(1) behavior, the server modules will execute a core dump only for fatal software errors. Under sensitive(2) behavior, the server modules will execute a core dump when the software recognizes a major, but non-fatal, software fault. Normal(1) is the strongly recommended setting.')
sonusBparamBaudRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 31), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamBaudRate.setStatus('current')
if mibBuilder.loadTexts: sonusBparamBaudRate.setDescription("The baud rate of a management port's physical interface.")
sonusBparamNfsPrimary = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 32), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsPrimary.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsPrimary.setDescription('The IP Address of the primary NFS Server for this switch.')
sonusBparamNfsSecondary = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 33), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsSecondary.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsSecondary.setDescription('The IP Address of the secondary NFS Server for this switch.')
sonusBparamNfsMountPri = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 34), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 31))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsMountPri.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsMountPri.setDescription('The NFS mount point exported by the Primary NFS server.')
sonusBparamNfsMountSec = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 35), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 31))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsMountSec.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsMountSec.setDescription('The NFS mount point exported by the Secondary NFS server.')
sonusBparamNfsPathUpgrade = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 36), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsPathUpgrade.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsPathUpgrade.setDescription('The name of the temporary load path override. This path is tried before the sonusBparamNfsPathLoad when specified. If the sonusBparamNfsPathUpgrade fails to completely boot the switch after three consecutive attempts, the path is automatically abandoned in favor of the sonusBparamNfsPathLoad.')
sonusBparamNfsPathLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 37), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 31))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsPathLoad.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsPathLoad.setDescription("The directory, beneath the exported NFS mount point, which contains the switch's operational directories.")
sonusBparamPrimName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 38), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamPrimName.setStatus('current')
if mibBuilder.loadTexts: sonusBparamPrimName.setDescription('The primary load file name for this server module.')
sonusBparamSecName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 39), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamSecName.setStatus('current')
if mibBuilder.loadTexts: sonusBparamSecName.setDescription('The secondary load file name for this server module. The secondary file is tried when the primary file can not be opened or read.')
sonusBparamMasterState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 40), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("slave", 1), ("master", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamMasterState.setStatus('current')
if mibBuilder.loadTexts: sonusBparamMasterState.setDescription('Specifies whether this shelf will participate in the node as a master shelf, or as a slave shelf. Each node contains exactly one master shelf, and may contain multiple slave shelves.')
sonusBparamParamMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disabled", 1), ("binaryFile", 2), ("defaults", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamParamMode.setStatus('current')
if mibBuilder.loadTexts: sonusBparamParamMode.setDescription('Specifies the binary parameter file mode of the node. This mode specifies whether the node will attempt to load a binary parameter file. The paramMode can be set to disabled(1) which disables parameter file loading. The mode can be set to defaults(3), which temporarily disables binary parameter file loading, until after the next binary parameter file save cycle initiated by the runtime software. In both of these disabled cases, the node boots with default parameters and automatically loads and executes the CLI startup script. The paramMode may be set to binaryFile(2), which enables binary parameter file loading and disables the automatic CLI startup script loading. A binary parameter file must exist before the node can succesfully load a binary parameter file. The node will load default parameters when a valid parameter file can not be loaded. The node loads default parameters when either the parameter mode is set to disabled(1) or when the mode is set to defaults(3). When the mode is set to defaults(3), the mode is automatically updated to binaryFile(2) on the first parameter save cycle.')
sonusBparamCliScript = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 42), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamCliScript.setStatus('current')
if mibBuilder.loadTexts: sonusBparamCliScript.setDescription('The name of the CLI script which will be run automatically when the switch intentionally boots with default parameters. The switch will intentionally boot with default parameters when sonusBparamParamMode is set to either disabled(1) or defaults(3). This CLI script will never be run when the sonusBparamParamMode is set to binaryFile(2). If the script is not specified, or if it can not be located, it is not run. The switch expects to find the script file in the cli/sys directory, beneath the load path specified directory.')
sonusBparamUId = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 43), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamUId.setStatus('current')
if mibBuilder.loadTexts: sonusBparamUId.setDescription('The UNIX user ID used for all file accesses on both the primary and secondary NFS servers.')
sonusBparamGrpId = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 44), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamGrpId.setStatus('current')
if mibBuilder.loadTexts: sonusBparamGrpId.setDescription('The UNIX group ID used for all file accesses on both the primary and secondary NFS servers.')
sonusBparamCoreDumpLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 45), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(6)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamCoreDumpLimit.setStatus('current')
if mibBuilder.loadTexts: sonusBparamCoreDumpLimit.setDescription('Indicates the maximum number of core dump files which can be created on behalf of a Server which is requesting a core dump. Setting the value to zero indicates no limit. This object is intended to limit the number of core dumps (and the amount of disk space used) when a Server repeatedly crashes.')
sonusBparamNfsPathSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 1, 1, 46), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusBparamNfsPathSoftware.setStatus('current')
if mibBuilder.loadTexts: sonusBparamNfsPathSoftware.setDescription('The name of the software load path. This path is is appended to the Boot Path. This object may be NULL, in which case the software is loaded directly from the Boot Path. This object allows multiple revisions of software to be maintained below the Boot Path. This object can be overridden by the Upgrade Path object during a LSWU. During general operation the complete software load path is formed by concatenating this object to the Boot Path and any applicable file system mount point.')
sonusFlashConfigTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 2), )
if mibBuilder.loadTexts: sonusFlashConfigTable.setStatus('current')
if mibBuilder.loadTexts: sonusFlashConfigTable.setDescription('This table specifies the FLASH Update parameters for the indexed server module. The Boot Firmware for each server module is contained in the FLASH device. It is essential that once the upgrade process is initiated, that it be allowed to complete without interruption. Power loss or manually reseting the server module during the upgrade process will result in a loss of Boot Firmware.')
sonusFlashConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 2, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusFlashAdmnShelfIndex"), (0, "SONUS-NODE-MIB", "sonusFlashAdmnSlotIndex"))
if mibBuilder.loadTexts: sonusFlashConfigEntry.setStatus('current')
if mibBuilder.loadTexts: sonusFlashConfigEntry.setDescription('')
sonusFlashAdmnShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashAdmnShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusFlashAdmnShelfIndex.setDescription('Identifies the target shelf within the node.')
sonusFlashAdmnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashAdmnSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusFlashAdmnSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusFlashAdmnUpdateButton = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("update", 1))).clone('update')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusFlashAdmnUpdateButton.setStatus('current')
if mibBuilder.loadTexts: sonusFlashAdmnUpdateButton.setDescription("Initiate the update of the specified server module's FLASH PROM now. This object always reads as the value update(1).")
sonusFlashStatusTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3), )
if mibBuilder.loadTexts: sonusFlashStatusTable.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatusTable.setDescription('This table specifies the status of the FLASH Update process.')
sonusFlashStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusFlashStatShelfIndex"), (0, "SONUS-NODE-MIB", "sonusFlashStatSlotIndex"))
if mibBuilder.loadTexts: sonusFlashStatusEntry.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatusEntry.setDescription('')
sonusFlashStatShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashStatShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatShelfIndex.setDescription('Identifies the target shelf within the node.')
sonusFlashStatSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashStatSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatSlotIndex.setDescription('Identifies the target slot within the shelf.')
sonusFlashStatState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("idle", 1), ("waitReply", 2), ("waitData", 3), ("imageComplete", 4), ("flashErase", 5), ("flashWrite", 6), ("done", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashStatState.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatState.setDescription('The current state of the FLASH update process on the target server module.')
sonusFlashStatLastStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("success", 1), ("unknown", 2), ("inProgress", 3), ("badRequest", 4), ("noReply", 5), ("managerNack", 6), ("timerResources", 7), ("dataTimeout", 8), ("msgSequence", 9), ("memoryResources", 10), ("imageChecksum", 11), ("badBlkType", 12), ("flashErase", 13), ("flashWrite", 14), ("flashChecksum", 15), ("mgrNack", 16), ("badState", 17)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusFlashStatLastStatus.setStatus('current')
if mibBuilder.loadTexts: sonusFlashStatLastStatus.setDescription('The status of the last FLASH update that was executed.')
sonusUser = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3))
sonusUserList = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1))
sonusUserListNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusUserListNextIndex.setStatus('current')
if mibBuilder.loadTexts: sonusUserListNextIndex.setDescription('The next valid index to use when creating a new sonusUserListEntry')
sonusUserListTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2), )
if mibBuilder.loadTexts: sonusUserListTable.setStatus('current')
if mibBuilder.loadTexts: sonusUserListTable.setDescription('This table specifies the user access list for the node.')
sonusUserListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusUserListIndex"))
if mibBuilder.loadTexts: sonusUserListEntry.setStatus('current')
if mibBuilder.loadTexts: sonusUserListEntry.setDescription('')
sonusUserListIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusUserListIndex.setStatus('current')
if mibBuilder.loadTexts: sonusUserListIndex.setDescription('Identifies the target user list entry.')
sonusUserListState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 2), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListState.setStatus('current')
if mibBuilder.loadTexts: sonusUserListState.setDescription('The administrative state of this user entry.')
sonusUserListUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 3), SonusName()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListUserName.setStatus('current')
if mibBuilder.loadTexts: sonusUserListUserName.setDescription('The user name of this user.')
sonusUserListProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 23))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListProfileName.setStatus('current')
if mibBuilder.loadTexts: sonusUserListProfileName.setDescription('The name of the profile applied to this user entry.')
sonusUserListPasswd = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(4, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListPasswd.setStatus('current')
if mibBuilder.loadTexts: sonusUserListPasswd.setDescription('The password for this user.')
sonusUserListComment = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListComment.setStatus('current')
if mibBuilder.loadTexts: sonusUserListComment.setDescription('A comment that is associated with this user.')
sonusUserListAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("readOnly", 1), ("readWrite", 2), ("admin", 3))).clone('readOnly')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListAccess.setStatus('current')
if mibBuilder.loadTexts: sonusUserListAccess.setDescription('The priviledge level of this user.')
sonusUserListRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 2, 1, 8), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserListRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusUserListRowStatus.setDescription('Row status object for this table.')
sonusUserListStatusTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 3), )
if mibBuilder.loadTexts: sonusUserListStatusTable.setStatus('current')
if mibBuilder.loadTexts: sonusUserListStatusTable.setDescription('This table specifies status of the user access list for the node.')
sonusUserListStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 3, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusUserListStatusIndex"))
if mibBuilder.loadTexts: sonusUserListStatusEntry.setStatus('current')
if mibBuilder.loadTexts: sonusUserListStatusEntry.setDescription('')
sonusUserListStatusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: sonusUserListStatusIndex.setStatus('current')
if mibBuilder.loadTexts: sonusUserListStatusIndex.setDescription('Identifies the target user list status entry.')
sonusUserListStatusLastConfigChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 1, 3, 1, 2), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusUserListStatusLastConfigChange.setStatus('current')
if mibBuilder.loadTexts: sonusUserListStatusLastConfigChange.setDescription('Octet string that identifies the GMT timestamp of last successful SET PDU from this CLI user. field octects contents range ----- ------- -------- ----- 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..59 7 8 deci-sec 0..9 * Notes: - the value of year is in network-byte order')
sonusUserProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2))
sonusUserProfileNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusUserProfileNextIndex.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileNextIndex.setDescription('The next valid index to use when creating an entry in the sonusUserProfileTable.')
sonusUserProfileTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2), )
if mibBuilder.loadTexts: sonusUserProfileTable.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileTable.setDescription('This table specifies the user access list for the node.')
sonusUserProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusUserProfileIndex"))
if mibBuilder.loadTexts: sonusUserProfileEntry.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileEntry.setDescription('')
sonusUserProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusUserProfileIndex.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileIndex.setDescription('Identifies the target profile entry.')
sonusUserProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 2), SonusName()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileName.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileName.setDescription('The name of this user profile. This object is required to create the table entry.')
sonusUserProfileUserState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 3), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserState.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserState.setDescription('The administrative state of this profiled user entry.')
sonusUserProfileUserPasswd = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(4, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserPasswd.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserPasswd.setDescription('The password for the profiled user entry.')
sonusUserProfileUserComment = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserComment.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserComment.setDescription('The comment that is associated with the profiled user entry.')
sonusUserProfileUserAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 6), SonusAccessLevel()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserAccess.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserAccess.setDescription('The priviledge level of the profiled user entry.')
sonusUserProfileUserCommentState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 7), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserCommentState.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserCommentState.setDescription('Indicates whether the sonusUserProfileUserComment object is present in this user profile.')
sonusUserProfileUserPasswdState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 8), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserPasswdState.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserPasswdState.setDescription('Indicates whether the sonusUserProfileUserPasswd object is present in this user profile.')
sonusUserProfileUserAccessState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 9), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserAccessState.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserAccessState.setDescription('Indicates whether the sonusUserProfileUserAccess object is present in this user profile.')
sonusUserProfileUserStateState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 10), SonusAdminState()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileUserStateState.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileUserStateState.setDescription('Indicates whether the sonusUserProfileUserState object is present in this user profile.')
sonusUserProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 3, 2, 2, 1, 11), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusUserProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusUserProfileRowStatus.setDescription('')
sonusSwLoad = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4))
sonusSwLoadTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1), )
if mibBuilder.loadTexts: sonusSwLoadTable.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadTable.setDescription('This table specifies the hardware type based software load table for the server modules in the node.')
sonusSwLoadEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusSwLoadAdmnIndex"))
if mibBuilder.loadTexts: sonusSwLoadEntry.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadEntry.setDescription('')
sonusSwLoadAdmnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusSwLoadAdmnIndex.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadAdmnIndex.setDescription('Identifies the target software load entry.')
sonusSwLoadAdmnImageName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusSwLoadAdmnImageName.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadAdmnImageName.setDescription('Identifies the name of the image to load for the hardware type identified by sonusSwLoadAdmnHwType.')
sonusSwLoadAdmnHwType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1, 1, 3), ServerTypeID()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusSwLoadAdmnHwType.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadAdmnHwType.setDescription('Identifies the target hardware type for the load image. This object can only be written at row creation.')
sonusSwLoadAdmnRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 1, 1, 4), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusSwLoadAdmnRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadAdmnRowStatus.setDescription('The RowStatus object for this row.')
sonusSwLoadSpecTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2), )
if mibBuilder.loadTexts: sonusSwLoadSpecTable.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecTable.setDescription('This table specifies the hardware type based software load table for the server modules in the node.')
sonusSwLoadSpecEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusSwLoadSpecAdmnShelfIndex"), (0, "SONUS-NODE-MIB", "sonusSwLoadSpecAdmnSlotIndex"))
if mibBuilder.loadTexts: sonusSwLoadSpecEntry.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecEntry.setDescription('')
sonusSwLoadSpecAdmnShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnShelfIndex.setDescription('Identifies the target shelf for this load entry entry.')
sonusSwLoadSpecAdmnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnSlotIndex.setDescription('Identifies the target slot within the chassis for this load entry.')
sonusSwLoadSpecAdmnImageName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnImageName.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnImageName.setDescription('Identifies the name of the image to load.')
sonusSwLoadSpecAdmnRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 4, 2, 1, 4), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnRowStatus.setStatus('current')
if mibBuilder.loadTexts: sonusSwLoadSpecAdmnRowStatus.setDescription('The RowStatus object for this row.')
sonusParam = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5))
sonusParamStatusObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1))
sonusParamSaveSeqNumber = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveSeqNumber.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveSeqNumber.setDescription('The parameter save sequence number assigned to this parameter file.')
sonusParamSaveTimeStart = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveTimeStart.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveTimeStart.setDescription('The system uptime, measured in milliseconds, when the last parameter save cycle started.')
sonusParamSaveTimeStop = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveTimeStop.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveTimeStop.setDescription('The system uptime, measured in milliseconds, when the last parameter save cycle ended.')
sonusParamSaveDuration = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveDuration.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveDuration.setDescription('The measured time in milliseconds to complete the last parameter save cycle.')
sonusParamSaveTotalBytes = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveTotalBytes.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveTotalBytes.setDescription('The number of bytes contained in the last binary parameter file saved.')
sonusParamSaveTotalRecords = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveTotalRecords.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveTotalRecords.setDescription('The number of individual parameter records contained in the last binary parameter file saved.')
sonusParamSaveFilename = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveFilename.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveFilename.setDescription('Identifies the name of the image to load for the hardware type identified by sonusSwLoadAdmnHwType.')
sonusParamSaveState = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("idle", 1), ("synchronize", 2), ("lock", 3), ("holdoff", 4), ("fopen", 5), ("collect", 6), ("fclose", 7), ("done", 8), ("retry", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveState.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveState.setDescription("The current state of the active Management Server's parameter saving process.")
sonusParamLoadServer = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 9), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadServer.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadServer.setDescription('The IP Address of the NFS server from which parameters were loaded from.')
sonusParamLoadFileType = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("primary", 1), ("backup", 2), ("temporary", 3), ("none", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadFileType.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadFileType.setDescription('The type of binary parameter which was loaded. Under normal circumstances, the primary(1) parameter file will always be loaded. When default parameters are used, no parameter file is loaded, and the value none(4) is used for the file type.')
sonusParamLoadStatus = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("defaults", 1), ("success", 2), ("paramError", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadStatus.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadStatus.setDescription('Indicates the status of the last binary parameter file load. The value defaults(1) indicates that parameters were not loaded and that the node began with default parameters. The value success(2) indicates that a binary parameter file was successfully loaded when the node booted. The value paramError(3) indicates that the node attempted to load a binary parameter file and that there was an error in the processing of the file. The node may be running with a partial parameter file when this error is indicated.')
sonusParamLoadSeqNumber = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadSeqNumber.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadSeqNumber.setDescription('')
sonusParamLoadTotalRecords = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadTotalRecords.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadTotalRecords.setDescription('')
sonusParamLoadTotalBytes = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadTotalBytes.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadTotalBytes.setDescription('')
sonusParamLoadDuration = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadDuration.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadDuration.setDescription('')
sonusParamLoadSerialNum = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLoadSerialNum.setStatus('current')
if mibBuilder.loadTexts: sonusParamLoadSerialNum.setDescription('Identifies the serial number of the node which created the parameter file loaded by this node.')
sonusParamSavePrimarySrvrState = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 1), ("failed", 2), ("failing", 3), ("behind", 4), ("current", 5), ("ahead", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSavePrimarySrvrState.setStatus('current')
if mibBuilder.loadTexts: sonusParamSavePrimarySrvrState.setDescription('The current state of parameter saving to this NFS server.')
sonusParamSavePrimarySrvrReason = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))).clone(namedValues=NamedValues(("success", 1), ("create", 2), ("fopen", 3), ("header", 4), ("timer", 5), ("nfs", 6), ("flush", 7), ("write", 8), ("close", 9), ("move", 10), ("memory", 11), ("none", 12)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSavePrimarySrvrReason.setStatus('current')
if mibBuilder.loadTexts: sonusParamSavePrimarySrvrReason.setDescription('The failure code associated with the last parameter save pass to this NFS server.')
sonusParamSaveSecondarySrvrState = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 1), ("failed", 2), ("failing", 3), ("behind", 4), ("current", 5), ("ahead", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveSecondarySrvrState.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveSecondarySrvrState.setDescription('The current state of parameter saving to this NFS server.')
sonusParamSaveSecondarySrvrReason = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))).clone(namedValues=NamedValues(("success", 1), ("create", 2), ("fopen", 3), ("header", 4), ("timer", 5), ("nfs", 6), ("flush", 7), ("write", 8), ("close", 9), ("move", 10), ("memory", 11), ("none", 12)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamSaveSecondarySrvrReason.setStatus('current')
if mibBuilder.loadTexts: sonusParamSaveSecondarySrvrReason.setDescription('The failure code associated with the last parameter save pass to this NFS server.')
sonusParamLastSaveTime = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 1, 21), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusParamLastSaveTime.setStatus('current')
if mibBuilder.loadTexts: sonusParamLastSaveTime.setDescription('Octet string that identifies the GMT timestamp of last successful PIF write. field octects contents range ----- ------- -------- ----- 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..59 7 8 deci-sec 0..9 * Notes: - the value of year is in network-byte order ')
sonusParamAdminObject = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 2))
sonusParamAdmnMaxIncrPifs = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 5, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusParamAdmnMaxIncrPifs.setStatus('current')
if mibBuilder.loadTexts: sonusParamAdmnMaxIncrPifs.setDescription('The maximum of Incremental PIF files saved per NFS server')
sonusNfs = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6))
sonusNfsAdmnTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1), )
if mibBuilder.loadTexts: sonusNfsAdmnTable.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnTable.setDescription('This table specifies the configurable NFS options for each MNS in each shelf.')
sonusNfsAdmnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNfsAdmnShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNfsAdmnSlotIndex"))
if mibBuilder.loadTexts: sonusNfsAdmnEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnEntry.setDescription('')
sonusNfsAdmnShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsAdmnShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnShelfIndex.setDescription('Identifies the target shelf. This object returns the value of sonusNodeShelfStatIndex which was used to index into this table.')
sonusNfsAdmnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsAdmnSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnSlotIndex.setDescription('Identifies the target MNS module slot within the shelf.')
sonusNfsAdmnMountServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noop", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNfsAdmnMountServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnMountServer.setDescription('Mounts the Primary or Secondary NFS server using mount parameters obtained from the NVS Boot parameters sonusBparamNfsPrimary or sonusBparamNfsSecondary, and sonusBparamNfsMountPri or sonusBparamNfsMountSec. Continuous retries will occur until the mount succeeds. This object is always read as noop(1).')
sonusNfsAdmnUnmountServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noop", 1), ("standby", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNfsAdmnUnmountServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnUnmountServer.setDescription('Unmounts the standby NFS server. Note: unmounting this server will disrupt any file I/O currently taking place on it. Continuous retries will occur until the unmount succeeds. This object is always read as noop(1).')
sonusNfsAdmnToggleActiveServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noop", 1), ("toggle", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNfsAdmnToggleActiveServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnToggleActiveServer.setDescription('Toggles the Active NFS server between the Primary and Secondary, provided both servers are currently mounted. This object is always read as noop(1).')
sonusNfsAdmnSetWritable = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noop", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonusNfsAdmnSetWritable.setStatus('current')
if mibBuilder.loadTexts: sonusNfsAdmnSetWritable.setDescription('Clears the perception of a read-only condition on the Primary or Secondary NFS server, so that server will be considered viable as the Active server. This object is always read as noop(1).')
sonusNfsStatTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2), )
if mibBuilder.loadTexts: sonusNfsStatTable.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatTable.setDescription('This table specifies NFS status objects for each MNS in each shelf.')
sonusNfsStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1), ).setIndexNames((0, "SONUS-NODE-MIB", "sonusNfsStatShelfIndex"), (0, "SONUS-NODE-MIB", "sonusNfsStatSlotIndex"))
if mibBuilder.loadTexts: sonusNfsStatEntry.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatEntry.setDescription('')
sonusNfsStatShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatShelfIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatShelfIndex.setDescription('Identifies the target shelf. This object returns the value of sonusNodeShelfStatIndex which was used to index into this table.')
sonusNfsStatSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatSlotIndex.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatSlotIndex.setDescription('Identifies the target MNS module slot within the shelf.')
sonusNfsStatPrimaryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("mounted", 1), ("mounting", 2), ("unmounted", 3), ("unmounting", 4), ("readOnly", 5), ("testing", 6), ("failed", 7), ("invalid", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatPrimaryStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatPrimaryStatus.setDescription('Indicates the mount status of the Primary NFS server: mounted and functioning properly, attemping to mount, indefinitely unmounted, attempting to unmount, mounted but read-only, testing connectivity, server failure, or invalid NFS parameters.')
sonusNfsStatSecondaryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("mounted", 1), ("mounting", 2), ("unmounted", 3), ("unmounting", 4), ("readOnly", 5), ("testing", 6), ("failed", 7), ("invalid", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatSecondaryStatus.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatSecondaryStatus.setDescription('Indicates the mount status of the Secondary NFS server: mounted and functioning properly, attemping to mount, indefinitely unmounted, attempting to unmount, mounted but read-only, testing connectivity, server failure, or invalid NFS parameters.')
sonusNfsStatActiveServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatActiveServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatActiveServer.setDescription('Indicates the current Active NFS server. This may change due to NFS failures or NFS administrative operations.')
sonusNfsStatStandbyServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatStandbyServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatStandbyServer.setDescription('Indicates the current Standby NFS server. This may change due to NFS failures or NFS administrative operations.')
sonusNfsStatPrimaryIP = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 11), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatPrimaryIP.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatPrimaryIP.setDescription('The IP Address of the currently mounted Primary NFS server. This may differ from the NVS settings if the user modified sonusBparamNfsPrimary without unmounting and remounting the Primary server.')
sonusNfsStatSecondaryIP = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 12), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatSecondaryIP.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatSecondaryIP.setDescription('The IP Address of the currently mounted Secondary NFS server. This may differ from the NVS settings if the user modified sonusBparamNfsSecondary without unmounting and remounting the Secondary server.')
sonusNfsStatPrimaryMount = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatPrimaryMount.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatPrimaryMount.setDescription('The mount point currently in use on the Primary NFS server. This may differ from the NVS settings if the user modified sonusBparamNfsMountPri without unmounting and remounting the Primary server.')
sonusNfsStatSecondaryMount = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatSecondaryMount.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatSecondaryMount.setDescription('The mount point currently in use on the Secondary NFS server. This may differ from the NVS settings if the user modified sonusBparamNfsMountSec without unmounting and remounting the Secondary server.')
sonusNfsStatPrimaryLastError = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("badVolumeStructure", 2), ("tooManyFiles", 3), ("volumeFull", 4), ("serverHardError", 5), ("quotaExceeded", 6), ("staleNfsHandle", 7), ("nfsTimeout", 8), ("rpcCanNotSend", 9), ("noAccess", 10), ("other", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatPrimaryLastError.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatPrimaryLastError.setDescription('Last consequential error received from the Primary NFS server. This object is reset to none(1) if the server is remounted.')
sonusNfsStatSecondaryLastError = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 1, 6, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("badVolumeStructure", 2), ("tooManyFiles", 3), ("volumeFull", 4), ("serverHardError", 5), ("quotaExceeded", 6), ("staleNfsHandle", 7), ("nfsTimeout", 8), ("rpcCanNotSend", 9), ("noAccess", 10), ("other", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsStatSecondaryLastError.setStatus('current')
if mibBuilder.loadTexts: sonusNfsStatSecondaryLastError.setDescription('Last consequential error received from the Secondary NFS server. This object is reset to none(1) if the server is remounted.')
sonusNodeMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2))
sonusNodeMIBNotificationsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0))
sonusNodeMIBNotificationsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1))
sonusNfsServer = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsServer.setStatus('current')
if mibBuilder.loadTexts: sonusNfsServer.setDescription('The NFS server referred to by the trap.')
sonusNfsRole = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("standby", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsRole.setStatus('current')
if mibBuilder.loadTexts: sonusNfsRole.setDescription('Role assumed by the NFS server referred to by the trap.')
sonusNfsServerIp = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsServerIp.setStatus('current')
if mibBuilder.loadTexts: sonusNfsServerIp.setDescription('The IP address of the NFS server referred to by the trap.')
sonusNfsServerMount = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsServerMount.setStatus('current')
if mibBuilder.loadTexts: sonusNfsServerMount.setDescription('The mount point used on the NFS server referred to by the trap.')
sonusNfsReason = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("adminOperation", 1), ("serverFailure", 2), ("serverNotWritable", 3), ("serverRecovery", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsReason.setStatus('current')
if mibBuilder.loadTexts: sonusNfsReason.setDescription('The reason for the generation of the trap - administrative operation (mount, unmount, or toggle), server failure, server not writable, or server recovery.')
sonusNfsErrorCode = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("badVolumeStructure", 2), ("tooManyFiles", 3), ("volumeFull", 4), ("serverHardError", 5), ("quotaExceeded", 6), ("staleNfsHandle", 7), ("nfsTimeout", 8), ("rpcCanNotSend", 9), ("noAccess", 10), ("other", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: sonusNfsErrorCode.setStatus('current')
if mibBuilder.loadTexts: sonusNfsErrorCode.setDescription('The NFS error that occurred.')
sonusNodeShelfPowerA48VdcNormalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 1)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfPowerA48VdcNormalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfPowerA48VdcNormalNotification.setDescription('A sonusShelfPowerA48VdcNormal trap indicates that 48V DC source A is operating normally for the specified shelf.')
sonusNodeShelfPowerB48VdcNormalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 2)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfPowerB48VdcNormalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfPowerB48VdcNormalNotification.setDescription('A sonusShelfPowerB48VdcNormal trap indicates that 48V DC source B is operating normally for the specified shelf.')
sonusNodeShelfPowerA48VdcFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 3)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfPowerA48VdcFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfPowerA48VdcFailureNotification.setDescription('A sonusShelfPowerA48VdcFailure trap indicates that 48V DC source A has failed for the specified shelf.')
sonusNodeShelfPowerB48VdcFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 4)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfPowerB48VdcFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfPowerB48VdcFailureNotification.setDescription('A sonusShelfPowerB48VdcFailure trap indicates that 48V DC source A has failed for the specified shelf.')
sonusNodeShelfFanTrayFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 5)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfFanTrayFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfFanTrayFailureNotification.setDescription('A sonusNodeShelfFanTrayFailure trap indicates that the fan controller on the specified shelf is indicating a problem. The Event Log should be examined for more detail. The fan tray should be replaced immediately.')
sonusNodeShelfFanTrayOperationalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 6)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfFanTrayOperationalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfFanTrayOperationalNotification.setDescription('A sonusNodeShelfFanTrayOperational trap indicates that the fan controller is fully operational on the specified shelf.')
sonusNodeShelfFanTrayRemovedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 7)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfFanTrayRemovedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfFanTrayRemovedNotification.setDescription('A sonusNodeShelfFanTrayRemoved trap indicates that the fan tray has been removed from the specified shelf. The fan tray should be replaced as soon as possible to avoid damage to the equipment as a result of overheating.')
sonusNodeShelfFanTrayPresentNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 8)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfFanTrayPresentNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfFanTrayPresentNotification.setDescription('A sonusNodeShelfFanTrayPresent trap indicates that a fan tray is present for the specified shelf.')
sonusNodeShelfIntakeTempWarningNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 9)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfIntakeTempWarningNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfIntakeTempWarningNotification.setDescription('A sonusNodeShelfIntakeTempWarning trap indicates that the intake temperature of the specified shelf has exceeded 45C degrees.')
sonusNodeServerTempWarningNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 10)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerTempWarningNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerTempWarningNotification.setDescription('A sonusNodeServerTempWarning trap indicates that the operating temperature of the specified shelf and slot has exceeded 60C degrees.')
sonusNodeServerTempFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 11)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerTempFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerTempFailureNotification.setDescription('A sonusNodeServerTempFailure trap indicates that the operating temperature of the specified shelf and slot has exceeded 70C degrees. A server module operating for any length of time at this temperature is in danger of being physically damaged. The specified module should be disabled and/or removed from the shelf.')
sonusNodeServerTempNormalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 12)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerTempNormalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerTempNormalNotification.setDescription('A sonusNodeServerTempNormal trap indicates that the operating temperature of the specified shelf and slot has is below 60C degrees.')
sonusNodeServerInsertedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 13)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerInsertedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerInsertedNotification.setDescription('A sonusNodeServerInserted trap indicates that a server module has been inserted in the specified shelf and slot.')
sonusNodeServerRemovedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 14)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerRemovedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerRemovedNotification.setDescription('A sonusNodeServerRemoved trap indicates that a server module has been removed from the specified shelf and slot.')
sonusNodeServerResetNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 15)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerResetNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerResetNotification.setDescription('A sonusNodeServerReset trap indicates that the server module in the specified shelf and slot has been reset.')
sonusNodeServerOperationalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 16)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerOperationalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerOperationalNotification.setDescription('A sonusNodeServerOperational trap indicates that the booting and initialization has completed successfully for the server module in the specified shelf and slot.')
sonusNodeServerPowerFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 17)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerPowerFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerPowerFailureNotification.setDescription('A sonusNodeServerPowerFailure trap indicates that a power failure has been detected for the server module in the specified shelf and slot.')
sonusNodeServerSoftwareFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 18)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerSoftwareFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerSoftwareFailureNotification.setDescription('A sonusNodeServerSoftwareFailure trap indicates that a software failure has occurred or the server module in the specified shelf and slot. The EventLog should be viewed for possible additional information.')
sonusNodeServerHardwareFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 19)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerHardwareFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerHardwareFailureNotification.setDescription('A sonusNodeServerHardwareFailure trap indicates that a hardware failure has occurred or the server module in the specified shelf and slot. The EventLog should be viewed for possible additional information.')
sonusNodeAdapterInsertedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 20)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeAdapterInsertedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapterInsertedNotification.setDescription('A sonusNodeAdapterInserted trap indicates that an adapter module has been inserted in the specified shelf and slot.')
sonusNodeAdapterRemovedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 21)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeAdapterRemovedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapterRemovedNotification.setDescription('A sonusNodeAdpaterRemoved trap indicates that an adapter module has been removed from the specified shelf and slot.')
sonusNodeMtaInsertedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 22)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeMtaInsertedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeMtaInsertedNotification.setDescription('A sonusNodeMtaInserted trap indicates that a Management Timing Adapter has been inserted in the specified shelf and slot.')
sonusNodeMtaRemovedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 23)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeMtaRemovedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeMtaRemovedNotification.setDescription('A sonusNodeMtaRemoved trap indicates that a Management Timing Adapter has been removed from the specified shelf and slot.')
sonusNodeEthernetActiveNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 24)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusPortIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeEthernetActiveNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeEthernetActiveNotification.setDescription('A sonusNodeEthernetActive trap indicates that an Ethernet link is active for the specified shelf, slot and port.')
sonusNodeEthernetInactiveNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 25)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusPortIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeEthernetInactiveNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeEthernetInactiveNotification.setDescription('A sonusNodeEthernetInactive trap indicates that an Ethernet link is inactive for the specified shelf, slot and port.')
sonusNodeEthernetDegradedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 26)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusPortIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeEthernetDegradedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeEthernetDegradedNotification.setDescription('A sonusNodeEthernetDegraded trap indicates that an Ethernet link is detecting network errors for the specified shelf, slot and port. The EventLog should be viewed for possible additional information.')
sonusNodeBootNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 27)).setObjects(("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeBootNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeBootNotification.setDescription("The Management Node Server module, in the node's master shelf, has begun the Node Boot process.")
sonusNodeSlaveShelfBootNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 28)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeSlaveShelfBootNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlaveShelfBootNotification.setDescription("The Management Node Server module, in a node's slave shelf, has begun the Node Boot process.")
sonusNodeNfsServerSwitchoverNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 29)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-NODE-MIB", "sonusNfsServer"), ("SONUS-NODE-MIB", "sonusNfsServerIp"), ("SONUS-NODE-MIB", "sonusNfsServerMount"), ("SONUS-NODE-MIB", "sonusNfsReason"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeNfsServerSwitchoverNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeNfsServerSwitchoverNotification.setDescription('Indicates that the Active NFS server has switched over to the Standby for the specified reason on the MNS in the given shelf and slot. The NFS server specified is the new Active.')
sonusNodeNfsServerOutOfServiceNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 30)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-NODE-MIB", "sonusNfsServer"), ("SONUS-NODE-MIB", "sonusNfsServerIp"), ("SONUS-NODE-MIB", "sonusNfsServerMount"), ("SONUS-NODE-MIB", "sonusNfsReason"), ("SONUS-NODE-MIB", "sonusNfsErrorCode"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeNfsServerOutOfServiceNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeNfsServerOutOfServiceNotification.setDescription('Indicates that the NFS server specified went out-of-service for the reason provided on the MNS in the given shelf and slot. If it was the result of a server failure, the error that caused the failure is also specified.')
sonusNodeNfsServerInServiceNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 31)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-NODE-MIB", "sonusNfsServer"), ("SONUS-NODE-MIB", "sonusNfsServerIp"), ("SONUS-NODE-MIB", "sonusNfsServerMount"), ("SONUS-NODE-MIB", "sonusNfsReason"), ("SONUS-NODE-MIB", "sonusNfsRole"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeNfsServerInServiceNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeNfsServerInServiceNotification.setDescription('Indicates that the NFS server specified came in-service for the reason provided on the MNS in the given shelf and slot. The Active/Standby role assumed by the server is also provided.')
sonusNodeNfsServerNotWritableNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 32)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-NODE-MIB", "sonusNfsServer"), ("SONUS-NODE-MIB", "sonusNfsServerIp"), ("SONUS-NODE-MIB", "sonusNfsServerMount"), ("SONUS-NODE-MIB", "sonusNfsErrorCode"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeNfsServerNotWritableNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeNfsServerNotWritableNotification.setDescription('Indicates that the NFS server specified is no longer writable by the MNS in the given shelf and slot. The error code received is provided.')
sonusNodeServerDisabledNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 33)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerDisabledNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerDisabledNotification.setDescription('The server modules administrative state has been set to disabled.')
sonusNodeServerEnabledNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 34)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerEnabledNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerEnabledNotification.setDescription('The server modules administrative state has been set to enabled.')
sonusNodeServerDeletedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 35)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeServerDeletedNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeServerDeletedNotification.setDescription("The server module has been deleted from the node's configuration. All configuration data associated with the server module has been deleted.")
sonusParamBackupLoadNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 36)).setObjects(("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusParamBackupLoadNotification.setStatus('current')
if mibBuilder.loadTexts: sonusParamBackupLoadNotification.setDescription('The backup parameter file was loaded. This indicates that the primary parameter file was lost or corrupted. The backup parameter file may contain data which is older than what the primary parameter file contains.')
sonusParamCorruptionNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 37)).setObjects(("SONUS-NODE-MIB", "sonusParamLoadFileType"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusParamCorruptionNotification.setStatus('current')
if mibBuilder.loadTexts: sonusParamCorruptionNotification.setDescription('The binary parameter inspected was corrupted. The indicated file was skipped due to corruption. This trap is only transmitted if a valid backup parameter file is located and successfully loaded.')
sonusNodeAdapterMissingNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 38)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeAdapterMissingNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapterMissingNotification.setDescription('A sonusNodeAdpaterMissing trap indicates that an adapter module has not been detected in a specific shelf and slot.')
sonusNodeAdapterFailureNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 39)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeAdapterFailureNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeAdapterFailureNotification.setDescription('A sonusNodeAdpaterFailure trap indicates that an adapter module has been detected but is not operational.')
sonusNodeSlotResetNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 40)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeSlotResetNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeSlotResetNotification.setDescription('A sonusNodeSlotReset trap indicates that a server module in the designated slot was reset.')
sonusNodeParamWriteCompleteNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 41)).setObjects(("SONUS-NODE-MIB", "sonusParamSaveFilename"), ("SONUS-NODE-MIB", "sonusParamSaveSeqNumber"), ("SONUS-NODE-MIB", "sonusParamLastSaveTime"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeParamWriteCompleteNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeParamWriteCompleteNotification.setDescription('A sonusNodeParamWriteComplete trap indicates that NFS server successfully complete PIF write.')
sonusNodeParamWriteErrorNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 42)).setObjects(("SONUS-NODE-MIB", "sonusParamSavePrimarySrvrReason"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeParamWriteErrorNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeParamWriteErrorNotification.setDescription('A sonusNodeParamWriteError trap indicates that error occured during PIF write.')
sonusNodeBootMnsActiveNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 43)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusSlotIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeBootMnsActiveNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeBootMnsActiveNotification.setDescription('The Management Node Server module in the specified shelf and slot has become active following a Node Boot.')
sonusNodeShelfIntakeTempNormalNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 1, 2, 0, 44)).setObjects(("SONUS-COMMON-MIB", "sonusShelfIndex"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel"))
if mibBuilder.loadTexts: sonusNodeShelfIntakeTempNormalNotification.setStatus('current')
if mibBuilder.loadTexts: sonusNodeShelfIntakeTempNormalNotification.setDescription('A sonusNodeShelfIntakeTempNormal trap indicates that the intake temperature of the specified shelf is at or below 45C degrees.')
mibBuilder.exportSymbols("SONUS-NODE-MIB", sonusNodeSrvrAdmnTable=sonusNodeSrvrAdmnTable, sonusBparamNfsPrimary=sonusBparamNfsPrimary, sonusNodeAdapStatMfgDate=sonusNodeAdapStatMfgDate, sonusNodeSrvrAdmnState=sonusNodeSrvrAdmnState, sonusNfsAdmnSetWritable=sonusNfsAdmnSetWritable, sonusFlashConfigTable=sonusFlashConfigTable, sonusNodeSrvrStatShelfIndex=sonusNodeSrvrStatShelfIndex, sonusBparamIfSpeedTypeSlot2Port0=sonusBparamIfSpeedTypeSlot2Port0, sonusParamLastSaveTime=sonusParamLastSaveTime, sonusNodeSrvrStatUserName=sonusNodeSrvrStatUserName, sonusNodeAdapStatShelfIndex=sonusNodeAdapStatShelfIndex, sonusUserProfileUserAccess=sonusUserProfileUserAccess, sonusNfsStatActiveServer=sonusNfsStatActiveServer, sonusNodeSlotAdmnSlotIndex=sonusNodeSlotAdmnSlotIndex, sonusNfsStatTable=sonusNfsStatTable, sonusSwLoadAdmnIndex=sonusSwLoadAdmnIndex, sonusNfsStatSecondaryLastError=sonusNfsStatSecondaryLastError, sonusNodeServerResetNotification=sonusNodeServerResetNotification, sonusNodeShelfPowerB48VdcNormalNotification=sonusNodeShelfPowerB48VdcNormalNotification, sonusNvsConfigTable=sonusNvsConfigTable, sonusNodeShelfStatBackplane=sonusNodeShelfStatBackplane, sonusNodeShelfPowerA48VdcNormalNotification=sonusNodeShelfPowerA48VdcNormalNotification, sonusNodeAdapterFailureNotification=sonusNodeAdapterFailureNotification, sonusNodeSlotAdapState=sonusNodeSlotAdapState, sonusSwLoadAdmnImageName=sonusSwLoadAdmnImageName, sonusNodeAdapStatHwType=sonusNodeAdapStatHwType, sonusNfs=sonusNfs, sonusFlashStatLastStatus=sonusFlashStatLastStatus, sonusNodeServerEnabledNotification=sonusNodeServerEnabledNotification, sonusParamAdmnMaxIncrPifs=sonusParamAdmnMaxIncrPifs, sonusNfsStatPrimaryMount=sonusNfsStatPrimaryMount, sonusSwLoadTable=sonusSwLoadTable, sonusNodeShelfAdmn48VdcAState=sonusNodeShelfAdmn48VdcAState, sonusNodeSrvrStatCpuUtilization=sonusNodeSrvrStatCpuUtilization, sonusNodeSrvrStatPartNum=sonusNodeSrvrStatPartNum, sonusSwLoadSpecAdmnRowStatus=sonusSwLoadSpecAdmnRowStatus, sonusNodeSrvrStatTotalMem=sonusNodeSrvrStatTotalMem, sonusBparamSecName=sonusBparamSecName, sonusNodeSrvrAdmnRowStatus=sonusNodeSrvrAdmnRowStatus, sonusSwLoadAdmnRowStatus=sonusSwLoadAdmnRowStatus, sonusBparamIfSpeedTypeSlot2Port2=sonusBparamIfSpeedTypeSlot2Port2, sonusSwLoad=sonusSwLoad, sonusNodeParamWriteErrorNotification=sonusNodeParamWriteErrorNotification, sonusUserListComment=sonusUserListComment, sonusNodeShelfStatFanSpeed=sonusNodeShelfStatFanSpeed, sonusNodeSrvrStatFreeMem=sonusNodeSrvrStatFreeMem, sonusBparamNfsSecondary=sonusBparamNfsSecondary, sonusNfsAdmnEntry=sonusNfsAdmnEntry, sonusNodeShelfStat48VAStatus=sonusNodeShelfStat48VAStatus, sonusNodeAdapterInsertedNotification=sonusNodeAdapterInsertedNotification, sonusParamLoadTotalBytes=sonusParamLoadTotalBytes, sonusNodeSlotAdmnReset=sonusNodeSlotAdmnReset, sonusBparamCoreLevel=sonusBparamCoreLevel, sonusUserListTable=sonusUserListTable, sonusNodeSrvrStatSwVersionCode=sonusNodeSrvrStatSwVersionCode, sonusUserProfileUserPasswdState=sonusUserProfileUserPasswdState, sonusNfsStatShelfIndex=sonusNfsStatShelfIndex, sonusNodeShelfFanTrayPresentNotification=sonusNodeShelfFanTrayPresentNotification, sonusBparamNfsMountSec=sonusBparamNfsMountSec, sonusNodeServerDeletedNotification=sonusNodeServerDeletedNotification, sonusNodeShelfAdmnRestart=sonusNodeShelfAdmnRestart, sonusBparamIpAddrSlot1Port1=sonusBparamIpAddrSlot1Port1, sonusNodeShelfIntakeTempWarningNotification=sonusNodeShelfIntakeTempWarningNotification, sonusBparamNfsPathUpgrade=sonusBparamNfsPathUpgrade, sonusBparamBaudRate=sonusBparamBaudRate, sonusNodeBootMnsActiveNotification=sonusNodeBootMnsActiveNotification, sonusNodeMIB=sonusNodeMIB, sonusBparamIfSpeedTypeSlot2Port1=sonusBparamIfSpeedTypeSlot2Port1, sonusParamSaveTimeStart=sonusParamSaveTimeStart, sonusParamSaveDuration=sonusParamSaveDuration, sonusBparamIpAddrSlot2Port0=sonusBparamIpAddrSlot2Port0, sonusNodeShelfFanTrayRemovedNotification=sonusNodeShelfFanTrayRemovedNotification, sonusParamLoadSeqNumber=sonusParamLoadSeqNumber, sonusUserListNextIndex=sonusUserListNextIndex, sonusSwLoadSpecAdmnShelfIndex=sonusSwLoadSpecAdmnShelfIndex, sonusNodeSrvrStatSerialNum=sonusNodeSrvrStatSerialNum, sonusNodeShelfFanTrayFailureNotification=sonusNodeShelfFanTrayFailureNotification, sonusNodeShelfStatEntry=sonusNodeShelfStatEntry, sonusBparamBootDelay=sonusBparamBootDelay, sonusUserProfileUserStateState=sonusUserProfileUserStateState, sonusBparamIpAddrSlot1Port0=sonusBparamIpAddrSlot1Port0, sonusNfsStatPrimaryStatus=sonusNfsStatPrimaryStatus, sonusNodeServerSoftwareFailureNotification=sonusNodeServerSoftwareFailureNotification, sonusNodeSrvrStatViewName=sonusNodeSrvrStatViewName, sonusNodeSlotAdmnTable=sonusNodeSlotAdmnTable, sonusBparamIpMaskSlot1Port1=sonusBparamIpMaskSlot1Port1, sonusNodeSrvrStatMode=sonusNodeSrvrStatMode, sonusParamBackupLoadNotification=sonusParamBackupLoadNotification, sonusNodeShelfIntakeTempNormalNotification=sonusNodeShelfIntakeTempNormalNotification, sonusParamSaveTimeStop=sonusParamSaveTimeStop, sonusParamSaveSeqNumber=sonusParamSaveSeqNumber, sonusNodeSrvrStatTable=sonusNodeSrvrStatTable, sonusNodeStatMgmtStatus=sonusNodeStatMgmtStatus, sonusNodeSrvrAdmnEntry=sonusNodeSrvrAdmnEntry, sonusNodeMtaRemovedNotification=sonusNodeMtaRemovedNotification, sonusNodeSlotAdapHwType=sonusNodeSlotAdapHwType, sonusNodeSrvrStatMfgDate=sonusNodeSrvrStatMfgDate, sonusNfsStatSecondaryIP=sonusNfsStatSecondaryIP, sonusBparamIpGatewaySlot1Port0=sonusBparamIpGatewaySlot1Port0, sonusNodeMtaInsertedNotification=sonusNodeMtaInsertedNotification, sonusBparamIpGatewaySlot1Port1=sonusBparamIpGatewaySlot1Port1, sonusBparamIfSpeedTypeSlot1Port0=sonusBparamIfSpeedTypeSlot1Port0, sonusNode=sonusNode, sonusNodeSrvrAdmnDumpState=sonusNodeSrvrAdmnDumpState, sonusFlashStatState=sonusFlashStatState, sonusBparamIpAddrSlot1Port2=sonusBparamIpAddrSlot1Port2, sonusNodeSrvrStatSlotIndex=sonusNodeSrvrStatSlotIndex, sonusNfsAdmnUnmountServer=sonusNfsAdmnUnmountServer, sonusNodeShelfAdmnEntry=sonusNodeShelfAdmnEntry, sonusNodeBootNotification=sonusNodeBootNotification, sonusUserListUserName=sonusUserListUserName, sonusNodeSlotTable=sonusNodeSlotTable, sonusParamCorruptionNotification=sonusParamCorruptionNotification, sonusNodeShelfStatType=sonusNodeShelfStatType, sonusSwLoadSpecEntry=sonusSwLoadSpecEntry, sonusNodeStatNextIfIndex=sonusNodeStatNextIfIndex, sonusNodeSlotState=sonusNodeSlotState, sonusUserListAccess=sonusUserListAccess, sonusNodeSrvrAdmnAdapHwType=sonusNodeSrvrAdmnAdapHwType, sonusNodeAdapStatEntry=sonusNodeAdapStatEntry, sonusNvsConfig=sonusNvsConfig, sonusNodeAdmnTelnetLogin=sonusNodeAdmnTelnetLogin, sonusNodeShelfStat48VBStatus=sonusNodeShelfStat48VBStatus, sonusNodeMIBNotifications=sonusNodeMIBNotifications, sonusUserListProfileName=sonusUserListProfileName, sonusNodeNfsServerSwitchoverNotification=sonusNodeNfsServerSwitchoverNotification, sonusNodeSlaveShelfBootNotification=sonusNodeSlaveShelfBootNotification, sonusUserProfileUserAccessState=sonusUserProfileUserAccessState, sonusNodeSrvrAdmnMode=sonusNodeSrvrAdmnMode, sonusBparamIpMaskSlot2Port2=sonusBparamIpMaskSlot2Port2, sonusParamSaveTotalBytes=sonusParamSaveTotalBytes, sonusNodeShelfFanTrayOperationalNotification=sonusNodeShelfFanTrayOperationalNotification, sonusBparamIfSpeedTypeSlot1Port1=sonusBparamIfSpeedTypeSlot1Port1, sonusUserProfileRowStatus=sonusUserProfileRowStatus, sonusNodeShelfPowerB48VdcFailureNotification=sonusNodeShelfPowerB48VdcFailureNotification, sonusParamSaveState=sonusParamSaveState, sonusFlashAdmnSlotIndex=sonusFlashAdmnSlotIndex, sonusBparamIpGatewaySlot2Port0=sonusBparamIpGatewaySlot2Port0, sonusNodeAdapStatSlotIndex=sonusNodeAdapStatSlotIndex, sonusNodeAdapStatPartNumRev=sonusNodeAdapStatPartNumRev, sonusBparamIpGatewaySlot2Port2=sonusBparamIpGatewaySlot2Port2, sonusBparamNfsMountPri=sonusBparamNfsMountPri, sonusNodeSrvrAdmnAction=sonusNodeSrvrAdmnAction, sonusNfsServer=sonusNfsServer, sonusUserProfileEntry=sonusUserProfileEntry, sonusNodeServerRemovedNotification=sonusNodeServerRemovedNotification, sonusFlashStatusTable=sonusFlashStatusTable, sonusSwLoadSpecAdmnSlotIndex=sonusSwLoadSpecAdmnSlotIndex, sonusUserProfileUserCommentState=sonusUserProfileUserCommentState, sonusBparamShelfIndex=sonusBparamShelfIndex, sonusParamLoadTotalRecords=sonusParamLoadTotalRecords, sonusBparamNfsPathLoad=sonusBparamNfsPathLoad, sonusUserListStatusLastConfigChange=sonusUserListStatusLastConfigChange, sonusNodeParamWriteCompleteNotification=sonusNodeParamWriteCompleteNotification, sonusNodeShelfAdmnTable=sonusNodeShelfAdmnTable, sonusNodeStatShelvesPresent=sonusNodeStatShelvesPresent, sonusUserListEntry=sonusUserListEntry, sonusNodeAdapStatPartNum=sonusNodeAdapStatPartNum, sonusNodeServerTempFailureNotification=sonusNodeServerTempFailureNotification, sonusNodeAdapStatSerialNum=sonusNodeAdapStatSerialNum, sonusFlashConfigEntry=sonusFlashConfigEntry, sonusNodeShelfAdmn48VdcBState=sonusNodeShelfAdmn48VdcBState, sonusNfsStatSecondaryMount=sonusNfsStatSecondaryMount, sonusUserProfileUserState=sonusUserProfileUserState, sonusNodeSrvrStatEpldRev=sonusNodeSrvrStatEpldRev, sonusNodeSrvrAdmnSpecialFunction=sonusNodeSrvrAdmnSpecialFunction, sonusNodeSrvrStatFlashVersion=sonusNodeSrvrStatFlashVersion, sonusSwLoadSpecTable=sonusSwLoadSpecTable, sonusParamSaveTotalRecords=sonusParamSaveTotalRecords, sonusNodeSrvrStatFreeSharedMem=sonusNodeSrvrStatFreeSharedMem, sonusNodeNfsServerInServiceNotification=sonusNodeNfsServerInServiceNotification, sonusBparamCliScript=sonusBparamCliScript, sonusNodeSrvrStatTemperature=sonusNodeSrvrStatTemperature, sonusParamSaveSecondarySrvrReason=sonusParamSaveSecondarySrvrReason, sonusFlashStatSlotIndex=sonusFlashStatSlotIndex, sonusNodeNfsServerOutOfServiceNotification=sonusNodeNfsServerOutOfServiceNotification, sonusNodeShelfAdmnIpaddr1=sonusNodeShelfAdmnIpaddr1, sonusBparamParamMode=sonusBparamParamMode, sonusBparamIpMaskSlot1Port0=sonusBparamIpMaskSlot1Port0, sonusNodeShelfStatTable=sonusNodeShelfStatTable, sonusUser=sonusUser, sonusNodeServerPowerFailureNotification=sonusNodeServerPowerFailureNotification, sonusParamSaveSecondarySrvrState=sonusParamSaveSecondarySrvrState, sonusFlashAdmnUpdateButton=sonusFlashAdmnUpdateButton, sonusNodeEthernetDegradedNotification=sonusNodeEthernetDegradedNotification, sonusNodeServerOperationalNotification=sonusNodeServerOperationalNotification, sonusNfsAdmnToggleActiveServer=sonusNfsAdmnToggleActiveServer, sonusParamLoadSerialNum=sonusParamLoadSerialNum, sonusBparamPrimName=sonusBparamPrimName, sonusNodeSrvrStatHostName=sonusNodeSrvrStatHostName, sonusUserListStatusTable=sonusUserListStatusTable, sonusNodeNfsServerNotWritableNotification=sonusNodeNfsServerNotWritableNotification, sonusNfsAdmnMountServer=sonusNfsAdmnMountServer, sonusNodeServerTempNormalNotification=sonusNodeServerTempNormalNotification, sonusParamLoadFileType=sonusParamLoadFileType, sonusNodeSrvrStatSwVersion=sonusNodeSrvrStatSwVersion, sonusUserListStatusIndex=sonusUserListStatusIndex, sonusNfsServerMount=sonusNfsServerMount, sonusFlashStatusEntry=sonusFlashStatusEntry, sonusNodeShelfPowerA48VdcFailureNotification=sonusNodeShelfPowerA48VdcFailureNotification, sonusBparamUId=sonusBparamUId, sonusNfsStatSlotIndex=sonusNfsStatSlotIndex, sonusNodeSrvrAdmnDryupLimit=sonusNodeSrvrAdmnDryupLimit, sonusUserListPasswd=sonusUserListPasswd, sonusNodeSrvrStatMemUtilization=sonusNodeSrvrStatMemUtilization, sonusUserProfileNextIndex=sonusUserProfileNextIndex, sonusNodeSrvrAdmnHwType=sonusNodeSrvrAdmnHwType, sonusUserProfileName=sonusUserProfileName, sonusUserProfile=sonusUserProfile, sonusNodeAdapStatMiddVersion=sonusNodeAdapStatMiddVersion, sonusUserProfileTable=sonusUserProfileTable, sonusNodeAdmnObjects=sonusNodeAdmnObjects, sonusFlashAdmnShelfIndex=sonusFlashAdmnShelfIndex, sonusBparamIpMaskSlot1Port2=sonusBparamIpMaskSlot1Port2, sonusNodeEthernetActiveNotification=sonusNodeEthernetActiveNotification, sonusNodeShelfStatSlots=sonusNodeShelfStatSlots, sonusNodeServerTempWarningNotification=sonusNodeServerTempWarningNotification, sonusNodeShelfAdmnState=sonusNodeShelfAdmnState, sonusNodeMIBObjects=sonusNodeMIBObjects, sonusNodeSrvrAdmnRedundancyRole=sonusNodeSrvrAdmnRedundancyRole, sonusNfsAdmnShelfIndex=sonusNfsAdmnShelfIndex, sonusParam=sonusParam, sonusNfsStatEntry=sonusNfsStatEntry, sonusFlashStatShelfIndex=sonusFlashStatShelfIndex, sonusNfsStatStandbyServer=sonusNfsStatStandbyServer, sonusNodeSlotHwType=sonusNodeSlotHwType, sonusNodeShelfAdmnStatus=sonusNodeShelfAdmnStatus, sonusBparamPasswd=sonusBparamPasswd, sonusNodeSlotHwTypeRev=sonusNodeSlotHwTypeRev, sonusParamSaveFilename=sonusParamSaveFilename, sonusNodeSlotAdmnEntry=sonusNodeSlotAdmnEntry, sonusNodeSrvrAdmnShelfIndex=sonusNodeSrvrAdmnShelfIndex, sonusBparamCoreState=sonusBparamCoreState, sonusNfsServerIp=sonusNfsServerIp, sonusNodeSrvrStatEntry=sonusNodeSrvrStatEntry, sonusBparamUnused=sonusBparamUnused, sonusBparamCoreDumpLimit=sonusBparamCoreDumpLimit, sonusUserList=sonusUserList, sonusNodeServerInsertedNotification=sonusNodeServerInsertedNotification, sonusNfsStatPrimaryLastError=sonusNfsStatPrimaryLastError, sonusNodeMIBNotificationsObjects=sonusNodeMIBNotificationsObjects, sonusSwLoadEntry=sonusSwLoadEntry, sonusNodeShelfStatFan=sonusNodeShelfStatFan, sonusNodeShelfStatSerialNumber=sonusNodeShelfStatSerialNumber, sonusSwLoadSpecAdmnImageName=sonusSwLoadSpecAdmnImageName, sonusBparamIfSpeedTypeSlot1Port2=sonusBparamIfSpeedTypeSlot1Port2, sonusBparamIpAddrSlot2Port1=sonusBparamIpAddrSlot2Port1, sonusNfsRole=sonusNfsRole, sonusNodeSlotResetNotification=sonusNodeSlotResetNotification, sonusParamStatusObjects=sonusParamStatusObjects, sonusUserListRowStatus=sonusUserListRowStatus, sonusNfsStatSecondaryStatus=sonusNfsStatSecondaryStatus, sonusBparamNfsPathSoftware=sonusBparamNfsPathSoftware, sonusUserListIndex=sonusUserListIndex)
mibBuilder.exportSymbols("SONUS-NODE-MIB", sonusBparamIpAddrSlot2Port2=sonusBparamIpAddrSlot2Port2, sonusNvsConfigEntry=sonusNvsConfigEntry, sonusNodeAdapStatHwTypeRev=sonusNodeAdapStatHwTypeRev, sonusNodeShelfAdmnIndex=sonusNodeShelfAdmnIndex, sonusSwLoadAdmnHwType=sonusSwLoadAdmnHwType, sonusNodeSlotPower=sonusNodeSlotPower, sonusParamLoadDuration=sonusParamLoadDuration, sonusNodeMIBNotificationsPrefix=sonusNodeMIBNotificationsPrefix, sonusNodeSrvrStatBuildNum=sonusNodeSrvrStatBuildNum, sonusUserProfileUserPasswd=sonusUserProfileUserPasswd, sonusParamLoadStatus=sonusParamLoadStatus, sonusNfsAdmnTable=sonusNfsAdmnTable, sonusNodeShelfAdmnIpaddr2=sonusNodeShelfAdmnIpaddr2, sonusNodeSlotShelfIndex=sonusNodeSlotShelfIndex, sonusNodeAdapterRemovedNotification=sonusNodeAdapterRemovedNotification, sonusNodeSrvrStatPartNumRev=sonusNodeSrvrStatPartNumRev, sonusBparamMasterState=sonusBparamMasterState, PYSNMP_MODULE_ID=sonusNodeMIB, sonusNodeStatusObjects=sonusNodeStatusObjects, sonusNodeAdapStatTable=sonusNodeAdapStatTable, sonusBparamGrpId=sonusBparamGrpId, sonusNfsReason=sonusNfsReason, sonusNodeSrvrStatHwTypeRev=sonusNodeSrvrStatHwTypeRev, sonusNodeAdmnShelves=sonusNodeAdmnShelves, sonusParamSavePrimarySrvrState=sonusParamSavePrimarySrvrState, sonusNodeShelfAdmnRowStatus=sonusNodeShelfAdmnRowStatus, sonusNodeSlotEntry=sonusNodeSlotEntry, sonusUserProfileUserComment=sonusUserProfileUserComment, sonusNodeSrvrStatTotalSharedMem=sonusNodeSrvrStatTotalSharedMem, sonusBparamIpGatewaySlot1Port2=sonusBparamIpGatewaySlot1Port2, sonusNodeSrvrAdmnSlotIndex=sonusNodeSrvrAdmnSlotIndex, sonusBparamIpGatewaySlot2Port1=sonusBparamIpGatewaySlot2Port1, sonusNodeSrvrStatMiddVersion=sonusNodeSrvrStatMiddVersion, sonusParamLoadServer=sonusParamLoadServer, sonusParamSavePrimarySrvrReason=sonusParamSavePrimarySrvrReason, sonusUserProfileIndex=sonusUserProfileIndex, sonusNfsAdmnSlotIndex=sonusNfsAdmnSlotIndex, sonusNodeSlotAdmnShelfIndex=sonusNodeSlotAdmnShelfIndex, sonusNodeAdapterMissingNotification=sonusNodeAdapterMissingNotification, sonusNodeSlotIndex=sonusNodeSlotIndex, sonusNodeShelfStatIndex=sonusNodeShelfStatIndex, sonusUserListState=sonusUserListState, sonusNodeEthernetInactiveNotification=sonusNodeEthernetInactiveNotification, sonusNodeServerHardwareFailureNotification=sonusNodeServerHardwareFailureNotification, sonusNodeShelfStatBootCount=sonusNodeShelfStatBootCount, sonusNfsErrorCode=sonusNfsErrorCode, sonusBparamIpMaskSlot2Port0=sonusBparamIpMaskSlot2Port0, sonusParamAdminObject=sonusParamAdminObject, sonusNodeServerDisabledNotification=sonusNodeServerDisabledNotification, sonusNodeSrvrStatHwType=sonusNodeSrvrStatHwType, sonusNodeShelfStatTemperature=sonusNodeShelfStatTemperature, sonusUserListStatusEntry=sonusUserListStatusEntry, sonusBparamIpMaskSlot2Port1=sonusBparamIpMaskSlot2Port1, sonusNfsStatPrimaryIP=sonusNfsStatPrimaryIP)
|
r"""
Crystals
========
Quickref
--------
.. TODO:: Write it!
Introductory material
---------------------
- :ref:`sage.combinat.crystals.crystals`
- The `Lie Methods and Related Combinatorics <../../../../../thematic_tutorials/lie.html>`_ thematic tutorial
Catalogs of crystals
--------------------
- :ref:`sage.combinat.crystals.catalog`
See also
--------
- The categories for crystals: :class:`Crystals`, :class:`HighestWeightCrystals`, :class:`FiniteCrystals`, :class:`ClassicalCrystals`, :class:`RegularCrystals` -- The categories for crystals
- :ref:`sage.combinat.root_system`
"""
|
# Lesson2: Operators with strings
# source: code/strings_operators.py
a = 'hello'
b = 'class'
c = ''
c = a + b
print(c)
c = a * 5
print(c)
c = 10 * b
print(c)
|
frase = str(input('Digite uma frase: ')).upper().replace(' ', '')
inverso = frase[::-1]
print(f'O inverso de {frase} é {inverso}')
if frase == inverso:
print('A frase é um palindromo')
else:
print('A frase não é um palindromo')
|
# CPU: 0.05 s
instructions = input()
nop_count = 0
idx = 0
for char in instructions:
if char.isupper() and idx % 4 != 0:
add = 4 * (idx // 4 + 1) - idx
idx += add
nop_count += add
idx += 1
print(nop_count)
|
#
# PySNMP MIB module BayNetworks-AHB-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BayNetworks-AHB-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:25:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter64, IpAddress, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, NotificationType, Integer32, Counter32, Gauge32, ModuleIdentity, iso, ObjectIdentity, TimeTicks, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "IpAddress", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "NotificationType", "Integer32", "Counter32", "Gauge32", "ModuleIdentity", "iso", "ObjectIdentity", "TimeTicks", "Unsigned32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
wfAtmHalfBridgeGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfAtmHalfBridgeGroup")
class MacAddress(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6)
fixedLength = 6
wfAhb = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1))
wfAhbDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbDelete.setStatus('mandatory')
wfAhbDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbDisable.setStatus('mandatory')
wfAhbAutoLearnMethod = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("unsecure", 2), ("secure", 3), ("both", 4))).clone('both')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbAutoLearnMethod.setStatus('mandatory')
wfAhbInitFile = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbInitFile.setStatus('mandatory')
wfAhbAltInitFile = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbAltInitFile.setStatus('mandatory')
wfAhbDebugLevel = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbDebugLevel.setStatus('mandatory')
wfAhbInboundFiltDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbInboundFiltDisable.setStatus('mandatory')
wfAhbReset = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notreset", 1), ("reset", 2))).clone('notreset')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbReset.setStatus('mandatory')
wfAhbStatNumNets = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 9), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatNumNets.setStatus('mandatory')
wfAhbStatNumHosts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatNumHosts.setStatus('mandatory')
wfAhbStatTotOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatTotOutPkts.setStatus('mandatory')
wfAhbStatFwdOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatFwdOutPkts.setStatus('mandatory')
wfAhbStatDropUnkPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatDropUnkPkts.setStatus('mandatory')
wfAhbStatTotInPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatTotInPkts.setStatus('mandatory')
wfAhbStatFwdInPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatFwdInPkts.setStatus('mandatory')
wfAhbStatNumHostCopies = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbStatNumHostCopies.setStatus('mandatory')
wfAhbPolicyDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyDisable.setStatus('mandatory')
wfAhbBaseStatus = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpres", 4))).clone('notpres')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbBaseStatus.setStatus('mandatory')
wfAhbCctTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2), )
if mibBuilder.loadTexts: wfAhbCctTable.setStatus('mandatory')
wfAhbCctEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1), ).setIndexNames((0, "BayNetworks-AHB-MIB", "wfAhbCctNum"))
if mibBuilder.loadTexts: wfAhbCctEntry.setStatus('mandatory')
wfAhbCctDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbCctDelete.setStatus('mandatory')
wfAhbCctDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbCctDisable.setStatus('mandatory')
wfAhbCctNum = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctNum.setStatus('mandatory')
wfAhbCctDefSubNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 4), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbCctDefSubNetMask.setStatus('mandatory')
wfAhbCctProxyArpDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbCctProxyArpDisable.setStatus('mandatory')
wfAhbCctMaxIdleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(5, 3600))).clone(namedValues=NamedValues(("minimum", 5), ("default", 3600))).clone('default')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbCctMaxIdleTime.setStatus('mandatory')
wfAhbCctStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2))).clone('down')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctStatus.setStatus('mandatory')
wfAhbCctTxPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctTxPkts.setStatus('mandatory')
wfAhbCctTxDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctTxDrop.setStatus('mandatory')
wfAhbCctRxPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctRxPkts.setStatus('mandatory')
wfAhbCctRxDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 2, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbCctRxDrop.setStatus('mandatory')
wfAhbHostTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3), )
if mibBuilder.loadTexts: wfAhbHostTable.setStatus('mandatory')
wfAhbHostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1), ).setIndexNames((0, "BayNetworks-AHB-MIB", "wfAhbHostSlot"), (0, "BayNetworks-AHB-MIB", "wfAhbHostIpAddress"))
if mibBuilder.loadTexts: wfAhbHostEntry.setStatus('mandatory')
wfAhbHostDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostDelete.setStatus('mandatory')
wfAhbHostSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbHostSlot.setStatus('mandatory')
wfAhbHostSeqNum = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostSeqNum.setStatus('mandatory')
wfAhbHostIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 4), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbHostIpAddress.setStatus('mandatory')
wfAhbHostSubNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 5), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostSubNetMask.setStatus('mandatory')
wfAhbHostCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostCct.setStatus('mandatory')
wfAhbHostVcid = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostVcid.setStatus('mandatory')
wfAhbHostBridgeHdr = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostBridgeHdr.setStatus('mandatory')
wfAhbHostFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostFlags.setStatus('mandatory')
wfAhbHostTxPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbHostTxPkts.setStatus('mandatory')
wfAhbHostRxPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbHostRxPkts.setStatus('mandatory')
wfAhbHostMaxIdleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbHostMaxIdleTime.setStatus('mandatory')
wfAhbHostCurIdleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 3, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbHostCurIdleTime.setStatus('mandatory')
wfAhbPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4), )
if mibBuilder.loadTexts: wfAhbPolicyTable.setStatus('mandatory')
wfAhbPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1), ).setIndexNames((0, "BayNetworks-AHB-MIB", "wfAhbPolicyIpAddress"), (0, "BayNetworks-AHB-MIB", "wfAhbPolicySubNetMask"))
if mibBuilder.loadTexts: wfAhbPolicyEntry.setStatus('mandatory')
wfAhbPolicyDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyDelete.setStatus('mandatory')
wfAhbPolicyIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbPolicyIpAddress.setStatus('mandatory')
wfAhbPolicySubNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAhbPolicySubNetMask.setStatus('mandatory')
wfAhbPolicyCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyCct.setStatus('mandatory')
wfAhbPolicyVPI = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyVPI.setStatus('mandatory')
wfAhbPolicyVCI = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyVCI.setStatus('mandatory')
wfAhbPolicyMACAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 7), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyMACAddr.setStatus('mandatory')
wfAhbPolicyFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyFlags.setStatus('mandatory')
wfAhbPolicyPermission = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 13, 4, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("allow", 1), ("disallow", 2), ("static", 3), ("notused", 4))).clone('allow')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAhbPolicyPermission.setStatus('mandatory')
mibBuilder.exportSymbols("BayNetworks-AHB-MIB", wfAhbCctStatus=wfAhbCctStatus, wfAhbHostSubNetMask=wfAhbHostSubNetMask, wfAhbPolicyFlags=wfAhbPolicyFlags, wfAhbReset=wfAhbReset, wfAhbStatNumHostCopies=wfAhbStatNumHostCopies, wfAhbPolicyTable=wfAhbPolicyTable, wfAhbAltInitFile=wfAhbAltInitFile, wfAhbPolicyDelete=wfAhbPolicyDelete, wfAhbHostIpAddress=wfAhbHostIpAddress, wfAhbStatNumHosts=wfAhbStatNumHosts, wfAhbDisable=wfAhbDisable, wfAhbPolicyCct=wfAhbPolicyCct, wfAhbCctTxPkts=wfAhbCctTxPkts, wfAhbPolicyVCI=wfAhbPolicyVCI, wfAhbHostEntry=wfAhbHostEntry, wfAhbStatFwdOutPkts=wfAhbStatFwdOutPkts, wfAhbCctNum=wfAhbCctNum, wfAhbHostVcid=wfAhbHostVcid, wfAhbCctTxDrop=wfAhbCctTxDrop, wfAhb=wfAhb, wfAhbCctDisable=wfAhbCctDisable, wfAhbPolicyVPI=wfAhbPolicyVPI, wfAhbStatTotInPkts=wfAhbStatTotInPkts, wfAhbPolicyIpAddress=wfAhbPolicyIpAddress, wfAhbPolicyDisable=wfAhbPolicyDisable, wfAhbHostTable=wfAhbHostTable, MacAddress=MacAddress, wfAhbCctMaxIdleTime=wfAhbCctMaxIdleTime, wfAhbCctRxDrop=wfAhbCctRxDrop, wfAhbDebugLevel=wfAhbDebugLevel, wfAhbStatDropUnkPkts=wfAhbStatDropUnkPkts, wfAhbBaseStatus=wfAhbBaseStatus, wfAhbCctDefSubNetMask=wfAhbCctDefSubNetMask, wfAhbPolicyPermission=wfAhbPolicyPermission, wfAhbStatTotOutPkts=wfAhbStatTotOutPkts, wfAhbHostCct=wfAhbHostCct, wfAhbCctDelete=wfAhbCctDelete, wfAhbHostRxPkts=wfAhbHostRxPkts, wfAhbHostMaxIdleTime=wfAhbHostMaxIdleTime, wfAhbCctTable=wfAhbCctTable, wfAhbPolicySubNetMask=wfAhbPolicySubNetMask, wfAhbHostTxPkts=wfAhbHostTxPkts, wfAhbAutoLearnMethod=wfAhbAutoLearnMethod, wfAhbHostSeqNum=wfAhbHostSeqNum, wfAhbInitFile=wfAhbInitFile, wfAhbHostBridgeHdr=wfAhbHostBridgeHdr, wfAhbHostSlot=wfAhbHostSlot, wfAhbDelete=wfAhbDelete, wfAhbCctEntry=wfAhbCctEntry, wfAhbPolicyEntry=wfAhbPolicyEntry, wfAhbInboundFiltDisable=wfAhbInboundFiltDisable, wfAhbHostDelete=wfAhbHostDelete, wfAhbStatNumNets=wfAhbStatNumNets, wfAhbStatFwdInPkts=wfAhbStatFwdInPkts, wfAhbPolicyMACAddr=wfAhbPolicyMACAddr, wfAhbHostCurIdleTime=wfAhbHostCurIdleTime, wfAhbHostFlags=wfAhbHostFlags, wfAhbCctRxPkts=wfAhbCctRxPkts, wfAhbCctProxyArpDisable=wfAhbCctProxyArpDisable)
|
a = [1, 2, 3]
a.append(4)
a
a.extend(5)
a
a.extend([5])
a
a.insert(10, 3)
a
a.insert(3, 10)
a
a = [1, 2, 3]
a
a.append(4)
a
a.append(5)
a
a.extend([6, 7])
a
a.extend(8)
help(a.insert)
a.insert(0, 10)
a
a.insert(2, 12)
a
a.remove(10)
a
a.remove(12)
a
a.append(1)
a
a.remove(1)
a
a.remove(1)
a
a.pop(0)
a
a.pop(1)
a
a = [1, 1, 2, 3]
a.clear(1)
a.clear(2)
help(a.clear)
a.clear()
a
a = [1, 2, 3]
a.index(1)
a.index(2)
a = [1, 1, 2, 3]
a.index(1)
a.index(2)
a.count(1)
a.count(2)
a.count(3)
a.sort()
a
a = [3, 1, 2]
a.sort()
a
a.sort(reverse=True)
a
a.copy()
b = a.copy()
b
a
b = a
b
a
b[0] = 100
b
a
|
# *****************************************************************************
# Copyright 2004-2008 Steve Menard
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# *****************************************************************************
class WindowAdapter(object):
def __init__(self, *mth, **kw):
object.__init__(self)
for i, j in kw.items():
setattr(self, i, j)
def windowActivated(self, e):
pass
def windowClosed(self, e):
pass
def windowClosing(self, e):
pass
def windowDeactivated(self, e):
pass
def windowDeiconified(self, e):
pass
def windowIconified(self, e):
pass
def windowOpened(self, e):
pass
|
def run():
@_core.listen('test')
def _():
print('a test 2')
@_core.on('test')
def _():
print('a test')
_emit('test')
_emit('test')
_emit('test')
|
class TestingToolError(Exception):
""" Base exception for all kind of error in the testing tool."""
pass
########################################################################
# Level 2
########################################################################
class UnknownTestError(TestingToolError):
""" The test is not defined in the testing platform."""
pass
class TestFailError(TestingToolError):
"""General exception thrown in case of a test failure."""
def __init__(self, description, test_case, step_name, last_message=None):
"""
:param description: description message of the failure.
:param test_case: name of the test case.
:param step_name: step of the tests.
:param last_message: last message received.
"""
self.last_message = last_message
self.step_name = step_name
self.test_case = test_case
error_msg = description + f"\nTest: {test_case}\nStep: {step_name}\n"
if last_message:
error_msg += f"Last received message: \n{last_message}"
super().__init__(error_msg)
class SessionTerminatedError(TestingToolError):
""" Session terminated by the UI or SO."""
pass
########################################################################
# Level 3
########################################################################
class SessionError(TestFailError):
pass
class ConformanceError(TestFailError):
"""
Test fail because of wrong format of a received message, with some header or field that differs from
the LoRaWAN specification under test.
"""
pass
class InteroperabilityError(TestFailError):
pass
class TimeOutError(TestFailError):
"""
Exception raised when the DUT doesn't send any response after a predefined lapse of time.
"""
pass
########################################################################
# Level 4
########################################################################
class UnknownDeviceError(SessionError):
""" The device was not registered in the testing platform."""
pass
class JoinRejectedError(SessionError):
""" The join request was rejected by the server."""
pass
class UnexpectedResponseError(InteroperabilityError):
""" Exception raised when the received message was not expected in the current step of the executed test."""
pass
class WrongResponseError(InteroperabilityError):
""" Exception raised when a correct test id is received but the content of the message is not correct."""
pass
########################################################################
# Level 5
########################################################################
|
# Python3 program to generate pythagorean
# triplets smaller than a given limit
# Function to generate pythagorean
# triplets smaller than limit
def pythagoreanTriplets(limits) :
c, m = 0, 2
# Limiting c would limit
# all a, b and c
while c < limits :
# Now loop on n from 1 to m-1
for n in range(1, m) :
a = m * m - n * n
b = 2 * m * n
c = m * m + n * n
# if c is greater than
# limit then break it
if c > limits :
break
print(a, b, c)
m = m + 1
# Driver Code
if __name__ == '__main__' :
limit = 20
pythagoreanTriplets(limit)
# This code is contributed by Shrikant13.
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Constants for use in the keystone.conf package.
These constants are shared by more than one module in the keystone.conf
package.
"""
_DEFAULT_AUTH_METHODS = ['external', 'password', 'token', 'oauth1', 'mapped']
_CERTFILE = '/etc/keystone/ssl/certs/signing_cert.pem'
_KEYFILE = '/etc/keystone/ssl/private/signing_key.pem'
|
# https://www.acmicpc.net/problem/2580
def init():
for row in range(N):
for col in range(N):
if data[row][col] == 0:
continue
row_sets[row].add(data[row][col])
for col in range(N):
for row in range(N):
if data[row][col] == 0:
continue
col_sets[col].add(data[row][col])
for row in range(N):
r = row // 3
for col in range(N):
if data[row][col] == 0:
continue
c = col // 3
mid_sets[r * 3 + c].add(data[row][col])
def dfs(depth):
if depth == 81:
return True
y = depth // N
x = depth % N
if data[y][x] != 0:
if dfs(depth + 1):
return True
return False
for num in range(1, 10):
if can_go(y, x, num):
visited(True, num, y, x)
if dfs(depth + 1):
return True
visited(False, num, y, x)
return False
def can_go(row, col, num):
if num in row_sets[row]:
return False
if num in col_sets[col]:
return False
if num in mid_sets[(row // 3) * 3 + (col // 3)]:
return False
return True
def visited(insert, num, row, col):
if insert:
data[row][col] = num
row_sets[row].add(num)
col_sets[col].add(num)
mid_sets[(row // 3) * 3 + (col // 3)].add(num)
else:
data[row][col] = 0
row_sets[row].remove(num)
col_sets[col].remove(num)
mid_sets[(row // 3) * 3 + (col // 3)].remove(num)
if __name__ == '__main__':
input = __import__('sys').stdin.readline
N = 9
data = [list(map(int,input().split())) for _ in range(N)]
row_sets = [set() for _ in range(N)]
col_sets = [set() for _ in range(N)]
mid_sets = [set() for _ in range(N)]
init()
dfs(0)
for line in data:
print(' '.join(map(str, line)))
|
# https://leetcode.com/problems/letter-case-permutation/
# Given a string s, we can transform every letter individually to be lowercase or
# uppercase to create another string.
# Return a list of all possible strings we could create. You can return the output
# in any order.
################################################################################
# dfs
class Solution:
def letterCasePermutation(self, S: str) -> List[str]:
if not S: return []
self.n = len(S)
self.S = S
self.ans = []
self.holder = []
self.dfs(0)
return self.ans
def dfs(self, pos):
if len(self.holder) == self.n:
self.ans.append(''.join(self.holder))
return
if "0" <= self.S[pos] <= "9": # move to next pos
self.holder.append(self.S[pos])
self.dfs(pos + 1)
self.holder.pop()
else:
for char in [self.S[pos].lower(), self.S[pos].upper()]:
self.holder.append(char)
self.dfs(pos + 1)
self.holder.pop()
|
def sockMerchant(n, ar):
# Write your code here
dict_count = {i:ar.count(i) for i in ar}
pairs = 0
for v in dict_count.values():
pairs+=v//2 #to get the quotient, % is used for remainder
#print(pairs, dict_count)
return pairs
a = 9
ar= [10, 20, 20, 10, 10, 30, 50, 10, 20]
print(sockMerchant(a,ar))
|
#
# Copyright 2018 Red Hat | Ansible
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Options for providing an object configuration
class ModuleDocFragment(object):
DOCUMENTATION = '''
options:
resource_definition:
description:
- "Provide a valid YAML definition (either as a string, list, or dict) for an object when creating or updating. NOTE: I(kind), I(api_version), I(name),
and I(namespace) will be overwritten by corresponding values found in the provided I(resource_definition)."
aliases:
- definition
- inline
src:
description:
- "Provide a path to a file containing a valid YAML definition of an object or objects to be created or updated. Mutually
exclusive with I(resource_definition). NOTE: I(kind), I(api_version), I(name), and I(namespace) will be
overwritten by corresponding values found in the configuration read in from the I(src) file."
- Reads from the local file system. To read from the Ansible controller's file system, use the file lookup
plugin or template lookup plugin, combined with the from_yaml filter, and pass the result to
I(resource_definition). See Examples below.
'''
|
"""Apply a simple test to see if the user is old enough to rent a car."""
answer = input('Hello, who are you?\n')
while not all(word.isalpha() for word in answer.split()):
answer = input(
"Names usually contain letters. Let's try this again.\n"
"Hello, who are you?\n"
)
name = answer.title().strip()
answer = input(f'When were you born, {name}?\n')
while not answer.isnumeric():
answer = input(
"Years are usually numeric. Let's try this again.\n"
f"When were you born {name}?\n"
)
year = int(answer)
print(f'Good to meet you, {name}.')
if (age := 2019 - year) >= 21:
print(f'{age} is old enough to rent a car.')
else:
print(f'{age} is too young to rent a car.')
|
"""Errors."""
class ProxyError(Exception):
pass
class NoProxyError(Exception):
pass
class ResolveError(Exception):
pass
class ProxyConnError(ProxyError):
errmsg = 'connection_failed'
class ProxyRecvError(ProxyError):
errmsg = 'connection_is_reset'
class ProxySendError(ProxyError):
errmsg = 'connection_is_reset'
class ProxyTimeoutError(ProxyError):
errmsg = 'connection_timeout'
class ProxyEmptyRecvError(ProxyError):
errmsg = 'empty_response'
class BadStatusError(Exception): # BadStatusLine
errmsg = 'bad_status'
class BadResponseError(Exception):
errmsg = 'bad_response'
class BadStatusLine(Exception):
errmsg = 'bad_status_line'
class ErrorOnStream(Exception):
errmsg = 'error_on_stream'
|
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# CISCO-PPPOE-MIB
# Compiled MIB
# Do not modify this file directly
# Run ./noc mib make_cmib instead
# ----------------------------------------------------------------------
# Copyright (C) 2007-2014 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# MIB Name
NAME = "CISCO-PPPOE-MIB"
# Metadata
LAST_UPDATED = "2011-04-25"
COMPILED = "2014-11-21"
# MIB Data: name -> oid
MIB = {
"CISCO-PPPOE-MIB::ciscoPppoeMIB": "1.3.6.1.4.1.9.9.194",
"CISCO-PPPOE-MIB::ciscoPppoeMIBObjects": "1.3.6.1.4.1.9.9.194.1",
"CISCO-PPPOE-MIB::cPppoeSystemSessionInfo": "1.3.6.1.4.1.9.9.194.1.1",
"CISCO-PPPOE-MIB::cPppoeSystemCurrSessions": "1.3.6.1.4.1.9.9.194.1.1.1",
"CISCO-PPPOE-MIB::cPppoeSystemHighWaterSessions": "1.3.6.1.4.1.9.9.194.1.1.2",
"CISCO-PPPOE-MIB::cPppoeSystemMaxAllowedSessions": "1.3.6.1.4.1.9.9.194.1.1.3",
"CISCO-PPPOE-MIB::cPppoeSystemThresholdSessions": "1.3.6.1.4.1.9.9.194.1.1.4",
"CISCO-PPPOE-MIB::cPppoeSystemExceededSessionErrors": "1.3.6.1.4.1.9.9.194.1.1.5",
"CISCO-PPPOE-MIB::cPppoeSystemPerMacSessionlimit": "1.3.6.1.4.1.9.9.194.1.1.6",
"CISCO-PPPOE-MIB::cPppoeSystemPerMacIWFSessionlimit": "1.3.6.1.4.1.9.9.194.1.1.7",
"CISCO-PPPOE-MIB::cPppoeSystemPerMacThrottleRatelimit": "1.3.6.1.4.1.9.9.194.1.1.8",
"CISCO-PPPOE-MIB::cPppoeSystemPerVLANlimit": "1.3.6.1.4.1.9.9.194.1.1.9",
"CISCO-PPPOE-MIB::cPppoeSystemPerVLANthrottleRatelimit": "1.3.6.1.4.1.9.9.194.1.1.10",
"CISCO-PPPOE-MIB::cPppoeSystemPerVClimit": "1.3.6.1.4.1.9.9.194.1.1.11",
"CISCO-PPPOE-MIB::cPppoeSystemPerVCThrottleRatelimit": "1.3.6.1.4.1.9.9.194.1.1.12",
"CISCO-PPPOE-MIB::cPppoeSystemSessionLossThreshold": "1.3.6.1.4.1.9.9.194.1.1.13",
"CISCO-PPPOE-MIB::cPppoeSystemSessionLossPercent": "1.3.6.1.4.1.9.9.194.1.1.14",
"CISCO-PPPOE-MIB::cPppoeVcCfgInfo": "1.3.6.1.4.1.9.9.194.1.2",
"CISCO-PPPOE-MIB::cPppoeVcCfgTable": "1.3.6.1.4.1.9.9.194.1.2.1",
"CISCO-PPPOE-MIB::cPppoeVcCfgEntry": "1.3.6.1.4.1.9.9.194.1.2.1.1",
"CISCO-PPPOE-MIB::cPppoeVcEnable": "1.3.6.1.4.1.9.9.194.1.2.1.1.1",
"CISCO-PPPOE-MIB::cPppoeVcSessionsInfo": "1.3.6.1.4.1.9.9.194.1.3",
"CISCO-PPPOE-MIB::cPppoeVcSessionsTable": "1.3.6.1.4.1.9.9.194.1.3.1",
"CISCO-PPPOE-MIB::cPppoeVcSessionsEntry": "1.3.6.1.4.1.9.9.194.1.3.1.1",
"CISCO-PPPOE-MIB::cPppoeVcCurrSessions": "1.3.6.1.4.1.9.9.194.1.3.1.1.1",
"CISCO-PPPOE-MIB::cPppoeVcHighWaterSessions": "1.3.6.1.4.1.9.9.194.1.3.1.1.2",
"CISCO-PPPOE-MIB::cPppoeVcMaxAllowedSessions": "1.3.6.1.4.1.9.9.194.1.3.1.1.3",
"CISCO-PPPOE-MIB::cPppoeVcThresholdSessions": "1.3.6.1.4.1.9.9.194.1.3.1.1.4",
"CISCO-PPPOE-MIB::cPppoeVcExceededSessionErrors": "1.3.6.1.4.1.9.9.194.1.3.1.1.5",
"CISCO-PPPOE-MIB::cPppoeSessionsPerInterfaceInfo": "1.3.6.1.4.1.9.9.194.1.4",
"CISCO-PPPOE-MIB::cPppoeSessionsPerInterfaceTable": "1.3.6.1.4.1.9.9.194.1.4.1",
"CISCO-PPPOE-MIB::cPppoeSessionsPerInterfaceEntry": "1.3.6.1.4.1.9.9.194.1.4.1.1",
"CISCO-PPPOE-MIB::cPppoeTotalSessions": "1.3.6.1.4.1.9.9.194.1.4.1.1.1",
"CISCO-PPPOE-MIB::cPppoePtaSessions": "1.3.6.1.4.1.9.9.194.1.4.1.1.2",
"CISCO-PPPOE-MIB::cPppoeFwdedSessions": "1.3.6.1.4.1.9.9.194.1.4.1.1.3",
"CISCO-PPPOE-MIB::cPppoeTransSessions": "1.3.6.1.4.1.9.9.194.1.4.1.1.4",
"CISCO-PPPOE-MIB::cPppoePerInterfaceSessionLossThreshold": "1.3.6.1.4.1.9.9.194.1.4.1.1.5",
"CISCO-PPPOE-MIB::cPppoePerInterfaceSessionLossPercent": "1.3.6.1.4.1.9.9.194.1.4.1.1.6",
"CISCO-PPPOE-MIB::cPppoeSystemSessionNotifyObjects": "1.3.6.1.4.1.9.9.194.1.5",
"CISCO-PPPOE-MIB::cPppoeSystemSessionClientMacAddress": "1.3.6.1.4.1.9.9.194.1.5.1",
"CISCO-PPPOE-MIB::cPppoeSystemSessionVlanID": "1.3.6.1.4.1.9.9.194.1.5.2",
"CISCO-PPPOE-MIB::cPppoeSystemSessionInnerVlanID": "1.3.6.1.4.1.9.9.194.1.5.3",
"CISCO-PPPOE-MIB::cPppoeSystemSessionVci": "1.3.6.1.4.1.9.9.194.1.5.4",
"CISCO-PPPOE-MIB::cPppoeSystemSessionVpi": "1.3.6.1.4.1.9.9.194.1.5.5",
"CISCO-PPPOE-MIB::ciscoPppoeMIBNotificationPrefix": "1.3.6.1.4.1.9.9.194.2",
"CISCO-PPPOE-MIB::ciscoPppoeMIBNotification": "1.3.6.1.4.1.9.9.194.2.0",
"CISCO-PPPOE-MIB::cPppoeSystemSessionThresholdTrap": "1.3.6.1.4.1.9.9.194.2.0.1",
"CISCO-PPPOE-MIB::cPppoeVcSessionThresholdTrap": "1.3.6.1.4.1.9.9.194.2.0.2",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerMACLimitNotif": "1.3.6.1.4.1.9.9.194.2.0.3",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerMACThrottleNotif": "1.3.6.1.4.1.9.9.194.2.0.4",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerVLANLimitNotif": "1.3.6.1.4.1.9.9.194.2.0.5",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerVLANThrottleNotif": "1.3.6.1.4.1.9.9.194.2.0.6",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerVCLimitNotif": "1.3.6.1.4.1.9.9.194.2.0.7",
"CISCO-PPPOE-MIB::cPppoeSystemSessionPerVCThrottleNotif": "1.3.6.1.4.1.9.9.194.2.0.8",
"CISCO-PPPOE-MIB::cPppoeSystemSessionLossThresholdNotif": "1.3.6.1.4.1.9.9.194.2.0.9",
"CISCO-PPPOE-MIB::cPppoePerInterfaceSessionLossThresholdNotif": "1.3.6.1.4.1.9.9.194.2.0.10",
"CISCO-PPPOE-MIB::cPppoeSystemSessionLossPercentNotif": "1.3.6.1.4.1.9.9.194.2.0.11",
"CISCO-PPPOE-MIB::cPppoePerInterfaceSessionLossPercentNotif": "1.3.6.1.4.1.9.9.194.2.0.12",
"CISCO-PPPOE-MIB::ciscoPppoeMIBConformance": "1.3.6.1.4.1.9.9.194.3",
"CISCO-PPPOE-MIB::ciscoPppoeMIBCompliances": "1.3.6.1.4.1.9.9.194.3.1",
"CISCO-PPPOE-MIB::ciscoPppoeMIBGroups": "1.3.6.1.4.1.9.9.194.3.2",
}
|
#!/Anaconda3/python
# -*- coding: UTF-8 -*-
__author__ = 'pedro'
def main(form, session):
html = "<p> Bem-Vindo a interface CGI do canal Ignorância Zero. Escolha uma operação nos menus acima</p>"
return html
|
rows, cols = [int(x) for x in input().split(' ')]
matrix = [input().split() for _ in range(rows)]
cmd = input()
while cmd != 'END':
cmd_args = cmd.split()
if cmd_args[0] != 'swap' or len(cmd_args) != 5:
print('Invalid input!')
cmd = input()
continue
row1, col1 = int(cmd_args[1]), int(cmd_args[2])
row2, col2 = int(cmd_args[3]), int(cmd_args[4])
if row1 >= rows or row2 >= rows or col1 >= cols or col2 >= cols:
print('Invalid input!')
cmd = input()
continue
matrix[row1][col1], matrix[row2][col2] = matrix[row2][col2], matrix[row1][col1]
for i in range(rows):
print(' '.join(matrix[i]))
cmd = input()
|
# #1
# def last(*args):
# last = args[-1]
# try:
# return last[-1]
# except TypeError:
# return last
#2
def last(*args):
try:
return args[-1][-1]
except:
return args[-1]
|
def setup():
size(500, 500)
smooth()
noLoop()
def draw():
background(100)
stroke(142,36,197)
strokeWeight(110)
line(100, 150, 400, 150)
stroke(203,29,163)
strokeWeight(60)
line(100, 250, 400, 250)
stroke(204,27,27)
strokeWeight(110)
line(100, 350, 400, 350)
|
class BadGrammarError(Exception):
pass
class EmptyGrammarError(BadGrammarError):
pass
|
# exceptions.py - exceptions for SQLAlchemy
# Copyright (C) 2005, 2006, 2007 Michael Bayer [email protected]
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
class SQLAlchemyError(Exception):
"""Generic error class."""
pass
class SQLError(SQLAlchemyError):
"""Raised when the execution of a SQL statement fails.
Includes accessors for the underlying exception, as well as the
SQL and bind parameters.
"""
def __init__(self, statement, params, orig):
SQLAlchemyError.__init__(self, "(%s) %s"% (orig.__class__.__name__, str(orig)))
self.statement = statement
self.params = params
self.orig = orig
def __str__(self):
return SQLAlchemyError.__str__(self) + " " + repr(self.statement) + " " + repr(self.params)
class ArgumentError(SQLAlchemyError):
"""Raised for all those conditions where invalid arguments are
sent to constructed objects. This error generally corresponds to
construction time state errors.
"""
pass
class CompileError(SQLAlchemyError):
"""Raised when an error occurs during SQL compilation"""
pass
class TimeoutError(SQLAlchemyError):
"""Raised when a connection pool times out on getting a connection."""
pass
class ConcurrentModificationError(SQLAlchemyError):
"""Raised when a concurrent modification condition is detected."""
pass
class CircularDependencyError(SQLAlchemyError):
"""Raised by topological sorts when a circular dependency is detected"""
pass
class FlushError(SQLAlchemyError):
"""Raised when an invalid condition is detected upon a ``flush()``."""
pass
class InvalidRequestError(SQLAlchemyError):
"""SQLAlchemy was asked to do something it can't do, return
nonexistent data, etc.
This error generally corresponds to runtime state errors.
"""
pass
class NoSuchTableError(InvalidRequestError):
"""SQLAlchemy was asked to load a table's definition from the
database, but the table doesn't exist.
"""
pass
class AssertionError(SQLAlchemyError):
"""Corresponds to internal state being detected in an invalid state."""
pass
class NoSuchColumnError(KeyError, SQLAlchemyError):
"""Raised by ``RowProxy`` when a nonexistent column is requested from a row."""
pass
class DBAPIError(SQLAlchemyError):
"""Something weird happened with a particular DBAPI version."""
def __init__(self, message, orig):
SQLAlchemyError.__init__(self, "(%s) (%s) %s"% (message, orig.__class__.__name__, str(orig)))
self.orig = orig
|
# Tutorial: http://www.learnpython.org/en/Loops
# Loops
# There are two types of loops in Python, for and while.
# The "for" loop
# For loops iterate over a given sequence. Here is an example:
primes = [2, 3, 5, 7]
for prime in primes:
print(prime)
# For loops can iterate over a sequence of numbers using the "range" and "xrange" functions. The difference between range and xrange is that the range function returns a new list with numbers of that specified range, whereas xrange returns an iterator, which is more efficient. (Python 3 uses the range function, which acts like xrange). Note that the range function is zero based.
# Prints out the numbers 0,1,2,3,4
for x in range(5):
print(x)
# Prints out 3,4,5
for x in range(3, 6):
print(x)
# Prints out 3,5,7
for x in range(3, 8, 2):
print(x)
# "while" loops
# While loops repeat as long as a certain boolean condition is met. For example:
# Prints out 0,1,2,3,4
count = 0
while count < 5:
print(count)
count += 1 # This is the same as count = count + 1
# "break" and "continue" statements
# break is used to exit a for loop or a while loop, whereas continue is used to skip the current block, and return to the "for" or "while" statement. A few examples:
# Prints out 0,1,2,3,4
count = 0
while True:
print(count)
count += 1
if count >= 5:
break
# Prints out only odd numbers - 1,3,5,7,9
for x in range(10):
# Check if x is even
if x % 2 == 0:
continue
print(x)
# Can we use "else" clause for loops?
# unlike languages like C,CPP.. we can use else for loops. When the loop condition of "for" or "while" statement fails then code part in "else" is executed. If break statement is executed inside for loop then the "else" part is skipped. Note that "else" part is executed even if there is a continue statement.
# Here are a few examples:
# Prints out 0,1,2,3,4 and then it prints "count value reached 5"
count=0
while(count<5):
print(count)
count +=1
else:
print("count value reached %d" %(count))
# Prints out 1,2,3,4
for i in range(1, 10):
if(i%5==0):
break
print(i)
else:
print("this is not printed because for loop is terminated because of break but not due to fail in condition")
# Exercise
# Loop through and print out all even numbers from the numbers list in the same order they are received. Don't print any numbers that come after 237 in the sequence.
numbers = [
951, 402, 984, 651, 360, 69, 408, 319, 601, 485, 980, 507, 725, 547, 544,
615, 83, 165, 141, 501, 263, 617, 865, 575, 219, 390, 984, 592, 236, 105, 942, 941,
386, 462, 47, 418, 907, 344, 236, 375, 823, 566, 597, 978, 328, 615, 953, 345,
399, 162, 758, 219, 918, 237, 412, 566, 826, 248, 866, 950, 626, 949, 687, 217,
815, 67, 104, 58, 512, 24, 892, 894, 767, 553, 81, 379, 843, 831, 445, 742, 717,
958, 609, 842, 451, 688, 753, 854, 685, 93, 857, 440, 380, 126, 721, 328, 753, 470,
743, 527
]
for number in numbers:
if number == 237:
break
if number % 2 == 1:
continue
print(number)
|
"""Exercício Python 067: Faça um programa que mostre a tabuada de vários números,
um de cada vez, para cada valor digitado pelo usuário. O programa será interrompido
quando o número solicitado for negativo. """
while True:
print('-------------------')
n = int(input('Número: '))
if n < 0:
break
else:
for c in range(1, 11):
print(f'{n}x{c} = {n * c}')
print('FIM')
|
"""
Autogenerated by Django - used for admin site settings
"""
# uncomment when needed
# from django.contrib import admin
# Register your models here.
|
with open('recovered/arc/clusters/6.0.0_r1_acdc_clustered.rsf', encoding="utf8") as data_file:
data = data_file.readlines()
cluster = set()
for line in data:
cluster.add(line.split(" ")[1])
print(len(cluster))
|
# Find square of a number without using multiplication and division operator
def main():
a = -10
if a < 0:
a = abs(a)
square = 0
for i in range(0, a):
square += a
print(square)
if __name__ == '__main__':
main()
|
#!/usr/bin/python3
#from node import Node # From node package import class Node
class Node(object):
"""Represent a singly linked node."""
def __init__(self, data, next = None):
self.data = data
self.next = next
head = None
for count in range(1, 6):
head = Node(count, head) #Instance of the class Node.
while head != None:
print (head.data)
head = head.next #This is the indicate variable.
|
def func(a, b):
# a is state 1
# b is state 2
# this is horrible code but it works! :^)
s = r"\frac{1}{6}"
s1 = r"\frac{1}{2}"
s2 = r"\frac{1}{3}"
if a == 19 and b != 19:
return 0
if a == b:
if a == 19:
return 1
else:
return 0
elif a == 0:
if b <= 6:
return s
else:
return 0
elif a <= 6:
if b == 0:
return s
elif b > 18:
return 0
else:
if a == 1 and (b in [2, 6, 7, 8, 9]):
return s
elif a == 2 and (b in [1, 3, 9, 10, 11]):
return s
elif a == 3 and (b in [2, 4, 11, 12, 13]):
return s
elif a == 4 and (b in [3, 5, 13, 14, 15]):
return s
elif a == 5 and (b in [4, 6, 15, 16, 17]):
return s
elif a == 6 and (b in [1, 5, 7, 17, 18]):
return s
else:
return 0
else:
if b == 19:
if a % 2 == 1:
return s2
else:
return s1
else:
if b == 0:
return 0
elif b in [a - 1, a + 1]:
return s
elif a == 7 and b == 18:
return s
elif b == 7 and a == 18:
return s
else:
if a % 2 == 1:
arr = list(map(int, [0.5 * a - 3.5, 0.5 * a - 2.5]))
if b in arr:
return s
else:
return 0
else:
if b == int(0.5 * a - 3):
return s
else:
return 0
f = open("transition3.tex", "w")
f.write(r"$$")
f.write("\n")
f.write("P = ")
f.write("\n")
f.write(r"\left ( \scalemath{0.4} { \begin{array}{cccccccccccccccccccc}")
f.write("\n")
for i in range(20):
s = "\t"
for j in range(20):
s += "p_{{ {}, {} }} = ".format(i, j)
s += str(func(i, j))
s += " & "
s = s[:-3]
f.write(s)
f.write(r"\\")
f.write("\n")
f.write(r"\end{array} } \right)")
f.write("\n")
f.write(r"$$")
f.write("\n")
f.close()
|
"""
`InverseHaar1D <http://community.topcoder.com/stat?c=problem_statement&pm=5896>`__
"""
def solution (t, l):
if (l == 1):
# level-1 untransformation
i = len(t) / 2
sums, diffs = t[:i], t[i:]
ut = []
for j in range(len(sums)):
# a + b = s, a - b = d
# a = (s + d) / 2, b = (s - d) / 2
s, d = sums[j], diffs[j]
a, b = (s + d) / 2, (s - d) / 2
ut.extend([a, b])
return ut
else:
# level-x untransformation
i = len(t) / (2 ** (l - 1))
head, tail = t[:i], t[i:]
ut = solution(head, 1) + tail
return solution(ut, l - 1)
|
# This file contains the credentials needed to connect to and use the TTN Lorawan network
#
# Steps:
# 1. Populate the values below from your TTN configuration and device/modem.
# (For RAK Wireless devices the dev_eui is printed on top of the device.)
# 2.Then rename the file to: creds_config.py
#
# Done, the file will then be imported into the other scripts at run time.
dev_eui="XXXXXXXXXXXXXX"
# or
dev_eui_rak4200="XXXXXXXXXXXXXX"
# or
dev_eui_rak3172="XXXXXXXXXXXXXX"
#
# Depending on which script you use etc.
app_eui="YYYYYYYYYYYYYY"
app_key="ZZZZZZZZZZZZZZ"
|
"""
entradas
mujeres-->muj-->int
hombres-->hom-->int
sumatotal=tot
salidas
porcentajemujeres=mujp
porcentajehombres=homp
"""
#entradas
muj=int(input("Ingrese el numero de mujeres "))
hom=int(input("Ingrese el numero de hombres "))
#caja negra
tot=muj+hom
mujp=(muj/tot)*100
homp=(hom/tot)*100
#salidas
print("El porcentajes de mujeres es ", mujp, "%")
print("El porcentajes de hombres es ", homp, "%")
|
def main():
n, m = [int(x) for x in input().split()]
def wczytajJiro():
defs = [0]*n
atks = [0]*n
both = [0]*2*n
defi = atki = bothi = 0
for i in range(n):
pi, si = input().split()
if (pi == 'ATK'):
atks[atki] = int(si)
atki += 1
both[bothi] = int(si)
bothi += 1
else:
defs[defi] = int(si)
defi += 1
both[bothi] = int(si) + 1
bothi += 1
return (sorted(defs[:defi]), sorted(atks[:atki]), sorted(both[:bothi]))
def wczytajCiel():
ms = [0]*m
for i in range(m):
si = int(input())
ms[i] = si
return sorted(ms)
jiro = wczytajJiro()
defenses, attacks, both = jiro
ciel = wczytajCiel()
def czyZabijamyWszyskie():
zzamkowane = zip(reversed(ciel), reversed(both))
checked = map(lambda cj : cj[0] - cj[1] >= 0, zzamkowane)
return all(checked)
def f(cj):
c, j = cj
r = c - j
if (r >= 0):
return r
else:
return 0
def bezNajslabszychObroncow():
w = 0
wyniklen = len(ciel)
for d in defenses:
while w != wyniklen and ciel[w] <= d:
w += 1
if w == wyniklen:
break
ciel[w] = 0
return sum(ciel)
if czyZabijamyWszyskie():
w = sum(map(f, zip(reversed(ciel), attacks)))
w1 = bezNajslabszychObroncow()
w2 = sum(attacks)
print(max(w, w1 - w2))
else:
w = sum(map(f, zip(reversed(ciel), attacks)))
print(w)
main()
|
load_modules = {
'hw_USBtin': {'port':'auto', 'debug':2, 'speed':500}, # IO hardware module
'ecu_controls':
{'bus':'BMW_F10',
'commands':[
# Music actions
{'High light - blink': '0x1ee:2:20ff', 'cmd':'127'},
{'TURN LEFT and RIGHT': '0x2fc:7:31000000000000', 'cmd':'126'},
{'TURN right ON PERMANENT': '0x1ee:2:01ff', 'cmd':'124'},
{'TURN right x3 or OFF PERMANENT':'0x1ee:2:02ff','cmd':'123'},
{'TURN left ON PERMANENT': '0x1ee:2:04ff', 'cmd':'122'},
{'TURN left x3 or OFF PERMANENT':'0x1ee:2:08ff','cmd':'121'},
{'STOP lights': '0x173:8:3afa00022000f2c4', 'cmd':'120'},
{'CLEANER - once':'0x2a6:2:02a1','cmd':'119'},
{'CLEANER x3 + Wasser':'0x2a6:2:10f1','cmd':'118'},
{'Mirrors+windows FOLD':'0x26e:8:5b5b4002ffffffff','cmd':"117"},
{'Mirrors UNfold':'0x2fc:7:12000000000000','cmd':"116"},
{'Windows open':'0x26e:8:49494001ffffffff','cmd':"115"},
{'Windows rear close + Mirrors FOLD':'0x26e:8:405b4002ffffffff','cmd':"114"},
{'Trunk open':'0x2a0:8:88888001ffffffff','cmd':"113"},
{'Trunk close':'0x23a:8:00f310f0fcf0ffff','cmd':"112"}
],
'statuses':[
]
}
}
# Now let's describe the logic of this test
actions = [
{'ecu_controls' : {}},
{'hw_USBtin': {'action':'write','pipe': 1}}
]
|
#!/usr/bin/env python3
fname = input("Enter file name: ")
fh = open(fname)
lst = list()
sorted_words = list()
for line in fh:
line = line.rstrip()
words = line.split()
for word in words:
if lst.count(word) == 0:
lst.append(word)
lst.sort()
print(lst)
|
# Python3 program to add two numbers
number1 = input("First number: ")
number2 = input("\nSecond number: ")
# Adding two numbers
# User might also enter float numbers
sum = float(number1) + float(number2)
# Display the sum
# will print value in float
print("The sum of {0} and {1} is {2}" .format(number1, number2, sum))
|
def extractCNovelProj(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('Please Be More Serious', 'Please Be More Serious', 'translated'),
('Still Not Wanting to Forget', 'Still Not Wanting to Forget', 'translated'),
('suddenly this summer', 'Suddenly, This Summer', 'translated'),
('mr earnest is my boyfriend', 'Mr. Earnest Is My Boyfriend', 'translated'),
]
for tagname, name, tl_type in tagmap:
if tagname in item['tags']:
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
return False
|
class Solution:
# @param {string} a a number
# @param {string} b a number
# @return {string} the result
def addBinary(self, a, b):
# Write your code here
max_len = max(len(a), len(b))
a = a.zfill(max_len)
b = b.zfill(max_len)
result = ''
carry = 0
for a, b in zip(a, b)[::-1]:
bits_sum = carry
bits_sum += int(a) + int(b)
result = ('0' if bits_sum % 2 == 0 else '1') + result
carry = 0 if bits_sum < 2 else 1
result = ('1' if carry > 0 else '') + result
return result
|
class Solution:
def dailyTemperatures(self, T: list) -> list:
if len(T) == 1:
return [0]
else:
mono_stack = [(T[0], 0)]
i = 1
res = [0] * len(T)
while i < len(T):
if T[i] <= mono_stack[-1][0]:
mono_stack.append((T[i], i))
else:
while mono_stack:
if T[i] > mono_stack[-1][0]:
_, popped_idx = mono_stack.pop()
res[popped_idx] = i - popped_idx
else:
break
mono_stack.append((T[i], i))
i += 1
return res
if __name__ == "__main__":
solu = Solution()
print(solu.dailyTemperatures([73, 74, 75, 71, 69, 72, 76, 73]))
|
with open("inputs_7.txt") as f:
inputs = [x.strip() for x in f.readlines()]
ex_inputs= [
"shiny gold bags contain 2 dark red bags.",
"dark red bags contain 2 dark orange bags.",
"dark orange bags contain 2 dark yellow bags.",
"dark yellow bags contain 2 dark green bags.",
"dark green bags contain 2 dark blue bags.",
"dark blue bags contain 2 dark violet bags.",
"dark violet bags contain no other bags."
]
def find_bags_containing_colour(roster, colour):
bags = []
for key, value in roster.items():
if colour in (x[1] for x in value):
bags.append(key)
bags.extend(find_bags_containing_colour(roster, key))
return bags
def part1(inputs):
roster = {}
for line in inputs:
colour = line[:line.index(" bags")]
contents = line.split("contain")[1].strip().replace(" bags", "").replace(" bag", "").split(", ")
if "no other" in line:
continue
roster[colour] = []
for content in contents:
num = content[:content.index(" ")]
content_colour = content[content.index(" ") + 1 :].strip(".")
roster[colour].append((num, content_colour))
bags = set(find_bags_containing_colour(roster, "shiny gold"))
print(len(bags))
def count_bags(roster, colour):
total = 1
for bag in roster[colour]:
if bag[1] == "None":
print(f"No Bags in {colour}, return 1")
return 1
else:
print(bag[0] * count_bags(roster, bag[1]))
total += bag[0] * count_bags(roster, bag[1])
print(total, colour)
return total
def part2(inputs):
roster = {}
for line in inputs:
colour = line[:line.index(" bags")]
contents = line.split("contain")[1].strip().replace(" bags", "").replace(" bag", "").split(", ")
roster[colour] = []
for content in contents:
if "no other" in line:
num = 0
content_colour = "None"
else:
num = int(content[:content.index(" ")])
content_colour = content[content.index(" ") + 1 :].strip(".")
roster[colour].append((int(num), content_colour))
total = 0
total = count_bags(roster,"shiny gold")
print(f"Current Total: {total}")
# minus the shiny gold bag from the count
print(total - 1)
# part1(inputs)
# not 75,31
part2(inputs)
|
#Simple calculator
def add(x,y):
return x+y
def subs(x,y):
return x-y
def multi(x,y):
return x*y
def divide(x,y):
return x/y
num1 = int(input("Enter the Value of Num1 :"))
num2 = int(input("Enter the Value of NUm2 :"))
print("Choose 1 for '+'/ 2 for '-'/ 3 for '*'/ 4 for '/' :-")
select = int(input("Enter the 1/2/3/4 :"))
if select == 1 :
print(num1,"+",num2,"=",add(num1,num2))
elif select == 2 :
print(num1,"-",num2,"=",subs(num1,num2))
elif select == 3 :
print(num1,"*",num2,"=",multi(num1,num2))
elif select == 4 :
print(num1,"/",num2,"=",divide(num1,num2))
else:
print("Enter the Valid number.")
|
a = 10
b = 20
soma = a + b
print ("a soma dos números é",soma)
|
PI = float(3.14159)
raio = float(input())
print("A=%0.4f" %(PI * (raio * raio)))
|
x = {}
with open('input.txt', 'r', encoding='utf8') as f:
for line in f:
line = line.strip()
x[line] = x.get(line, 0) + 1
lol = [(y, x) for x, y in x.items()]
lol.sort()
with open('output.txt', 'w', encoding='utf8') as f:
if lol[-1][0] / sum(x.values()) > 0.5:
f.write(lol[-1][1])
else:
f.write(lol[-1][1])
f.write("\n")
f.write(lol[-2][1])
|
"""
Implementar um algoritmo para determinar se uma string possui todos os caracteres exclusivos.
Premissas
Podemos assumir que a string é ASCII? Sim
Nota: As cadeias de caracteres Unicode podem exigir tratamento especial dependendo do seu idioma
Podemos supor que há distinção entre maiúsculas e minúsculas? * Sim
Podemos usar estruturas de dados adicionais? * Sim
Teste Cases
None -> False
'' -> True
'foo' -> False
'bar' -> True
"""
def caracexclusiv (palavra):
tam = len(palavra)
palavra = palavra.lower()
if tam == 0:
return True
else:
contadoraux = 0
for c1 in range(0, tam):
for c2 in range(0, tam):
if palavra[c1] == palavra[c2]:
contadoraux += 1
if contadoraux/tam == 1:
return True
else:
return False
def main ():
outra = 's'
while outra == 's':
palavra = input('Digite a palavra: ')
if caracexclusiv(palavra):
print(f'Verdadeiro. A palavra "{palavra}" possui todos os caracteres exclusivos')
else:
print(f'Falso. A palavra "{palavra}" não possui todos os caracteres exclusivos')
outra = input('Outra palavra? [S/N] ').lower()
if __name__ == '__main__': main()
|
{
"includes": [
"drafter/common.gypi"
],
"targets": [
{
"target_name": "protagonist",
"include_dirs": [
"drafter/src",
"<!(node -e \"require('nan')\")"
],
"sources": [
"src/options_parser.cc",
"src/parse_async.cc",
"src/parse_sync.cc",
"src/protagonist.cc",
"src/protagonist.h",
"src/refractToV8.cc",
"src/validate_async.cc",
"src/validate_sync.cc"
],
"conditions" : [
[ 'libdrafter_type=="shared_library"', { 'defines' : [ 'DRAFTER_BUILD_SHARED' ] }, { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
"dependencies": [
"drafter/drafter.gyp:libdrafter",
]
}
]
}
|
# Chalk Damage Skin
success = sm.addDamageSkin(2433236)
if success:
sm.chat("The Chalk Damage Skin has been added to your account's damage skin collection.")
|
"""
Key point:
- Locate a '1' first and make all the right, left, up and down to '0'.
- Make all the adjacent '1' to '0' so all the islands would be counted.
"""
class Solution:
def numIslands(self, grid):
if not grid:
return 0
row = len(grid)
col = len(grid[0])
count = 0
for i in range(row):
for j in range(col):
if grid[i][j] == '1':
self.dfs(grid, row, col, i, j)
count += 1
return count
def dfs(self, grid, row, col, x, y):
if grid[x][y] == '0':
return
grid[x][y] = '0'
if x != 0:
self.dfs(grid, row, col, x - 1 , y)
if x != row - 1:
self.dfs(grid, row, col, x + 1, y)
if y != 0:
self.dfs(grid, row, col, x, y - 1)
if y != col - 1:
self.dfs(grid, row, col, x, y + 1)
if __name__ == "__main__":
grid = [
["1","1","1","1","0"],
["1","1","0","1","0"],
["1","1","0","0","0"],
["0","0","0","0","0"]
]
s = Solution()
print(s.numIslands(grid))
|
N_T = input().split()
N = int(N_T[0])
T = int(N_T[1])
interactions = []
input_condition = input()
conditions = list(input_condition)
conditions = [int(x) for x in conditions]
for x in range(T):
input_line = input().split()
input_line = [int(x) for x in input_line]
interactions.append(input_line)
sorted_interactions = sorted(interactions)
largest_k = 0
minimum_k = T
patient_zero = 0
for cow_num in range(0, N): #zeros -- x is cow number
temp_conditions = [0 for x in range(len(conditions))]
temp_conditions[cow_num] = 1
for y in range(0, len(interactions)): #loops through the process
if cow_num == interactions[y][1]-1:
temp_conditions[interactions[y][2]-1] = 1
elif cow_num == interactions[y][2]-1:
temp_conditions[interactions[y][1]-1] = 1
if temp_conditions == conditions: #checks if condition arrays match, if so, counter + 1
patient_zero += 1
print(patient_zero)
|
#WAP to calculate and display the factorial of
#an inputted number.
num = int(input("enter the range for factorial: "))
f = 1
if num < 0:
print("factorial does not exist")
elif num == 0:
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):
f = f * i
print("The factorial of",num,"is",f)
|
"""
while / Else
contadores
acumuladores
"""
contador = 1
acumulador = 1
while contador <= 20:
print(contador, acumulador)
acumulador += contador
contador += 1
if contador > 7:
break
else:
print('cheguei no else')
print('sai do while')
|
def pascal_nth_row(line_num):
if line_num == 0:
return [1]
line = [1]
last_line = pascal_nth_row(line_num - 1)
for i in range(len(last_line) - 1):
line.append(last_line[i] + last_line[i + 1])
line.append(1)
# line here will the line at num line_num
return line
print(pascal_nth_row(5))
|
class Product:
def __init__(self):
self.codigo = ''
self.categoria = ''
self.fabricante = ''
self.nome = ''
self.precoCheio = ''
self.precoDesconto = ''
self.totalVendas = ''
self.precoVarejo = ''
self.precoAtacado = ''
self.resumo = ''
self.descricao = ''
self.caracteristicas = ''
self.url = ''
self.urlImagem = []
self.imageFile = []
self.disponibilidade = 'DISPONÍVEL'
self.profundidade = ''
self.largura = ''
self.altura = ''
self.peso = ''
self.variacoes = []
|
# -*- coding: utf-8 -*-
# @Time : 2018/7/28 下午3:34
# @Author : yidxue
class Person:
def __new__(cls, name, age):
print('__new__ called.')
return super(Person, cls).__new__(cls)
def __init__(self, name, age):
print('__init__ called.')
self.name = name
self.age = age
print(self.name, age)
p = Person("yidxue", 27)
|
#Attept a
def isPerfectSquare(n):
if n <= 1:
return True
start = 0
end = n//2
while((end - start) > 1):
mid = (start + end)//2
sq = mid*mid
print(mid, sq, start, end)
if sq == n:
return True
if sq > n:
end = mid
if sq < n:
start = mid
return False
s = 1111*1111
print(isPerfectSquare(s))
|
"""Below Python Programme demonstrate maketrans
functions in a string"""
#Example:
# example dictionary
dict = {"a": "123", "b": "456", "c": "789"}
string = "abc"
print(string.maketrans(dict))
# example dictionary
dict = {97: "123", 98: "456", 99: "789"}
string = "abc"
print(string.maketrans(dict))
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
base_url = "https://es.wikiquote.org/w/api.php"
quote_of_the_day_url = "https://es.wikiquote.org/wiki/Portada"
def quote_of_the_day_parser(html):
table = html("table")[1]("table")[0]
quote = table("td")[3].text.strip()
author = table("td")[5].div.a.text.strip()
# Author and quote could have an accent
return (quote, author)
non_quote_sections = ["sobre", "referencias"]
|
# membuat tupple
buah = ('anggur', 'jeruk', 'mangga')
print(buah) # output: ('anggur', 'jeruk', 'mangga')
|
input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 0 0
1 19 0 0
1 20 0 0
1 21 0 0
1 22 0 0
1 23 0 0
1 24 0 0
1 25 0 0
1 26 0 0
1 27 0 0
1 28 0 0
1 29 0 0
1 30 0 0
1 31 0 0
1 32 0 0
1 33 0 0
1 34 0 0
1 35 0 0
1 36 0 0
1 37 0 0
1 38 0 0
1 39 0 0
1 40 0 0
1 41 0 0
1 42 0 0
1 43 0 0
1 44 0 0
1 45 0 0
1 46 0 0
1 47 0 0
1 48 0 0
1 49 0 0
1 50 0 0
1 51 0 0
1 52 0 0
1 53 0 0
1 54 0 0
1 55 0 0
1 56 0 0
1 57 0 0
1 58 0 0
1 59 0 0
1 60 0 0
1 61 0 0
1 62 0 0
1 63 0 0
1 64 0 0
1 65 0 0
1 66 0 0
1 67 0 0
1 68 0 0
1 69 0 0
1 70 0 0
1 71 0 0
1 72 0 0
1 73 0 0
1 74 0 0
1 75 0 0
1 76 0 0
1 77 0 0
1 78 0 0
1 79 0 0
1 80 0 0
1 81 0 0
1 82 0 0
1 83 0 0
1 84 0 0
1 85 0 0
1 86 0 0
1 87 0 0
1 88 0 0
1 89 0 0
1 90 0 0
1 91 2 1 92 93
1 92 2 1 91 93
1 93 0 0
1 94 2 1 95 96
1 95 2 1 94 96
1 96 0 0
1 97 2 1 98 99
1 98 2 1 97 99
1 99 0 0
1 100 2 1 101 102
1 101 2 1 100 102
1 102 0 0
1 103 2 1 104 105
1 104 2 1 103 105
1 105 0 0
1 106 2 1 107 108
1 107 2 1 106 108
1 108 0 0
1 109 2 1 110 111
1 110 2 1 109 111
1 111 0 0
1 112 2 1 113 114
1 113 2 1 112 114
1 114 0 0
1 115 2 1 116 117
1 116 2 1 115 117
1 117 0 0
1 118 2 1 119 120
1 119 2 1 118 120
1 120 0 0
1 121 2 1 122 123
1 122 2 1 121 123
1 123 0 0
1 124 2 1 125 126
1 125 2 1 124 126
1 126 0 0
1 127 2 1 128 129
1 128 2 1 127 129
1 129 0 0
1 130 2 1 131 132
1 131 2 1 130 132
1 132 0 0
1 133 2 1 134 135
1 134 2 1 133 135
1 135 0 0
1 136 2 1 137 138
1 137 2 1 136 138
1 138 0 0
1 139 2 1 140 141
1 140 2 1 139 141
1 141 0 0
1 142 2 1 143 144
1 143 2 1 142 144
1 144 0 0
1 145 2 1 146 147
1 146 2 1 145 147
1 147 0 0
1 148 2 1 149 150
1 149 2 1 148 150
1 150 0 0
1 151 2 1 152 153
1 152 2 1 151 153
1 153 0 0
1 154 2 1 155 156
1 155 2 1 154 156
1 156 0 0
1 157 2 1 158 159
1 158 2 1 157 159
1 159 0 0
1 160 2 1 161 162
1 161 2 1 160 162
1 162 0 0
1 163 2 1 164 165
1 164 2 1 163 165
1 165 0 0
1 166 2 1 167 168
1 167 2 1 166 168
1 168 0 0
1 169 2 1 170 171
1 170 2 1 169 171
1 171 0 0
1 172 2 1 173 174
1 173 2 1 172 174
1 174 0 0
1 175 2 1 176 177
1 176 2 1 175 177
1 177 0 0
1 178 2 1 179 180
1 179 2 1 178 180
1 180 0 0
1 181 2 1 182 183
1 182 2 1 181 183
1 183 0 0
1 184 2 1 185 186
1 185 2 1 184 186
1 186 0 0
1 187 2 1 188 189
1 188 2 1 187 189
1 189 0 0
1 190 2 1 191 192
1 191 2 1 190 192
1 192 0 0
1 193 2 1 194 195
1 194 2 1 193 195
1 195 0 0
1 196 2 1 197 198
1 197 2 1 196 198
1 198 0 0
1 199 2 1 200 201
1 200 2 1 199 201
1 201 0 0
1 202 2 1 203 204
1 203 2 1 202 204
1 204 0 0
1 205 2 1 206 207
1 206 2 1 205 207
1 207 0 0
1 208 2 1 209 210
1 209 2 1 208 210
1 210 0 0
1 211 2 1 212 213
1 212 2 1 211 213
1 213 0 0
1 214 2 1 215 216
1 215 2 1 214 216
1 216 0 0
1 217 2 1 218 219
1 218 2 1 217 219
1 219 0 0
1 220 2 1 221 222
1 221 2 1 220 222
1 222 0 0
1 223 2 1 224 225
1 224 2 1 223 225
1 225 0 0
1 226 2 1 227 228
1 227 2 1 226 228
1 228 0 0
1 229 2 1 230 231
1 230 2 1 229 231
1 231 0 0
1 232 2 1 233 234
1 233 2 1 232 234
1 234 0 0
1 235 2 1 236 237
1 236 2 1 235 237
1 237 0 0
1 238 2 1 239 240
1 239 2 1 238 240
1 240 0 0
1 241 2 1 242 243
1 242 2 1 241 243
1 243 0 0
1 244 2 1 245 246
1 245 2 1 244 246
1 246 0 0
1 247 2 1 248 249
1 248 2 1 247 249
1 249 0 0
1 250 2 1 251 252
1 251 2 1 250 252
1 252 0 0
1 253 2 1 254 255
1 254 2 1 253 255
1 255 0 0
1 256 2 1 257 258
1 257 2 1 256 258
1 258 0 0
1 259 2 1 260 261
1 260 2 1 259 261
1 261 0 0
1 262 2 1 263 264
1 263 2 1 262 264
1 264 0 0
1 265 2 1 266 267
1 266 2 1 265 267
1 267 0 0
1 268 2 1 269 270
1 269 2 1 268 270
1 270 0 0
2 271 3 0 2 211 151 91
1 1 1 0 271
2 272 3 0 2 214 154 94
1 1 1 0 272
2 273 3 0 2 217 157 97
1 1 1 0 273
2 274 3 0 2 220 160 100
1 1 1 0 274
2 275 3 0 2 223 163 103
1 1 1 0 275
2 276 3 0 2 226 166 106
1 1 1 0 276
2 277 3 0 2 229 169 109
1 1 1 0 277
2 278 3 0 2 232 172 112
1 1 1 0 278
2 279 3 0 2 235 175 115
1 1 1 0 279
2 280 3 0 2 238 178 118
1 1 1 0 280
2 281 3 0 2 241 181 121
1 1 1 0 281
2 282 3 0 2 244 184 124
1 1 1 0 282
2 283 3 0 2 247 187 127
1 1 1 0 283
2 284 3 0 2 250 190 130
1 1 1 0 284
2 285 3 0 2 253 193 133
1 1 1 0 285
2 286 3 0 2 256 196 136
1 1 1 0 286
2 287 3 0 2 259 199 139
1 1 1 0 287
2 288 3 0 2 262 202 142
1 1 1 0 288
2 289 3 0 2 265 205 145
1 1 1 0 289
2 290 3 0 2 268 208 148
1 1 1 0 290
2 291 3 0 1 211 151 91
1 1 1 1 291
2 292 3 0 1 214 154 94
1 1 1 1 292
2 293 3 0 1 217 157 97
1 1 1 1 293
2 294 3 0 1 220 160 100
1 1 1 1 294
2 295 3 0 1 223 163 103
1 1 1 1 295
2 296 3 0 1 226 166 106
1 1 1 1 296
2 297 3 0 1 229 169 109
1 1 1 1 297
2 298 3 0 1 232 172 112
1 1 1 1 298
2 299 3 0 1 235 175 115
1 1 1 1 299
2 300 3 0 1 238 178 118
1 1 1 1 300
2 301 3 0 1 241 181 121
1 1 1 1 301
2 302 3 0 1 244 184 124
1 1 1 1 302
2 303 3 0 1 247 187 127
1 1 1 1 303
2 304 3 0 1 250 190 130
1 1 1 1 304
2 305 3 0 1 253 193 133
1 1 1 1 305
2 306 3 0 1 256 196 136
1 1 1 1 306
2 307 3 0 1 259 199 139
1 1 1 1 307
2 308 3 0 1 262 202 142
1 1 1 1 308
2 309 3 0 1 265 205 145
1 1 1 1 309
2 310 3 0 1 268 208 148
1 1 1 1 310
1 1 2 0 268 220
1 1 2 0 265 253
1 1 2 0 265 223
1 1 2 0 265 217
1 1 2 0 262 256
1 1 2 0 262 253
1 1 2 0 262 226
1 1 2 0 262 211
1 1 2 0 259 226
1 1 2 0 256 217
1 1 2 0 256 211
1 1 2 0 253 226
1 1 2 0 253 217
1 1 2 0 250 235
1 1 2 0 250 226
1 1 2 0 247 244
1 1 2 0 247 241
1 1 2 0 247 235
1 1 2 0 247 229
1 1 2 0 241 235
1 1 2 0 241 226
1 1 2 0 238 235
1 1 2 0 238 211
1 1 2 0 235 211
1 1 2 0 232 229
1 1 2 0 232 220
1 1 2 0 229 217
1 1 2 0 226 223
1 1 2 0 226 217
1 1 2 0 223 211
1 1 2 0 220 217
1 1 2 0 217 211
1 1 2 0 214 211
1 1 2 0 208 160
1 1 2 0 205 193
1 1 2 0 205 163
1 1 2 0 205 157
1 1 2 0 202 196
1 1 2 0 202 193
1 1 2 0 202 166
1 1 2 0 202 151
1 1 2 0 199 166
1 1 2 0 196 157
1 1 2 0 196 151
1 1 2 0 193 166
1 1 2 0 193 157
1 1 2 0 190 175
1 1 2 0 190 166
1 1 2 0 187 184
1 1 2 0 187 181
1 1 2 0 187 175
1 1 2 0 187 169
1 1 2 0 181 175
1 1 2 0 181 166
1 1 2 0 178 175
1 1 2 0 178 151
1 1 2 0 175 151
1 1 2 0 172 169
1 1 2 0 172 160
1 1 2 0 169 157
1 1 2 0 166 163
1 1 2 0 166 157
1 1 2 0 163 151
1 1 2 0 160 157
1 1 2 0 157 151
1 1 2 0 154 151
1 1 2 0 148 100
1 1 2 0 145 133
1 1 2 0 145 103
1 1 2 0 145 97
1 1 2 0 142 136
1 1 2 0 142 133
1 1 2 0 142 106
1 1 2 0 142 91
1 1 2 0 139 106
1 1 2 0 136 97
1 1 2 0 136 91
1 1 2 0 133 106
1 1 2 0 133 97
1 1 2 0 130 115
1 1 2 0 130 106
1 1 2 0 127 124
1 1 2 0 127 121
1 1 2 0 127 115
1 1 2 0 127 109
1 1 2 0 121 115
1 1 2 0 121 106
1 1 2 0 118 115
1 1 2 0 118 91
1 1 2 0 115 91
1 1 2 0 112 109
1 1 2 0 112 100
1 1 2 0 109 97
1 1 2 0 106 103
1 1 2 0 106 97
1 1 2 0 103 91
1 1 2 0 100 97
1 1 2 0 97 91
1 1 2 0 94 91
0
22 link(1,17)
23 link(17,1)
24 link(2,6)
25 link(6,2)
26 link(2,16)
27 link(16,2)
28 link(2,18)
29 link(18,2)
30 link(3,5)
31 link(5,3)
32 link(3,6)
33 link(6,3)
34 link(3,15)
35 link(15,3)
36 link(3,20)
37 link(20,3)
38 link(4,15)
39 link(15,4)
40 link(5,18)
41 link(18,5)
42 link(5,20)
43 link(20,5)
44 link(6,15)
45 link(15,6)
46 link(6,18)
47 link(18,6)
48 link(7,12)
49 link(12,7)
50 link(7,15)
51 link(15,7)
52 link(8,9)
53 link(9,8)
54 link(8,10)
55 link(10,8)
56 link(8,12)
57 link(12,8)
58 link(8,14)
59 link(14,8)
60 link(10,12)
61 link(12,10)
62 link(10,15)
63 link(15,10)
64 link(11,12)
65 link(12,11)
66 link(11,20)
67 link(20,11)
68 link(12,20)
69 link(20,12)
70 link(13,14)
71 link(14,13)
72 link(13,17)
73 link(17,13)
74 link(14,18)
75 link(18,14)
76 link(15,16)
77 link(16,15)
78 link(15,18)
79 link(18,15)
80 link(16,20)
81 link(20,16)
82 link(17,18)
83 link(18,17)
84 link(18,20)
85 link(20,18)
86 link(19,20)
87 link(20,19)
88 colour(red0)
89 colour(green0)
90 colour(blue0)
91 chosenColour(20,blue0)
94 chosenColour(19,blue0)
97 chosenColour(18,blue0)
100 chosenColour(17,blue0)
103 chosenColour(16,blue0)
106 chosenColour(15,blue0)
109 chosenColour(14,blue0)
112 chosenColour(13,blue0)
115 chosenColour(12,blue0)
118 chosenColour(11,blue0)
121 chosenColour(10,blue0)
124 chosenColour(9,blue0)
127 chosenColour(8,blue0)
130 chosenColour(7,blue0)
133 chosenColour(6,blue0)
136 chosenColour(5,blue0)
139 chosenColour(4,blue0)
142 chosenColour(3,blue0)
145 chosenColour(2,blue0)
148 chosenColour(1,blue0)
151 chosenColour(20,green0)
154 chosenColour(19,green0)
157 chosenColour(18,green0)
160 chosenColour(17,green0)
163 chosenColour(16,green0)
166 chosenColour(15,green0)
169 chosenColour(14,green0)
172 chosenColour(13,green0)
175 chosenColour(12,green0)
178 chosenColour(11,green0)
181 chosenColour(10,green0)
184 chosenColour(9,green0)
187 chosenColour(8,green0)
190 chosenColour(7,green0)
193 chosenColour(6,green0)
196 chosenColour(5,green0)
199 chosenColour(4,green0)
202 chosenColour(3,green0)
205 chosenColour(2,green0)
208 chosenColour(1,green0)
211 chosenColour(20,red0)
214 chosenColour(19,red0)
217 chosenColour(18,red0)
220 chosenColour(17,red0)
223 chosenColour(16,red0)
226 chosenColour(15,red0)
229 chosenColour(14,red0)
232 chosenColour(13,red0)
235 chosenColour(12,red0)
238 chosenColour(11,red0)
241 chosenColour(10,red0)
244 chosenColour(9,red0)
247 chosenColour(8,red0)
250 chosenColour(7,red0)
253 chosenColour(6,red0)
256 chosenColour(5,red0)
259 chosenColour(4,red0)
262 chosenColour(3,red0)
265 chosenColour(2,red0)
268 chosenColour(1,red0)
2 node(1)
3 node(2)
4 node(3)
5 node(4)
6 node(5)
7 node(6)
8 node(7)
9 node(8)
10 node(9)
11 node(10)
12 node(11)
13 node(12)
14 node(13)
15 node(14)
16 node(15)
17 node(16)
18 node(17)
19 node(18)
20 node(19)
21 node(20)
92 notChosenColour(20,blue0)
95 notChosenColour(19,blue0)
98 notChosenColour(18,blue0)
101 notChosenColour(17,blue0)
104 notChosenColour(16,blue0)
107 notChosenColour(15,blue0)
110 notChosenColour(14,blue0)
113 notChosenColour(13,blue0)
116 notChosenColour(12,blue0)
119 notChosenColour(11,blue0)
122 notChosenColour(10,blue0)
125 notChosenColour(9,blue0)
128 notChosenColour(8,blue0)
131 notChosenColour(7,blue0)
134 notChosenColour(6,blue0)
137 notChosenColour(5,blue0)
140 notChosenColour(4,blue0)
143 notChosenColour(3,blue0)
146 notChosenColour(2,blue0)
149 notChosenColour(1,blue0)
152 notChosenColour(20,green0)
155 notChosenColour(19,green0)
158 notChosenColour(18,green0)
161 notChosenColour(17,green0)
164 notChosenColour(16,green0)
167 notChosenColour(15,green0)
170 notChosenColour(14,green0)
173 notChosenColour(13,green0)
176 notChosenColour(12,green0)
179 notChosenColour(11,green0)
182 notChosenColour(10,green0)
185 notChosenColour(9,green0)
188 notChosenColour(8,green0)
191 notChosenColour(7,green0)
194 notChosenColour(6,green0)
197 notChosenColour(5,green0)
200 notChosenColour(4,green0)
203 notChosenColour(3,green0)
206 notChosenColour(2,green0)
209 notChosenColour(1,green0)
212 notChosenColour(20,red0)
215 notChosenColour(19,red0)
218 notChosenColour(18,red0)
221 notChosenColour(17,red0)
224 notChosenColour(16,red0)
227 notChosenColour(15,red0)
230 notChosenColour(14,red0)
233 notChosenColour(13,red0)
236 notChosenColour(12,red0)
239 notChosenColour(11,red0)
242 notChosenColour(10,red0)
245 notChosenColour(9,red0)
248 notChosenColour(8,red0)
251 notChosenColour(7,red0)
254 notChosenColour(6,red0)
257 notChosenColour(5,red0)
260 notChosenColour(4,red0)
263 notChosenColour(3,red0)
266 notChosenColour(2,red0)
269 notChosenColour(1,red0)
0
B+
0
B-
1
0
1
"""
output = """
{node(1), node(2), node(3), node(4), node(5), node(6), node(7), node(8), node(9), node(10), node(11), node(12), node(13), node(14), node(15), node(16), node(17), node(18), node(19), node(20), link(1,17), link(17,1), link(2,6), link(6,2), link(2,16), link(16,2), link(2,18), link(18,2), link(3,5), link(5,3), link(3,6), link(6,3), link(3,15), link(15,3), link(3,20), link(20,3), link(4,15), link(15,4), link(5,18), link(18,5), link(5,20), link(20,5), link(6,15), link(15,6), link(6,18), link(18,6), link(7,12), link(12,7), link(7,15), link(15,7), link(8,9), link(9,8), link(8,10), link(10,8), link(8,12), link(12,8), link(8,14), link(14,8), link(10,12), link(12,10), link(10,15), link(15,10), link(11,12), link(12,11), link(11,20), link(20,11), link(12,20), link(20,12), link(13,14), link(14,13), link(13,17), link(17,13), link(14,18), link(18,14), link(15,16), link(16,15), link(15,18), link(18,15), link(16,20), link(20,16), link(17,18), link(18,17), link(18,20), link(20,18), link(19,20), link(20,19), colour(red0), colour(green0), colour(blue0)}
"""
|
class Solution:
def searchMatrix(self, matrix: 'List[List[int]]', target: int) -> bool:
m = len(matrix)
if m == 0:
return False
n = len(matrix[0])
if n == 0:
return False
left, right = 0, m * n
while left + 1 < right:
mid = (left + right) >> 1
num = matrix[mid // n][mid % n]
if num < target:
left = mid
elif num > target:
right = mid
else:
return True
return matrix[left // n][left % n] == target
if __name__ == "__main__":
# matrix = [
# [1, 3, 5, 7],
# [10, 11, 16, 20],
# [23, 30, 34, 50]
# ]
# target = 3
# print(Solution().searchMatrix(matrix, target))
#
# matrix = [
# [1, 3, 5, 7],
# [10, 11, 16, 20],
# [23, 30, 34, 50]
# ]
# target = 13
# print(Solution().searchMatrix(matrix, target))
matrix = [[]]
target = 1
print(Solution().searchMatrix(matrix, target))
|
#Eoin Lees
student = {
"name":"Mary",
"modules": [
{
"courseName":"Programming",
"grade":45
},
{
"courseName":"History",
"grade":99
}
]
}
print ("Student: {}".format(student["name"]))
for module in student["modules"]:
print("\t {} \t: {}".format(module["courseName"], module["grade"]))
|
# crypto_test.py 21/05/2016 D.J.Whale
#
# Placeholder for test harness for crypto.py
#TODO:
print("no tests defined")
# END
|
def ask(name='Jack'):
print(name)
class Person:
def __init__(self):
print('Ma')
my_func = ask
my_func()
"""
Jack
"""
print()
my_class = Person
my_class()
"""
Ma
"""
print()
obj_list = []
obj_list.extend([ask, Person])
for item in obj_list:
print(item())
"""
Jack
None
Ma
<__main__.Person object at 0x0000024556E5AC50>
"""
def decorator_func():
print('dec start')
return ask
print()
my_ask = decorator_func()
my_ask('Tom')
"""
dec start
Tom
"""
|
'''
Given a balanced parentheses string S, compute the score of the string based on the following rule:
() has score 1
AB has score A + B, where A and B are balanced parentheses strings.
(A) has score 2 * A, where A is a balanced parentheses string.
Example 1:
Input: "()"
Output: 1
Example 2:
Input: "(())"
Output: 2
Example 3:
Input: "()()"
Output: 2
Example 4:
Input: "(()(()))"
Output: 6
Note:
S is a balanced parentheses string, containing only ( and ).
2 <= S.length <= 50
'''
class Solution(object):
def scoreOfParentheses(self, S):
"""
:type S: str
:rtype: int
"""
stack = []
for x in S:
if x == '(':
stack.append(0)
else:
tmp = 0
while stack and stack[-1] != 0:
tmp += stack.pop()
if stack and stack[-1] == 0:
stack.pop()
if tmp:
stack.append(tmp * 2)
else:
stack.append(1)
return sum(stack)
|
# Modified from https://github.com/google/subpar/blob/master/debug.bzl
def dump(obj, obj_name):
"""Debugging method that recursively prints object fields to stderr
Args:
obj: Object to dump
obj_name: Name to print for that object
Example Usage:
```
load("debug", "dump")
...
dump(ctx, "ctx")
```
Example Output:
```
WARNING: /code/rrrrr/subpar/debug.bzl:11:5:
ctx[ctx]:
action[string]: <getattr(action) failed>
attr[struct]:
_action_listener[list]: []
_compiler[RuleConfiguredTarget]:
data_runfiles[runfiles]:
```
"""
s = '\n' + _dumpstr(obj, obj_name)
print(s)
def _dumpstr(root_obj, root_obj_name):
"""Helper method for dump() to just generate the string
Some fields always raise errors if we getattr() on them. We
manually blacklist them here. Other fields raise errors only if
we getattr() without a default. Those are handled below.
A bug was filed against Bazel, but it got fixed in a way that
didn't actually fix this.
"""
BLACKLIST = [
"InputFileConfiguredTarget.output_group",
"Label.Label",
"Label.relative",
"License.to_json",
"RuleConfiguredTarget.output_group",
"ctx.action",
"ctx.check_placeholders",
"ctx.empty_action",
"ctx.expand",
"ctx.expand_location",
"ctx.expand_make_variables",
"ctx.file_action",
"ctx.middle_man",
"ctx.new_file",
"ctx.resolve_command",
"ctx.rule",
"ctx.runfiles",
"ctx.build_setting_value",
"ctx.aspect_ids",
"scala_library",
"swift",
"ctx.template_action",
"ctx.tokenize",
"fragments.apple",
"fragments.cpp",
"fragments.java",
"fragments.jvm",
"fragments.objc",
"fragments.swift",
"fragments.py",
"fragments.proto",
"fragments.j2objc",
"fragments.android",
"runfiles.symlinks",
"struct.output_licenses",
"struct.to_json",
"struct.to_proto",
]
appendsCtx = ["_action_listener", "_bloop", "_code_coverage_instrumentation_worker", "_config_dependencies", "_dependency_analyzer_plugin", "_exe", "_host_javabase", "_java_runtime", "_java_toolchain", "_phase_providers", "_scala_toolchain", "_scalac", "_singlejar", "_unused_dependency_checker_plugin", "_zipper", "compatible_with", "data", "deps", "exec_compatible_with", "exports", "plugins", "resource_jars", "resources", "restricted_to", "runtime_deps", "srcs", "to_json", "to_proto", "toolchains", "unused_dependency_checker_ignored_targets"]
# for a in appendsCtx:
# BLACKLIST.append("ctx." + a)
# print(BLACKLIST)
MAXLINES = 4000
ROOT_MAXDEPTH = 5
# List of printable lines
lines = []
# Bazel doesn't allow a function to recursively call itself, so
# use an explicit stack
stack = [(root_obj, root_obj_name, 0, ROOT_MAXDEPTH)]
# No while() in Bazel, so use for loop over large range
for _ in range(MAXLINES):
if len(stack) == 0:
break
obj, obj_name, indent, maxdepth = stack.pop()
obj_type = type(obj)
indent_str = ' '*indent
line = '{indent_str}{obj_name}[{obj_type}]:'.format(
indent_str=indent_str, obj_name=obj_name, obj_type=obj_type)
if maxdepth == 0 or obj_type in ['dict', 'list', 'set', 'string']:
# Dump value as string, inline
line += ' ' + str(obj)
else:
# Dump all of value's fields on separate lines
attrs = dir(obj)
# print(attrs)
# Push each field to stack in reverse order, so they pop
# in sorted order
for attr in reversed(attrs):
# print("%s.%s" % (obj_type, attr))
if "%s.%s" % (obj_type, attr) in BLACKLIST:
value = '<blacklisted attr (%s)>' % attr
else:
value = getattr(obj, attr, '<getattr(%s) failed>' % attr)
stack.append((value, attr, indent+4, maxdepth-1))
lines.append(line)
return '\n'.join(lines)
|
class Node:
def __init__(self, data):
self.data = data
self.both = id(data)
def __repr__(self):
return str(self.data)
a = Node("a")
b = Node("b")
c = Node("c")
d = Node("d")
e = Node("e")
# id_map simulates object pointer values
id_map = dict()
id_map[id("a")] = a
id_map[id("b")] = b
id_map[id("c")] = c
id_map[id("d")] = d
id_map[id("e")] = e
class LinkedList:
def __init__(self, node):
self.head = node
self.tail = node
self.head.both = 0
self.tail.both = 0
def add(self, element):
self.tail.both ^= id(element.data)
element.both = id(self.tail.data)
self.tail = element
def get(self, index):
prev_node_address = 0
result_node = self.head
for i in range(index):
next_node_address = prev_node_address ^ result_node.both
prev_node_address = id(result_node.data)
result_node = id_map[next_node_address]
return result_node.data
llist = LinkedList(c)
llist.add(d)
llist.add(e)
llist.add(a)
assert llist.get(0) == "c"
assert llist.get(1) == "d"
assert llist.get(2) == "e"
assert llist.get(3) == "a"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.