content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Matrix: # Class that creates adjacency matrix for displaying graph.
def __init__(self):
self.graph = {} # graph to be displayed
self.matrix = [] # list that will contain the adjacency matrix
def create_matrix(self):
keys = sorted(self.graph.keys()) # ordering of keys in graph for use in matrix table
self.matrix.append(['-'] + keys) # column headers
for node in keys:
row = [node] # create a row[list] for each key in the graph
for neighbours in keys: # for every node in the graph
if node == neighbours: # check if the nodes are same
row.append('-') # if same then insert blank
elif neighbours in self.graph[node]: # if neighbour node is actually a neighbour of the current node
row.append(self.graph[node][neighbours]) # insert the distance from the node to the neighbour
else:
row.append('-') # the neighbour node is not in the neighbours of source so blank is inserted
self.matrix.append(row) # Add completed row to matrix
return self.display_matrix() # call method for display graph formatting
def display_matrix(self): # function to display graph as formatted string string
display_matrix = [map("{:^7}".format, line) for line in self.matrix] # map applies formatting every list in -
# matrix
# ^7 is spacing between elements
start = "([" # opening part of string
end = "])" # last part of string
lines = ["[{}]".format(" ".join(array)) for array in display_matrix] # joins the formatted graph
line_prefix = ",\n" + " " * len(start)
data = line_prefix.join(lines)
return start + data + end # return the matrix
| class Matrix:
def __init__(self):
self.graph = {}
self.matrix = []
def create_matrix(self):
keys = sorted(self.graph.keys())
self.matrix.append(['-'] + keys)
for node in keys:
row = [node]
for neighbours in keys:
if node == neighbours:
row.append('-')
elif neighbours in self.graph[node]:
row.append(self.graph[node][neighbours])
else:
row.append('-')
self.matrix.append(row)
return self.display_matrix()
def display_matrix(self):
display_matrix = [map('{:^7}'.format, line) for line in self.matrix]
start = '(['
end = '])'
lines = ['[{}]'.format(' '.join(array)) for array in display_matrix]
line_prefix = ',\n' + ' ' * len(start)
data = line_prefix.join(lines)
return start + data + end |
"""
PERIODS
"""
numPeriods = 180
"""
STOPS
"""
numStations = 13
station_names = (
"Hamburg Hbf", # 0
"Landwehr", # 1
"Hasselbrook", # 2
"Wansbeker Chaussee*", # 3
"Friedrichsberg*", # 4
"Barmbek*", # 5
"Alte Woehr (Stadtpark)", # 6
"Ruebenkamp (City Nord)", # 7
"Ohlsdorf*", # 8
"Kornweg", # 9
"Hoheneichen", # 10
"Wellingsbuettel", # 11
"Poppenbuettel*", # 12
)
numStops = 26
stops_position = (
(0, 0), # Stop 0
(2, 0), # Stop 1
(3, 0), # Stop 2
(4, 0), # Stop 3
(5, 0), # Stop 4
(6, 0), # Stop 5
(7, 0), # Stop 6
(8, 0), # Stop 7
(9, 0), # Stop 8
(11, 0), # Stop 9
(13, 0), # Stop 10
(14, 0), # Stop 11
(15, 0), # Stop 12
(15, 1), # Stop 13
(15, 1), # Stop 14
(13, 1), # Stop 15
(12, 1), # Stop 16
(11, 1), # Stop 17
(10, 1), # Stop 18
(9, 1), # Stop 19
(8, 1), # Stop 20
(7, 1), # Stop 21
(6, 1), # Stop 22
(4, 1), # Stop 23
(2, 1), # Stop 24
(1, 1), # Stop 25
)
stops_distance = (
(0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 0
(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 1
(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 2
(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 3
(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 4
(0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 5
(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 6
(0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 7
(0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 8
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 9
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 10
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 11
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 12
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 13
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 14
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 15
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0), # Stop 16
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), # Stop 17
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), # Stop 18
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0), # Stop 19
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), # Stop 20
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), # Stop 21
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), # Stop 22
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), # Stop 23
(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, 2), # Stop 24
(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), # Stop 25
)
station_start = 0
"""
TRAMS
"""
numTrams = 18
tram_capacity = 514
tram_capacity_cargo = 304
tram_capacity_min_passenger = 208
tram_capacity_min_cargo = 0
tram_speed = 1
tram_headway = 1
tram_min_service = 1
tram_max_service = 10
min_time_next_tram = 0.333
tram_travel_deviation = 0.167
"""
PASSENGERS
"""
passenger_set = "pas-20210422-1717-int1"
passenger_service_time_board = 0.0145
passenger_service_time_alight = 0.0145
"""
CARGO
"""
numCargo = 90
cargo_size = 4
cargo_station_destination = (
8, # 0
8, # 1
4, # 2
5, # 3
3, # 4
8, # 5
4, # 6
3, # 7
5, # 8
12, # 9
12, # 10
5, # 11
5, # 12
3, # 13
8, # 14
3, # 15
12, # 16
4, # 17
5, # 18
5, # 19
8, # 20
5, # 21
5, # 22
5, # 23
8, # 24
5, # 25
12, # 26
8, # 27
4, # 28
8, # 29
5, # 30
8, # 31
3, # 32
5, # 33
12, # 34
4, # 35
3, # 36
12, # 37
12, # 38
8, # 39
3, # 40
5, # 41
4, # 42
4, # 43
12, # 44
3, # 45
12, # 46
12, # 47
5, # 48
3, # 49
12, # 50
5, # 51
12, # 52
5, # 53
12, # 54
4, # 55
5, # 56
3, # 57
4, # 58
12, # 59
5, # 60
3, # 61
8, # 62
5, # 63
4, # 64
5, # 65
3, # 66
8, # 67
5, # 68
12, # 69
4, # 70
8, # 71
8, # 72
3, # 73
5, # 74
12, # 75
3, # 76
8, # 77
3, # 78
8, # 79
3, # 80
4, # 81
12, # 82
3, # 83
12, # 84
5, # 85
3, # 86
3, # 87
5, # 88
4, # 89
)
cargo_release = (
2, # 0
3, # 1
3, # 2
5, # 3
6, # 4
6, # 5
7, # 6
8, # 7
8, # 8
9, # 9
9, # 10
10, # 11
12, # 12
12, # 13
12, # 14
13, # 15
14, # 16
14, # 17
15, # 18
16, # 19
17, # 20
18, # 21
19, # 22
21, # 23
22, # 24
24, # 25
25, # 26
26, # 27
27, # 28
28, # 29
28, # 30
29, # 31
30, # 32
30, # 33
32, # 34
33, # 35
33, # 36
34, # 37
35, # 38
36, # 39
37, # 40
37, # 41
37, # 42
37, # 43
37, # 44
37, # 45
38, # 46
38, # 47
39, # 48
41, # 49
41, # 50
43, # 51
44, # 52
44, # 53
45, # 54
45, # 55
46, # 56
46, # 57
46, # 58
47, # 59
48, # 60
49, # 61
49, # 62
51, # 63
52, # 64
52, # 65
55, # 66
56, # 67
57, # 68
57, # 69
61, # 70
61, # 71
61, # 72
62, # 73
63, # 74
64, # 75
64, # 76
65, # 77
65, # 78
66, # 79
66, # 80
67, # 81
70, # 82
70, # 83
70, # 84
71, # 85
71, # 86
71, # 87
71, # 88
72, # 89
)
cargo_station_deadline = (
33, # 0
119, # 1
119, # 2
176, # 3
59, # 4
123, # 5
72, # 6
18, # 7
171, # 8
90, # 9
175, # 10
142, # 11
88, # 12
32, # 13
157, # 14
84, # 15
131, # 16
105, # 17
170, # 18
155, # 19
156, # 20
140, # 21
38, # 22
173, # 23
123, # 24
126, # 25
91, # 26
36, # 27
87, # 28
144, # 29
127, # 30
108, # 31
40, # 32
134, # 33
141, # 34
101, # 35
163, # 36
108, # 37
144, # 38
85, # 39
98, # 40
47, # 41
47, # 42
76, # 43
175, # 44
162, # 45
48, # 46
97, # 47
87, # 48
114, # 49
164, # 50
143, # 51
54, # 52
142, # 53
55, # 54
55, # 55
56, # 56
56, # 57
56, # 58
57, # 59
118, # 60
59, # 61
160, # 62
112, # 63
95, # 64
141, # 65
168, # 66
170, # 67
105, # 68
139, # 69
71, # 70
71, # 71
71, # 72
82, # 73
73, # 74
90, # 75
135, # 76
109, # 77
161, # 78
128, # 79
151, # 80
77, # 81
80, # 82
98, # 83
169, # 84
81, # 85
129, # 86
104, # 87
97, # 88
99, # 89
)
cargo_max_delay = 3
cargo_service_time_load = 0.3333333333333333
cargo_service_time_unload = 0.25
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 8991598675325360468762009371570610170
#index for seed sequence child
child_seed_index = (
0, # 0
)
| """
PERIODS
"""
num_periods = 180
'\nSTOPS\n'
num_stations = 13
station_names = ('Hamburg Hbf', 'Landwehr', 'Hasselbrook', 'Wansbeker Chaussee*', 'Friedrichsberg*', 'Barmbek*', 'Alte Woehr (Stadtpark)', 'Ruebenkamp (City Nord)', 'Ohlsdorf*', 'Kornweg', 'Hoheneichen', 'Wellingsbuettel', 'Poppenbuettel*')
num_stops = 26
stops_position = ((0, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0), (9, 0), (11, 0), (13, 0), (14, 0), (15, 0), (15, 1), (15, 1), (13, 1), (12, 1), (11, 1), (10, 1), (9, 1), (8, 1), (7, 1), (6, 1), (4, 1), (2, 1), (1, 1))
stops_distance = ((0, 2, 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, 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, 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, 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, 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, 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, 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, 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, 2, 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, 2, 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, 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, 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, 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, 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, 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, 2, 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, 2, 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, 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, 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, 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, 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, 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, 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, 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, 2), (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))
station_start = 0
'\nTRAMS\n'
num_trams = 18
tram_capacity = 514
tram_capacity_cargo = 304
tram_capacity_min_passenger = 208
tram_capacity_min_cargo = 0
tram_speed = 1
tram_headway = 1
tram_min_service = 1
tram_max_service = 10
min_time_next_tram = 0.333
tram_travel_deviation = 0.167
'\nPASSENGERS\n'
passenger_set = 'pas-20210422-1717-int1'
passenger_service_time_board = 0.0145
passenger_service_time_alight = 0.0145
'\nCARGO\n'
num_cargo = 90
cargo_size = 4
cargo_station_destination = (8, 8, 4, 5, 3, 8, 4, 3, 5, 12, 12, 5, 5, 3, 8, 3, 12, 4, 5, 5, 8, 5, 5, 5, 8, 5, 12, 8, 4, 8, 5, 8, 3, 5, 12, 4, 3, 12, 12, 8, 3, 5, 4, 4, 12, 3, 12, 12, 5, 3, 12, 5, 12, 5, 12, 4, 5, 3, 4, 12, 5, 3, 8, 5, 4, 5, 3, 8, 5, 12, 4, 8, 8, 3, 5, 12, 3, 8, 3, 8, 3, 4, 12, 3, 12, 5, 3, 3, 5, 4)
cargo_release = (2, 3, 3, 5, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 14, 15, 16, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 28, 29, 30, 30, 32, 33, 33, 34, 35, 36, 37, 37, 37, 37, 37, 37, 38, 38, 39, 41, 41, 43, 44, 44, 45, 45, 46, 46, 46, 47, 48, 49, 49, 51, 52, 52, 55, 56, 57, 57, 61, 61, 61, 62, 63, 64, 64, 65, 65, 66, 66, 67, 70, 70, 70, 71, 71, 71, 71, 72)
cargo_station_deadline = (33, 119, 119, 176, 59, 123, 72, 18, 171, 90, 175, 142, 88, 32, 157, 84, 131, 105, 170, 155, 156, 140, 38, 173, 123, 126, 91, 36, 87, 144, 127, 108, 40, 134, 141, 101, 163, 108, 144, 85, 98, 47, 47, 76, 175, 162, 48, 97, 87, 114, 164, 143, 54, 142, 55, 55, 56, 56, 56, 57, 118, 59, 160, 112, 95, 141, 168, 170, 105, 139, 71, 71, 71, 82, 73, 90, 135, 109, 161, 128, 151, 77, 80, 98, 169, 81, 129, 104, 97, 99)
cargo_max_delay = 3
cargo_service_time_load = 0.3333333333333333
cargo_service_time_unload = 0.25
'\nparameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html\n'
entropy = 8991598675325360468762009371570610170
child_seed_index = (0,) |
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Compute a resolution order for an object and it's bases
$Id: ro.py 25177 2004-06-02 13:17:31Z jim $
"""
def ro(object):
"""Compute a "resolution order" for an object
"""
return mergeOrderings([_flatten(object, [])])
def mergeOrderings(orderings, seen=None):
"""Merge multiple orderings so that within-ordering order is preserved
Orderings are constrained in such a way that if an object appears
in two or more orderings, then the suffix that begins with the
object must be in both orderings.
For example:
>>> _mergeOrderings([
... ['x', 'y', 'z'],
... ['q', 'z'],
... [1, 3, 5],
... ['z']
... ])
['x', 'y', 'q', 1, 3, 5, 'z']
"""
if seen is None:
seen = {}
result = []
orderings.reverse()
for ordering in orderings:
ordering = list(ordering)
ordering.reverse()
for o in ordering:
if o not in seen:
seen[o] = 1
result.append(o)
result.reverse()
return result
def _flatten(ob, result):
result.append(ob)
for base in ob.__bases__:
_flatten(base, result)
return result
| """Compute a resolution order for an object and it's bases
$Id: ro.py 25177 2004-06-02 13:17:31Z jim $
"""
def ro(object):
"""Compute a "resolution order" for an object
"""
return merge_orderings([_flatten(object, [])])
def merge_orderings(orderings, seen=None):
"""Merge multiple orderings so that within-ordering order is preserved
Orderings are constrained in such a way that if an object appears
in two or more orderings, then the suffix that begins with the
object must be in both orderings.
For example:
>>> _mergeOrderings([
... ['x', 'y', 'z'],
... ['q', 'z'],
... [1, 3, 5],
... ['z']
... ])
['x', 'y', 'q', 1, 3, 5, 'z']
"""
if seen is None:
seen = {}
result = []
orderings.reverse()
for ordering in orderings:
ordering = list(ordering)
ordering.reverse()
for o in ordering:
if o not in seen:
seen[o] = 1
result.append(o)
result.reverse()
return result
def _flatten(ob, result):
result.append(ob)
for base in ob.__bases__:
_flatten(base, result)
return result |
#############################################################################
#
# Copyright (c) 2008 by Casey Duncan and contributors
# All Rights Reserved.
#
# This software is subject to the provisions of the MIT License
# A copy of the license should accompany this distribution.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
#
#############################################################################
"""Particle system classes"""
__version__ = '$Id$'
class ParticleSystem(object):
def __init__(self, global_controllers=()):
"""Initialize the particle system, adding the specified global
controllers, if any
"""
# Tuples are used for global controllers to prevent
# unpleasant side-affects if they are added during update or draw
self.controllers = tuple(global_controllers)
self.groups = []
def add_global_controller(self, *controllers):
"""Add a global controller applied to all groups on update"""
self.controllers += controllers
def add_group(self, group):
"""Add a particle group to the system"""
self.groups.append(group)
def remove_group(self, group):
"""Remove a particle group from the system, raise ValueError
if the group is not in the system
"""
self.groups.remove(group)
def __len__(self):
"""Return the number of particle groups in the system"""
return len(self.groups)
def __iter__(self):
"""Iterate the system's particle groups"""
# Iterate a copy of the group list to so that the groups
# can be safely changed during iteration
return iter(list(self.groups))
def __contains__(self, group):
"""Return True if the specified group is in the system"""
return group in self.groups
def update(self, time_delta):
"""Update all particle groups in the system. time_delta is the
time since the last update (in arbitrary time units).
When updating, first the global controllers are applied to
all groups. Then update(time_delta) is called for all groups.
This method can be conveniently scheduled using the Pyglet
scheduler method: pyglet.clock.schedule_interval
"""
for group in self:
group.update(time_delta)
def run_ahead(self, time, framerate):
"""Run the particle system for the specified time frame at the
specified framerate to move time forward as quickly as possible.
Useful for "warming up" the particle system to reach a steady-state
before anything is drawn or to simply "skip ahead" in time.
time -- The amount of simulation time to skip over.
framerate -- The framerate of the simulation in updates per unit
time. Higher values will increase simulation accuracy,
but will take longer to compute.
"""
if time:
td = 1.0 / framerate
update = self.update
for i in xrange(int(time / td)):
update(td)
def draw(self):
"""Draw all particle groups in the system using their renderers.
This method is convenient to call from your Pyglet window's
on_draw handler to redraw particles when needed.
"""
for group in self:
group.draw()
| """Particle system classes"""
__version__ = '$Id$'
class Particlesystem(object):
def __init__(self, global_controllers=()):
"""Initialize the particle system, adding the specified global
controllers, if any
"""
self.controllers = tuple(global_controllers)
self.groups = []
def add_global_controller(self, *controllers):
"""Add a global controller applied to all groups on update"""
self.controllers += controllers
def add_group(self, group):
"""Add a particle group to the system"""
self.groups.append(group)
def remove_group(self, group):
"""Remove a particle group from the system, raise ValueError
if the group is not in the system
"""
self.groups.remove(group)
def __len__(self):
"""Return the number of particle groups in the system"""
return len(self.groups)
def __iter__(self):
"""Iterate the system's particle groups"""
return iter(list(self.groups))
def __contains__(self, group):
"""Return True if the specified group is in the system"""
return group in self.groups
def update(self, time_delta):
"""Update all particle groups in the system. time_delta is the
time since the last update (in arbitrary time units).
When updating, first the global controllers are applied to
all groups. Then update(time_delta) is called for all groups.
This method can be conveniently scheduled using the Pyglet
scheduler method: pyglet.clock.schedule_interval
"""
for group in self:
group.update(time_delta)
def run_ahead(self, time, framerate):
"""Run the particle system for the specified time frame at the
specified framerate to move time forward as quickly as possible.
Useful for "warming up" the particle system to reach a steady-state
before anything is drawn or to simply "skip ahead" in time.
time -- The amount of simulation time to skip over.
framerate -- The framerate of the simulation in updates per unit
time. Higher values will increase simulation accuracy,
but will take longer to compute.
"""
if time:
td = 1.0 / framerate
update = self.update
for i in xrange(int(time / td)):
update(td)
def draw(self):
"""Draw all particle groups in the system using their renderers.
This method is convenient to call from your Pyglet window's
on_draw handler to redraw particles when needed.
"""
for group in self:
group.draw() |
class World():
def __init__(self, size):
# World Size
self.x_range = size[0]
self.y_range = size[1]
if(len(size) == 3):
self.z_range = size[2]
# World Information
self.environment = None
self.agents = []
self.comm_messages = []
def add_agent(self, agent):
self.agents.append(agent)
def set_environment(self, environment):
self.environment = environment
# Agents behaviour:
# - Observe Environment
# - Send out Communication
# - Receive Communication and Perform Action
def update(self, delta):
if(self.environment):
self.environment.update(delta)
# First let the agent observe the current world.
# - While observing, agent should create a plan on what it wants to do
for agent in self.agents:
agent.observe(self)
# Collect all communication messages
# - A comm_message can contain information on what the agent is planning to do.
self.comm_messages = []
for agent in self.agents:
comm_message = agent.communicate()
if(comm_message):
self.comm_messages.append( comm_message )
# Perform the (planned) action
# - Action can be influenced based comm_message (e.g. planned action might cause collision)
for agent in self.agents:
agent.update(self, delta) | class World:
def __init__(self, size):
self.x_range = size[0]
self.y_range = size[1]
if len(size) == 3:
self.z_range = size[2]
self.environment = None
self.agents = []
self.comm_messages = []
def add_agent(self, agent):
self.agents.append(agent)
def set_environment(self, environment):
self.environment = environment
def update(self, delta):
if self.environment:
self.environment.update(delta)
for agent in self.agents:
agent.observe(self)
self.comm_messages = []
for agent in self.agents:
comm_message = agent.communicate()
if comm_message:
self.comm_messages.append(comm_message)
for agent in self.agents:
agent.update(self, delta) |
#
# PySNMP MIB module NNCEXTVPTTP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NNCEXTVPTTP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:13:17 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, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint")
atmVclVpi, = mibBuilder.importSymbols("ATM-MIB", "atmVclVpi")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
nncExtensions, = mibBuilder.importSymbols("NNCGNI0001-SMI", "nncExtensions")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Counter64, IpAddress, iso, Counter32, Gauge32, MibIdentifier, Unsigned32, ObjectIdentity, TimeTicks, NotificationType, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "IpAddress", "iso", "Counter32", "Gauge32", "MibIdentifier", "Unsigned32", "ObjectIdentity", "TimeTicks", "NotificationType", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Bits")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
nncExtVpttp = ModuleIdentity((1, 3, 6, 1, 4, 1, 123, 3, 80))
if mibBuilder.loadTexts: nncExtVpttp.setLastUpdated('200007211126Z')
if mibBuilder.loadTexts: nncExtVpttp.setOrganization('Alcatel Networks Corporation')
nncExtVpttpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 1))
nncExtVpttpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 3))
nncExtVpttpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 4))
nncCrVpTrailTerminationPointTable = MibTable((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1), )
if mibBuilder.loadTexts: nncCrVpTrailTerminationPointTable.setStatus('current')
nncCrVpTrailTerminationPointEntry = MibTableRow((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ATM-MIB", "atmVclVpi"))
if mibBuilder.loadTexts: nncCrVpTrailTerminationPointEntry.setStatus('current')
nncCrVpTrailTerminationPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disabled", 0), ("enabledWithNoAlarms", 1), ("enabledWithAlarms", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: nncCrVpTrailTerminationPoint.setStatus('current')
nncCrVpTrailTerminationPointGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 123, 3, 80, 3, 1)).setObjects(("NNCEXTVPTTP-MIB", "nncCrVpTrailTerminationPoint"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nncCrVpTrailTerminationPointGroup = nncCrVpTrailTerminationPointGroup.setStatus('current')
nncVpttpCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 123, 3, 80, 4, 1)).setObjects(("NNCEXTVPTTP-MIB", "nncCrVpTrailTerminationPointGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nncVpttpCompliance = nncVpttpCompliance.setStatus('current')
mibBuilder.exportSymbols("NNCEXTVPTTP-MIB", nncExtVpttpObjects=nncExtVpttpObjects, nncCrVpTrailTerminationPointTable=nncCrVpTrailTerminationPointTable, nncExtVpttpGroups=nncExtVpttpGroups, PYSNMP_MODULE_ID=nncExtVpttp, nncVpttpCompliance=nncVpttpCompliance, nncCrVpTrailTerminationPointGroup=nncCrVpTrailTerminationPointGroup, nncExtVpttp=nncExtVpttp, nncCrVpTrailTerminationPointEntry=nncCrVpTrailTerminationPointEntry, nncCrVpTrailTerminationPoint=nncCrVpTrailTerminationPoint, nncExtVpttpCompliances=nncExtVpttpCompliances)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, constraints_union, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint')
(atm_vcl_vpi,) = mibBuilder.importSymbols('ATM-MIB', 'atmVclVpi')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(nnc_extensions,) = mibBuilder.importSymbols('NNCGNI0001-SMI', 'nncExtensions')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(counter64, ip_address, iso, counter32, gauge32, mib_identifier, unsigned32, object_identity, time_ticks, notification_type, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'IpAddress', 'iso', 'Counter32', 'Gauge32', 'MibIdentifier', 'Unsigned32', 'ObjectIdentity', 'TimeTicks', 'NotificationType', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Bits')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
nnc_ext_vpttp = module_identity((1, 3, 6, 1, 4, 1, 123, 3, 80))
if mibBuilder.loadTexts:
nncExtVpttp.setLastUpdated('200007211126Z')
if mibBuilder.loadTexts:
nncExtVpttp.setOrganization('Alcatel Networks Corporation')
nnc_ext_vpttp_objects = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 1))
nnc_ext_vpttp_groups = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 3))
nnc_ext_vpttp_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 80, 4))
nnc_cr_vp_trail_termination_point_table = mib_table((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1))
if mibBuilder.loadTexts:
nncCrVpTrailTerminationPointTable.setStatus('current')
nnc_cr_vp_trail_termination_point_entry = mib_table_row((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'ATM-MIB', 'atmVclVpi'))
if mibBuilder.loadTexts:
nncCrVpTrailTerminationPointEntry.setStatus('current')
nnc_cr_vp_trail_termination_point = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 80, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disabled', 0), ('enabledWithNoAlarms', 1), ('enabledWithAlarms', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
nncCrVpTrailTerminationPoint.setStatus('current')
nnc_cr_vp_trail_termination_point_group = object_group((1, 3, 6, 1, 4, 1, 123, 3, 80, 3, 1)).setObjects(('NNCEXTVPTTP-MIB', 'nncCrVpTrailTerminationPoint'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nnc_cr_vp_trail_termination_point_group = nncCrVpTrailTerminationPointGroup.setStatus('current')
nnc_vpttp_compliance = module_compliance((1, 3, 6, 1, 4, 1, 123, 3, 80, 4, 1)).setObjects(('NNCEXTVPTTP-MIB', 'nncCrVpTrailTerminationPointGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nnc_vpttp_compliance = nncVpttpCompliance.setStatus('current')
mibBuilder.exportSymbols('NNCEXTVPTTP-MIB', nncExtVpttpObjects=nncExtVpttpObjects, nncCrVpTrailTerminationPointTable=nncCrVpTrailTerminationPointTable, nncExtVpttpGroups=nncExtVpttpGroups, PYSNMP_MODULE_ID=nncExtVpttp, nncVpttpCompliance=nncVpttpCompliance, nncCrVpTrailTerminationPointGroup=nncCrVpTrailTerminationPointGroup, nncExtVpttp=nncExtVpttp, nncCrVpTrailTerminationPointEntry=nncCrVpTrailTerminationPointEntry, nncCrVpTrailTerminationPoint=nncCrVpTrailTerminationPoint, nncExtVpttpCompliances=nncExtVpttpCompliances) |
# -*- coding: utf-8 -*-
"""This package contains code related to all authorization calls.
The main and currently only supported authorization method is OAuth2.
"""
| """This package contains code related to all authorization calls.
The main and currently only supported authorization method is OAuth2.
""" |
"""
https://www.codewars.com/kata/5412509bd436bd33920011bc/train/python
Given a string consisting of a cc number,
return a string in which all but the last four characters are changed into #
maskify("4556364607935616") == "############5616"
maskify( "64607935616") == "#######5616"
maskify( "1") == "1"
maskify( "") == ""
"""
def maskify(cc: str) -> str:
if len(cc) < 4:
return cc
return '#' * (len(cc)-4) + cc[-4:]
print(maskify("4556364607935616"))
print(maskify("64607935616"))
print(maskify("1"))
print(maskify(""))
| """
https://www.codewars.com/kata/5412509bd436bd33920011bc/train/python
Given a string consisting of a cc number,
return a string in which all but the last four characters are changed into #
maskify("4556364607935616") == "############5616"
maskify( "64607935616") == "#######5616"
maskify( "1") == "1"
maskify( "") == ""
"""
def maskify(cc: str) -> str:
if len(cc) < 4:
return cc
return '#' * (len(cc) - 4) + cc[-4:]
print(maskify('4556364607935616'))
print(maskify('64607935616'))
print(maskify('1'))
print(maskify('')) |
"""Helper functions that assist with testing, but are themselves not fixtures."""
def clear_data(db):
"""Clear all data in the database so the test suite has a clean slate to work with."""
for table in reversed(db.metadata.sorted_tables):
db.session.execute(table.delete())
db.session.commit()
def verify_model(loaded_data, expected, model_type):
"""
Check that each key of the expected result is the same as the returned data.
Ignores passwords and ids.
Recursively calls self on each object in wishlist.
"""
for key in expected:
if key == 'password' or key == 'wishlist':
continue
assert loaded_data[key] == expected[key]
assert loaded_data['type'] == model_type
if 'wishlist' in loaded_data:
for i in range(len(expected['wishlist'])):
verify_model(loaded_data['wishlist'][i], expected['wishlist'][i], 'book')
| """Helper functions that assist with testing, but are themselves not fixtures."""
def clear_data(db):
"""Clear all data in the database so the test suite has a clean slate to work with."""
for table in reversed(db.metadata.sorted_tables):
db.session.execute(table.delete())
db.session.commit()
def verify_model(loaded_data, expected, model_type):
"""
Check that each key of the expected result is the same as the returned data.
Ignores passwords and ids.
Recursively calls self on each object in wishlist.
"""
for key in expected:
if key == 'password' or key == 'wishlist':
continue
assert loaded_data[key] == expected[key]
assert loaded_data['type'] == model_type
if 'wishlist' in loaded_data:
for i in range(len(expected['wishlist'])):
verify_model(loaded_data['wishlist'][i], expected['wishlist'][i], 'book') |
_marker = []
def merge(base, overlay):
"""Recursively merge two dictionaries.
This function merges two dictionaries. It is intended to be used to
(re)create the full new state of a resource based on its current
state and any changes passed in via a PATCH request. The merge rules
are:
* if a key `k` is present in `base` but missing in `overlay` it is
untouched.
* if a key `k` is present in both `base` and `overlay`:
- and `base[k]` and `overlay[k]` are both dictionaries merge is
applied recursively,
- otherwise to value in `overlay` is used.
* if a key `k` is not present in `base`, but is present in `overlay`
it the value from `overlay` will be used.
.. code-block:: python
>>> merge({'foo': 'bar'}, {'foo': 'buz'})
{'foo': 'buz'}
>>> merge(['foo': 'bar'}, {'buz': True})
{'foo': 'bar', 'buz': True}
:param dict base: Dictionary with default data.
:param dict overlay: Dictioanry with data to overlay on top of `base`.
:rtype: dict
:return: A copy of `base` with data from `overlay` added.
"""
new_base = base.copy()
for (key, new_value) in overlay.items():
old_value = new_base.get(key, _marker)
if old_value is _marker:
new_base[key] = new_value
elif isinstance(old_value, dict):
if isinstance(new_value, dict):
new_base[key] = merge(old_value, new_value)
else:
new_base[key] = new_value
else:
new_base[key] = new_value
return new_base
def add_missing(data, defaults):
for (key, value) in defaults.items():
if key not in data:
data[key] = value
return data
__all__ = ['merge']
| _marker = []
def merge(base, overlay):
"""Recursively merge two dictionaries.
This function merges two dictionaries. It is intended to be used to
(re)create the full new state of a resource based on its current
state and any changes passed in via a PATCH request. The merge rules
are:
* if a key `k` is present in `base` but missing in `overlay` it is
untouched.
* if a key `k` is present in both `base` and `overlay`:
- and `base[k]` and `overlay[k]` are both dictionaries merge is
applied recursively,
- otherwise to value in `overlay` is used.
* if a key `k` is not present in `base`, but is present in `overlay`
it the value from `overlay` will be used.
.. code-block:: python
>>> merge({'foo': 'bar'}, {'foo': 'buz'})
{'foo': 'buz'}
>>> merge(['foo': 'bar'}, {'buz': True})
{'foo': 'bar', 'buz': True}
:param dict base: Dictionary with default data.
:param dict overlay: Dictioanry with data to overlay on top of `base`.
:rtype: dict
:return: A copy of `base` with data from `overlay` added.
"""
new_base = base.copy()
for (key, new_value) in overlay.items():
old_value = new_base.get(key, _marker)
if old_value is _marker:
new_base[key] = new_value
elif isinstance(old_value, dict):
if isinstance(new_value, dict):
new_base[key] = merge(old_value, new_value)
else:
new_base[key] = new_value
else:
new_base[key] = new_value
return new_base
def add_missing(data, defaults):
for (key, value) in defaults.items():
if key not in data:
data[key] = value
return data
__all__ = ['merge'] |
def remdup(l):
dupr=[]
for i in l:
if i not in dupr:
dupr.append(i)
l=dupr
print(l)
| def remdup(l):
dupr = []
for i in l:
if i not in dupr:
dupr.append(i)
l = dupr
print(l) |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 29 09:25:41 2021
@author: Easin
"""
n,k = input().split()
k = int(k)
count = 0
a = input().split()
for elm in range(len(a)):
a[elm] = int(a[elm])
if int(a[k-1]) <= a[elm] and a[elm]:
count += 1
print(count)
| """
Created on Tue Jun 29 09:25:41 2021
@author: Easin
"""
(n, k) = input().split()
k = int(k)
count = 0
a = input().split()
for elm in range(len(a)):
a[elm] = int(a[elm])
if int(a[k - 1]) <= a[elm] and a[elm]:
count += 1
print(count) |
description = 'STRESS-SPEC setup with Eulerian cradle'
group = 'basic'
includes = [
'system', 'monochromator', 'detector', 'sampletable', 'primaryslit',
'slits', 'reactor'
]
excludes = ['stressi', 'robot']
sysconfig = dict(
datasinks = ['caresssink'],
)
devices = dict(
chis = device('nicos.devices.generic.Axis',
description = 'Simulated CHIS axis',
motor = device('nicos.devices.generic.VirtualMotor',
fmtstr = '%.2f',
unit = 'deg',
abslimits = (-180, 180),
lowlevel = True,
speed = 2,
),
precision = 0.001,
),
phis = device('nicos.devices.generic.Axis',
description = 'Simulated PHIS axis',
motor = device('nicos.devices.generic.VirtualMotor',
fmtstr = '%.2f',
unit = 'deg',
abslimits = (-720, 720),
lowlevel = True,
speed = 2,
),
precision = 0.001,
),
)
| description = 'STRESS-SPEC setup with Eulerian cradle'
group = 'basic'
includes = ['system', 'monochromator', 'detector', 'sampletable', 'primaryslit', 'slits', 'reactor']
excludes = ['stressi', 'robot']
sysconfig = dict(datasinks=['caresssink'])
devices = dict(chis=device('nicos.devices.generic.Axis', description='Simulated CHIS axis', motor=device('nicos.devices.generic.VirtualMotor', fmtstr='%.2f', unit='deg', abslimits=(-180, 180), lowlevel=True, speed=2), precision=0.001), phis=device('nicos.devices.generic.Axis', description='Simulated PHIS axis', motor=device('nicos.devices.generic.VirtualMotor', fmtstr='%.2f', unit='deg', abslimits=(-720, 720), lowlevel=True, speed=2), precision=0.001)) |
# Complete the function below.
def findSum(a, b):
return(c)
| def find_sum(a, b):
return c |
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
# %% hello cell for 8
hello="Welcome 8!!!"
print(hello)
# %% new cell to do sth
n1 = 8
n2 = 6
print("Product of ",n1," and ",n2, "is", n1*n2)
# %% new cell--trouble maker
print(hello,n1*dfasljn2)
# %% one more cell
print("Checked!")
# %% copied from notebook
# Welcome!
hello="Welcome 2021!!!"
print(hello)
# %% copied from notebook markdown
* print("Welcome 2021!")
| """
Spyder Editor
This is a temporary script file.
"""
hello = 'Welcome 8!!!'
print(hello)
n1 = 8
n2 = 6
print('Product of ', n1, ' and ', n2, 'is', n1 * n2)
print(hello, n1 * dfasljn2)
print('Checked!')
hello = 'Welcome 2021!!!'
print(hello)
*print('Welcome 2021!') |
# -*- coding: utf-8 -*-
if not session.cart:
# instantiate new cart
session.cart, session.balance = [], 0
def index():
now = datetime.datetime.now()
span = datetime.timedelta(days=10)
product_list = db(db.product.created_on >= (now-span)).select(limitby=(0,3), orderby=~db.product.created_on)
return locals()
def user():
"""
exposes:
http://..../[app]/default/user/login
http://..../[app]/default/user/logout
http://..../[app]/default/user/register
http://..../[app]/default/user/profile
http://..../[app]/default/user/retrieve_password
http://..../[app]/default/user/change_password
http://..../[app]/default/user/manage_users (requires membership in
use @auth.requires_login()
@auth.requires_membership('group name')
@auth.requires_permission('read','table name',record_id)
to decorate functions that need access control
"""
return dict(form=auth())
def register():
form = auth.register()
return locals()
@cache.action()
def download():
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
"""
return response.download(request, db) | if not session.cart:
(session.cart, session.balance) = ([], 0)
def index():
now = datetime.datetime.now()
span = datetime.timedelta(days=10)
product_list = db(db.product.created_on >= now - span).select(limitby=(0, 3), orderby=~db.product.created_on)
return locals()
def user():
"""
exposes:
http://..../[app]/default/user/login
http://..../[app]/default/user/logout
http://..../[app]/default/user/register
http://..../[app]/default/user/profile
http://..../[app]/default/user/retrieve_password
http://..../[app]/default/user/change_password
http://..../[app]/default/user/manage_users (requires membership in
use @auth.requires_login()
@auth.requires_membership('group name')
@auth.requires_permission('read','table name',record_id)
to decorate functions that need access control
"""
return dict(form=auth())
def register():
form = auth.register()
return locals()
@cache.action()
def download():
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
"""
return response.download(request, db) |
#
# Copyright (C) 2018 Red Hat, Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
class NodeRule(object):
"""
Definition of a Skydive Node rule.
"""
def __init__(self, uuid, action, metadata, name="",
description="", query=""):
self.uuid = uuid
self.name = name
self.description = description
self.metadata = metadata
self.action = action
self.query = query
def repr_json(self):
obj = {
"UUID": self.uuid,
"Action": self.action,
"Metadata": self.metadata,
}
if self.name:
obj["Name"] = self.name
if self.description:
obj["Description"] = self.description
if self.query:
obj["Query"] = self.query
return obj
@classmethod
def from_object(self, obj):
return self(obj["UUID"], obj["Action"], obj["Metadata"],
name=obj.get("Name"),
description=obj.get("Description"),
query=obj.get("Query"))
class EdgeRule(object):
"""
Definition of a Skydive Edge rule.
"""
def __init__(self, uuid, src, dst, metadata, name="", description=""):
self.uuid = uuid
self.name = name
self.description = description
self.src = src
self.dst = dst
self.metadata = metadata
def repr_json(self):
obj = {
"UUID": self.uuid,
"Src": self.src,
"Dst": self.dst,
"Metadata": self.metadata,
}
if self.name:
obj["Name"] = self.name
if self.description:
obj["Description"] = self.description
@classmethod
def from_object(self, obj):
return self(obj["UUID"], obj["Src"], obj["Dst"], obj["Metadata"],
name=obj.get("Name"),
description=obj.get("Description"))
| class Noderule(object):
"""
Definition of a Skydive Node rule.
"""
def __init__(self, uuid, action, metadata, name='', description='', query=''):
self.uuid = uuid
self.name = name
self.description = description
self.metadata = metadata
self.action = action
self.query = query
def repr_json(self):
obj = {'UUID': self.uuid, 'Action': self.action, 'Metadata': self.metadata}
if self.name:
obj['Name'] = self.name
if self.description:
obj['Description'] = self.description
if self.query:
obj['Query'] = self.query
return obj
@classmethod
def from_object(self, obj):
return self(obj['UUID'], obj['Action'], obj['Metadata'], name=obj.get('Name'), description=obj.get('Description'), query=obj.get('Query'))
class Edgerule(object):
"""
Definition of a Skydive Edge rule.
"""
def __init__(self, uuid, src, dst, metadata, name='', description=''):
self.uuid = uuid
self.name = name
self.description = description
self.src = src
self.dst = dst
self.metadata = metadata
def repr_json(self):
obj = {'UUID': self.uuid, 'Src': self.src, 'Dst': self.dst, 'Metadata': self.metadata}
if self.name:
obj['Name'] = self.name
if self.description:
obj['Description'] = self.description
@classmethod
def from_object(self, obj):
return self(obj['UUID'], obj['Src'], obj['Dst'], obj['Metadata'], name=obj.get('Name'), description=obj.get('Description')) |
class ErrorBlinkStyle(Enum,IComparable,IFormattable,IConvertible):
"""
Specifies constants indicating when the error icon,supplied by an System.Windows.Forms.ErrorProvider,should blink to alert the user that an error has occurred.
enum ErrorBlinkStyle,values: AlwaysBlink (1),BlinkIfDifferentError (0),NeverBlink (2)
"""
def Instance(self):
""" This function has been arbitrarily put into the stubs"""
return ErrorBlinkStyle()
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self,*args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self,*args):
pass
def __gt__(self,*args):
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self,*args):
pass
def __lt__(self,*args):
pass
def __ne__(self,*args):
pass
def __reduce_ex__(self,*args):
pass
def __str__(self,*args):
pass
AlwaysBlink=None
BlinkIfDifferentError=None
NeverBlink=None
value__=None
| class Errorblinkstyle(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies constants indicating when the error icon,supplied by an System.Windows.Forms.ErrorProvider,should blink to alert the user that an error has occurred.
enum ErrorBlinkStyle,values: AlwaysBlink (1),BlinkIfDifferentError (0),NeverBlink (2)
"""
def instance(self):
""" This function has been arbitrarily put into the stubs"""
return error_blink_style()
def __eq__(self, *args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self, *args):
pass
def __gt__(self, *args):
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args):
pass
def __lt__(self, *args):
pass
def __ne__(self, *args):
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass
always_blink = None
blink_if_different_error = None
never_blink = None
value__ = None |
class A:
X = 0
def __init__(self,v = 0):
self.Y = v
A.X += v
a = A()
b = A(1)
c = A(2)
print(c.X)
# Prints 3 | class A:
x = 0
def __init__(self, v=0):
self.Y = v
A.X += v
a = a()
b = a(1)
c = a(2)
print(c.X) |
URL = 'https://raw.githubusercontent.com/sarumont/py-trello/master/CHANGELOG'
def get_head(line, releases, **kwargs):
for release in releases:
print("checking", release, "vs", line)
if "v{}".format(release) == line:
return release
return False
def get_urls(releases, **kwargs):
return {URL}, set()
| url = 'https://raw.githubusercontent.com/sarumont/py-trello/master/CHANGELOG'
def get_head(line, releases, **kwargs):
for release in releases:
print('checking', release, 'vs', line)
if 'v{}'.format(release) == line:
return release
return False
def get_urls(releases, **kwargs):
return ({URL}, set()) |
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Simple example using doctest
"""
# end_pymotw_header
def my_function(a, b):
"""
>>> my_function(2, 3)
6
>>> my_function('a', 3)
'aaa'
"""
return a * b
| """Simple example using doctest
"""
def my_function(a, b):
"""
>>> my_function(2, 3)
6
>>> my_function('a', 3)
'aaa'
"""
return a * b |
class Memento:
def __init__(self, balance):
self.balance = balance
class BankAccount:
def __init__(self, balance=0):
self.balance = balance
## SAVE all states
self.changes = [Memento(self.balance)]
## NEED to know index of current state for undo/redo
self.current = 0
def deposit(self, amount):
self.balance += amount
m = Memento(self.balance)
self.changes.append(m)
self.current += 1
return m
# roll back to preserved system
def restore(self, memento):
if memento: # memento can be None
self.balance = memento.balance
self.changes.append(memento)
self.current = len(self.changes) - 1
# points to last element in list
def undo(self):
# can undo only when current position is not zero
if self.current > 0:
self.current -= 1 # go back
m = self.changes[self.current]
self.balance = m.balance
return m
return None
def redo(self):
# can redo only when current position is last
if self.current + 1 < len(self.changes):
self.current += 1 # go back
m = self.changes[self.current]
self.balance = m.balance
return m
return None
def __str__(self):
return f'Balance = {self.balance}'
if __name__ == "__main__":
'''
# no memento for init balance - since its object initializer
ba = BankAccount(100)
m1 = ba.deposit(50) # memento1
m2 = ba.deposit(25) # memento2
print(ba) # Balance = 175
# restore the state
ba.restore(m1)
print(ba) # Balance = 150
ba.restore(m2)
print(ba) # Balance = 175
'''
## UNDO and REDO
ba = BankAccount(100)
ba.deposit(50)
ba.deposit(25)
print(ba) # Balance = 175
ba.undo()
print(f'Undo 1: {ba}')
ba.undo()
print(f'Undo 2: {ba}')
ba.redo()
print(f'Redo 1: {ba}')
ba.redo()
print(f'Redo 2: {ba}')
| class Memento:
def __init__(self, balance):
self.balance = balance
class Bankaccount:
def __init__(self, balance=0):
self.balance = balance
self.changes = [memento(self.balance)]
self.current = 0
def deposit(self, amount):
self.balance += amount
m = memento(self.balance)
self.changes.append(m)
self.current += 1
return m
def restore(self, memento):
if memento:
self.balance = memento.balance
self.changes.append(memento)
self.current = len(self.changes) - 1
def undo(self):
if self.current > 0:
self.current -= 1
m = self.changes[self.current]
self.balance = m.balance
return m
return None
def redo(self):
if self.current + 1 < len(self.changes):
self.current += 1
m = self.changes[self.current]
self.balance = m.balance
return m
return None
def __str__(self):
return f'Balance = {self.balance}'
if __name__ == '__main__':
'\n # no memento for init balance - since its object initializer\n ba = BankAccount(100)\n m1 = ba.deposit(50) # memento1\n m2 = ba.deposit(25) # memento2\n print(ba) # Balance = 175\n\n # restore the state\n ba.restore(m1)\n print(ba) # Balance = 150\n\n ba.restore(m2)\n print(ba) # Balance = 175\n '
ba = bank_account(100)
ba.deposit(50)
ba.deposit(25)
print(ba)
ba.undo()
print(f'Undo 1: {ba}')
ba.undo()
print(f'Undo 2: {ba}')
ba.redo()
print(f'Redo 1: {ba}')
ba.redo()
print(f'Redo 2: {ba}') |
#!/bin/python
# Solution for https://www.hackerrank.com/challenges/game-of-thrones
string = raw_input().strip()
def can_be_palindrome(data):
odd_requencies = 0
for l in set(data):
current_frequency = data.count(l)
if current_frequency % 2:
odd_requencies += 1
if odd_requencies > 1:
return False
return True
palindromable = can_be_palindrome(string)
if not palindromable:
print("NO")
else:
print("YES")
| string = raw_input().strip()
def can_be_palindrome(data):
odd_requencies = 0
for l in set(data):
current_frequency = data.count(l)
if current_frequency % 2:
odd_requencies += 1
if odd_requencies > 1:
return False
return True
palindromable = can_be_palindrome(string)
if not palindromable:
print('NO')
else:
print('YES') |
#https://leetcode.com/problems/combination-sum-ii/description/
class Solution(object):
def combinationSum2(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
self.candidates = candidates
self.size = len(candidates)
self.rtype = []
def findsums(valuesum,valuelist, index, target):
complete = False
if valuesum > target:
return
elif valuesum == target:
if valuelist not in self.rtype:
self.rtype.append(valuelist)
return
while index < self.size:
if valuesum + self.candidates[index] == target:
good = valuelist[:]
good.append(self.candidates[index])
if good not in self.rtype:
self.rtype.append(good )
return
elif valuesum + self.candidates[index] < target:
less = valuelist[:]
less.append(self.candidates[index])
findsums(valuesum + self.candidates[index],less,index + 1,target)
elif valuesum + self.candidates[index] > target:
great = valuelist[:]
return
index += 1
count = 0
self.candidates.sort()
while count < self.size :
findsums(self.candidates[count],[self.candidates[count]],count + 1,target)
count += 1
return self.rtype
| class Solution(object):
def combination_sum2(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
self.candidates = candidates
self.size = len(candidates)
self.rtype = []
def findsums(valuesum, valuelist, index, target):
complete = False
if valuesum > target:
return
elif valuesum == target:
if valuelist not in self.rtype:
self.rtype.append(valuelist)
return
while index < self.size:
if valuesum + self.candidates[index] == target:
good = valuelist[:]
good.append(self.candidates[index])
if good not in self.rtype:
self.rtype.append(good)
return
elif valuesum + self.candidates[index] < target:
less = valuelist[:]
less.append(self.candidates[index])
findsums(valuesum + self.candidates[index], less, index + 1, target)
elif valuesum + self.candidates[index] > target:
great = valuelist[:]
return
index += 1
count = 0
self.candidates.sort()
while count < self.size:
findsums(self.candidates[count], [self.candidates[count]], count + 1, target)
count += 1
return self.rtype |
#!/usr/bin/python3
with open('01_in.txt') as f:
lines = f.read()
data = [ float(x) for x in lines.split('\n') if x]
increases = 0
for i in range(1, len(data)):
increases += data[i] > data[i-1]
print(increases)
increases = 0
for i in range(3, len(data)):
old = sum( data[i-3:i] )
new = sum( data[i-2:i+1] )
increases += new > old
print(increases)
| with open('01_in.txt') as f:
lines = f.read()
data = [float(x) for x in lines.split('\n') if x]
increases = 0
for i in range(1, len(data)):
increases += data[i] > data[i - 1]
print(increases)
increases = 0
for i in range(3, len(data)):
old = sum(data[i - 3:i])
new = sum(data[i - 2:i + 1])
increases += new > old
print(increases) |
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 25 14:20:52 2021
@author: caear
"""
def get_ratios(L1, L2):
"""
Parameters
----------
L1 and L2 are lists of equal length of numbers
Returns a list containing L1[i/L2[i]
-------
"""
ratios = []
for index in range(len(L1)):
try:
ratios.append(L1[index]/float(L2[index]))
except ZeroDivisionError:
ratios.append(float('NaN'))
except:
raise ValueError('get_ratios called with bard arg')
return ratios
| """
Created on Thu Feb 25 14:20:52 2021
@author: caear
"""
def get_ratios(L1, L2):
"""
Parameters
----------
L1 and L2 are lists of equal length of numbers
Returns a list containing L1[i/L2[i]
-------
"""
ratios = []
for index in range(len(L1)):
try:
ratios.append(L1[index] / float(L2[index]))
except ZeroDivisionError:
ratios.append(float('NaN'))
except:
raise value_error('get_ratios called with bard arg')
return ratios |
'''
Created on 14.04.2016
@author: Tobias
'''
| """
Created on 14.04.2016
@author: Tobias
""" |
class Function:
def __init__(self, model_name, complexity_level, equation_string, output, mse):
self.model_name = model_name
self.complexity_level = complexity_level
self.equation_string = equation_string
self.output = output
self.mse = mse
def __str__(self):
'''
For example: "y = 2x + 5"
'''
return self.equation_string | class Function:
def __init__(self, model_name, complexity_level, equation_string, output, mse):
self.model_name = model_name
self.complexity_level = complexity_level
self.equation_string = equation_string
self.output = output
self.mse = mse
def __str__(self):
"""
For example: "y = 2x + 5"
"""
return self.equation_string |
#-----------------------------------------------------------------------------
# Name: File Reading (fileReading - one line at a time.py)
# Purpose: To provide examples of how to read from files.
# Example from http://openbookproject.net/thinkcs/python/english3e/files.html
#
# Author: Mr. Brooks
# Created: 21-Oct-2021
# Updated: 21-Oct-2021
#-----------------------------------------------------------------------------
file = open("fruit.txt", "r") # Open the file
while True: # Keep reading forever
theLine = file.readline() # Try to read next line
if len(theLine) == 0: # If there are no more lines
break # Leave the loop
# Now process the line we've just read
print(theLine, end="")
file.close() #Close the file for another program can use it | file = open('fruit.txt', 'r')
while True:
the_line = file.readline()
if len(theLine) == 0:
break
print(theLine, end='')
file.close() |
class Solution:
def mySqrt(self, x: int) -> int:
if x == 0:
return 0
if x == 1:
return 1
pivot = x // 2
left, right = 0, pivot
while left <= right:
mid = (left + right) // 2
nxt = (mid + 1) * (mid + 1)
prev = (mid - 1) * (mid - 1)
pwr = mid * mid
if (pwr == x) or ((pwr < x) and (prev < x) and (nxt > x)):
return mid
elif mid * mid < x:
left = mid + 1
else:
right = mid - 1
return -1
s = Solution()
print(s.mySqrt(8))
print(s.mySqrt(10)) | class Solution:
def my_sqrt(self, x: int) -> int:
if x == 0:
return 0
if x == 1:
return 1
pivot = x // 2
(left, right) = (0, pivot)
while left <= right:
mid = (left + right) // 2
nxt = (mid + 1) * (mid + 1)
prev = (mid - 1) * (mid - 1)
pwr = mid * mid
if pwr == x or (pwr < x and prev < x and (nxt > x)):
return mid
elif mid * mid < x:
left = mid + 1
else:
right = mid - 1
return -1
s = solution()
print(s.mySqrt(8))
print(s.mySqrt(10)) |
PENN_TREEBANK_SRC = "https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/treebank.zip"
LOCAL_CORPORA_DIR_UNIX = "/usr/share/nl_data"
LOCAL_CORPORA_DIR_WINDOWS = "C:\\nl_data"
LOCAL_CORPORA_DIR_MAC = "/usr/local/share/nl_data" | penn_treebank_src = 'https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/treebank.zip'
local_corpora_dir_unix = '/usr/share/nl_data'
local_corpora_dir_windows = 'C:\\nl_data'
local_corpora_dir_mac = '/usr/local/share/nl_data' |
class ValidationError(ValueError):
"""
:param errors: a list of errors
"""
def __init__(self, errors):
self.errors = errors
class InconsistentOrderError(TypeError):
pass
| class Validationerror(ValueError):
"""
:param errors: a list of errors
"""
def __init__(self, errors):
self.errors = errors
class Inconsistentordererror(TypeError):
pass |
"""
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
"""
# Write your code here
n, k = map(int, input().strip().split())
a = sorted(map(int, input().strip().split()))
samosas = 0
for i in range(n):
samosas += a[i]
if samosas > k:
print(i)
break
else:
print(n)
| """
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
"""
(n, k) = map(int, input().strip().split())
a = sorted(map(int, input().strip().split()))
samosas = 0
for i in range(n):
samosas += a[i]
if samosas > k:
print(i)
break
else:
print(n) |
# Atharv Kolhar
"""
Strings
"""
var_string = "The quick brown fox jumps over the lazy dog"
# Length of the string
print(len(var_string))
# Slicing the string
print(var_string[0:3])
# This will print characters at index 0,1,2
# Question
# #lazy dog
# Last Character Printing
print(var_string[-3:])
# Replace Character
var_string_new = var_string.replace('T', 't')
print(var_string_new)
# String Concatenation
var_1 = "Python "
var_3 = "Cool"
var_2 = "is "
var_concat = var_1 + var_2 + var_3
print(var_concat)
| """
Strings
"""
var_string = 'The quick brown fox jumps over the lazy dog'
print(len(var_string))
print(var_string[0:3])
print(var_string[-3:])
var_string_new = var_string.replace('T', 't')
print(var_string_new)
var_1 = 'Python '
var_3 = 'Cool'
var_2 = 'is '
var_concat = var_1 + var_2 + var_3
print(var_concat) |
class OpbTestMockable():
def __init__(self, case, filename):
self.case = case
self.filename = filename
self.prepender = []
self.replacers = {}
self.inputs = {}
self.proctotest = ""
self.appender = ["\nopbtestquitfn: output sD, FF\n"]
def testproc(self, procname):
self.proctotest = procname
return self
def testfunc(self, funcname):
return self.testproc(funcname)
def setregs(self, regmap):
for key, val in regmap.items():
self.prepender.append("load " + key + ", " + str(val) + "\n")
return self
def replace(self, statement1, statement2):
self.replacers[statement1] = statement2
return self
def mockproc(self, procname):
return self.replace("call " + procname, "load s0, s0")
def mockinput(self, port, value):
self.inputs[port] = value
return self
def execute(self):
with open(self.filename, 'r') as original:
data = original.readlines()
def find_line_between(data, statement1, statement2):
linenr = 0
startcounting = False
for line in data:
if statement1 in line:
startcounting = True
if startcounting and statement2 in line:
break
linenr += 1
if linenr + 1 == len(data):
self.case.fail("No statements between " + statement1 + " and " + statement2 + " found")
return linenr
def find_last_closing_bracket(data, procname):
procname += "(" # add (, could also have been a call
linenr = 0
startcounting = False
amount_of_brackets_open = 0
for line in data:
if procname in line:
startcounting = True
if startcounting:
if '}' in line:
amount_of_brackets_open -= 1
elif '{' in line:
amount_of_brackets_open += 1
if amount_of_brackets_open == 0:
break
linenr += 1
if linenr + 1 == len(data):
self.case.fail("Proc " + procname + ": no ending bracket } found")
return linenr
def setupproc(data):
self.prepender.append("jump " + self.proctotest + "\n")
linenr = find_last_closing_bracket(data, self.proctotest)
data = data[0:linenr] + ["jump opbtestquitfn\n"] + data[linenr:]
return data
def setupinputs(data):
newdata = []
for line in data:
if line.startswith("input "):
found = False
for key, value in self.inputs.items():
if ", " + str(key) in line or "," + str(key) in line:
newdata.append(line.split(",")[0].replace("input", "load") + ", " + str(value) + "\n")
found = True
if found is False:
newdata.append(line)
else:
newdata.append(line)
return newdata
def setupreplaces(data):
newdata = []
for line in data:
found = False
for key, value in self.replacers.items():
if line.upper().replace(" ", "").replace("\t", "").startswith(key.upper().replace(" ", "")):
newdata.append(value + "\n")
found = True
if found is False:
newdata.append(line)
return newdata
if len(self.proctotest) > 0:
data = setupproc(data)
if len(self.inputs) > 0:
data = setupinputs(data)
if len(self.replacers) > 0:
data = setupreplaces(data)
firstjump = find_line_between(data, "jump", "jump")
data = data[0:firstjump] + self.prepender + data[firstjump:] + self.appender
with open(self.filename, 'w') as modified:
modified.writelines(data)
return self.case.execute_file(self.filename)
| class Opbtestmockable:
def __init__(self, case, filename):
self.case = case
self.filename = filename
self.prepender = []
self.replacers = {}
self.inputs = {}
self.proctotest = ''
self.appender = ['\nopbtestquitfn: output sD, FF\n']
def testproc(self, procname):
self.proctotest = procname
return self
def testfunc(self, funcname):
return self.testproc(funcname)
def setregs(self, regmap):
for (key, val) in regmap.items():
self.prepender.append('load ' + key + ', ' + str(val) + '\n')
return self
def replace(self, statement1, statement2):
self.replacers[statement1] = statement2
return self
def mockproc(self, procname):
return self.replace('call ' + procname, 'load s0, s0')
def mockinput(self, port, value):
self.inputs[port] = value
return self
def execute(self):
with open(self.filename, 'r') as original:
data = original.readlines()
def find_line_between(data, statement1, statement2):
linenr = 0
startcounting = False
for line in data:
if statement1 in line:
startcounting = True
if startcounting and statement2 in line:
break
linenr += 1
if linenr + 1 == len(data):
self.case.fail('No statements between ' + statement1 + ' and ' + statement2 + ' found')
return linenr
def find_last_closing_bracket(data, procname):
procname += '('
linenr = 0
startcounting = False
amount_of_brackets_open = 0
for line in data:
if procname in line:
startcounting = True
if startcounting:
if '}' in line:
amount_of_brackets_open -= 1
elif '{' in line:
amount_of_brackets_open += 1
if amount_of_brackets_open == 0:
break
linenr += 1
if linenr + 1 == len(data):
self.case.fail('Proc ' + procname + ': no ending bracket } found')
return linenr
def setupproc(data):
self.prepender.append('jump ' + self.proctotest + '\n')
linenr = find_last_closing_bracket(data, self.proctotest)
data = data[0:linenr] + ['jump opbtestquitfn\n'] + data[linenr:]
return data
def setupinputs(data):
newdata = []
for line in data:
if line.startswith('input '):
found = False
for (key, value) in self.inputs.items():
if ', ' + str(key) in line or ',' + str(key) in line:
newdata.append(line.split(',')[0].replace('input', 'load') + ', ' + str(value) + '\n')
found = True
if found is False:
newdata.append(line)
else:
newdata.append(line)
return newdata
def setupreplaces(data):
newdata = []
for line in data:
found = False
for (key, value) in self.replacers.items():
if line.upper().replace(' ', '').replace('\t', '').startswith(key.upper().replace(' ', '')):
newdata.append(value + '\n')
found = True
if found is False:
newdata.append(line)
return newdata
if len(self.proctotest) > 0:
data = setupproc(data)
if len(self.inputs) > 0:
data = setupinputs(data)
if len(self.replacers) > 0:
data = setupreplaces(data)
firstjump = find_line_between(data, 'jump', 'jump')
data = data[0:firstjump] + self.prepender + data[firstjump:] + self.appender
with open(self.filename, 'w') as modified:
modified.writelines(data)
return self.case.execute_file(self.filename) |
known_plugins = {
"BMP-FI": "imageio.plugins.freeimage",
"BMP-PIL": "imageio.plugins.pillow_legacy",
"BSDF": "imageio.plugins.bsdf",
"BUFR-PIL": "imageio.plugins.pillow_legacy",
"CUR-PIL": "imageio.plugins.pillow_legacy",
"CUT-FI": "imageio.plugins.freeimage",
"DCX-PIL": "imageio.plugins.pillow_legacy",
"DDS-FI": "imageio.plugins.freeimage",
"DDS-PIL": "imageio.plugins.pillow_legacy",
"DIB-PIL": "imageio.plugins.pillow_legacy",
"DICOM": "imageio.plugins.dicom",
"EPS-PIL": "imageio.plugins.pillow_legacy",
"EXR-FI": "imageio.plugins.freeimage",
"FEI": "imageio.plugins.feisem",
"FFMPEG": "imageio.plugins.ffmpeg",
"FITS-PIL": "imageio.plugins.pillow_legacy",
"fits": "imageio.plugins.fits",
"FLI-PIL": "imageio.plugins.pillow_legacy",
"FPX-PIL": "imageio.plugins.pillow_legacy",
"FTEX-PIL": "imageio.plugins.pillow_legacy",
"G3-FI": "imageio.plugins.freeimage",
"GBR-PIL": "imageio.plugins.pillow_legacy",
"GDAL": "imageio.plugins.gdal",
"GIF-FI": "imageio.plugins.freeimage",
"GIF-PIL": "imageio.plugins.pillow_legacy",
"GRIB-PIL": "imageio.plugins.pillow_legacy",
"HDF5-PIL": "imageio.plugins.pillow_legacy",
"HDR-FI": "imageio.plugins.freeimage",
"ICNS-PIL": "imageio.plugins.pillow_legacy",
"ICO-FI": "imageio.plugins.freeimage",
"ICO-PIL": "imageio.plugins.pillow_legacy",
"IFF-FI": "imageio.plugins.freeimage",
"IM-PIL": "imageio.plugins.pillow_legacy",
"IMT-PIL": "imageio.plugins.pillow_legacy",
"IPTC-PIL": "imageio.plugins.pillow_legacy",
"itk": "imageio.plugins.simpleitk",
"J2K-FI": "imageio.plugins.freeimage",
"JNG-FI": "imageio.plugins.freeimage",
"JP2-FI": "imageio.plugins.freeimage",
"JPEG-FI": "imageio.plugins.freeimage",
"JPEG-PIL": "imageio.plugins.pillow_legacy",
"JPEG-XR-FI": "imageio.plugins.freeimage",
"JPEG2000-PIL": "imageio.plugins.pillow_legacy",
"KOALA-FI": "imageio.plugins.freeimage",
"LYTRO-F01-RAW": "imageio.plugins.lytro",
"LYTRO-ILLUM-RAW": "imageio.plugins.lytro",
"LYTRO-LFP": "imageio.plugins.lytro",
"LYTRO-LFR": "imageio.plugins.lytro",
"MCIDAS-PIL": "imageio.plugins.pillow_legacy",
"MIC-PIL": "imageio.plugins.pillow_legacy",
"MPO-PIL": "imageio.plugins.pillow_legacy",
"MSP-PIL": "imageio.plugins.pillow_legacy",
"npz": "imageio.plugins.npz",
"PBM-FI": "imageio.plugins.freeimage",
"PBMRAW-FI": "imageio.plugins.freeimage",
"PCD-FI": "imageio.plugins.freeimage",
"PCD-PIL": "imageio.plugins.pillow_legacy",
"PCX-FI": "imageio.plugins.freeimage",
"PCX-PIL": "imageio.plugins.pillow_legacy",
"PFM-FI": "imageio.plugins.freeimage",
"PGM-FI": "imageio.plugins.freeimage",
"PGMRAW-FI": "imageio.plugins.freeimage",
"PICT-PIL": "imageio.plugins.pillow_legacy",
"PIXAR-PIL": "imageio.plugins.pillow_legacy",
"PNG-FI": "imageio.plugins.freeimage",
"PNG-PIL": "imageio.plugins.pillow_legacy",
"PPM-FI": "imageio.plugins.freeimage",
"PPM-PIL": "imageio.plugins.pillow_legacy",
"PPMRAW-FI": "imageio.plugins.freeimage",
"PSD-FI": "imageio.plugins.freeimage",
"PSD-PIL": "imageio.plugins.pillow_legacy",
"RAS-FI": "imageio.plugins.freeimage",
"RAW-FI": "imageio.plugins.freeimage",
"SGI-FI": "imageio.plugins.freeimage",
"SGI-PI": "imageio.plugins.pillow_legacy",
"SGI-PIL": "imageio.plugins.pillow_legacy",
"SPE": "imageio.plugins.spe",
"SPIDER-PIL": "imageio.plugins.pillow_legacy",
"SUN-PIL": "imageio.plugins.pillow_legacy",
"SWF": "imageio.plugins.swf",
"TARGA-FI": "imageio.plugins.freeimage",
"TGA-PIL": "imageio.plugins.pillow_legacy",
"TIFF-FI": "imageio.plugins.freeimage",
"TIFF-PIL": "imageio.plugins.pillow_legacy",
"tiff": "imageio.plugins.tifffile",
"WBMP-FI": "imageio.plugins.freeimage",
"WEBP-FI": "imageio.plugins.freeimage",
"WMF-PIL": "imageio.plugins.pillow_legacy",
"XBM-FI": "imageio.plugins.freeimage",
"XBM-PIL": "imageio.plugins.pillow_legacy",
"XPM-FI": "imageio.plugins.freeimage",
"XPM-PIL": "imageio.plugins.pillow_legacy",
"XVTHUMB-PIL": "imageio.plugins.pillow_legacy",
}
| known_plugins = {'BMP-FI': 'imageio.plugins.freeimage', 'BMP-PIL': 'imageio.plugins.pillow_legacy', 'BSDF': 'imageio.plugins.bsdf', 'BUFR-PIL': 'imageio.plugins.pillow_legacy', 'CUR-PIL': 'imageio.plugins.pillow_legacy', 'CUT-FI': 'imageio.plugins.freeimage', 'DCX-PIL': 'imageio.plugins.pillow_legacy', 'DDS-FI': 'imageio.plugins.freeimage', 'DDS-PIL': 'imageio.plugins.pillow_legacy', 'DIB-PIL': 'imageio.plugins.pillow_legacy', 'DICOM': 'imageio.plugins.dicom', 'EPS-PIL': 'imageio.plugins.pillow_legacy', 'EXR-FI': 'imageio.plugins.freeimage', 'FEI': 'imageio.plugins.feisem', 'FFMPEG': 'imageio.plugins.ffmpeg', 'FITS-PIL': 'imageio.plugins.pillow_legacy', 'fits': 'imageio.plugins.fits', 'FLI-PIL': 'imageio.plugins.pillow_legacy', 'FPX-PIL': 'imageio.plugins.pillow_legacy', 'FTEX-PIL': 'imageio.plugins.pillow_legacy', 'G3-FI': 'imageio.plugins.freeimage', 'GBR-PIL': 'imageio.plugins.pillow_legacy', 'GDAL': 'imageio.plugins.gdal', 'GIF-FI': 'imageio.plugins.freeimage', 'GIF-PIL': 'imageio.plugins.pillow_legacy', 'GRIB-PIL': 'imageio.plugins.pillow_legacy', 'HDF5-PIL': 'imageio.plugins.pillow_legacy', 'HDR-FI': 'imageio.plugins.freeimage', 'ICNS-PIL': 'imageio.plugins.pillow_legacy', 'ICO-FI': 'imageio.plugins.freeimage', 'ICO-PIL': 'imageio.plugins.pillow_legacy', 'IFF-FI': 'imageio.plugins.freeimage', 'IM-PIL': 'imageio.plugins.pillow_legacy', 'IMT-PIL': 'imageio.plugins.pillow_legacy', 'IPTC-PIL': 'imageio.plugins.pillow_legacy', 'itk': 'imageio.plugins.simpleitk', 'J2K-FI': 'imageio.plugins.freeimage', 'JNG-FI': 'imageio.plugins.freeimage', 'JP2-FI': 'imageio.plugins.freeimage', 'JPEG-FI': 'imageio.plugins.freeimage', 'JPEG-PIL': 'imageio.plugins.pillow_legacy', 'JPEG-XR-FI': 'imageio.plugins.freeimage', 'JPEG2000-PIL': 'imageio.plugins.pillow_legacy', 'KOALA-FI': 'imageio.plugins.freeimage', 'LYTRO-F01-RAW': 'imageio.plugins.lytro', 'LYTRO-ILLUM-RAW': 'imageio.plugins.lytro', 'LYTRO-LFP': 'imageio.plugins.lytro', 'LYTRO-LFR': 'imageio.plugins.lytro', 'MCIDAS-PIL': 'imageio.plugins.pillow_legacy', 'MIC-PIL': 'imageio.plugins.pillow_legacy', 'MPO-PIL': 'imageio.plugins.pillow_legacy', 'MSP-PIL': 'imageio.plugins.pillow_legacy', 'npz': 'imageio.plugins.npz', 'PBM-FI': 'imageio.plugins.freeimage', 'PBMRAW-FI': 'imageio.plugins.freeimage', 'PCD-FI': 'imageio.plugins.freeimage', 'PCD-PIL': 'imageio.plugins.pillow_legacy', 'PCX-FI': 'imageio.plugins.freeimage', 'PCX-PIL': 'imageio.plugins.pillow_legacy', 'PFM-FI': 'imageio.plugins.freeimage', 'PGM-FI': 'imageio.plugins.freeimage', 'PGMRAW-FI': 'imageio.plugins.freeimage', 'PICT-PIL': 'imageio.plugins.pillow_legacy', 'PIXAR-PIL': 'imageio.plugins.pillow_legacy', 'PNG-FI': 'imageio.plugins.freeimage', 'PNG-PIL': 'imageio.plugins.pillow_legacy', 'PPM-FI': 'imageio.plugins.freeimage', 'PPM-PIL': 'imageio.plugins.pillow_legacy', 'PPMRAW-FI': 'imageio.plugins.freeimage', 'PSD-FI': 'imageio.plugins.freeimage', 'PSD-PIL': 'imageio.plugins.pillow_legacy', 'RAS-FI': 'imageio.plugins.freeimage', 'RAW-FI': 'imageio.plugins.freeimage', 'SGI-FI': 'imageio.plugins.freeimage', 'SGI-PI': 'imageio.plugins.pillow_legacy', 'SGI-PIL': 'imageio.plugins.pillow_legacy', 'SPE': 'imageio.plugins.spe', 'SPIDER-PIL': 'imageio.plugins.pillow_legacy', 'SUN-PIL': 'imageio.plugins.pillow_legacy', 'SWF': 'imageio.plugins.swf', 'TARGA-FI': 'imageio.plugins.freeimage', 'TGA-PIL': 'imageio.plugins.pillow_legacy', 'TIFF-FI': 'imageio.plugins.freeimage', 'TIFF-PIL': 'imageio.plugins.pillow_legacy', 'tiff': 'imageio.plugins.tifffile', 'WBMP-FI': 'imageio.plugins.freeimage', 'WEBP-FI': 'imageio.plugins.freeimage', 'WMF-PIL': 'imageio.plugins.pillow_legacy', 'XBM-FI': 'imageio.plugins.freeimage', 'XBM-PIL': 'imageio.plugins.pillow_legacy', 'XPM-FI': 'imageio.plugins.freeimage', 'XPM-PIL': 'imageio.plugins.pillow_legacy', 'XVTHUMB-PIL': 'imageio.plugins.pillow_legacy'} |
'''Property Definitions (bpy.props)
This module defines properties to extend blenders internal data, the result of these functions is used to assign properties to classes registered with blender and can't be used directly.
'''
def BoolProperty(name="", description="", default=False, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
'''Returns a new boolean property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def BoolVectorProperty(name="", description="", default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
'''Returns a new vector boolean property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of booleans the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def CollectionProperty(items, type="", description="", options={'ANIMATABLE'}):
'''Returns a new collection property definition.
Arguments:
@type (class): A subclass of bpy.types.PropertyGroup.
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
'''
pass
def EnumProperty(items, name="", description="", default="", options={'ANIMATABLE'}, update=None, get=None, set=None):
'''Returns a new enumerator property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (string or set): The default value for this enum, A string when *ENUM_FLAG*is disabled otherwise a set which may only contain string identifiers
used in *items*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG', 'LIBRARY_EDITABLE'].
@items (sequence of string triples or a function): sequence of enum items formatted:[(identifier, name, description, icon, number), ...] where the identifier is used
for python access and other values are used for the interface.
Note the item is optional.
For dynamic values a callback can be passed which returns a list in
the same format as the static list.
This function must take 2 arguments (self, context)
WARNING: Do not use generators here (they will work the first time, but will lead to empty values
in some unload/reload scenarii)!
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def FloatProperty(name="", description="", default=0.0, min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', unit='NONE', update=None, get=None, set=None):
'''Returns a new float property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@unit (string): Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def FloatVectorProperty(name="", description="", default=(0.0, 0.0, 0.0), min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
'''Returns a new vector float property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of floats the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@unit (string): Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def IntProperty(name="", description="", default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
'''Returns a new int property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def IntVectorProperty(name="", description="", default=(0, 0, 0), min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
'''Returns a new vector int property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of ints the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def PointerProperty(type="", description="", options={'ANIMATABLE'}, update=None):
'''Returns a new pointer property definition.
Arguments:
@type (class): A subclass of bpy.types.PropertyGroup.
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
def RemoveProperty(cls, attr):
'''Removes a dynamically defined property.
Arguments:
@cls (type): The class containing the property (must be a positional argument).
@attr (string): Property name (must be passed as a keyword).
Note: Typically this function doesn't need to be accessed directly.Instead use del cls.attr
'''
pass
def StringProperty(name="", description="", default="", maxlen=0, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
'''Returns a new string property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
'''
pass
| """Property Definitions (bpy.props)
This module defines properties to extend blenders internal data, the result of these functions is used to assign properties to classes registered with blender and can't be used directly.
"""
def bool_property(name='', description='', default=False, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
"""Returns a new boolean property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def bool_vector_property(name='', description='', default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
"""Returns a new vector boolean property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of booleans the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def collection_property(items, type='', description='', options={'ANIMATABLE'}):
"""Returns a new collection property definition.
Arguments:
@type (class): A subclass of bpy.types.PropertyGroup.
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
"""
pass
def enum_property(items, name='', description='', default='', options={'ANIMATABLE'}, update=None, get=None, set=None):
"""Returns a new enumerator property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (string or set): The default value for this enum, A string when *ENUM_FLAG*is disabled otherwise a set which may only contain string identifiers
used in *items*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG', 'LIBRARY_EDITABLE'].
@items (sequence of string triples or a function): sequence of enum items formatted:[(identifier, name, description, icon, number), ...] where the identifier is used
for python access and other values are used for the interface.
Note the item is optional.
For dynamic values a callback can be passed which returns a list in
the same format as the static list.
This function must take 2 arguments (self, context)
WARNING: Do not use generators here (they will work the first time, but will lead to empty values
in some unload/reload scenarii)!
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def float_property(name='', description='', default=0.0, min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', unit='NONE', update=None, get=None, set=None):
"""Returns a new float property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@unit (string): Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def float_vector_property(name='', description='', default=(0.0, 0.0, 0.0), min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
"""Returns a new vector float property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of floats the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@unit (string): Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def int_property(name='', description='', default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
"""Returns a new int property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def int_vector_property(name='', description='', default=(0, 0, 0), min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3, update=None, get=None, set=None):
"""Returns a new vector int property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@default (sequence): sequence of ints the length of *size*.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].
@size (int): Vector dimensions in [1, and 32].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def pointer_property(type='', description='', options={'ANIMATABLE'}, update=None):
"""Returns a new pointer property definition.
Arguments:
@type (class): A subclass of bpy.types.PropertyGroup.
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass
def remove_property(cls, attr):
"""Removes a dynamically defined property.
Arguments:
@cls (type): The class containing the property (must be a positional argument).
@attr (string): Property name (must be passed as a keyword).
Note: Typically this function doesn't need to be accessed directly.Instead use del cls.attr
"""
pass
def string_property(name='', description='', default='', maxlen=0, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None):
"""Returns a new string property definition.
Arguments:
@name (string): Name used in the user interface.
@description (string): Text used for the tooltip and api documentation.
@options (set): Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].
@subtype (string): Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'NONE'].
@update (function): function to be called when this value is modified,This function must take 2 values (self, context) and return None.
*Warning* there are no safety checks to avoid infinite recursion.
"""
pass |
def calc(n):
if n == 0:
raise ZeroDivisionError
if n < 0:
raise ValueError
result = 100/n
return result
| def calc(n):
if n == 0:
raise ZeroDivisionError
if n < 0:
raise ValueError
result = 100 / n
return result |
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 17 13:50:58 2017
@author: Anshu.Wang
"""
othe = othello()
othe.display()
othe.move(3,2,BLACK)
othe.move(2,2,WHITE)
othe.move(5,4,BLACK)
othe.move(5,3,WHITE)
othe.move(5,2,BLACK)
othe.move(4,2,WHITE) | """
Created on Fri Nov 17 13:50:58 2017
@author: Anshu.Wang
"""
othe = othello()
othe.display()
othe.move(3, 2, BLACK)
othe.move(2, 2, WHITE)
othe.move(5, 4, BLACK)
othe.move(5, 3, WHITE)
othe.move(5, 2, BLACK)
othe.move(4, 2, WHITE) |
# Write a program to check the given person is eligible to vote or not
a = int(input("Age of a persion: "))
if(a>=18):
print("Yes,The persion is eligible to vote")
else:
print("No,The persion is not eligible to vote")
| a = int(input('Age of a persion: '))
if a >= 18:
print('Yes,The persion is eligible to vote')
else:
print('No,The persion is not eligible to vote') |
SkillSanta_Dict={
"name":"Pooja",
"age":22,
"salary":60000,
"city":"new delhi"
}
print("previous dictionary is:",SkillSanta_Dict)
SkillSanta_Dict["location"]=SkillSanta_Dict["city"]
del SkillSanta_Dict["city"]
print("change dictionary is:",SkillSanta_Dict)
| skill_santa__dict = {'name': 'Pooja', 'age': 22, 'salary': 60000, 'city': 'new delhi'}
print('previous dictionary is:', SkillSanta_Dict)
SkillSanta_Dict['location'] = SkillSanta_Dict['city']
del SkillSanta_Dict['city']
print('change dictionary is:', SkillSanta_Dict) |
def nba_extrap(ppg, mpg):
if mpg == 0:
return 0
else:
return round(ppg*48.0/mpg, 1) | def nba_extrap(ppg, mpg):
if mpg == 0:
return 0
else:
return round(ppg * 48.0 / mpg, 1) |
#!/usr/bin/env python3
END_MARK = None
for _ in range(int(input())):
input() # don't need n
# build the trie
trie = {}
for word in input().split():
cur = trie
for ch in word:
try:
cur = cur[ch]
except KeyError:
nxt = {}
cur[ch] = nxt
cur = nxt
cur[END_MARK] = END_MARK
# read the input string and create an initial table
text = input().strip()
length = len(text)
table = [False] * length
table.append(True)
# attempt to build a chain of words
for i in range(length - 1, -1, -1):
try:
node = trie
for j in range(i, length):
node = node[text[j]]
if table[j + 1] and END_MARK in node:
table[i] = True
break
except KeyError:
pass
# report if there is a chain all the way from the beginning to the end
print(int(table[0]))
| end_mark = None
for _ in range(int(input())):
input()
trie = {}
for word in input().split():
cur = trie
for ch in word:
try:
cur = cur[ch]
except KeyError:
nxt = {}
cur[ch] = nxt
cur = nxt
cur[END_MARK] = END_MARK
text = input().strip()
length = len(text)
table = [False] * length
table.append(True)
for i in range(length - 1, -1, -1):
try:
node = trie
for j in range(i, length):
node = node[text[j]]
if table[j + 1] and END_MARK in node:
table[i] = True
break
except KeyError:
pass
print(int(table[0])) |
# -*- coding: utf-8 -*-
class ComponentBaseException(Exception):
pass
class ComponentAPIException(ComponentBaseException):
"""Exception for Component API"""
def __init__(self, api_obj, error_message, resp=None):
self.api_obj = api_obj
self.error_message = error_message
self.resp = resp
if self.resp is not None:
error_message = '%s, resp=%s' % (error_message, self.resp.text)
super(ComponentAPIException, self).__init__(error_message)
| class Componentbaseexception(Exception):
pass
class Componentapiexception(ComponentBaseException):
"""Exception for Component API"""
def __init__(self, api_obj, error_message, resp=None):
self.api_obj = api_obj
self.error_message = error_message
self.resp = resp
if self.resp is not None:
error_message = '%s, resp=%s' % (error_message, self.resp.text)
super(ComponentAPIException, self).__init__(error_message) |
load("//node:node_grpc_compile.bzl", "node_grpc_compile")
load("//node:node_module_index.bzl", "node_module_index")
load("@org_pubref_rules_node//node:rules.bzl", "node_module")
def node_grpc_library(**kwargs):
name = kwargs.get("name")
deps = kwargs.get("deps")
visibility = kwargs.get("visibility")
name_pb = name + "_pb"
name_index = name + "_index"
node_grpc_compile(
name = name_pb,
deps = deps,
transitive = True,
visibility = visibility,
)
node_module_index(
name = name_index,
compilation = name_pb,
)
node_module(
name = name,
srcs = [name_pb],
index = name_index,
deps = [
"@proto_node_modules//:_all_",
"@grpc_node_modules//:_all_",
],
visibility = visibility,
)
| load('//node:node_grpc_compile.bzl', 'node_grpc_compile')
load('//node:node_module_index.bzl', 'node_module_index')
load('@org_pubref_rules_node//node:rules.bzl', 'node_module')
def node_grpc_library(**kwargs):
name = kwargs.get('name')
deps = kwargs.get('deps')
visibility = kwargs.get('visibility')
name_pb = name + '_pb'
name_index = name + '_index'
node_grpc_compile(name=name_pb, deps=deps, transitive=True, visibility=visibility)
node_module_index(name=name_index, compilation=name_pb)
node_module(name=name, srcs=[name_pb], index=name_index, deps=['@proto_node_modules//:_all_', '@grpc_node_modules//:_all_'], visibility=visibility) |
"""
DSN means: "domain specific nerf" (the name is obviously tentative)
The idea is: in many subparts of the application, we apply the same pattern:
* a structure
* a Clef (set of notes that operate on that structure)
* play_... & construct_... can be used to combine the 2.
In principle, a single structure can have multiple clefs defined on it, so grouping all of the above in a single
directory is a bit of a shortcut. But as it stands, multiple clefs per structure haven't arisen yet; so we're just
grouping them all in a single directory.
"""
| """
DSN means: "domain specific nerf" (the name is obviously tentative)
The idea is: in many subparts of the application, we apply the same pattern:
* a structure
* a Clef (set of notes that operate on that structure)
* play_... & construct_... can be used to combine the 2.
In principle, a single structure can have multiple clefs defined on it, so grouping all of the above in a single
directory is a bit of a shortcut. But as it stands, multiple clefs per structure haven't arisen yet; so we're just
grouping them all in a single directory.
""" |
# -*- coding: utf-8 -*-
"""
idfy_rest_client.models.return_urls
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class ReturnUrls(object):
"""Implementation of the 'ReturnUrls' model.
Return urls for the identity request
Attributes:
error (string): The url to be redirected to if the identification
process fails. This url supports the following placeholders: [0]
statuscode, [1] requestId, [2] ExternalReference (your unique
id).
abort (string): The url to be redirected to if the user aborts the
identification process. This url supports the following
placeholders: [1] requestId, [2] ExternalReference (your unique
id).
success (string): The return urls to be redirected to after the
identification process is a success. This url supports the
following placeholders: [1] requestId, [2] ExternalReference (your
unique id).
"""
# Create a mapping from Model property names to API property names
_names = {
"error":'Error',
"abort":'Abort',
"success":'Success'
}
def __init__(self,
error=None,
abort=None,
success=None,
additional_properties = {}):
"""Constructor for the ReturnUrls class"""
# Initialize members of the class
self.error = error
self.abort = abort
self.success = success
# Add additional model properties to the instance
self.additional_properties = additional_properties
@classmethod
def from_dictionary(cls,
dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
# Extract variables from the dictionary
error = dictionary.get('Error')
abort = dictionary.get('Abort')
success = dictionary.get('Success')
# Clean out expected properties from dictionary
for key in cls._names.values():
if key in dictionary:
del dictionary[key]
# Return an object of this model
return cls(error,
abort,
success,
dictionary)
| """
idfy_rest_client.models.return_urls
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class Returnurls(object):
"""Implementation of the 'ReturnUrls' model.
Return urls for the identity request
Attributes:
error (string): The url to be redirected to if the identification
process fails. This url supports the following placeholders: [0]
statuscode, [1] requestId, [2] ExternalReference (your unique
id).
abort (string): The url to be redirected to if the user aborts the
identification process. This url supports the following
placeholders: [1] requestId, [2] ExternalReference (your unique
id).
success (string): The return urls to be redirected to after the
identification process is a success. This url supports the
following placeholders: [1] requestId, [2] ExternalReference (your
unique id).
"""
_names = {'error': 'Error', 'abort': 'Abort', 'success': 'Success'}
def __init__(self, error=None, abort=None, success=None, additional_properties={}):
"""Constructor for the ReturnUrls class"""
self.error = error
self.abort = abort
self.success = success
self.additional_properties = additional_properties
@classmethod
def from_dictionary(cls, dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
error = dictionary.get('Error')
abort = dictionary.get('Abort')
success = dictionary.get('Success')
for key in cls._names.values():
if key in dictionary:
del dictionary[key]
return cls(error, abort, success, dictionary) |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#-----------------------------------------------------------------------------
class CatalogException(Exception):
"""Basic exception for errors raised by catalog"""
class PermissionDenied(CatalogException):
"""Raised when user requests functionality that they do not have permission
to access.
"""
class ShellPermissionDenied(PermissionDenied):
"""The user does not have permission to execute shell commands."""
def __init__(self, msg=None):
if msg is None:
msg = "Additional permissions needed to execute shell commands."
super(ShellPermissionDenied, self).__init__(msg)
class EnvironmentPermissionDenied(PermissionDenied):
"""The user does not have permission to read environment variables."""
def __init__(self, msg=None):
if msg is None:
msg = "Additional permissions needed to read environment variables."
super(EnvironmentPermissionDenied, self).__init__(msg)
class ValidationError(CatalogException):
"""Something's wrong with the catalog spec"""
def __init__(self, message, errors):
super(ValidationError, self).__init__(message)
self.errors = errors
class DuplicateKeyError(ValidationError):
"""Catalog contains key duplications"""
def __init__(self, context, context_mark, problem, problem_mark):
line = problem_mark.line
column = problem_mark.column
msg = "duplicate key found on line {}, column {}".format(
line + 1, column + 1)
super(DuplicateKeyError, self).__init__(msg, [])
class ObsoleteError(ValidationError):
pass
class ObsoleteParameterError(ObsoleteError):
def __init__(self):
msg = """Detected old syntax. See details for upgrade instructions to new syntax:
[old syntax]
parameters:
- name: abc
type: str
[new syntax]
parameters:
abc:
type: str
"""
super(ObsoleteParameterError, self).__init__(msg, [])
class ObsoleteDataSourceError(ObsoleteError):
def __init__(self):
msg = """Detected old syntax. See details for upgrade instructions to new syntax:
[old syntax]
sources:
- name: abc
driver: csv
[new syntax]
sources:
abc:
driver: csv
"""
super(ObsoleteDataSourceError, self).__init__(msg, [])
| class Catalogexception(Exception):
"""Basic exception for errors raised by catalog"""
class Permissiondenied(CatalogException):
"""Raised when user requests functionality that they do not have permission
to access.
"""
class Shellpermissiondenied(PermissionDenied):
"""The user does not have permission to execute shell commands."""
def __init__(self, msg=None):
if msg is None:
msg = 'Additional permissions needed to execute shell commands.'
super(ShellPermissionDenied, self).__init__(msg)
class Environmentpermissiondenied(PermissionDenied):
"""The user does not have permission to read environment variables."""
def __init__(self, msg=None):
if msg is None:
msg = 'Additional permissions needed to read environment variables.'
super(EnvironmentPermissionDenied, self).__init__(msg)
class Validationerror(CatalogException):
"""Something's wrong with the catalog spec"""
def __init__(self, message, errors):
super(ValidationError, self).__init__(message)
self.errors = errors
class Duplicatekeyerror(ValidationError):
"""Catalog contains key duplications"""
def __init__(self, context, context_mark, problem, problem_mark):
line = problem_mark.line
column = problem_mark.column
msg = 'duplicate key found on line {}, column {}'.format(line + 1, column + 1)
super(DuplicateKeyError, self).__init__(msg, [])
class Obsoleteerror(ValidationError):
pass
class Obsoleteparametererror(ObsoleteError):
def __init__(self):
msg = 'Detected old syntax. See details for upgrade instructions to new syntax:\n\n[old syntax]\n\nparameters:\n - name: abc\n type: str\n\n[new syntax]\n\nparameters:\n abc:\n type: str\n'
super(ObsoleteParameterError, self).__init__(msg, [])
class Obsoletedatasourceerror(ObsoleteError):
def __init__(self):
msg = 'Detected old syntax. See details for upgrade instructions to new syntax:\n\n[old syntax]\n\nsources:\n - name: abc\n driver: csv\n\n[new syntax]\n\nsources:\n abc:\n driver: csv\n'
super(ObsoleteDataSourceError, self).__init__(msg, []) |
resource_type = [
('v1', 'Pod', 'pod'),
('batch/v1', 'Job', 'job.v1.batch')
]
| resource_type = [('v1', 'Pod', 'pod'), ('batch/v1', 'Job', 'job.v1.batch')] |
"""58. Length of Last Word
https://leetcode.com/problems/length-of-last-word/
Given a string s consists of upper/lower-case alphabets and empty space
characters ' ', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is defined as a character sequence consists of
non-space characters only.
Example:
Input: "Hello World"
Output: 5
"""
class Solution:
def length_of_last_word(self, s: str) -> int:
index = len(s) - 1
while index >= 0 and s[index] == " ":
index -= 1
ans = 0
for i in range(index, -1, -1):
if s[i] == ' ':
break
ans += 1
return ans
| """58. Length of Last Word
https://leetcode.com/problems/length-of-last-word/
Given a string s consists of upper/lower-case alphabets and empty space
characters ' ', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is defined as a character sequence consists of
non-space characters only.
Example:
Input: "Hello World"
Output: 5
"""
class Solution:
def length_of_last_word(self, s: str) -> int:
index = len(s) - 1
while index >= 0 and s[index] == ' ':
index -= 1
ans = 0
for i in range(index, -1, -1):
if s[i] == ' ':
break
ans += 1
return ans |
class Weight():
def __init__(self, value=0.0, previous_delta=0.0):
self.value = value
self.previous_val = value
self.previous_delta = previous_delta
def add_delta(self, delta_w):
self.previous_val = self.value
self.value -= delta_w
self.previous_delta = delta_w
def __str__(self):
return "{:.2f}".format(self.value)
| class Weight:
def __init__(self, value=0.0, previous_delta=0.0):
self.value = value
self.previous_val = value
self.previous_delta = previous_delta
def add_delta(self, delta_w):
self.previous_val = self.value
self.value -= delta_w
self.previous_delta = delta_w
def __str__(self):
return '{:.2f}'.format(self.value) |
class CanExecuteChangedEventManager(WeakEventManager):
# no doc
@staticmethod
def AddHandler(source,handler):
""" AddHandler(source: ICommand,handler: EventHandler[EventArgs]) """
pass
@staticmethod
def RemoveHandler(source,handler):
""" RemoveHandler(source: ICommand,handler: EventHandler[EventArgs]) """
pass
ReadLock=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Establishes a read-lock on the underlying data table,and returns an System.IDisposable.
"""
WriteLock=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Establishes a write-lock on the underlying data table,and returns an System.IDisposable.
"""
| class Canexecutechangedeventmanager(WeakEventManager):
@staticmethod
def add_handler(source, handler):
""" AddHandler(source: ICommand,handler: EventHandler[EventArgs]) """
pass
@staticmethod
def remove_handler(source, handler):
""" RemoveHandler(source: ICommand,handler: EventHandler[EventArgs]) """
pass
read_lock = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Establishes a read-lock on the underlying data table,and returns an System.IDisposable.\n\n\n\n'
write_lock = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Establishes a write-lock on the underlying data table,and returns an System.IDisposable.\n\n\n\n' |
#
# PySNMP MIB module Wellfleet-ATM-LE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-ATM-LE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:39:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Bits, Counter64, IpAddress, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Gauge32, ModuleIdentity, NotificationType, TimeTicks, Counter32, MibIdentifier, ObjectIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter64", "IpAddress", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Gauge32", "ModuleIdentity", "NotificationType", "TimeTicks", "Counter32", "MibIdentifier", "ObjectIdentity", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
wfAtmLeGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfAtmLeGroup")
wfAtmLecConfigTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1), )
if mibBuilder.loadTexts: wfAtmLecConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigTable.setDescription('ATM LEC Interface table - One per LEC Client This table deals with configuration and operational status')
wfAtmLecConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecConfigCct"))
if mibBuilder.loadTexts: wfAtmLecConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigEntry.setDescription('per LEC Client objects - wfAtmLecCct corresponds to Wellfleet circuit number ')
wflecConfDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfDelete.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfDelete.setDescription('Indication to create or delete an ATM LE Client Config Entry from the MIB ')
wflecRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: wflecRowStatus.setDescription('Indication to create or delete an ATM LE Client. This will remove the LEC from the Emulated LAN. However, the instance is not removed from the MIB ')
wflecConfigCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigCct.setDescription('This corresponds to the Wellfleet circuit number')
wflecOwner = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 4), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecOwner.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOwner.setDescription('The entity that configured this entry and is therefore using the resources assigned to it.')
wflecConfigMode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("autocfg", 1), ("mancfg", 2))).clone('autocfg')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigMode.setDescription('Indicates whether this LAN Emulation Client should auto-configure the next time it is (re)started.')
wflecConfigLanType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unspecified", 1), ("ieee8023", 2), ("ieee8025", 3))).clone('unspecified')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigLanType.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigLanType.setDescription('C2 - LEC LAN Type The data frame format which this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. ')
wflecConfigMaxDataFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unspec", 1), ("size1516", 2), ("size4544", 3), ("size9234", 4), ("size18190", 5))).clone('unspec')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigMaxDataFrameSize.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigMaxDataFrameSize.setDescription("C3 Maximum Data Frame Size. The maximum data frame size which this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. This MIB object will not be overwritten with the new value from a LE_{JOIN,CONFIGURE}_RESPONSE. Instead, lecActualMaxDataFrameSize will be.'")
wflecConfigLanName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 8), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigLanName.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigLanName.setDescription("C5 ELAN Name. The ELAN Name this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. This MIB object will not be overwritten with the new value from a LE_{JOIN,CONFIGURE}_RESPONSE. Instead, lecActualMaxDataFrameSize will be.' ")
wflecConfigLesAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 9), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigLesAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigLesAtmAddress.setDescription("C9 LE Server ATM Address. The LAN Emulation Server which this client will use the next time it is started in manual configuration mode. When lecConfigMode is 'automatic', there is no need to set this address, and no advantage to doing so. The client will use the LECS to find a LES, putting the auto-configured address in lecActualLesAtmAddress while leaving lecConfigLesAtmAddress alone. ")
wflecControlTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 300)).clone(30)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecControlTimeout.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlTimeout.setDescription('C7 Control Time-out. Time out period used for timing out most request/response control frame most request/response control frame interactions.')
wflecMaxUnknownFrameCount = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMaxUnknownFrameCount.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMaxUnknownFrameCount.setDescription('C10 Maximum Unknown Frame Count. This parameter MUST be less than or equal to 10. (See parameter C11) ')
wflecMaxUnknownFrameTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 60)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMaxUnknownFrameTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMaxUnknownFrameTime.setDescription('C11 Maximum Unknown Frame Time. This parameter MUST be greater than or equal to 1.0 seconds. Within the period of time defined by the Maximum Unknown Frame Time, a LE Client will send no more than Maximum Unknown Frame Count frames to a given MAC address or Route Designator without also initiating the address resolution protocol to resolve that MAC address or Route Designator. This time value is expressed in seconds. ')
wflecVccTimeoutPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1200))).clone(namedValues=NamedValues(("vcctmodef", 1200))).clone('vcctmodef')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecVccTimeoutPeriod.setStatus('mandatory')
if mibBuilder.loadTexts: wflecVccTimeoutPeriod.setDescription('C12 VCC Timeout Period. A LE Client may release any Data Direct or Multicast Send VCC that it has not used to transmit or receive any data frames for the length of the VCC Timeout Period. This time value is expressed in seconds. ')
wflecMaxRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMaxRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMaxRetryCount.setDescription("C13 Maximum Retry Count. A LE CLient MUST not retry a LE-ARP for a given frame's LAN destination more than Maximum Retry Count times, after which it must discard the frame.")
wflecAgingTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 300)).clone(300)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecAgingTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecAgingTime.setDescription('C17 Aging Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship.')
wflecForwardDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(4, 30)).clone(15)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecForwardDelayTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecForwardDelayTime.setDescription('C18 Forward Delay Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship, so long as the Topology Change flag C19 is true.')
wflecExpectedArpResponseTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecExpectedArpResponseTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecExpectedArpResponseTime.setDescription('C20 Expected LE_ARP Reponse Time. The maximum time (seconds) that the LEC expects an LE_ARP_REQUEST/ LE_ARP_RESPONSE cycle to take. Used for retries and verifies. ')
wflecFlushTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecFlushTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts: wflecFlushTimeOut.setDescription('C21 Flush Time-out. Time limit (seconds) to wait to receive a LE_FLUSH_RESPONSE after the LE_FLUSH_REQUEST has been sent before taking recovery action.')
wflecPathSwitchingDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)).clone(6)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecPathSwitchingDelay.setStatus('mandatory')
if mibBuilder.loadTexts: wflecPathSwitchingDelay.setDescription('C22 Path Switching Delay. The time (seconds) since sending a frame to the BUS after which the LE Client may assume that the frame has been either discarded or delivered to the recipient. May be used to bypass the Flush protocol.')
wflecLocalSegmentID = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecLocalSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts: wflecLocalSegmentID.setDescription("C23 Local Segment ID. The segment ID of the emulated LAN. This is only required for IEEE 802.5 clients that are Source Routing bridges.'")
wflecMulticastSendType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("abr", 1), ("vbr", 2), ("cbr", 3))).clone('cbr')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMulticastSendType.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendType.setDescription('C24 Multicast Send VCC Type. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. This is the method to be used by the LE Client when specifying traffic parameters when it sets up the Multicast Send VCC for this emulated LAN.')
wflecMulticastSendAvgRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 22), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMulticastSendAvgRate.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendAvgRate.setDescription('C25 Multicast Send VCC AvgRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Sustained Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflecMulticastSendPeakRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 23), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMulticastSendPeakRate.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendPeakRate.setDescription('C26 Multicast Send VCC PeakRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Peak Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflecConnectionCompleteTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConnectionCompleteTimer.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConnectionCompleteTimer.setDescription('C28 Connection Complete Timer. Optional. In Connection Establishment this is the time period in which data or a READY_IND message is expected from a Calling Party.')
wflecFlushEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecFlushEnable.setStatus('mandatory')
if mibBuilder.loadTexts: wflecFlushEnable.setDescription('Flush Protocol enable/disable - ATM_LEC_FLUSH_ENABLED - ATM LE flush protocol is used when switching VCs. If the Flush timeout (wflecFlushTimeOut) expires data for that MAC address will start flowing over the old VC again. ATM_LEC_FLUSH_DISABLED - ATM LE flush protocol is not used. Instead data for that MAC address will automatically start flowing over the new VC once the Path Switching delay timeout (wflecPathSwitchingDelay) has expired.')
wflecConfigRetry = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 26), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigRetry.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigRetry.setDescription('This attribute specifies how many retries should be attempted if any part of the config phase fails. The config phase starts with setting up the config direct VC and ends when a JOIN response is received. The default is 0 which means retry forever with a maximum timeout of 30 seconds between each retry. The time between each retry will start at 2 seconds and double from that point (never exceeding 30 seconds).')
wflecMulticastFwdTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(5))).clone(namedValues=NamedValues(("mcsfwdtmodef", 5))).clone('mcsfwdtmodef')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMulticastFwdTimeout.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastFwdTimeout.setDescription('The attribute specifies how many seconds to wait for the Multicast Forward VC to be set up before retrying. The retry will include closing the Multicast Send VC (if it has been opened) and reARPing for the BUS. A successful ARP response will result in the setup of the Multicast Send which in turn should result in the BUS setting up the Multicast Forward VC.')
wflecMulticastFwdRetry = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(10))).clone(namedValues=NamedValues(("mcsfwdrtrydef", 10))).clone('mcsfwdrtrydef')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecMulticastFwdRetry.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastFwdRetry.setDescription('The attribute specifies how many retries should be made to get the Multicast Forward VC setup. The LEC will retry after wflecMulticastFwdTimeout seconds and will double this timeout for each each retry which follows. The timeout will not exeed 30 seconds however. After wflecMulticastFwdRetry retries, the LEC will restart itself. If wflecMulticastFwdRetry is set to 0 it will retry the BUS phase forever and will never restart itself.')
wflecDebugLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecDebugLevel.setStatus('mandatory')
if mibBuilder.loadTexts: wflecDebugLevel.setDescription("Debug Levels - The level of debug desired from the Portable LEC code LEC_DBG_OFF - 0 LEC_DBG_WARN - 1 LEC_DBG_ERR - 2 LEC_DBG_MSG - 4 LEC_DBG_DBG - 8 LEC_DBG_VERBOSE - 16 This values above can be used separately, or OR'd together for a combination of debug levels. For example, to see both WARN and ERR messages, LEC_DBG_WARN OR LEC_DBG_ERR = 3, so set this object to 3.")
wflecConfigLECSAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 30), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigLECSAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigLECSAtmAddress.setDescription('The LE Config Server Address to be used. If left (or set) to NULL_VAL the well-known LECS ATM address will be used.')
wflecConfigV2Capable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecConfigV2Capable.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigV2Capable.setDescription('Indication to enable or disable LANE V2 support for this ATM LE Client.')
wfAtmLecStatusTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2), )
if mibBuilder.loadTexts: wfAtmLecStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecStatusTable.setDescription('Lan Emulation Status Group Read-only table containing identification, status, and operational information about the LAN Emulation Clients this agent manages ')
wfAtmLecStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecStatusCct"))
if mibBuilder.loadTexts: wfAtmLecStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecStatusEntry.setDescription('per LEC Client objects - wfAtmLecCct corresponds to Wellfleet circuit number ')
wflecStatusCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecStatusCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecStatusCct.setDescription('This corresponds to the Wellfleet circuit number')
wflecPrimaryAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecPrimaryAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecPrimaryAtmAddress.setDescription("C1 - LE Client's ATM Address.")
wflecID = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecID.setStatus('mandatory')
if mibBuilder.loadTexts: wflecID.setDescription("C14 LE Client Identifier. Each LE Client requires a LE Client Identifier (LECID) assigned by the LE Server during the Join phase. The LECID is placed in control requests by the LE Client and MAY be used for echo suppression on multicast data frames sent by that LE Client. This value MUST NOT change without terminating the LE Client and returning to the Initial state. A valid LECID MUST be in the range X'0001' through X'FEFF'. The value of this object is only meaningful for a LEC that is connected to a LES. For a LEC which does not belong to an emulated LAN, the value of this object is defined to be 0.'")
wflecInterfaceState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("initial", 1), ("lecsconnect", 2), ("configure", 3), ("join", 4), ("reg", 5), ("busconnect", 6), ("operational", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInterfaceState.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInterfaceState.setDescription('Indicates the state for the LE Client')
wflecLastFailureRespCode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=NamedValues(("none", 1), ("tmo", 2), ("undef", 3), ("vrsnotsup", 4), ("invreq", 5), ("dupdst", 6), ("dupatmadr", 7), ("insufres", 8), ("accdenied", 9), ("invreqid", 10), ("invdst", 11), ("invatmadr", 12), ("nocfg", 13), ("lecfgerr", 14), ("insufinfo", 15))).clone('none')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecLastFailureRespCode.setStatus('mandatory')
if mibBuilder.loadTexts: wflecLastFailureRespCode.setDescription("Failure response code. Status code from the last failed Configure response or Join response. Failed responses are those for which the LE_CONFIGURE_RESPONSE / LE_JOIN_RESPONSE frame contains a non-zero code, or fails to arrive within a timeout period. If none of this client's requests have failed, this object has the value 'none'. If the failed response contained a STATUS code that is not defined in the LAN Emulation specification, this object has the value 'undefinedError'. The value 'timeout' is self-explanatory. Other failure codes correspond to those defined in the specification, although they may have different numeric values.")
wflecLastFailureState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecLastFailureState.setStatus('mandatory')
if mibBuilder.loadTexts: wflecLastFailureState.setDescription("Last failure state The state this client was in when it updated the 'lecLastFailureRespCode'. If 'lecLastFailureRespCode' is 'none', this object has the value initialState(1).")
wflecProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("prot1", 1))).clone('prot1')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecProtocol.setStatus('mandatory')
if mibBuilder.loadTexts: wflecProtocol.setDescription('The LAN Emulation protocol which this client supports, and specifies in its LE_JOIN_REQUESTs. ')
wflecVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecVersion.setStatus('mandatory')
if mibBuilder.loadTexts: wflecVersion.setDescription('The LAN Emulation protocol version which this client supports, and specifies in its LE_JOIN_REQUESTs. ')
wflecTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecTopologyChange.setStatus('mandatory')
if mibBuilder.loadTexts: wflecTopologyChange.setDescription('C19 Topology Change. Boolean indication that the LE Client is using the Forward Delay Time C18, instead of the Ageing Time C17, to age entries in its LE-ARP cache.')
wflecConfigServerAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 10), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigServerAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigServerAtmAddress.setDescription('The ATM address of the LECS for this Client')
wflecConfigSource = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("viailmi", 1), ("knownadr", 2), ("cfgpvc", 3), ("nolecs", 4))).clone('nolecs')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigSource.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigSource.setDescription('Indicates whether this LAN Emulation Client used the LAN Emulation Configuration Server, and, if so, what method it used to establish the Configuration Direct VCC.')
wflecActualLanType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unspecified", 1), ("ieee8023", 2), ("ieee8025", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecActualLanType.setStatus('mandatory')
if mibBuilder.loadTexts: wflecActualLanType.setDescription('C2 - LEC LAN Type The data frame format that this LAN Emulation Client is using right now. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server')
wflecActualMaxDataFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unspec", 1), ("size1516", 2), ("size4544", 3), ("size9234", 4), ("size18190", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecActualMaxDataFrameSize.setStatus('mandatory')
if mibBuilder.loadTexts: wflecActualMaxDataFrameSize.setDescription('C3 Maximum Data Frame Size. The maximum data frame size that this LAN Emulation client is using right now. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server ')
wflecActualLanName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecActualLanName.setStatus('mandatory')
if mibBuilder.loadTexts: wflecActualLanName.setDescription('C5 ELAN Name. The identity of the emulated LAN which this client last joined, or wishes to join. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server')
wflecActualLesAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 15), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecActualLesAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecActualLesAtmAddress.setDescription("C9 LE Server ATM Address. The LAN Emulation Server address currently in use or most recently attempted. If no LAN Emulation Server attachment has been tried, this object's value is the zero-length string.' ")
wflecProxyClient = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecProxyClient.setStatus('mandatory')
if mibBuilder.loadTexts: wflecProxyClient.setDescription("C4 Proxy When a client joins an ATM emulated LAN, it indicates whether it wants to act as a proxy. Proxy clients are allowed to represent unregistered MAC addresses, and receive copies of LE_ARP_REQUEST frames for such addresses.'")
wfAtmLecOperConfigTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3), )
if mibBuilder.loadTexts: wfAtmLecOperConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecOperConfigTable.setDescription('ATM LEC Interface table - One per LEC Client This table deals with configuration and operational status')
wfAtmLecOperConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecOperConfigCct"))
if mibBuilder.loadTexts: wfAtmLecOperConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecOperConfigEntry.setDescription('per LEC Operation Config objects - wfAtmLecOperConfigCct corresponds to Wellfleet circuit number ')
wflecOperConfigCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigCct.setDescription('This corresponds to the Wellfleet circuit number')
wflecOperConfigControlTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigControlTimeout.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigControlTimeout.setDescription('C7 Control Time-out. Time out period used for timing out most request/response control frame most request/response control frame interactions.')
wflecOperConfigMaxUnknownFrameCount = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMaxUnknownFrameCount.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMaxUnknownFrameCount.setDescription('C10 Maximum Unknown Frame Count. This parameter MUST be less than or equal to 10. (See parameter C11) ')
wflecOperConfigMaxUnknownFrameTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMaxUnknownFrameTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMaxUnknownFrameTime.setDescription('C11 Maximum Unknown Frame Time. This parameter MUST be greater than or equal to 1.0 seconds. Within the period of time defined by the Maximum Unknown Frame Time, a LE Client will send no more than Maximum Unknown Frame Count frames to a given MAC address or Route Designator without also initiating the address resolution protocol to resolve that MAC address or Route Designator. This time value is expressed in seconds. ')
wflecOperConfigVccTimeoutPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigVccTimeoutPeriod.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigVccTimeoutPeriod.setDescription('C12 VCC Timeout Period. A LE Client may release any Data Direct or Multicast Send VCC that it has not used to transmit or receive any data frames for the length of the VCC Timeout Period. This time value is expressed in seconds. ')
wflecOperConfigMaxRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMaxRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMaxRetryCount.setDescription("C13 Maximum Retry Count. A LE CLient MUST not retry a LE-ARP for a given frame's LAN destination more than Maximum Retry Count times, after which it must discard the frame.")
wflecOperConfigAgingTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigAgingTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigAgingTime.setDescription('C17 Aging Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship.')
wflecOperConfigForwardDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigForwardDelayTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigForwardDelayTime.setDescription('C18 Forward Delay Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship, so long as the Topology Change flag C19 is true.')
wflecOperConfigTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigTopologyChange.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigTopologyChange.setDescription('C19 Topology Change. Boolean indication that the LE Client is using the Forward Delay Time C18, instead of the Ageing Time C17, to age entries in its LE-ARP cache.')
wflecOperConfigExpectedArpResponseTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigExpectedArpResponseTime.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigExpectedArpResponseTime.setDescription('C20 Expected LE_ARP Reponse Time. The maximum time (seconds) that the LEC expects an LE_ARP_REQUEST/ LE_ARP_RESPONSE cycle to take. Used for retries and verifies. ')
wflecOperConfigFlushTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigFlushTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigFlushTimeOut.setDescription('C21 Flush Time-out. Time limit (seconds) to wait to receive a LE_FLUSH_RESPONSE after the LE_FLUSH_REQUEST has been sent before taking recovery action.')
wflecOperConfigPathSwitchingDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigPathSwitchingDelay.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigPathSwitchingDelay.setDescription('C22 Path Switching Delay. The time (seconds) since sending a frame to the BUS after which the LE Client may assume that the frame has been either discarded or delivered to the recipient. May be used to bypass the Flush protocol.')
wflecOperConfigLocalSegmentID = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigLocalSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigLocalSegmentID.setDescription("C23 Local Segment ID. The segment ID of the emulated LAN. This is only required for IEEE 802.5 clients that are Source Routing bridges.'")
wflecOperConfigMulticastSendType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMulticastSendType.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMulticastSendType.setDescription('C24 Multicast Send VCC Type. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. This is the method to be used by the LE Client when specifying traffic parameters when it sets up the Multicast Send VCC for this emulated LAN.')
wflecOperConfigMulticastSendAvgRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMulticastSendAvgRate.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMulticastSendAvgRate.setDescription('C25 Multicast Send VCC AvgRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Sustained Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflecOperConfigMulticastSendPeakRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigMulticastSendPeakRate.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigMulticastSendPeakRate.setDescription('C26 Multicast Send VCC PeakRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Peak Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflecOperConfigConnectionCompleteTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOperConfigConnectionCompleteTimer.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOperConfigConnectionCompleteTimer.setDescription('C28 Connection Complete Timer. Optional. In Connection Establishment this is the time period in which data or a READY_IND message is expected from a Calling Party.')
wfAtmLecStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4), )
if mibBuilder.loadTexts: wfAtmLecStatisticsTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecStatisticsTable.setDescription('Table of statistics')
wfAtmLecStatisticsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecStatisticsCct"))
if mibBuilder.loadTexts: wfAtmLecStatisticsEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecStatisticsEntry.setDescription('Entry contains statistics for each LEC')
wflecArpRequestsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecArpRequestsOut.setStatus('mandatory')
if mibBuilder.loadTexts: wflecArpRequestsOut.setDescription('The number of MAC-to-ATM ARP requests made by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflecArpRequestsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecArpRequestsIn.setStatus('mandatory')
if mibBuilder.loadTexts: wflecArpRequestsIn.setDescription('The number of MAC-to-ATM ARP requests received by this LAN Emulation client over the LUNI associated with this emulated packet interface. Requests may arrive on the Control Direct VCC or on the Control Distribute VCC, depending upon how the LES is implemented and the chances it has had for learning. This counter covers both VCCs.')
wflecArpRepliesOut = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecArpRepliesOut.setStatus('mandatory')
if mibBuilder.loadTexts: wflecArpRepliesOut.setDescription('The number of MAC-to-ATM ARP replies sent by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflecArpRepliesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecArpRepliesIn.setStatus('mandatory')
if mibBuilder.loadTexts: wflecArpRepliesIn.setDescription('The number of MAC-to-ATM ARP replies received by this LAN Emulation client over the LUNI associated with this emulated packet interface. This count includes all such replies, whether solicited or not. Replies may arrive on the Control Direct VCC or on the Control Distribute VCC, depending upon how the LES is implemented. This counter covers both VCCs.')
wflecControlFramesOut = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlFramesOut.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlFramesOut.setDescription('The total number of control packets sent by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflecControlFramesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlFramesIn.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlFramesIn.setDescription('The total number of control packets received by this LAN Emulation client over the LUNI associated with this emulated packet interface')
wflecSvcFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecSvcFailures.setStatus('mandatory')
if mibBuilder.loadTexts: wflecSvcFailures.setDescription('The number of SVCs which this client tried to, but failed to, open.')
wflecStatisticsCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecStatisticsCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecStatisticsCct.setDescription('This corresponds to the Wellfleet circuit number')
wflecUnknownFramesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecUnknownFramesDropped.setStatus('mandatory')
if mibBuilder.loadTexts: wflecUnknownFramesDropped.setDescription('The number of frames that have been dropped due to unknown frame pacing.')
wflecInDataFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInDataFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInDataFrames.setDescription('')
wflecInUnicastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInUnicastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInUnicastFrames.setDescription('')
wflecInUnicastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInUnicastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInUnicastOctets.setDescription('')
wflecInMulticastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInMulticastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInMulticastFrames.setDescription('')
wflecInMulticastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInMulticastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInMulticastOctets.setDescription('')
wflecInBroadcastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInBroadcastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInBroadcastFrames.setDescription('')
wflecInBroadcastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecInBroadcastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecInBroadcastOctets.setDescription('')
wflecOutDataFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutDataFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutDataFrames.setDescription('')
wflecOutUnknownFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutUnknownFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutUnknownFrames.setDescription('')
wflecOutUnknownOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutUnknownOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutUnknownOctets.setDescription('')
wflecOutMulticastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutMulticastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutMulticastFrames.setDescription('')
wflecOutMulticastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutMulticastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutMulticastOctets.setDescription('')
wflecOutBroadcastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutBroadcastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutBroadcastFrames.setDescription('')
wflecOutBroadcastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutBroadcastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutBroadcastOctets.setDescription('')
wflecOutUnicastFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutUnicastFrames.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutUnicastFrames.setDescription('')
wflecOutUnicastOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecOutUnicastOctets.setStatus('mandatory')
if mibBuilder.loadTexts: wflecOutUnicastOctets.setDescription('')
wfAtmLecServerVccTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5), )
if mibBuilder.loadTexts: wfAtmLecServerVccTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecServerVccTable.setDescription('Lan Emulation Client - Server VCC Table')
wfAtmLecServerVccEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecServerVccCct"))
if mibBuilder.loadTexts: wfAtmLecServerVccEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecServerVccEntry.setDescription('Entry contains statistics for each LEC')
wflecConfigDirectInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigDirectInterface.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigDirectInterface.setDescription('The interface associated with the Configuration Direct VCC. If no Configuration Direct VCC exists, this object has the value 0. Otherwise, the objects ( wflecConfigDirectInterface, wflecConfigDirectVPI, wflecConfigDirectVCI ) identify the circuit')
wflecConfigDirectVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigDirectVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigDirectVpi.setDescription('If the Configuration Direct VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecConfigDirectVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecConfigDirectVci.setStatus('mandatory')
if mibBuilder.loadTexts: wflecConfigDirectVci.setDescription('If the Configuration Direct VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecControlDirectInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDirectInterface.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDirectInterface.setDescription('The interface associated with the Control Direct VCC. If no Control Direct VCC exists, this object has the value 0. Otherwise, the objects ( wflecControlDirectInterface, wflecControlDirectVPI, wflecControlDirectVCI ) identify the circuit')
wflecControlDirectVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDirectVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDirectVpi.setDescription('If the Control Direct VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecControlDirectVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDirectVci.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDirectVci.setDescription('If the Control Direct VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecControlDistributeInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDistributeInterface.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDistributeInterface.setDescription('The interface associated with the Control Distribute VCC. If no Control Distribute VCC exists, this object has the value 0. Otherwise, the objects ( wflecControlDistributeInterface, wflecControlDistributeVPI, wflecControlDistributeVCI ) identify the circuit')
wflecControlDistributeVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDistributeVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDistributeVpi.setDescription('If the Control Distribute VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecControlDistributeVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecControlDistributeVci.setStatus('mandatory')
if mibBuilder.loadTexts: wflecControlDistributeVci.setDescription('If the Control Distribute VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecMulticastSendInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastSendInterface.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendInterface.setDescription('The interface associated with the Multicast Send VCC. If no Multicast Send VCC exists, this object has the value 0. Otherwise, the objects ( wflecMulticastSendInterface, wflecMulticastSendVPI, wflecMulticastSendVCI ) identify the circuit')
wflecMulticastSendVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastSendVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendVpi.setDescription('If the Multicast Send VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecMulticastSendVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastSendVci.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastSendVci.setDescription('If the Multicast Send VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecMulticastForwardInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastForwardInterface.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastForwardInterface.setDescription('The interface associated with the Multicast Forward VCC. If no Multicast Forward VCC exists, this object has the value 0. Otherwise, the objects ( wflecMulticastForwardInterface, wflecMulticastForwardVPI, wflecMulticastForwardVCI ) identify the circuit')
wflecMulticastForwardVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastForwardVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastForwardVpi.setDescription('If the Multicast Forward VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecMulticastForwardVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMulticastForwardVci.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMulticastForwardVci.setDescription('If the Multicast Forward VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflecServerVccCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecServerVccCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecServerVccCct.setDescription('This corresponds to the Wellfleet circuit number')
wfAtmLecAtmAddressTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6), )
if mibBuilder.loadTexts: wfAtmLecAtmAddressTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecAtmAddressTable.setDescription('LAN Emulation Client - ATM Addresses table')
wfAtmLecAtmAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecAtmAddressCct"), (0, "Wellfleet-ATM-LE-MIB", "wflecAtmAddress"))
if mibBuilder.loadTexts: wfAtmLecAtmAddressEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecAtmAddressEntry.setDescription('Entry contains ATM address for a LE CLient')
wflecAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(20, 20)).setFixedLength(20)).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecAtmAddress.setDescription('The ATM address this row describes. This could be either a primary address or a secondary address.')
wflecAtmAddressStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enbl", 1), ("dsbl", 2))).clone('enbl')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wflecAtmAddressStatus.setStatus('mandatory')
if mibBuilder.loadTexts: wflecAtmAddressStatus.setDescription('Used to create and delete rows in this table. A management station cannot disable an ATM address while the client is up')
wflecAtmAddressCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecAtmAddressCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecAtmAddressCct.setDescription('This corresponds to the Wellfleet circuit number')
wfAtmLecMacAddressTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7), )
if mibBuilder.loadTexts: wfAtmLecMacAddressTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecMacAddressTable.setDescription('LAN Emulation Client - MAC Addresses table')
wfAtmLecMacAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wflecMacAddressCct"), (0, "Wellfleet-ATM-LE-MIB", "wflecMacAddress"))
if mibBuilder.loadTexts: wfAtmLecMacAddressEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecMacAddressEntry.setDescription('Entry contains MAC address for a LE CLient')
wflecMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMacAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMacAddress.setDescription('The MAC address this row describes. This could be either a primary address or a secondary address.')
wflecMacAddressAtmBinding = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMacAddressAtmBinding.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMacAddressAtmBinding.setDescription('The ATM Address registered for wflecMacAddress')
wflecMacAddressCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wflecMacAddressCct.setStatus('mandatory')
if mibBuilder.loadTexts: wflecMacAddressCct.setDescription('This corresponds to the Wellfleet circuit number')
wfAtmLeArpTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8), )
if mibBuilder.loadTexts: wfAtmLeArpTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLeArpTable.setDescription("Lan Emulation Client ARP Cache Group This table provides access to an ATM LAN Emulation Client's MAC-to-ATM ARP cache. It contains entries for unicast addresses and for the broadcast address, but not for multicast MAC addresses.")
wfAtmLeArpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wfleArpCct"), (0, "Wellfleet-ATM-LE-MIB", "wfleArpMacAddress"))
if mibBuilder.loadTexts: wfAtmLeArpEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLeArpEntry.setDescription('entry of MAC address to ATM address')
wfleArpMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpMacAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpMacAddress.setDescription('The MAC address for which this cache entry provides a translation. Since ATM LAN Emulation uses an ARP protocol to locate broadcast and multicast servers, the value of this object could be the broadcast MAC address')
wfleArpAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpAtmAddress.setDescription("The ATM address of the Broadcast & Unknown Server or LAN Emulation Client whose MAC address is stored in 'leArpMacAddress'. ")
wfleArpIsRemoteAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2))).clone('true')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpIsRemoteAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpIsRemoteAddress.setDescription("Indicates whether the 'leArpMACaddress' belongs to a remote client. true(1) The address is believed to be remote - or its local/remote status is unknown. For an entry created via the LE_ARP mechanism, this corresponds to the 'Remote address' flag being set in the LE_ARP_RESPONSE. false(2) The address is believed to be local - that is to say, registered with the LES by the client whose ATM address is leArpAtmAddress.")
wfleArpEntryType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("ctrl", 2), ("data", 3), ("vol", 4), ("nonvol", 5))).clone('vol')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpEntryType.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpEntryType.setDescription('Indicates how this LE_ARP table entry was created and whether it is aged.')
wfleArpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enbl", 1), ("dsbl", 2))).clone('enbl')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfleArpRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpRowStatus.setDescription('Row status of enable or disable')
wfleArpCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpCct.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpCct.setDescription('This corresponds to the Wellfleet circuit number')
wfleArpVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpVpi.setDescription('This is the Vpi will be used for this MAC address')
wfleArpVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleArpVci.setStatus('mandatory')
if mibBuilder.loadTexts: wfleArpVci.setDescription('This is the Vci will be used for this MAC address')
wfAtmLeRDArpTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9), )
if mibBuilder.loadTexts: wfAtmLeRDArpTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLeRDArpTable.setDescription("Lan Emulation Client RDArp Cache Group This table provides access to an ATM LAN Emulation Client's Route Descriptor-to-ATM ARP cache. ")
wfAtmLeRDArpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wfleRDArpCct"), (0, "Wellfleet-ATM-LE-MIB", "wfleRDArpSegmentID"), (0, "Wellfleet-ATM-LE-MIB", "wfleRDArpBridgeNumber"))
if mibBuilder.loadTexts: wfAtmLeRDArpEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLeRDArpEntry.setDescription('entry of Route Descriptor to ATM address')
wfleRDArpSegmentID = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpSegmentID.setDescription('The LAN ID portion of the Route Descriptor associated with this ARP cache entry.')
wfleRDArpBridgeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpBridgeNumber.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpBridgeNumber.setDescription('The Bridge Number portion of the Route Descriptor associated with this ARP cache entry.')
wfleRDArpAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 3), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpAtmAddress.setDescription('The ATM address of the LAN Emulation Client which is associated with the route descriptor.')
wfleRDArpEntryType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("ctrl", 2), ("data", 3), ("vol", 4), ("nonvol", 5))).clone('vol')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpEntryType.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpEntryType.setDescription('Indicates how this RD LE_ARP table entry was created and whether it is aged.')
wfleRDArpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enbl", 1), ("dsbl", 2))).clone('enbl')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfleRDArpRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpRowStatus.setDescription('Row status of enable or disable')
wfleRDArpCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpCct.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpCct.setDescription('This corresponds to the Wellfleet circuit number')
wfleRDArpVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpVpi.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpVpi.setDescription('This is the Vpi will be used for this Route Descriptor')
wfleRDArpVci = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfleRDArpVci.setStatus('mandatory')
if mibBuilder.loadTexts: wfleRDArpVci.setDescription('This is the Vci will be used for this Route Descriptor')
wfAtmLecConfigLesTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10), )
if mibBuilder.loadTexts: wfAtmLecConfigLesTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesTable.setDescription('Address of Configured LES per LEC ')
wfAtmLecConfigLesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1), ).setIndexNames((0, "Wellfleet-ATM-LE-MIB", "wfAtmLecConfigLesCct"), (0, "Wellfleet-ATM-LE-MIB", "wfAtmLecConfigLesIndex"))
if mibBuilder.loadTexts: wfAtmLecConfigLesEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesEntry.setDescription('An entry in the ATM Le Table')
wfAtmLecConfigLesDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAtmLecConfigLesDelete.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesDelete.setDescription('Create or Delete this LES Atm Address from the list')
wfAtmLecConfigLesEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAtmLecConfigLesEnable.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesEnable.setDescription('Enable or disable this LES Atm Address')
wfAtmLecConfigLesCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAtmLecConfigLesCct.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesCct.setDescription('CCT number for this LEC')
wfAtmLecConfigLesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfAtmLecConfigLesIndex.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesIndex.setDescription('a unique one up type number to create a list')
wfAtmLecConfigLesAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 5), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAtmLecConfigLesAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesAddress.setDescription('Atm address of the LES')
wfAtmLecConfigLesName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 6), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfAtmLecConfigLesName.setStatus('mandatory')
if mibBuilder.loadTexts: wfAtmLecConfigLesName.setDescription('User name for the LES')
mibBuilder.exportSymbols("Wellfleet-ATM-LE-MIB", wfleArpVpi=wfleArpVpi, wfAtmLeArpTable=wfAtmLeArpTable, wflecMulticastSendType=wflecMulticastSendType, wflecMulticastFwdTimeout=wflecMulticastFwdTimeout, wflecOperConfigTopologyChange=wflecOperConfigTopologyChange, wflecControlDistributeVpi=wflecControlDistributeVpi, wflecLastFailureState=wflecLastFailureState, wflecProtocol=wflecProtocol, wfleArpVci=wfleArpVci, wflecMulticastSendVci=wflecMulticastSendVci, wflecConfigSource=wflecConfigSource, wflecMacAddressAtmBinding=wflecMacAddressAtmBinding, wflecOperConfigControlTimeout=wflecOperConfigControlTimeout, wflecConfigCct=wflecConfigCct, wflecMacAddress=wflecMacAddress, wfleArpAtmAddress=wfleArpAtmAddress, wfAtmLecMacAddressEntry=wfAtmLecMacAddressEntry, wfAtmLecAtmAddressEntry=wfAtmLecAtmAddressEntry, wflecOperConfigMaxUnknownFrameTime=wflecOperConfigMaxUnknownFrameTime, wflecOperConfigLocalSegmentID=wflecOperConfigLocalSegmentID, wfleRDArpSegmentID=wfleRDArpSegmentID, wflecOperConfigFlushTimeOut=wflecOperConfigFlushTimeOut, wflecConfigLanName=wflecConfigLanName, wfAtmLecConfigTable=wfAtmLecConfigTable, wflecFlushTimeOut=wflecFlushTimeOut, wfAtmLecStatusTable=wfAtmLecStatusTable, wfleRDArpVpi=wfleRDArpVpi, wflecActualLanName=wflecActualLanName, wfAtmLecOperConfigTable=wfAtmLecOperConfigTable, wflecActualLanType=wflecActualLanType, wflecAtmAddressStatus=wflecAtmAddressStatus, wfAtmLecConfigLesCct=wfAtmLecConfigLesCct, wflecMaxUnknownFrameCount=wflecMaxUnknownFrameCount, wfAtmLecStatisticsEntry=wfAtmLecStatisticsEntry, wfAtmLecConfigLesEntry=wfAtmLecConfigLesEntry, wfAtmLecConfigLesIndex=wfAtmLecConfigLesIndex, wflecSvcFailures=wflecSvcFailures, wflecID=wflecID, wflecProxyClient=wflecProxyClient, wflecInBroadcastFrames=wflecInBroadcastFrames, wflecOutDataFrames=wflecOutDataFrames, wflecConfigLECSAtmAddress=wflecConfigLECSAtmAddress, wflecInUnicastOctets=wflecInUnicastOctets, wflecStatusCct=wflecStatusCct, wflecInMulticastOctets=wflecInMulticastOctets, wflecConfigLesAtmAddress=wflecConfigLesAtmAddress, wflecMaxRetryCount=wflecMaxRetryCount, wflecLastFailureRespCode=wflecLastFailureRespCode, wflecVersion=wflecVersion, wflecOutMulticastOctets=wflecOutMulticastOctets, wflecControlDistributeInterface=wflecControlDistributeInterface, wflecConfigDirectVci=wflecConfigDirectVci, wflecOperConfigExpectedArpResponseTime=wflecOperConfigExpectedArpResponseTime, wflecOutBroadcastFrames=wflecOutBroadcastFrames, wfAtmLecMacAddressTable=wfAtmLecMacAddressTable, wflecInMulticastFrames=wflecInMulticastFrames, wflecConfigLanType=wflecConfigLanType, wfleRDArpRowStatus=wfleRDArpRowStatus, wflecOperConfigMaxRetryCount=wflecOperConfigMaxRetryCount, wflecConfigV2Capable=wflecConfigV2Capable, wflecAgingTime=wflecAgingTime, wflecMacAddressCct=wflecMacAddressCct, wflecControlDirectVci=wflecControlDirectVci, wflecInUnicastFrames=wflecInUnicastFrames, wfAtmLeArpEntry=wfAtmLeArpEntry, wflecOperConfigPathSwitchingDelay=wflecOperConfigPathSwitchingDelay, wflecOperConfigMaxUnknownFrameCount=wflecOperConfigMaxUnknownFrameCount, wflecActualLesAtmAddress=wflecActualLesAtmAddress, wflecOutBroadcastOctets=wflecOutBroadcastOctets, wflecMulticastFwdRetry=wflecMulticastFwdRetry, wfAtmLecConfigEntry=wfAtmLecConfigEntry, wfleRDArpVci=wfleRDArpVci, wflecActualMaxDataFrameSize=wflecActualMaxDataFrameSize, wflecOperConfigMulticastSendAvgRate=wflecOperConfigMulticastSendAvgRate, wfleRDArpAtmAddress=wfleRDArpAtmAddress, wflecMulticastForwardVci=wflecMulticastForwardVci, wflecControlFramesOut=wflecControlFramesOut, wflecUnknownFramesDropped=wflecUnknownFramesDropped, wflecOperConfigForwardDelayTime=wflecOperConfigForwardDelayTime, wflecMulticastSendVpi=wflecMulticastSendVpi, wflecOutMulticastFrames=wflecOutMulticastFrames, wflecOperConfigConnectionCompleteTimer=wflecOperConfigConnectionCompleteTimer, wflecConfigMaxDataFrameSize=wflecConfigMaxDataFrameSize, wfAtmLeRDArpEntry=wfAtmLeRDArpEntry, wflecOperConfigAgingTime=wflecOperConfigAgingTime, wflecOperConfigMulticastSendType=wflecOperConfigMulticastSendType, wflecMulticastSendInterface=wflecMulticastSendInterface, wflecOutUnknownFrames=wflecOutUnknownFrames, wflecServerVccCct=wflecServerVccCct, wfleRDArpEntryType=wfleRDArpEntryType, wflecInBroadcastOctets=wflecInBroadcastOctets, wflecConfigDirectVpi=wflecConfigDirectVpi, wfAtmLecAtmAddressTable=wfAtmLecAtmAddressTable, wflecOperConfigVccTimeoutPeriod=wflecOperConfigVccTimeoutPeriod, wfleArpMacAddress=wfleArpMacAddress, wflecMulticastSendPeakRate=wflecMulticastSendPeakRate, wfAtmLecConfigLesName=wfAtmLecConfigLesName, wfleArpCct=wfleArpCct, wflecTopologyChange=wflecTopologyChange, wflecVccTimeoutPeriod=wflecVccTimeoutPeriod, wfAtmLecServerVccEntry=wfAtmLecServerVccEntry, wflecConfigServerAtmAddress=wflecConfigServerAtmAddress, wflecControlDirectInterface=wflecControlDirectInterface, wflecAtmAddressCct=wflecAtmAddressCct, wflecFlushEnable=wflecFlushEnable, wfleRDArpCct=wfleRDArpCct, wflecOutUnknownOctets=wflecOutUnknownOctets, wfleRDArpBridgeNumber=wfleRDArpBridgeNumber, wfAtmLecConfigLesDelete=wfAtmLecConfigLesDelete, wflecConfigRetry=wflecConfigRetry, wflecOwner=wflecOwner, wflecConfigMode=wflecConfigMode, wflecArpRequestsOut=wflecArpRequestsOut, wfAtmLecOperConfigEntry=wfAtmLecOperConfigEntry, wflecConnectionCompleteTimer=wflecConnectionCompleteTimer, wfAtmLecConfigLesEnable=wfAtmLecConfigLesEnable, wflecControlDirectVpi=wflecControlDirectVpi, wflecLocalSegmentID=wflecLocalSegmentID, wflecExpectedArpResponseTime=wflecExpectedArpResponseTime, wflecControlFramesIn=wflecControlFramesIn, wflecPathSwitchingDelay=wflecPathSwitchingDelay, wflecDebugLevel=wflecDebugLevel, wflecMulticastForwardVpi=wflecMulticastForwardVpi, wflecOperConfigCct=wflecOperConfigCct, wflecMulticastSendAvgRate=wflecMulticastSendAvgRate, wfAtmLeRDArpTable=wfAtmLeRDArpTable, wflecMulticastForwardInterface=wflecMulticastForwardInterface, wfleArpIsRemoteAddress=wfleArpIsRemoteAddress, wfleArpEntryType=wfleArpEntryType, wfAtmLecServerVccTable=wfAtmLecServerVccTable, wflecForwardDelayTime=wflecForwardDelayTime, wflecControlDistributeVci=wflecControlDistributeVci, wflecArpRepliesOut=wflecArpRepliesOut, wflecOutUnicastFrames=wflecOutUnicastFrames, wfAtmLecConfigLesAddress=wfAtmLecConfigLesAddress, wflecInterfaceState=wflecInterfaceState, wfAtmLecConfigLesTable=wfAtmLecConfigLesTable, wflecAtmAddress=wflecAtmAddress, wflecMaxUnknownFrameTime=wflecMaxUnknownFrameTime, wfAtmLecStatisticsTable=wfAtmLecStatisticsTable, wfAtmLecStatusEntry=wfAtmLecStatusEntry, wflecStatisticsCct=wflecStatisticsCct, wflecRowStatus=wflecRowStatus, wflecPrimaryAtmAddress=wflecPrimaryAtmAddress, wflecOperConfigMulticastSendPeakRate=wflecOperConfigMulticastSendPeakRate, wflecInDataFrames=wflecInDataFrames, wflecOutUnicastOctets=wflecOutUnicastOctets, wflecConfDelete=wflecConfDelete, wflecControlTimeout=wflecControlTimeout, wfleArpRowStatus=wfleArpRowStatus, wflecConfigDirectInterface=wflecConfigDirectInterface, wflecArpRepliesIn=wflecArpRepliesIn, wflecArpRequestsIn=wflecArpRequestsIn)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_size_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(bits, counter64, ip_address, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, gauge32, module_identity, notification_type, time_ticks, counter32, mib_identifier, object_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Counter64', 'IpAddress', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Gauge32', 'ModuleIdentity', 'NotificationType', 'TimeTicks', 'Counter32', 'MibIdentifier', 'ObjectIdentity', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(wf_atm_le_group,) = mibBuilder.importSymbols('Wellfleet-COMMON-MIB', 'wfAtmLeGroup')
wf_atm_lec_config_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1))
if mibBuilder.loadTexts:
wfAtmLecConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigTable.setDescription('ATM LEC Interface table - One per LEC Client This table deals with configuration and operational status')
wf_atm_lec_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecConfigCct'))
if mibBuilder.loadTexts:
wfAtmLecConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigEntry.setDescription('per LEC Client objects - wfAtmLecCct corresponds to Wellfleet circuit number ')
wflec_conf_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfDelete.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfDelete.setDescription('Indication to create or delete an ATM LE Client Config Entry from the MIB ')
wflec_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecRowStatus.setDescription('Indication to create or delete an ATM LE Client. This will remove the LEC from the Emulated LAN. However, the instance is not removed from the MIB ')
wflec_config_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigCct.setDescription('This corresponds to the Wellfleet circuit number')
wflec_owner = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 4), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecOwner.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOwner.setDescription('The entity that configured this entry and is therefore using the resources assigned to it.')
wflec_config_mode = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('autocfg', 1), ('mancfg', 2))).clone('autocfg')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigMode.setDescription('Indicates whether this LAN Emulation Client should auto-configure the next time it is (re)started.')
wflec_config_lan_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unspecified', 1), ('ieee8023', 2), ('ieee8025', 3))).clone('unspecified')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigLanType.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigLanType.setDescription('C2 - LEC LAN Type The data frame format which this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. ')
wflec_config_max_data_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unspec', 1), ('size1516', 2), ('size4544', 3), ('size9234', 4), ('size18190', 5))).clone('unspec')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigMaxDataFrameSize.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigMaxDataFrameSize.setDescription("C3 Maximum Data Frame Size. The maximum data frame size which this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. This MIB object will not be overwritten with the new value from a LE_{JOIN,CONFIGURE}_RESPONSE. Instead, lecActualMaxDataFrameSize will be.'")
wflec_config_lan_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 8), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigLanName.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigLanName.setDescription("C5 ELAN Name. The ELAN Name this client will use the next time it returns to the Initial State. Auto-configuring clients use this parameter in their Configure requests. Manually-configured clients use it in their Join requests. This MIB object will not be overwritten with the new value from a LE_{JOIN,CONFIGURE}_RESPONSE. Instead, lecActualMaxDataFrameSize will be.' ")
wflec_config_les_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 9), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigLesAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigLesAtmAddress.setDescription("C9 LE Server ATM Address. The LAN Emulation Server which this client will use the next time it is started in manual configuration mode. When lecConfigMode is 'automatic', there is no need to set this address, and no advantage to doing so. The client will use the LECS to find a LES, putting the auto-configured address in lecActualLesAtmAddress while leaving lecConfigLesAtmAddress alone. ")
wflec_control_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(10, 300)).clone(30)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecControlTimeout.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlTimeout.setDescription('C7 Control Time-out. Time out period used for timing out most request/response control frame most request/response control frame interactions.')
wflec_max_unknown_frame_count = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMaxUnknownFrameCount.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMaxUnknownFrameCount.setDescription('C10 Maximum Unknown Frame Count. This parameter MUST be less than or equal to 10. (See parameter C11) ')
wflec_max_unknown_frame_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 60)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMaxUnknownFrameTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMaxUnknownFrameTime.setDescription('C11 Maximum Unknown Frame Time. This parameter MUST be greater than or equal to 1.0 seconds. Within the period of time defined by the Maximum Unknown Frame Time, a LE Client will send no more than Maximum Unknown Frame Count frames to a given MAC address or Route Designator without also initiating the address resolution protocol to resolve that MAC address or Route Designator. This time value is expressed in seconds. ')
wflec_vcc_timeout_period = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1200))).clone(namedValues=named_values(('vcctmodef', 1200))).clone('vcctmodef')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecVccTimeoutPeriod.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecVccTimeoutPeriod.setDescription('C12 VCC Timeout Period. A LE Client may release any Data Direct or Multicast Send VCC that it has not used to transmit or receive any data frames for the length of the VCC Timeout Period. This time value is expressed in seconds. ')
wflec_max_retry_count = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 2)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMaxRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMaxRetryCount.setDescription("C13 Maximum Retry Count. A LE CLient MUST not retry a LE-ARP for a given frame's LAN destination more than Maximum Retry Count times, after which it must discard the frame.")
wflec_aging_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(10, 300)).clone(300)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecAgingTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecAgingTime.setDescription('C17 Aging Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship.')
wflec_forward_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(4, 30)).clone(15)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecForwardDelayTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecForwardDelayTime.setDescription('C18 Forward Delay Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship, so long as the Topology Change flag C19 is true.')
wflec_expected_arp_response_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(1, 30)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecExpectedArpResponseTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecExpectedArpResponseTime.setDescription('C20 Expected LE_ARP Reponse Time. The maximum time (seconds) that the LEC expects an LE_ARP_REQUEST/ LE_ARP_RESPONSE cycle to take. Used for retries and verifies. ')
wflec_flush_time_out = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(1, 4)).clone(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecFlushTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecFlushTimeOut.setDescription('C21 Flush Time-out. Time limit (seconds) to wait to receive a LE_FLUSH_RESPONSE after the LE_FLUSH_REQUEST has been sent before taking recovery action.')
wflec_path_switching_delay = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(1, 8)).clone(6)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecPathSwitchingDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecPathSwitchingDelay.setDescription('C22 Path Switching Delay. The time (seconds) since sending a frame to the BUS after which the LE Client may assume that the frame has been either discarded or delivered to the recipient. May be used to bypass the Flush protocol.')
wflec_local_segment_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecLocalSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecLocalSegmentID.setDescription("C23 Local Segment ID. The segment ID of the emulated LAN. This is only required for IEEE 802.5 clients that are Source Routing bridges.'")
wflec_multicast_send_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('abr', 1), ('vbr', 2), ('cbr', 3))).clone('cbr')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMulticastSendType.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendType.setDescription('C24 Multicast Send VCC Type. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. This is the method to be used by the LE Client when specifying traffic parameters when it sets up the Multicast Send VCC for this emulated LAN.')
wflec_multicast_send_avg_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 22), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMulticastSendAvgRate.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendAvgRate.setDescription('C25 Multicast Send VCC AvgRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Sustained Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflec_multicast_send_peak_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 23), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMulticastSendPeakRate.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendPeakRate.setDescription('C26 Multicast Send VCC PeakRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Peak Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflec_connection_complete_timer = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConnectionCompleteTimer.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConnectionCompleteTimer.setDescription('C28 Connection Complete Timer. Optional. In Connection Establishment this is the time period in which data or a READY_IND message is expected from a Calling Party.')
wflec_flush_enable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecFlushEnable.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecFlushEnable.setDescription('Flush Protocol enable/disable - ATM_LEC_FLUSH_ENABLED - ATM LE flush protocol is used when switching VCs. If the Flush timeout (wflecFlushTimeOut) expires data for that MAC address will start flowing over the old VC again. ATM_LEC_FLUSH_DISABLED - ATM LE flush protocol is not used. Instead data for that MAC address will automatically start flowing over the new VC once the Path Switching delay timeout (wflecPathSwitchingDelay) has expired.')
wflec_config_retry = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 26), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigRetry.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigRetry.setDescription('This attribute specifies how many retries should be attempted if any part of the config phase fails. The config phase starts with setting up the config direct VC and ends when a JOIN response is received. The default is 0 which means retry forever with a maximum timeout of 30 seconds between each retry. The time between each retry will start at 2 seconds and double from that point (never exceeding 30 seconds).')
wflec_multicast_fwd_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(5))).clone(namedValues=named_values(('mcsfwdtmodef', 5))).clone('mcsfwdtmodef')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMulticastFwdTimeout.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastFwdTimeout.setDescription('The attribute specifies how many seconds to wait for the Multicast Forward VC to be set up before retrying. The retry will include closing the Multicast Send VC (if it has been opened) and reARPing for the BUS. A successful ARP response will result in the setup of the Multicast Send which in turn should result in the BUS setting up the Multicast Forward VC.')
wflec_multicast_fwd_retry = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(10))).clone(namedValues=named_values(('mcsfwdrtrydef', 10))).clone('mcsfwdrtrydef')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecMulticastFwdRetry.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastFwdRetry.setDescription('The attribute specifies how many retries should be made to get the Multicast Forward VC setup. The LEC will retry after wflecMulticastFwdTimeout seconds and will double this timeout for each each retry which follows. The timeout will not exeed 30 seconds however. After wflecMulticastFwdRetry retries, the LEC will restart itself. If wflecMulticastFwdRetry is set to 0 it will retry the BUS phase forever and will never restart itself.')
wflec_debug_level = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(0, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecDebugLevel.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecDebugLevel.setDescription("Debug Levels - The level of debug desired from the Portable LEC code LEC_DBG_OFF - 0 LEC_DBG_WARN - 1 LEC_DBG_ERR - 2 LEC_DBG_MSG - 4 LEC_DBG_DBG - 8 LEC_DBG_VERBOSE - 16 This values above can be used separately, or OR'd together for a combination of debug levels. For example, to see both WARN and ERR messages, LEC_DBG_WARN OR LEC_DBG_ERR = 3, so set this object to 3.")
wflec_config_lecs_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 30), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigLECSAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigLECSAtmAddress.setDescription('The LE Config Server Address to be used. If left (or set) to NULL_VAL the well-known LECS ATM address will be used.')
wflec_config_v2_capable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 1, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecConfigV2Capable.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigV2Capable.setDescription('Indication to enable or disable LANE V2 support for this ATM LE Client.')
wf_atm_lec_status_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2))
if mibBuilder.loadTexts:
wfAtmLecStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecStatusTable.setDescription('Lan Emulation Status Group Read-only table containing identification, status, and operational information about the LAN Emulation Clients this agent manages ')
wf_atm_lec_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecStatusCct'))
if mibBuilder.loadTexts:
wfAtmLecStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecStatusEntry.setDescription('per LEC Client objects - wfAtmLecCct corresponds to Wellfleet circuit number ')
wflec_status_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecStatusCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecStatusCct.setDescription('This corresponds to the Wellfleet circuit number')
wflec_primary_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecPrimaryAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecPrimaryAtmAddress.setDescription("C1 - LE Client's ATM Address.")
wflec_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecID.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecID.setDescription("C14 LE Client Identifier. Each LE Client requires a LE Client Identifier (LECID) assigned by the LE Server during the Join phase. The LECID is placed in control requests by the LE Client and MAY be used for echo suppression on multicast data frames sent by that LE Client. This value MUST NOT change without terminating the LE Client and returning to the Initial state. A valid LECID MUST be in the range X'0001' through X'FEFF'. The value of this object is only meaningful for a LEC that is connected to a LES. For a LEC which does not belong to an emulated LAN, the value of this object is defined to be 0.'")
wflec_interface_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('initial', 1), ('lecsconnect', 2), ('configure', 3), ('join', 4), ('reg', 5), ('busconnect', 6), ('operational', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInterfaceState.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInterfaceState.setDescription('Indicates the state for the LE Client')
wflec_last_failure_resp_code = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=named_values(('none', 1), ('tmo', 2), ('undef', 3), ('vrsnotsup', 4), ('invreq', 5), ('dupdst', 6), ('dupatmadr', 7), ('insufres', 8), ('accdenied', 9), ('invreqid', 10), ('invdst', 11), ('invatmadr', 12), ('nocfg', 13), ('lecfgerr', 14), ('insufinfo', 15))).clone('none')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecLastFailureRespCode.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecLastFailureRespCode.setDescription("Failure response code. Status code from the last failed Configure response or Join response. Failed responses are those for which the LE_CONFIGURE_RESPONSE / LE_JOIN_RESPONSE frame contains a non-zero code, or fails to arrive within a timeout period. If none of this client's requests have failed, this object has the value 'none'. If the failed response contained a STATUS code that is not defined in the LAN Emulation specification, this object has the value 'undefinedError'. The value 'timeout' is self-explanatory. Other failure codes correspond to those defined in the specification, although they may have different numeric values.")
wflec_last_failure_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecLastFailureState.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecLastFailureState.setDescription("Last failure state The state this client was in when it updated the 'lecLastFailureRespCode'. If 'lecLastFailureRespCode' is 'none', this object has the value initialState(1).")
wflec_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('prot1', 1))).clone('prot1')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecProtocol.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecProtocol.setDescription('The LAN Emulation protocol which this client supports, and specifies in its LE_JOIN_REQUESTs. ')
wflec_version = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecVersion.setDescription('The LAN Emulation protocol version which this client supports, and specifies in its LE_JOIN_REQUESTs. ')
wflec_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecTopologyChange.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecTopologyChange.setDescription('C19 Topology Change. Boolean indication that the LE Client is using the Forward Delay Time C18, instead of the Ageing Time C17, to age entries in its LE-ARP cache.')
wflec_config_server_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 10), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigServerAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigServerAtmAddress.setDescription('The ATM address of the LECS for this Client')
wflec_config_source = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('viailmi', 1), ('knownadr', 2), ('cfgpvc', 3), ('nolecs', 4))).clone('nolecs')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigSource.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigSource.setDescription('Indicates whether this LAN Emulation Client used the LAN Emulation Configuration Server, and, if so, what method it used to establish the Configuration Direct VCC.')
wflec_actual_lan_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unspecified', 1), ('ieee8023', 2), ('ieee8025', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecActualLanType.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecActualLanType.setDescription('C2 - LEC LAN Type The data frame format that this LAN Emulation Client is using right now. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server')
wflec_actual_max_data_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unspec', 1), ('size1516', 2), ('size4544', 3), ('size9234', 4), ('size18190', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecActualMaxDataFrameSize.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecActualMaxDataFrameSize.setDescription('C3 Maximum Data Frame Size. The maximum data frame size that this LAN Emulation client is using right now. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server ')
wflec_actual_lan_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecActualLanName.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecActualLanName.setDescription('C5 ELAN Name. The identity of the emulated LAN which this client last joined, or wishes to join. This may come from lecConfigLanType, the LAN Emulation Configuration Server, or the LAN Emulation Server')
wflec_actual_les_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 15), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecActualLesAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecActualLesAtmAddress.setDescription("C9 LE Server ATM Address. The LAN Emulation Server address currently in use or most recently attempted. If no LAN Emulation Server attachment has been tried, this object's value is the zero-length string.' ")
wflec_proxy_client = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 2, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecProxyClient.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecProxyClient.setDescription("C4 Proxy When a client joins an ATM emulated LAN, it indicates whether it wants to act as a proxy. Proxy clients are allowed to represent unregistered MAC addresses, and receive copies of LE_ARP_REQUEST frames for such addresses.'")
wf_atm_lec_oper_config_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3))
if mibBuilder.loadTexts:
wfAtmLecOperConfigTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecOperConfigTable.setDescription('ATM LEC Interface table - One per LEC Client This table deals with configuration and operational status')
wf_atm_lec_oper_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecOperConfigCct'))
if mibBuilder.loadTexts:
wfAtmLecOperConfigEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecOperConfigEntry.setDescription('per LEC Operation Config objects - wfAtmLecOperConfigCct corresponds to Wellfleet circuit number ')
wflec_oper_config_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigCct.setDescription('This corresponds to the Wellfleet circuit number')
wflec_oper_config_control_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigControlTimeout.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigControlTimeout.setDescription('C7 Control Time-out. Time out period used for timing out most request/response control frame most request/response control frame interactions.')
wflec_oper_config_max_unknown_frame_count = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMaxUnknownFrameCount.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMaxUnknownFrameCount.setDescription('C10 Maximum Unknown Frame Count. This parameter MUST be less than or equal to 10. (See parameter C11) ')
wflec_oper_config_max_unknown_frame_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMaxUnknownFrameTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMaxUnknownFrameTime.setDescription('C11 Maximum Unknown Frame Time. This parameter MUST be greater than or equal to 1.0 seconds. Within the period of time defined by the Maximum Unknown Frame Time, a LE Client will send no more than Maximum Unknown Frame Count frames to a given MAC address or Route Designator without also initiating the address resolution protocol to resolve that MAC address or Route Designator. This time value is expressed in seconds. ')
wflec_oper_config_vcc_timeout_period = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigVccTimeoutPeriod.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigVccTimeoutPeriod.setDescription('C12 VCC Timeout Period. A LE Client may release any Data Direct or Multicast Send VCC that it has not used to transmit or receive any data frames for the length of the VCC Timeout Period. This time value is expressed in seconds. ')
wflec_oper_config_max_retry_count = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMaxRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMaxRetryCount.setDescription("C13 Maximum Retry Count. A LE CLient MUST not retry a LE-ARP for a given frame's LAN destination more than Maximum Retry Count times, after which it must discard the frame.")
wflec_oper_config_aging_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigAgingTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigAgingTime.setDescription('C17 Aging Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship.')
wflec_oper_config_forward_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigForwardDelayTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigForwardDelayTime.setDescription('C18 Forward Delay Time. The maximum time that a LE Client will maintain an entry in its LE-ARP cache in the absence of a verification of that relationship, so long as the Topology Change flag C19 is true.')
wflec_oper_config_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigTopologyChange.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigTopologyChange.setDescription('C19 Topology Change. Boolean indication that the LE Client is using the Forward Delay Time C18, instead of the Ageing Time C17, to age entries in its LE-ARP cache.')
wflec_oper_config_expected_arp_response_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigExpectedArpResponseTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigExpectedArpResponseTime.setDescription('C20 Expected LE_ARP Reponse Time. The maximum time (seconds) that the LEC expects an LE_ARP_REQUEST/ LE_ARP_RESPONSE cycle to take. Used for retries and verifies. ')
wflec_oper_config_flush_time_out = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigFlushTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigFlushTimeOut.setDescription('C21 Flush Time-out. Time limit (seconds) to wait to receive a LE_FLUSH_RESPONSE after the LE_FLUSH_REQUEST has been sent before taking recovery action.')
wflec_oper_config_path_switching_delay = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigPathSwitchingDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigPathSwitchingDelay.setDescription('C22 Path Switching Delay. The time (seconds) since sending a frame to the BUS after which the LE Client may assume that the frame has been either discarded or delivered to the recipient. May be used to bypass the Flush protocol.')
wflec_oper_config_local_segment_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigLocalSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigLocalSegmentID.setDescription("C23 Local Segment ID. The segment ID of the emulated LAN. This is only required for IEEE 802.5 clients that are Source Routing bridges.'")
wflec_oper_config_multicast_send_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendType.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendType.setDescription('C24 Multicast Send VCC Type. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. This is the method to be used by the LE Client when specifying traffic parameters when it sets up the Multicast Send VCC for this emulated LAN.')
wflec_oper_config_multicast_send_avg_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendAvgRate.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendAvgRate.setDescription('C25 Multicast Send VCC AvgRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Sustained Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflec_oper_config_multicast_send_peak_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendPeakRate.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigMulticastSendPeakRate.setDescription('C26 Multicast Send VCC PeakRate. Signalling parameter that SHOULD be used by the LE Client when establishing the Multicast Send VCC. Forward and Backward Peak Cell Rate to be requested by LE Client when setting up Multicast Send VCC, if using Variable bit rate codings. ')
wflec_oper_config_connection_complete_timer = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 3, 1, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOperConfigConnectionCompleteTimer.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOperConfigConnectionCompleteTimer.setDescription('C28 Connection Complete Timer. Optional. In Connection Establishment this is the time period in which data or a READY_IND message is expected from a Calling Party.')
wf_atm_lec_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4))
if mibBuilder.loadTexts:
wfAtmLecStatisticsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecStatisticsTable.setDescription('Table of statistics')
wf_atm_lec_statistics_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecStatisticsCct'))
if mibBuilder.loadTexts:
wfAtmLecStatisticsEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecStatisticsEntry.setDescription('Entry contains statistics for each LEC')
wflec_arp_requests_out = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecArpRequestsOut.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecArpRequestsOut.setDescription('The number of MAC-to-ATM ARP requests made by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflec_arp_requests_in = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecArpRequestsIn.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecArpRequestsIn.setDescription('The number of MAC-to-ATM ARP requests received by this LAN Emulation client over the LUNI associated with this emulated packet interface. Requests may arrive on the Control Direct VCC or on the Control Distribute VCC, depending upon how the LES is implemented and the chances it has had for learning. This counter covers both VCCs.')
wflec_arp_replies_out = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecArpRepliesOut.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecArpRepliesOut.setDescription('The number of MAC-to-ATM ARP replies sent by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflec_arp_replies_in = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecArpRepliesIn.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecArpRepliesIn.setDescription('The number of MAC-to-ATM ARP replies received by this LAN Emulation client over the LUNI associated with this emulated packet interface. This count includes all such replies, whether solicited or not. Replies may arrive on the Control Direct VCC or on the Control Distribute VCC, depending upon how the LES is implemented. This counter covers both VCCs.')
wflec_control_frames_out = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlFramesOut.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlFramesOut.setDescription('The total number of control packets sent by this LAN Emulation client over the LUNI associated with this emulated packet interface.')
wflec_control_frames_in = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlFramesIn.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlFramesIn.setDescription('The total number of control packets received by this LAN Emulation client over the LUNI associated with this emulated packet interface')
wflec_svc_failures = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecSvcFailures.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecSvcFailures.setDescription('The number of SVCs which this client tried to, but failed to, open.')
wflec_statistics_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecStatisticsCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecStatisticsCct.setDescription('This corresponds to the Wellfleet circuit number')
wflec_unknown_frames_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecUnknownFramesDropped.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecUnknownFramesDropped.setDescription('The number of frames that have been dropped due to unknown frame pacing.')
wflec_in_data_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInDataFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInDataFrames.setDescription('')
wflec_in_unicast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInUnicastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInUnicastFrames.setDescription('')
wflec_in_unicast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInUnicastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInUnicastOctets.setDescription('')
wflec_in_multicast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInMulticastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInMulticastFrames.setDescription('')
wflec_in_multicast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInMulticastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInMulticastOctets.setDescription('')
wflec_in_broadcast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInBroadcastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInBroadcastFrames.setDescription('')
wflec_in_broadcast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecInBroadcastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecInBroadcastOctets.setDescription('')
wflec_out_data_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutDataFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutDataFrames.setDescription('')
wflec_out_unknown_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutUnknownFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutUnknownFrames.setDescription('')
wflec_out_unknown_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutUnknownOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutUnknownOctets.setDescription('')
wflec_out_multicast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutMulticastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutMulticastFrames.setDescription('')
wflec_out_multicast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutMulticastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutMulticastOctets.setDescription('')
wflec_out_broadcast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutBroadcastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutBroadcastFrames.setDescription('')
wflec_out_broadcast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutBroadcastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutBroadcastOctets.setDescription('')
wflec_out_unicast_frames = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutUnicastFrames.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutUnicastFrames.setDescription('')
wflec_out_unicast_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 4, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecOutUnicastOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecOutUnicastOctets.setDescription('')
wf_atm_lec_server_vcc_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5))
if mibBuilder.loadTexts:
wfAtmLecServerVccTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecServerVccTable.setDescription('Lan Emulation Client - Server VCC Table')
wf_atm_lec_server_vcc_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecServerVccCct'))
if mibBuilder.loadTexts:
wfAtmLecServerVccEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecServerVccEntry.setDescription('Entry contains statistics for each LEC')
wflec_config_direct_interface = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigDirectInterface.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigDirectInterface.setDescription('The interface associated with the Configuration Direct VCC. If no Configuration Direct VCC exists, this object has the value 0. Otherwise, the objects ( wflecConfigDirectInterface, wflecConfigDirectVPI, wflecConfigDirectVCI ) identify the circuit')
wflec_config_direct_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigDirectVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigDirectVpi.setDescription('If the Configuration Direct VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_config_direct_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecConfigDirectVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecConfigDirectVci.setDescription('If the Configuration Direct VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_control_direct_interface = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDirectInterface.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDirectInterface.setDescription('The interface associated with the Control Direct VCC. If no Control Direct VCC exists, this object has the value 0. Otherwise, the objects ( wflecControlDirectInterface, wflecControlDirectVPI, wflecControlDirectVCI ) identify the circuit')
wflec_control_direct_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDirectVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDirectVpi.setDescription('If the Control Direct VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_control_direct_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDirectVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDirectVci.setDescription('If the Control Direct VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_control_distribute_interface = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDistributeInterface.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDistributeInterface.setDescription('The interface associated with the Control Distribute VCC. If no Control Distribute VCC exists, this object has the value 0. Otherwise, the objects ( wflecControlDistributeInterface, wflecControlDistributeVPI, wflecControlDistributeVCI ) identify the circuit')
wflec_control_distribute_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDistributeVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDistributeVpi.setDescription('If the Control Distribute VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_control_distribute_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecControlDistributeVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecControlDistributeVci.setDescription('If the Control Distribute VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_multicast_send_interface = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastSendInterface.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendInterface.setDescription('The interface associated with the Multicast Send VCC. If no Multicast Send VCC exists, this object has the value 0. Otherwise, the objects ( wflecMulticastSendInterface, wflecMulticastSendVPI, wflecMulticastSendVCI ) identify the circuit')
wflec_multicast_send_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastSendVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendVpi.setDescription('If the Multicast Send VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_multicast_send_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastSendVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastSendVci.setDescription('If the Multicast Send VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_multicast_forward_interface = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastForwardInterface.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastForwardInterface.setDescription('The interface associated with the Multicast Forward VCC. If no Multicast Forward VCC exists, this object has the value 0. Otherwise, the objects ( wflecMulticastForwardInterface, wflecMulticastForwardVPI, wflecMulticastForwardVCI ) identify the circuit')
wflec_multicast_forward_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastForwardVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastForwardVpi.setDescription('If the Multicast Forward VCC exists, this object contains the VPI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_multicast_forward_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMulticastForwardVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMulticastForwardVci.setDescription('If the Multicast Forward VCC exists, this object contains the VCI which identifies that VCC at the point where it connects to this LE client. Otherwise, this object has the value 0.')
wflec_server_vcc_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 5, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecServerVccCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecServerVccCct.setDescription('This corresponds to the Wellfleet circuit number')
wf_atm_lec_atm_address_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6))
if mibBuilder.loadTexts:
wfAtmLecAtmAddressTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecAtmAddressTable.setDescription('LAN Emulation Client - ATM Addresses table')
wf_atm_lec_atm_address_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecAtmAddressCct'), (0, 'Wellfleet-ATM-LE-MIB', 'wflecAtmAddress'))
if mibBuilder.loadTexts:
wfAtmLecAtmAddressEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecAtmAddressEntry.setDescription('Entry contains ATM address for a LE CLient')
wflec_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(20, 20)).setFixedLength(20)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecAtmAddress.setDescription('The ATM address this row describes. This could be either a primary address or a secondary address.')
wflec_atm_address_status = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enbl', 1), ('dsbl', 2))).clone('enbl')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wflecAtmAddressStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecAtmAddressStatus.setDescription('Used to create and delete rows in this table. A management station cannot disable an ATM address while the client is up')
wflec_atm_address_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 6, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecAtmAddressCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecAtmAddressCct.setDescription('This corresponds to the Wellfleet circuit number')
wf_atm_lec_mac_address_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7))
if mibBuilder.loadTexts:
wfAtmLecMacAddressTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecMacAddressTable.setDescription('LAN Emulation Client - MAC Addresses table')
wf_atm_lec_mac_address_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wflecMacAddressCct'), (0, 'Wellfleet-ATM-LE-MIB', 'wflecMacAddress'))
if mibBuilder.loadTexts:
wfAtmLecMacAddressEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecMacAddressEntry.setDescription('Entry contains MAC address for a LE CLient')
wflec_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMacAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMacAddress.setDescription('The MAC address this row describes. This could be either a primary address or a secondary address.')
wflec_mac_address_atm_binding = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMacAddressAtmBinding.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMacAddressAtmBinding.setDescription('The ATM Address registered for wflecMacAddress')
wflec_mac_address_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 7, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wflecMacAddressCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wflecMacAddressCct.setDescription('This corresponds to the Wellfleet circuit number')
wf_atm_le_arp_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8))
if mibBuilder.loadTexts:
wfAtmLeArpTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLeArpTable.setDescription("Lan Emulation Client ARP Cache Group This table provides access to an ATM LAN Emulation Client's MAC-to-ATM ARP cache. It contains entries for unicast addresses and for the broadcast address, but not for multicast MAC addresses.")
wf_atm_le_arp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wfleArpCct'), (0, 'Wellfleet-ATM-LE-MIB', 'wfleArpMacAddress'))
if mibBuilder.loadTexts:
wfAtmLeArpEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLeArpEntry.setDescription('entry of MAC address to ATM address')
wfle_arp_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpMacAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpMacAddress.setDescription('The MAC address for which this cache entry provides a translation. Since ATM LAN Emulation uses an ARP protocol to locate broadcast and multicast servers, the value of this object could be the broadcast MAC address')
wfle_arp_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpAtmAddress.setDescription("The ATM address of the Broadcast & Unknown Server or LAN Emulation Client whose MAC address is stored in 'leArpMacAddress'. ")
wfle_arp_is_remote_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2))).clone('true')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpIsRemoteAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpIsRemoteAddress.setDescription("Indicates whether the 'leArpMACaddress' belongs to a remote client. true(1) The address is believed to be remote - or its local/remote status is unknown. For an entry created via the LE_ARP mechanism, this corresponds to the 'Remote address' flag being set in the LE_ARP_RESPONSE. false(2) The address is believed to be local - that is to say, registered with the LES by the client whose ATM address is leArpAtmAddress.")
wfle_arp_entry_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('ctrl', 2), ('data', 3), ('vol', 4), ('nonvol', 5))).clone('vol')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpEntryType.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpEntryType.setDescription('Indicates how this LE_ARP table entry was created and whether it is aged.')
wfle_arp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enbl', 1), ('dsbl', 2))).clone('enbl')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfleArpRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpRowStatus.setDescription('Row status of enable or disable')
wfle_arp_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpCct.setDescription('This corresponds to the Wellfleet circuit number')
wfle_arp_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpVpi.setDescription('This is the Vpi will be used for this MAC address')
wfle_arp_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 8, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleArpVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleArpVci.setDescription('This is the Vci will be used for this MAC address')
wf_atm_le_rd_arp_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9))
if mibBuilder.loadTexts:
wfAtmLeRDArpTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLeRDArpTable.setDescription("Lan Emulation Client RDArp Cache Group This table provides access to an ATM LAN Emulation Client's Route Descriptor-to-ATM ARP cache. ")
wf_atm_le_rd_arp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wfleRDArpCct'), (0, 'Wellfleet-ATM-LE-MIB', 'wfleRDArpSegmentID'), (0, 'Wellfleet-ATM-LE-MIB', 'wfleRDArpBridgeNumber'))
if mibBuilder.loadTexts:
wfAtmLeRDArpEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLeRDArpEntry.setDescription('entry of Route Descriptor to ATM address')
wfle_rd_arp_segment_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpSegmentID.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpSegmentID.setDescription('The LAN ID portion of the Route Descriptor associated with this ARP cache entry.')
wfle_rd_arp_bridge_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpBridgeNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpBridgeNumber.setDescription('The Bridge Number portion of the Route Descriptor associated with this ARP cache entry.')
wfle_rd_arp_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 3), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpAtmAddress.setDescription('The ATM address of the LAN Emulation Client which is associated with the route descriptor.')
wfle_rd_arp_entry_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('ctrl', 2), ('data', 3), ('vol', 4), ('nonvol', 5))).clone('vol')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpEntryType.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpEntryType.setDescription('Indicates how this RD LE_ARP table entry was created and whether it is aged.')
wfle_rd_arp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enbl', 1), ('dsbl', 2))).clone('enbl')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfleRDArpRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpRowStatus.setDescription('Row status of enable or disable')
wfle_rd_arp_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpCct.setDescription('This corresponds to the Wellfleet circuit number')
wfle_rd_arp_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpVpi.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpVpi.setDescription('This is the Vpi will be used for this Route Descriptor')
wfle_rd_arp_vci = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 9, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfleRDArpVci.setStatus('mandatory')
if mibBuilder.loadTexts:
wfleRDArpVci.setDescription('This is the Vci will be used for this Route Descriptor')
wf_atm_lec_config_les_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10))
if mibBuilder.loadTexts:
wfAtmLecConfigLesTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesTable.setDescription('Address of Configured LES per LEC ')
wf_atm_lec_config_les_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1)).setIndexNames((0, 'Wellfleet-ATM-LE-MIB', 'wfAtmLecConfigLesCct'), (0, 'Wellfleet-ATM-LE-MIB', 'wfAtmLecConfigLesIndex'))
if mibBuilder.loadTexts:
wfAtmLecConfigLesEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesEntry.setDescription('An entry in the ATM Le Table')
wf_atm_lec_config_les_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfAtmLecConfigLesDelete.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesDelete.setDescription('Create or Delete this LES Atm Address from the list')
wf_atm_lec_config_les_enable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfAtmLecConfigLesEnable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesEnable.setDescription('Enable or disable this LES Atm Address')
wf_atm_lec_config_les_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfAtmLecConfigLesCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesCct.setDescription('CCT number for this LEC')
wf_atm_lec_config_les_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfAtmLecConfigLesIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesIndex.setDescription('a unique one up type number to create a list')
wf_atm_lec_config_les_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 5), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfAtmLecConfigLesAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesAddress.setDescription('Atm address of the LES')
wf_atm_lec_config_les_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 5, 20, 10, 1, 6), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfAtmLecConfigLesName.setStatus('mandatory')
if mibBuilder.loadTexts:
wfAtmLecConfigLesName.setDescription('User name for the LES')
mibBuilder.exportSymbols('Wellfleet-ATM-LE-MIB', wfleArpVpi=wfleArpVpi, wfAtmLeArpTable=wfAtmLeArpTable, wflecMulticastSendType=wflecMulticastSendType, wflecMulticastFwdTimeout=wflecMulticastFwdTimeout, wflecOperConfigTopologyChange=wflecOperConfigTopologyChange, wflecControlDistributeVpi=wflecControlDistributeVpi, wflecLastFailureState=wflecLastFailureState, wflecProtocol=wflecProtocol, wfleArpVci=wfleArpVci, wflecMulticastSendVci=wflecMulticastSendVci, wflecConfigSource=wflecConfigSource, wflecMacAddressAtmBinding=wflecMacAddressAtmBinding, wflecOperConfigControlTimeout=wflecOperConfigControlTimeout, wflecConfigCct=wflecConfigCct, wflecMacAddress=wflecMacAddress, wfleArpAtmAddress=wfleArpAtmAddress, wfAtmLecMacAddressEntry=wfAtmLecMacAddressEntry, wfAtmLecAtmAddressEntry=wfAtmLecAtmAddressEntry, wflecOperConfigMaxUnknownFrameTime=wflecOperConfigMaxUnknownFrameTime, wflecOperConfigLocalSegmentID=wflecOperConfigLocalSegmentID, wfleRDArpSegmentID=wfleRDArpSegmentID, wflecOperConfigFlushTimeOut=wflecOperConfigFlushTimeOut, wflecConfigLanName=wflecConfigLanName, wfAtmLecConfigTable=wfAtmLecConfigTable, wflecFlushTimeOut=wflecFlushTimeOut, wfAtmLecStatusTable=wfAtmLecStatusTable, wfleRDArpVpi=wfleRDArpVpi, wflecActualLanName=wflecActualLanName, wfAtmLecOperConfigTable=wfAtmLecOperConfigTable, wflecActualLanType=wflecActualLanType, wflecAtmAddressStatus=wflecAtmAddressStatus, wfAtmLecConfigLesCct=wfAtmLecConfigLesCct, wflecMaxUnknownFrameCount=wflecMaxUnknownFrameCount, wfAtmLecStatisticsEntry=wfAtmLecStatisticsEntry, wfAtmLecConfigLesEntry=wfAtmLecConfigLesEntry, wfAtmLecConfigLesIndex=wfAtmLecConfigLesIndex, wflecSvcFailures=wflecSvcFailures, wflecID=wflecID, wflecProxyClient=wflecProxyClient, wflecInBroadcastFrames=wflecInBroadcastFrames, wflecOutDataFrames=wflecOutDataFrames, wflecConfigLECSAtmAddress=wflecConfigLECSAtmAddress, wflecInUnicastOctets=wflecInUnicastOctets, wflecStatusCct=wflecStatusCct, wflecInMulticastOctets=wflecInMulticastOctets, wflecConfigLesAtmAddress=wflecConfigLesAtmAddress, wflecMaxRetryCount=wflecMaxRetryCount, wflecLastFailureRespCode=wflecLastFailureRespCode, wflecVersion=wflecVersion, wflecOutMulticastOctets=wflecOutMulticastOctets, wflecControlDistributeInterface=wflecControlDistributeInterface, wflecConfigDirectVci=wflecConfigDirectVci, wflecOperConfigExpectedArpResponseTime=wflecOperConfigExpectedArpResponseTime, wflecOutBroadcastFrames=wflecOutBroadcastFrames, wfAtmLecMacAddressTable=wfAtmLecMacAddressTable, wflecInMulticastFrames=wflecInMulticastFrames, wflecConfigLanType=wflecConfigLanType, wfleRDArpRowStatus=wfleRDArpRowStatus, wflecOperConfigMaxRetryCount=wflecOperConfigMaxRetryCount, wflecConfigV2Capable=wflecConfigV2Capable, wflecAgingTime=wflecAgingTime, wflecMacAddressCct=wflecMacAddressCct, wflecControlDirectVci=wflecControlDirectVci, wflecInUnicastFrames=wflecInUnicastFrames, wfAtmLeArpEntry=wfAtmLeArpEntry, wflecOperConfigPathSwitchingDelay=wflecOperConfigPathSwitchingDelay, wflecOperConfigMaxUnknownFrameCount=wflecOperConfigMaxUnknownFrameCount, wflecActualLesAtmAddress=wflecActualLesAtmAddress, wflecOutBroadcastOctets=wflecOutBroadcastOctets, wflecMulticastFwdRetry=wflecMulticastFwdRetry, wfAtmLecConfigEntry=wfAtmLecConfigEntry, wfleRDArpVci=wfleRDArpVci, wflecActualMaxDataFrameSize=wflecActualMaxDataFrameSize, wflecOperConfigMulticastSendAvgRate=wflecOperConfigMulticastSendAvgRate, wfleRDArpAtmAddress=wfleRDArpAtmAddress, wflecMulticastForwardVci=wflecMulticastForwardVci, wflecControlFramesOut=wflecControlFramesOut, wflecUnknownFramesDropped=wflecUnknownFramesDropped, wflecOperConfigForwardDelayTime=wflecOperConfigForwardDelayTime, wflecMulticastSendVpi=wflecMulticastSendVpi, wflecOutMulticastFrames=wflecOutMulticastFrames, wflecOperConfigConnectionCompleteTimer=wflecOperConfigConnectionCompleteTimer, wflecConfigMaxDataFrameSize=wflecConfigMaxDataFrameSize, wfAtmLeRDArpEntry=wfAtmLeRDArpEntry, wflecOperConfigAgingTime=wflecOperConfigAgingTime, wflecOperConfigMulticastSendType=wflecOperConfigMulticastSendType, wflecMulticastSendInterface=wflecMulticastSendInterface, wflecOutUnknownFrames=wflecOutUnknownFrames, wflecServerVccCct=wflecServerVccCct, wfleRDArpEntryType=wfleRDArpEntryType, wflecInBroadcastOctets=wflecInBroadcastOctets, wflecConfigDirectVpi=wflecConfigDirectVpi, wfAtmLecAtmAddressTable=wfAtmLecAtmAddressTable, wflecOperConfigVccTimeoutPeriod=wflecOperConfigVccTimeoutPeriod, wfleArpMacAddress=wfleArpMacAddress, wflecMulticastSendPeakRate=wflecMulticastSendPeakRate, wfAtmLecConfigLesName=wfAtmLecConfigLesName, wfleArpCct=wfleArpCct, wflecTopologyChange=wflecTopologyChange, wflecVccTimeoutPeriod=wflecVccTimeoutPeriod, wfAtmLecServerVccEntry=wfAtmLecServerVccEntry, wflecConfigServerAtmAddress=wflecConfigServerAtmAddress, wflecControlDirectInterface=wflecControlDirectInterface, wflecAtmAddressCct=wflecAtmAddressCct, wflecFlushEnable=wflecFlushEnable, wfleRDArpCct=wfleRDArpCct, wflecOutUnknownOctets=wflecOutUnknownOctets, wfleRDArpBridgeNumber=wfleRDArpBridgeNumber, wfAtmLecConfigLesDelete=wfAtmLecConfigLesDelete, wflecConfigRetry=wflecConfigRetry, wflecOwner=wflecOwner, wflecConfigMode=wflecConfigMode, wflecArpRequestsOut=wflecArpRequestsOut, wfAtmLecOperConfigEntry=wfAtmLecOperConfigEntry, wflecConnectionCompleteTimer=wflecConnectionCompleteTimer, wfAtmLecConfigLesEnable=wfAtmLecConfigLesEnable, wflecControlDirectVpi=wflecControlDirectVpi, wflecLocalSegmentID=wflecLocalSegmentID, wflecExpectedArpResponseTime=wflecExpectedArpResponseTime, wflecControlFramesIn=wflecControlFramesIn, wflecPathSwitchingDelay=wflecPathSwitchingDelay, wflecDebugLevel=wflecDebugLevel, wflecMulticastForwardVpi=wflecMulticastForwardVpi, wflecOperConfigCct=wflecOperConfigCct, wflecMulticastSendAvgRate=wflecMulticastSendAvgRate, wfAtmLeRDArpTable=wfAtmLeRDArpTable, wflecMulticastForwardInterface=wflecMulticastForwardInterface, wfleArpIsRemoteAddress=wfleArpIsRemoteAddress, wfleArpEntryType=wfleArpEntryType, wfAtmLecServerVccTable=wfAtmLecServerVccTable, wflecForwardDelayTime=wflecForwardDelayTime, wflecControlDistributeVci=wflecControlDistributeVci, wflecArpRepliesOut=wflecArpRepliesOut, wflecOutUnicastFrames=wflecOutUnicastFrames, wfAtmLecConfigLesAddress=wfAtmLecConfigLesAddress, wflecInterfaceState=wflecInterfaceState, wfAtmLecConfigLesTable=wfAtmLecConfigLesTable, wflecAtmAddress=wflecAtmAddress, wflecMaxUnknownFrameTime=wflecMaxUnknownFrameTime, wfAtmLecStatisticsTable=wfAtmLecStatisticsTable, wfAtmLecStatusEntry=wfAtmLecStatusEntry, wflecStatisticsCct=wflecStatisticsCct, wflecRowStatus=wflecRowStatus, wflecPrimaryAtmAddress=wflecPrimaryAtmAddress, wflecOperConfigMulticastSendPeakRate=wflecOperConfigMulticastSendPeakRate, wflecInDataFrames=wflecInDataFrames, wflecOutUnicastOctets=wflecOutUnicastOctets, wflecConfDelete=wflecConfDelete, wflecControlTimeout=wflecControlTimeout, wfleArpRowStatus=wfleArpRowStatus, wflecConfigDirectInterface=wflecConfigDirectInterface, wflecArpRepliesIn=wflecArpRepliesIn, wflecArpRequestsIn=wflecArpRequestsIn) |
"""
PASSENGERS
"""
numPassengers = 1311
passenger_arriving = (
(2, 6, 2, 2, 1, 0, 0, 6, 1, 3, 1, 0), # 0
(0, 3, 0, 0, 2, 0, 2, 3, 1, 2, 1, 0), # 1
(2, 1, 3, 1, 1, 0, 2, 6, 1, 3, 0, 0), # 2
(2, 1, 1, 0, 2, 0, 3, 5, 1, 0, 0, 0), # 3
(1, 3, 2, 0, 2, 0, 3, 3, 3, 5, 1, 0), # 4
(5, 5, 3, 2, 0, 0, 2, 3, 1, 2, 1, 0), # 5
(4, 2, 6, 0, 1, 0, 3, 7, 2, 1, 1, 0), # 6
(2, 3, 7, 4, 0, 0, 3, 4, 3, 0, 1, 0), # 7
(2, 6, 6, 1, 0, 0, 4, 5, 2, 3, 1, 0), # 8
(3, 2, 2, 2, 0, 0, 2, 3, 3, 0, 0, 0), # 9
(2, 2, 4, 0, 0, 0, 2, 1, 4, 5, 0, 0), # 10
(4, 4, 2, 1, 0, 0, 4, 5, 1, 3, 0, 0), # 11
(2, 2, 4, 4, 0, 0, 2, 1, 2, 2, 0, 0), # 12
(2, 2, 1, 2, 1, 0, 2, 5, 5, 4, 0, 0), # 13
(3, 2, 4, 2, 1, 0, 0, 3, 6, 1, 0, 0), # 14
(4, 2, 4, 6, 2, 0, 1, 6, 1, 0, 2, 0), # 15
(1, 6, 5, 1, 1, 0, 1, 5, 3, 2, 2, 0), # 16
(1, 4, 3, 1, 0, 0, 4, 5, 2, 3, 1, 0), # 17
(1, 0, 5, 0, 2, 0, 1, 5, 1, 2, 0, 0), # 18
(0, 3, 4, 2, 0, 0, 2, 3, 0, 3, 1, 0), # 19
(2, 2, 2, 3, 1, 0, 1, 2, 0, 2, 1, 0), # 20
(0, 1, 3, 0, 1, 0, 4, 3, 1, 1, 0, 0), # 21
(0, 2, 2, 1, 2, 0, 1, 3, 2, 4, 0, 0), # 22
(3, 7, 4, 1, 1, 0, 3, 4, 3, 1, 0, 0), # 23
(3, 4, 5, 1, 0, 0, 1, 4, 6, 1, 1, 0), # 24
(3, 4, 2, 6, 0, 0, 2, 4, 4, 2, 2, 0), # 25
(1, 6, 3, 1, 0, 0, 4, 4, 1, 2, 1, 0), # 26
(2, 3, 4, 1, 0, 0, 2, 6, 2, 2, 1, 0), # 27
(2, 3, 3, 4, 0, 0, 2, 6, 6, 0, 1, 0), # 28
(4, 5, 3, 0, 0, 0, 5, 2, 0, 2, 2, 0), # 29
(0, 7, 2, 2, 0, 0, 3, 5, 4, 0, 2, 0), # 30
(4, 5, 2, 1, 2, 0, 5, 6, 2, 0, 0, 0), # 31
(2, 2, 5, 4, 1, 0, 2, 1, 2, 0, 3, 0), # 32
(2, 1, 3, 1, 1, 0, 3, 3, 2, 2, 0, 0), # 33
(2, 1, 4, 1, 2, 0, 6, 3, 0, 2, 2, 0), # 34
(3, 4, 3, 3, 0, 0, 5, 1, 3, 2, 2, 0), # 35
(0, 3, 4, 0, 2, 0, 1, 6, 2, 2, 3, 0), # 36
(2, 4, 0, 2, 1, 0, 3, 4, 3, 0, 3, 0), # 37
(1, 6, 5, 1, 0, 0, 1, 4, 3, 4, 0, 0), # 38
(1, 2, 1, 2, 4, 0, 3, 4, 1, 3, 0, 0), # 39
(3, 9, 1, 1, 1, 0, 2, 1, 2, 2, 3, 0), # 40
(2, 2, 3, 2, 1, 0, 1, 3, 1, 0, 3, 0), # 41
(1, 5, 2, 0, 2, 0, 2, 3, 3, 2, 3, 0), # 42
(1, 3, 4, 2, 0, 0, 3, 5, 1, 2, 3, 0), # 43
(1, 6, 2, 3, 0, 0, 1, 3, 1, 1, 0, 0), # 44
(1, 4, 2, 5, 2, 0, 1, 8, 3, 0, 0, 0), # 45
(2, 5, 3, 0, 0, 0, 3, 4, 3, 0, 0, 0), # 46
(1, 6, 2, 3, 1, 0, 2, 4, 4, 1, 1, 0), # 47
(1, 3, 1, 1, 0, 0, 3, 4, 4, 2, 1, 0), # 48
(0, 3, 5, 1, 0, 0, 2, 3, 1, 4, 0, 0), # 49
(2, 4, 1, 2, 1, 0, 3, 3, 5, 0, 2, 0), # 50
(4, 6, 4, 0, 4, 0, 3, 4, 5, 1, 2, 0), # 51
(1, 2, 4, 1, 1, 0, 2, 6, 3, 1, 0, 0), # 52
(2, 4, 3, 1, 3, 0, 5, 3, 3, 0, 3, 0), # 53
(1, 7, 4, 0, 1, 0, 1, 3, 2, 4, 0, 0), # 54
(1, 3, 0, 2, 0, 0, 1, 2, 4, 3, 2, 0), # 55
(0, 1, 1, 1, 0, 0, 0, 4, 1, 4, 0, 0), # 56
(0, 5, 2, 1, 0, 0, 2, 5, 0, 1, 0, 0), # 57
(2, 1, 1, 1, 1, 0, 3, 6, 1, 2, 1, 0), # 58
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59
)
station_arriving_intensity = (
(1.5897909350307289, 4.077876420454546, 4.7965416131105405, 3.8017663043478263, 4.285817307692308, 2.8540760869565225), # 0
(1.6047132060286802, 4.123224959227694, 4.822449322514998, 3.8229386322463776, 4.317939903846154, 2.853103283514493), # 1
(1.6194650863330406, 4.167900841750842, 4.84774207369323, 3.8436449275362325, 4.349384615384616, 2.8521007246376815), # 2
(1.6340340539947322, 4.211855859375001, 4.8724013897814915, 3.863867527173913, 4.380122596153847, 2.851068546195653), # 3
(1.6484075870646768, 4.25504180345118, 4.896408793916025, 3.883588768115943, 4.410125000000001, 2.850006884057971), # 4
(1.662573163593796, 4.297410465330389, 4.919745809233077, 3.902790987318841, 4.439362980769231, 2.848915874094203), # 5
(1.6765182616330119, 4.338913636363637, 4.942393958868896, 3.9214565217391315, 4.467807692307693, 2.8477956521739136), # 6
(1.690230359233246, 4.379503107901936, 4.964334765959726, 3.939567708333334, 4.49543028846154, 2.8466463541666673), # 7
(1.7036969344454203, 4.419130671296296, 4.985549753641818, 3.9571068840579713, 4.522201923076924, 2.845468115942029), # 8
(1.7169054653204567, 4.457748117897728, 5.006020445051415, 3.974056385869566, 4.5480937500000005, 2.8442610733695655), # 9
(1.7298434299092773, 4.49530723905724, 5.025728363324765, 3.9903985507246387, 4.573076923076924, 2.8430253623188406), # 10
(1.7424983062628039, 4.5317598261258425, 5.044655031598115, 4.0061157155797105, 4.597122596153847, 2.841761118659421), # 11
(1.7548575724319582, 4.567057670454545, 5.062781973007713, 4.021190217391305, 4.620201923076923, 2.8404684782608696), # 12
(1.7669087064676616, 4.601152563394361, 5.080090710689803, 4.035604393115943, 4.642286057692309, 2.839147576992754), # 13
(1.7786391864208373, 4.6339962962962975, 5.096562767780633, 4.049340579710145, 4.663346153846154, 2.8377985507246377), # 14
(1.7900364903424055, 4.665540660511364, 5.112179667416452, 4.062381114130435, 4.683353365384616, 2.8364215353260875), # 15
(1.8010880962832896, 4.695737447390573, 5.126922932733506, 4.074708333333334, 4.702278846153847, 2.835016666666667), # 16
(1.8117814822944105, 4.724538448284933, 5.1407740868680385, 4.0863045742753625, 4.720093750000001, 2.833584080615943), # 17
(1.8221041264266904, 4.751895454545455, 5.1537146529563, 4.097152173913044, 4.736769230769233, 2.8321239130434788), # 18
(1.8320435067310508, 4.777760257523148, 5.165726154134534, 4.107233469202899, 4.752276442307693, 2.830636299818841), # 19
(1.841587101258414, 4.802084648569023, 5.176790113538988, 4.11653079710145, 4.76658653846154, 2.8291213768115946), # 20
(1.850722388059702, 4.82482041903409, 5.186888054305914, 4.125026494565218, 4.779670673076923, 2.827579279891305), # 21
(1.8594368451858356, 4.845919360269361, 5.196001499571551, 4.1327028985507255, 4.7915, 2.8260101449275368), # 22
(1.867717950687738, 4.865333263625843, 5.204111972472152, 4.139542346014493, 4.802045673076924, 2.8244141077898557), # 23
(1.8755531826163303, 4.8830139204545455, 5.211200996143959, 4.145527173913044, 4.811278846153846, 2.8227913043478265), # 24
(1.8829300190225344, 4.898913122106482, 5.217250093723223, 4.150639719202899, 4.819170673076923, 2.8211418704710147), # 25
(1.8898359379572727, 4.91298265993266, 5.222240788346188, 4.15486231884058, 4.825692307692308, 2.819465942028986), # 26
(1.8962584174714663, 4.9251743252840905, 5.2261546031491, 4.15817730978261, 4.830814903846155, 2.817763654891305), # 27
(1.9021849356160379, 4.935439909511785, 5.22897306126821, 4.160567028985508, 4.834509615384616, 2.8160351449275365), # 28
(1.9076029704419084, 4.943731203966752, 5.23067768583976, 4.162013813405798, 4.836747596153847, 2.814280548007247), # 29
(1.9125000000000003, 4.950000000000001, 5.231250000000001, 4.1625000000000005, 4.8375, 2.8125000000000004), # 30
(1.9170822170716115, 4.955207279829545, 5.230820969202899, 4.162412193627452, 4.837226196808512, 2.8100257558720645), # 31
(1.92156550511509, 4.960345738636365, 5.229546014492754, 4.162150490196079, 4.836410638297873, 2.8062148550724646), # 32
(1.925951878196931, 4.96541473721591, 5.227443342391306, 4.161717463235295, 4.83506210106383, 2.8011046101949026), # 33
(1.9302433503836318, 4.970413636363637, 5.22453115942029, 4.161115686274511, 4.833189361702129, 2.794732333833084), # 34
(1.9344419357416882, 4.975341796875, 5.22082767210145, 4.160347732843138, 4.830801196808512, 2.78713533858071), # 35
(1.9385496483375964, 4.980198579545456, 5.216351086956522, 4.1594161764705895, 4.827906382978725, 2.7783509370314845), # 36
(1.9425685022378518, 4.9849833451704555, 5.211119610507247, 4.158323590686275, 4.824513696808511, 2.768416441779111), # 37
(1.9465005115089515, 4.989695454545455, 5.2051514492753626, 4.157072549019608, 4.820631914893617, 2.757369165417291), # 38
(1.9503476902173915, 4.994334268465909, 5.1984648097826085, 4.155665625000001, 4.816269813829788, 2.7452464205397304), # 39
(1.9541120524296678, 4.998899147727274, 5.191077898550725, 4.154105392156863, 4.811436170212766, 2.73208551974013), # 40
(1.9577956122122764, 5.003389453125, 5.18300892210145, 4.152394424019608, 4.806139760638298, 2.717923775612195), # 41
(1.9614003836317138, 5.0078045454545475, 5.174276086956523, 4.150535294117647, 4.800389361702129, 2.702798500749626), # 42
(1.9649283807544762, 5.0121437855113635, 5.164897599637682, 4.148530575980393, 4.794193750000001, 2.6867470077461273), # 43
(1.968381617647059, 5.01640653409091, 5.154891666666668, 4.146382843137255, 4.78756170212766, 2.6698066091954025), # 44
(1.971762108375959, 5.0205921519886365, 5.144276494565219, 4.1440946691176475, 4.780501994680852, 2.652014617691155), # 45
(1.9750718670076732, 5.024700000000001, 5.133070289855074, 4.141668627450981, 4.77302340425532, 2.633408345827087), # 46
(1.978312907608696, 5.028729438920456, 5.121291259057971, 4.139107291666667, 4.765134707446809, 2.6140251061969018), # 47
(1.981487244245525, 5.032679829545455, 5.108957608695652, 4.136413235294118, 4.7568446808510645, 2.5939022113943038), # 48
(1.9845968909846547, 5.0365505326704545, 5.096087545289856, 4.133589031862746, 4.748162101063831, 2.5730769740129937), # 49
(1.9876438618925836, 5.040340909090909, 5.0826992753623195, 4.130637254901962, 4.739095744680852, 2.551586706646677), # 50
(1.990630171035806, 5.044050319602273, 5.0688110054347835, 4.127560477941177, 4.729654388297873, 2.5294687218890557), # 51
(1.9935578324808187, 5.047678125000001, 5.054440942028986, 4.124361274509805, 4.719846808510639, 2.5067603323338337), # 52
(1.996428860294118, 5.051223686079546, 5.039607291666667, 4.121042218137255, 4.709681781914894, 2.483498850574713), # 53
(1.9992452685422, 5.054686363636364, 5.024328260869566, 4.117605882352942, 4.6991680851063835, 2.4597215892053974), # 54
(2.0020090712915604, 5.058065518465909, 5.00862205615942, 4.114054840686276, 4.688314494680852, 2.4354658608195905), # 55
(2.0047222826086957, 5.061360511363636, 4.992506884057971, 4.110391666666667, 4.677129787234043, 2.410768978010995), # 56
(2.007386916560103, 5.064570703125002, 4.976000951086957, 4.10661893382353, 4.6656227393617025, 2.3856682533733133), # 57
(2.0100049872122767, 5.067695454545454, 4.959122463768116, 4.102739215686276, 4.653802127659575, 2.3602009995002504), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_arriving_acc = (
(2, 6, 2, 2, 1, 0, 0, 6, 1, 3, 1, 0), # 0
(2, 9, 2, 2, 3, 0, 2, 9, 2, 5, 2, 0), # 1
(4, 10, 5, 3, 4, 0, 4, 15, 3, 8, 2, 0), # 2
(6, 11, 6, 3, 6, 0, 7, 20, 4, 8, 2, 0), # 3
(7, 14, 8, 3, 8, 0, 10, 23, 7, 13, 3, 0), # 4
(12, 19, 11, 5, 8, 0, 12, 26, 8, 15, 4, 0), # 5
(16, 21, 17, 5, 9, 0, 15, 33, 10, 16, 5, 0), # 6
(18, 24, 24, 9, 9, 0, 18, 37, 13, 16, 6, 0), # 7
(20, 30, 30, 10, 9, 0, 22, 42, 15, 19, 7, 0), # 8
(23, 32, 32, 12, 9, 0, 24, 45, 18, 19, 7, 0), # 9
(25, 34, 36, 12, 9, 0, 26, 46, 22, 24, 7, 0), # 10
(29, 38, 38, 13, 9, 0, 30, 51, 23, 27, 7, 0), # 11
(31, 40, 42, 17, 9, 0, 32, 52, 25, 29, 7, 0), # 12
(33, 42, 43, 19, 10, 0, 34, 57, 30, 33, 7, 0), # 13
(36, 44, 47, 21, 11, 0, 34, 60, 36, 34, 7, 0), # 14
(40, 46, 51, 27, 13, 0, 35, 66, 37, 34, 9, 0), # 15
(41, 52, 56, 28, 14, 0, 36, 71, 40, 36, 11, 0), # 16
(42, 56, 59, 29, 14, 0, 40, 76, 42, 39, 12, 0), # 17
(43, 56, 64, 29, 16, 0, 41, 81, 43, 41, 12, 0), # 18
(43, 59, 68, 31, 16, 0, 43, 84, 43, 44, 13, 0), # 19
(45, 61, 70, 34, 17, 0, 44, 86, 43, 46, 14, 0), # 20
(45, 62, 73, 34, 18, 0, 48, 89, 44, 47, 14, 0), # 21
(45, 64, 75, 35, 20, 0, 49, 92, 46, 51, 14, 0), # 22
(48, 71, 79, 36, 21, 0, 52, 96, 49, 52, 14, 0), # 23
(51, 75, 84, 37, 21, 0, 53, 100, 55, 53, 15, 0), # 24
(54, 79, 86, 43, 21, 0, 55, 104, 59, 55, 17, 0), # 25
(55, 85, 89, 44, 21, 0, 59, 108, 60, 57, 18, 0), # 26
(57, 88, 93, 45, 21, 0, 61, 114, 62, 59, 19, 0), # 27
(59, 91, 96, 49, 21, 0, 63, 120, 68, 59, 20, 0), # 28
(63, 96, 99, 49, 21, 0, 68, 122, 68, 61, 22, 0), # 29
(63, 103, 101, 51, 21, 0, 71, 127, 72, 61, 24, 0), # 30
(67, 108, 103, 52, 23, 0, 76, 133, 74, 61, 24, 0), # 31
(69, 110, 108, 56, 24, 0, 78, 134, 76, 61, 27, 0), # 32
(71, 111, 111, 57, 25, 0, 81, 137, 78, 63, 27, 0), # 33
(73, 112, 115, 58, 27, 0, 87, 140, 78, 65, 29, 0), # 34
(76, 116, 118, 61, 27, 0, 92, 141, 81, 67, 31, 0), # 35
(76, 119, 122, 61, 29, 0, 93, 147, 83, 69, 34, 0), # 36
(78, 123, 122, 63, 30, 0, 96, 151, 86, 69, 37, 0), # 37
(79, 129, 127, 64, 30, 0, 97, 155, 89, 73, 37, 0), # 38
(80, 131, 128, 66, 34, 0, 100, 159, 90, 76, 37, 0), # 39
(83, 140, 129, 67, 35, 0, 102, 160, 92, 78, 40, 0), # 40
(85, 142, 132, 69, 36, 0, 103, 163, 93, 78, 43, 0), # 41
(86, 147, 134, 69, 38, 0, 105, 166, 96, 80, 46, 0), # 42
(87, 150, 138, 71, 38, 0, 108, 171, 97, 82, 49, 0), # 43
(88, 156, 140, 74, 38, 0, 109, 174, 98, 83, 49, 0), # 44
(89, 160, 142, 79, 40, 0, 110, 182, 101, 83, 49, 0), # 45
(91, 165, 145, 79, 40, 0, 113, 186, 104, 83, 49, 0), # 46
(92, 171, 147, 82, 41, 0, 115, 190, 108, 84, 50, 0), # 47
(93, 174, 148, 83, 41, 0, 118, 194, 112, 86, 51, 0), # 48
(93, 177, 153, 84, 41, 0, 120, 197, 113, 90, 51, 0), # 49
(95, 181, 154, 86, 42, 0, 123, 200, 118, 90, 53, 0), # 50
(99, 187, 158, 86, 46, 0, 126, 204, 123, 91, 55, 0), # 51
(100, 189, 162, 87, 47, 0, 128, 210, 126, 92, 55, 0), # 52
(102, 193, 165, 88, 50, 0, 133, 213, 129, 92, 58, 0), # 53
(103, 200, 169, 88, 51, 0, 134, 216, 131, 96, 58, 0), # 54
(104, 203, 169, 90, 51, 0, 135, 218, 135, 99, 60, 0), # 55
(104, 204, 170, 91, 51, 0, 135, 222, 136, 103, 60, 0), # 56
(104, 209, 172, 92, 51, 0, 137, 227, 136, 104, 60, 0), # 57
(106, 210, 173, 93, 52, 0, 140, 233, 137, 106, 61, 0), # 58
(106, 210, 173, 93, 52, 0, 140, 233, 137, 106, 61, 0), # 59
)
passenger_arriving_rate = (
(1.5897909350307289, 3.2623011363636363, 2.877924967866324, 1.5207065217391305, 0.8571634615384615, 0.0, 2.8540760869565225, 3.428653846153846, 2.2810597826086956, 1.918616645244216, 0.8155752840909091, 0.0), # 0
(1.6047132060286802, 3.298579967382155, 2.8934695935089985, 1.5291754528985508, 0.8635879807692308, 0.0, 2.853103283514493, 3.4543519230769233, 2.2937631793478266, 1.928979729005999, 0.8246449918455387, 0.0), # 1
(1.6194650863330406, 3.3343206734006734, 2.908645244215938, 1.5374579710144929, 0.8698769230769231, 0.0, 2.8521007246376815, 3.4795076923076924, 2.3061869565217394, 1.939096829477292, 0.8335801683501683, 0.0), # 2
(1.6340340539947322, 3.369484687500001, 2.9234408338688946, 1.545547010869565, 0.8760245192307694, 0.0, 2.851068546195653, 3.5040980769230776, 2.3183205163043477, 1.9489605559125964, 0.8423711718750002, 0.0), # 3
(1.6484075870646768, 3.4040334427609436, 2.9378452763496146, 1.553435507246377, 0.8820250000000001, 0.0, 2.850006884057971, 3.5281000000000002, 2.3301532608695656, 1.9585635175664096, 0.8510083606902359, 0.0), # 4
(1.662573163593796, 3.437928372264311, 2.951847485539846, 1.5611163949275362, 0.8878725961538462, 0.0, 2.848915874094203, 3.5514903846153847, 2.3416745923913043, 1.9678983236932306, 0.8594820930660777, 0.0), # 5
(1.6765182616330119, 3.4711309090909093, 2.9654363753213375, 1.5685826086956525, 0.8935615384615384, 0.0, 2.8477956521739136, 3.5742461538461536, 2.352873913043479, 1.9769575835475584, 0.8677827272727273, 0.0), # 6
(1.690230359233246, 3.5036024863215487, 2.9786008595758355, 1.5758270833333334, 0.8990860576923079, 0.0, 2.8466463541666673, 3.5963442307692315, 2.363740625, 1.9857339063838901, 0.8759006215803872, 0.0), # 7
(1.7036969344454203, 3.5353045370370366, 2.991329852185091, 1.5828427536231884, 0.9044403846153848, 0.0, 2.845468115942029, 3.617761538461539, 2.3742641304347827, 1.994219901456727, 0.8838261342592592, 0.0), # 8
(1.7169054653204567, 3.566198494318182, 3.003612267030849, 1.5896225543478264, 0.90961875, 0.0, 2.8442610733695655, 3.638475, 2.3844338315217395, 2.002408178020566, 0.8915496235795455, 0.0), # 9
(1.7298434299092773, 3.5962457912457917, 3.015437017994859, 1.5961594202898552, 0.9146153846153847, 0.0, 2.8430253623188406, 3.658461538461539, 2.394239130434783, 2.0102913453299056, 0.8990614478114479, 0.0), # 10
(1.7424983062628039, 3.625407860900674, 3.0267930189588688, 1.602446286231884, 0.9194245192307693, 0.0, 2.841761118659421, 3.677698076923077, 2.403669429347826, 2.0178620126392457, 0.9063519652251685, 0.0), # 11
(1.7548575724319582, 3.653646136363636, 3.0376691838046277, 1.6084760869565218, 0.9240403846153845, 0.0, 2.8404684782608696, 3.696161538461538, 2.4127141304347828, 2.025112789203085, 0.913411534090909, 0.0), # 12
(1.7669087064676616, 3.680922050715489, 3.048054426413882, 1.614241757246377, 0.9284572115384617, 0.0, 2.839147576992754, 3.713828846153847, 2.4213626358695657, 2.032036284275921, 0.9202305126788722, 0.0), # 13
(1.7786391864208373, 3.7071970370370377, 3.05793766066838, 1.6197362318840578, 0.9326692307692308, 0.0, 2.8377985507246377, 3.7306769230769232, 2.429604347826087, 2.038625107112253, 0.9267992592592594, 0.0), # 14
(1.7900364903424055, 3.732432528409091, 3.0673078004498713, 1.624952445652174, 0.9366706730769232, 0.0, 2.8364215353260875, 3.746682692307693, 2.437428668478261, 2.044871866966581, 0.9331081321022727, 0.0), # 15
(1.8010880962832896, 3.7565899579124578, 3.0761537596401034, 1.6298833333333334, 0.9404557692307693, 0.0, 2.835016666666667, 3.7618230769230774, 2.4448250000000002, 2.050769173093402, 0.9391474894781144, 0.0), # 16
(1.8117814822944105, 3.779630758627946, 3.084464452120823, 1.634521829710145, 0.9440187500000001, 0.0, 2.833584080615943, 3.7760750000000005, 2.4517827445652176, 2.0563096347472154, 0.9449076896569865, 0.0), # 17
(1.8221041264266904, 3.8015163636363636, 3.09222879177378, 1.6388608695652176, 0.9473538461538464, 0.0, 2.8321239130434788, 3.7894153846153857, 2.4582913043478265, 2.0614858611825198, 0.9503790909090909, 0.0), # 18
(1.8320435067310508, 3.8222082060185185, 3.09943569248072, 1.6428933876811593, 0.9504552884615385, 0.0, 2.830636299818841, 3.801821153846154, 2.464340081521739, 2.0662904616538134, 0.9555520515046296, 0.0), # 19
(1.841587101258414, 3.841667718855218, 3.106074068123393, 1.6466123188405797, 0.9533173076923078, 0.0, 2.8291213768115946, 3.8132692307692313, 2.46991847826087, 2.0707160454155953, 0.9604169297138045, 0.0), # 20
(1.850722388059702, 3.8598563352272715, 3.1121328325835482, 1.650010597826087, 0.9559341346153846, 0.0, 2.827579279891305, 3.8237365384615383, 2.475015896739131, 2.0747552217223655, 0.9649640838068179, 0.0), # 21
(1.8594368451858356, 3.8767354882154885, 3.1176008997429308, 1.65308115942029, 0.9582999999999999, 0.0, 2.8260101449275368, 3.8331999999999997, 2.4796217391304354, 2.0784005998286204, 0.9691838720538721, 0.0), # 22
(1.867717950687738, 3.892266610900674, 3.122467183483291, 1.655816938405797, 0.9604091346153847, 0.0, 2.8244141077898557, 3.8416365384615387, 2.483725407608696, 2.0816447889888607, 0.9730666527251685, 0.0), # 23
(1.8755531826163303, 3.9064111363636362, 3.1267205976863752, 1.6582108695652176, 0.9622557692307692, 0.0, 2.8227913043478265, 3.8490230769230767, 2.4873163043478264, 2.0844803984575835, 0.9766027840909091, 0.0), # 24
(1.8829300190225344, 3.919130497685185, 3.1303500562339335, 1.6602558876811595, 0.9638341346153845, 0.0, 2.8211418704710147, 3.855336538461538, 2.4903838315217395, 2.086900037489289, 0.9797826244212963, 0.0), # 25
(1.8898359379572727, 3.930386127946128, 3.1333444730077127, 1.661944927536232, 0.9651384615384615, 0.0, 2.819465942028986, 3.860553846153846, 2.492917391304348, 2.088896315338475, 0.982596531986532, 0.0), # 26
(1.8962584174714663, 3.940139460227272, 3.1356927618894597, 1.6632709239130437, 0.966162980769231, 0.0, 2.817763654891305, 3.864651923076924, 2.4949063858695655, 2.0904618412596396, 0.985034865056818, 0.0), # 27
(1.9021849356160379, 3.948351927609427, 3.1373838367609257, 1.664226811594203, 0.9669019230769231, 0.0, 2.8160351449275365, 3.8676076923076925, 2.4963402173913045, 2.091589224507284, 0.9870879819023568, 0.0), # 28
(1.9076029704419084, 3.954984963173401, 3.138406611503856, 1.664805525362319, 0.9673495192307693, 0.0, 2.814280548007247, 3.869398076923077, 2.4972082880434785, 2.092271074335904, 0.9887462407933503, 0.0), # 29
(1.9125000000000003, 3.9600000000000004, 3.1387500000000004, 1.665, 0.9675, 0.0, 2.8125000000000004, 3.87, 2.4975, 2.0925000000000002, 0.9900000000000001, 0.0), # 30
(1.9170822170716115, 3.9641658238636355, 3.138492581521739, 1.6649648774509804, 0.9674452393617023, 0.0, 2.8100257558720645, 3.8697809574468094, 2.497447316176471, 2.0923283876811594, 0.9910414559659089, 0.0), # 31
(1.92156550511509, 3.9682765909090914, 3.137727608695652, 1.6648601960784315, 0.9672821276595746, 0.0, 2.8062148550724646, 3.869128510638298, 2.497290294117647, 2.091818405797101, 0.9920691477272728, 0.0), # 32
(1.925951878196931, 3.9723317897727273, 3.1364660054347833, 1.6646869852941177, 0.9670124202127659, 0.0, 2.8011046101949026, 3.8680496808510636, 2.497030477941177, 2.090977336956522, 0.9930829474431818, 0.0), # 33
(1.9302433503836318, 3.976330909090909, 3.134718695652174, 1.664446274509804, 0.9666378723404256, 0.0, 2.794732333833084, 3.8665514893617026, 2.496669411764706, 2.0898124637681157, 0.9940827272727273, 0.0), # 34
(1.9344419357416882, 3.9802734374999997, 3.13249660326087, 1.664139093137255, 0.9661602393617023, 0.0, 2.78713533858071, 3.864640957446809, 2.4962086397058827, 2.0883310688405796, 0.9950683593749999, 0.0), # 35
(1.9385496483375964, 3.984158863636364, 3.1298106521739135, 1.6637664705882356, 0.9655812765957449, 0.0, 2.7783509370314845, 3.8623251063829795, 2.4956497058823537, 2.086540434782609, 0.996039715909091, 0.0), # 36
(1.9425685022378518, 3.987986676136364, 3.126671766304348, 1.66332943627451, 0.9649027393617021, 0.0, 2.768416441779111, 3.8596109574468085, 2.494994154411765, 2.0844478442028986, 0.996996669034091, 0.0), # 37
(1.9465005115089515, 3.9917563636363633, 3.1230908695652175, 1.662829019607843, 0.9641263829787234, 0.0, 2.757369165417291, 3.8565055319148938, 2.4942435294117646, 2.082060579710145, 0.9979390909090908, 0.0), # 38
(1.9503476902173915, 3.995467414772727, 3.119078885869565, 1.6622662500000003, 0.9632539627659574, 0.0, 2.7452464205397304, 3.8530158510638297, 2.4933993750000005, 2.079385923913043, 0.9988668536931817, 0.0), # 39
(1.9541120524296678, 3.9991193181818185, 3.114646739130435, 1.661642156862745, 0.9622872340425531, 0.0, 2.73208551974013, 3.8491489361702125, 2.492463235294118, 2.0764311594202898, 0.9997798295454546, 0.0), # 40
(1.9577956122122764, 4.0027115625, 3.10980535326087, 1.660957769607843, 0.9612279521276595, 0.0, 2.717923775612195, 3.844911808510638, 2.4914366544117645, 2.07320356884058, 1.000677890625, 0.0), # 41
(1.9614003836317138, 4.006243636363638, 3.1045656521739136, 1.6602141176470588, 0.9600778723404256, 0.0, 2.702798500749626, 3.8403114893617025, 2.490321176470588, 2.0697104347826087, 1.0015609090909094, 0.0), # 42
(1.9649283807544762, 4.00971502840909, 3.0989385597826087, 1.6594122303921572, 0.9588387500000001, 0.0, 2.6867470077461273, 3.8353550000000003, 2.4891183455882357, 2.0659590398550725, 1.0024287571022725, 0.0), # 43
(1.968381617647059, 4.013125227272727, 3.0929350000000007, 1.6585531372549018, 0.9575123404255319, 0.0, 2.6698066091954025, 3.8300493617021276, 2.487829705882353, 2.061956666666667, 1.0032813068181818, 0.0), # 44
(1.971762108375959, 4.016473721590909, 3.086565896739131, 1.657637867647059, 0.9561003989361703, 0.0, 2.652014617691155, 3.824401595744681, 2.4864568014705886, 2.0577105978260875, 1.0041184303977273, 0.0), # 45
(1.9750718670076732, 4.019760000000001, 3.0798421739130446, 1.6566674509803923, 0.954604680851064, 0.0, 2.633408345827087, 3.818418723404256, 2.4850011764705884, 2.0532281159420296, 1.0049400000000002, 0.0), # 46
(1.978312907608696, 4.022983551136364, 3.0727747554347826, 1.6556429166666666, 0.9530269414893617, 0.0, 2.6140251061969018, 3.812107765957447, 2.483464375, 2.0485165036231883, 1.005745887784091, 0.0), # 47
(1.981487244245525, 4.026143863636364, 3.0653745652173914, 1.654565294117647, 0.9513689361702128, 0.0, 2.5939022113943038, 3.805475744680851, 2.4818479411764707, 2.043583043478261, 1.006535965909091, 0.0), # 48
(1.9845968909846547, 4.029240426136363, 3.0576525271739134, 1.6534356127450982, 0.9496324202127661, 0.0, 2.5730769740129937, 3.7985296808510642, 2.4801534191176473, 2.0384350181159423, 1.0073101065340908, 0.0), # 49
(1.9876438618925836, 4.032272727272726, 3.0496195652173914, 1.6522549019607846, 0.9478191489361703, 0.0, 2.551586706646677, 3.791276595744681, 2.478382352941177, 2.0330797101449276, 1.0080681818181816, 0.0), # 50
(1.990630171035806, 4.035240255681818, 3.04128660326087, 1.6510241911764707, 0.9459308776595745, 0.0, 2.5294687218890557, 3.783723510638298, 2.476536286764706, 2.0275244021739134, 1.0088100639204545, 0.0), # 51
(1.9935578324808187, 4.0381425, 3.0326645652173916, 1.6497445098039216, 0.9439693617021278, 0.0, 2.5067603323338337, 3.775877446808511, 2.4746167647058828, 2.0217763768115944, 1.009535625, 0.0), # 52
(1.996428860294118, 4.0409789488636365, 3.0237643750000003, 1.6484168872549019, 0.9419363563829788, 0.0, 2.483498850574713, 3.767745425531915, 2.472625330882353, 2.0158429166666667, 1.0102447372159091, 0.0), # 53
(1.9992452685422, 4.043749090909091, 3.014596956521739, 1.6470423529411766, 0.9398336170212767, 0.0, 2.4597215892053974, 3.7593344680851066, 2.470563529411765, 2.009731304347826, 1.0109372727272727, 0.0), # 54
(2.0020090712915604, 4.046452414772727, 3.005173233695652, 1.6456219362745101, 0.9376628989361703, 0.0, 2.4354658608195905, 3.750651595744681, 2.4684329044117654, 2.003448822463768, 1.0116131036931817, 0.0), # 55
(2.0047222826086957, 4.049088409090909, 2.995504130434783, 1.6441566666666665, 0.9354259574468086, 0.0, 2.410768978010995, 3.7417038297872343, 2.4662349999999997, 1.9970027536231885, 1.0122721022727272, 0.0), # 56
(2.007386916560103, 4.051656562500001, 2.9856005706521738, 1.6426475735294117, 0.9331245478723404, 0.0, 2.3856682533733133, 3.732498191489362, 2.4639713602941176, 1.9904003804347825, 1.0129141406250002, 0.0), # 57
(2.0100049872122767, 4.054156363636363, 2.9754734782608696, 1.64109568627451, 0.930760425531915, 0.0, 2.3602009995002504, 3.72304170212766, 2.461643529411765, 1.9836489855072463, 1.0135390909090907, 0.0), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_allighting_rate = (
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 258194110137029475889902652135037600173
#index for seed sequence child
child_seed_index = (
1, # 0
37, # 1
)
| """
PASSENGERS
"""
num_passengers = 1311
passenger_arriving = ((2, 6, 2, 2, 1, 0, 0, 6, 1, 3, 1, 0), (0, 3, 0, 0, 2, 0, 2, 3, 1, 2, 1, 0), (2, 1, 3, 1, 1, 0, 2, 6, 1, 3, 0, 0), (2, 1, 1, 0, 2, 0, 3, 5, 1, 0, 0, 0), (1, 3, 2, 0, 2, 0, 3, 3, 3, 5, 1, 0), (5, 5, 3, 2, 0, 0, 2, 3, 1, 2, 1, 0), (4, 2, 6, 0, 1, 0, 3, 7, 2, 1, 1, 0), (2, 3, 7, 4, 0, 0, 3, 4, 3, 0, 1, 0), (2, 6, 6, 1, 0, 0, 4, 5, 2, 3, 1, 0), (3, 2, 2, 2, 0, 0, 2, 3, 3, 0, 0, 0), (2, 2, 4, 0, 0, 0, 2, 1, 4, 5, 0, 0), (4, 4, 2, 1, 0, 0, 4, 5, 1, 3, 0, 0), (2, 2, 4, 4, 0, 0, 2, 1, 2, 2, 0, 0), (2, 2, 1, 2, 1, 0, 2, 5, 5, 4, 0, 0), (3, 2, 4, 2, 1, 0, 0, 3, 6, 1, 0, 0), (4, 2, 4, 6, 2, 0, 1, 6, 1, 0, 2, 0), (1, 6, 5, 1, 1, 0, 1, 5, 3, 2, 2, 0), (1, 4, 3, 1, 0, 0, 4, 5, 2, 3, 1, 0), (1, 0, 5, 0, 2, 0, 1, 5, 1, 2, 0, 0), (0, 3, 4, 2, 0, 0, 2, 3, 0, 3, 1, 0), (2, 2, 2, 3, 1, 0, 1, 2, 0, 2, 1, 0), (0, 1, 3, 0, 1, 0, 4, 3, 1, 1, 0, 0), (0, 2, 2, 1, 2, 0, 1, 3, 2, 4, 0, 0), (3, 7, 4, 1, 1, 0, 3, 4, 3, 1, 0, 0), (3, 4, 5, 1, 0, 0, 1, 4, 6, 1, 1, 0), (3, 4, 2, 6, 0, 0, 2, 4, 4, 2, 2, 0), (1, 6, 3, 1, 0, 0, 4, 4, 1, 2, 1, 0), (2, 3, 4, 1, 0, 0, 2, 6, 2, 2, 1, 0), (2, 3, 3, 4, 0, 0, 2, 6, 6, 0, 1, 0), (4, 5, 3, 0, 0, 0, 5, 2, 0, 2, 2, 0), (0, 7, 2, 2, 0, 0, 3, 5, 4, 0, 2, 0), (4, 5, 2, 1, 2, 0, 5, 6, 2, 0, 0, 0), (2, 2, 5, 4, 1, 0, 2, 1, 2, 0, 3, 0), (2, 1, 3, 1, 1, 0, 3, 3, 2, 2, 0, 0), (2, 1, 4, 1, 2, 0, 6, 3, 0, 2, 2, 0), (3, 4, 3, 3, 0, 0, 5, 1, 3, 2, 2, 0), (0, 3, 4, 0, 2, 0, 1, 6, 2, 2, 3, 0), (2, 4, 0, 2, 1, 0, 3, 4, 3, 0, 3, 0), (1, 6, 5, 1, 0, 0, 1, 4, 3, 4, 0, 0), (1, 2, 1, 2, 4, 0, 3, 4, 1, 3, 0, 0), (3, 9, 1, 1, 1, 0, 2, 1, 2, 2, 3, 0), (2, 2, 3, 2, 1, 0, 1, 3, 1, 0, 3, 0), (1, 5, 2, 0, 2, 0, 2, 3, 3, 2, 3, 0), (1, 3, 4, 2, 0, 0, 3, 5, 1, 2, 3, 0), (1, 6, 2, 3, 0, 0, 1, 3, 1, 1, 0, 0), (1, 4, 2, 5, 2, 0, 1, 8, 3, 0, 0, 0), (2, 5, 3, 0, 0, 0, 3, 4, 3, 0, 0, 0), (1, 6, 2, 3, 1, 0, 2, 4, 4, 1, 1, 0), (1, 3, 1, 1, 0, 0, 3, 4, 4, 2, 1, 0), (0, 3, 5, 1, 0, 0, 2, 3, 1, 4, 0, 0), (2, 4, 1, 2, 1, 0, 3, 3, 5, 0, 2, 0), (4, 6, 4, 0, 4, 0, 3, 4, 5, 1, 2, 0), (1, 2, 4, 1, 1, 0, 2, 6, 3, 1, 0, 0), (2, 4, 3, 1, 3, 0, 5, 3, 3, 0, 3, 0), (1, 7, 4, 0, 1, 0, 1, 3, 2, 4, 0, 0), (1, 3, 0, 2, 0, 0, 1, 2, 4, 3, 2, 0), (0, 1, 1, 1, 0, 0, 0, 4, 1, 4, 0, 0), (0, 5, 2, 1, 0, 0, 2, 5, 0, 1, 0, 0), (2, 1, 1, 1, 1, 0, 3, 6, 1, 2, 1, 0), (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
station_arriving_intensity = ((1.5897909350307289, 4.077876420454546, 4.7965416131105405, 3.8017663043478263, 4.285817307692308, 2.8540760869565225), (1.6047132060286802, 4.123224959227694, 4.822449322514998, 3.8229386322463776, 4.317939903846154, 2.853103283514493), (1.6194650863330406, 4.167900841750842, 4.84774207369323, 3.8436449275362325, 4.349384615384616, 2.8521007246376815), (1.6340340539947322, 4.211855859375001, 4.8724013897814915, 3.863867527173913, 4.380122596153847, 2.851068546195653), (1.6484075870646768, 4.25504180345118, 4.896408793916025, 3.883588768115943, 4.410125000000001, 2.850006884057971), (1.662573163593796, 4.297410465330389, 4.919745809233077, 3.902790987318841, 4.439362980769231, 2.848915874094203), (1.6765182616330119, 4.338913636363637, 4.942393958868896, 3.9214565217391315, 4.467807692307693, 2.8477956521739136), (1.690230359233246, 4.379503107901936, 4.964334765959726, 3.939567708333334, 4.49543028846154, 2.8466463541666673), (1.7036969344454203, 4.419130671296296, 4.985549753641818, 3.9571068840579713, 4.522201923076924, 2.845468115942029), (1.7169054653204567, 4.457748117897728, 5.006020445051415, 3.974056385869566, 4.5480937500000005, 2.8442610733695655), (1.7298434299092773, 4.49530723905724, 5.025728363324765, 3.9903985507246387, 4.573076923076924, 2.8430253623188406), (1.7424983062628039, 4.5317598261258425, 5.044655031598115, 4.0061157155797105, 4.597122596153847, 2.841761118659421), (1.7548575724319582, 4.567057670454545, 5.062781973007713, 4.021190217391305, 4.620201923076923, 2.8404684782608696), (1.7669087064676616, 4.601152563394361, 5.080090710689803, 4.035604393115943, 4.642286057692309, 2.839147576992754), (1.7786391864208373, 4.6339962962962975, 5.096562767780633, 4.049340579710145, 4.663346153846154, 2.8377985507246377), (1.7900364903424055, 4.665540660511364, 5.112179667416452, 4.062381114130435, 4.683353365384616, 2.8364215353260875), (1.8010880962832896, 4.695737447390573, 5.126922932733506, 4.074708333333334, 4.702278846153847, 2.835016666666667), (1.8117814822944105, 4.724538448284933, 5.1407740868680385, 4.0863045742753625, 4.720093750000001, 2.833584080615943), (1.8221041264266904, 4.751895454545455, 5.1537146529563, 4.097152173913044, 4.736769230769233, 2.8321239130434788), (1.8320435067310508, 4.777760257523148, 5.165726154134534, 4.107233469202899, 4.752276442307693, 2.830636299818841), (1.841587101258414, 4.802084648569023, 5.176790113538988, 4.11653079710145, 4.76658653846154, 2.8291213768115946), (1.850722388059702, 4.82482041903409, 5.186888054305914, 4.125026494565218, 4.779670673076923, 2.827579279891305), (1.8594368451858356, 4.845919360269361, 5.196001499571551, 4.1327028985507255, 4.7915, 2.8260101449275368), (1.867717950687738, 4.865333263625843, 5.204111972472152, 4.139542346014493, 4.802045673076924, 2.8244141077898557), (1.8755531826163303, 4.8830139204545455, 5.211200996143959, 4.145527173913044, 4.811278846153846, 2.8227913043478265), (1.8829300190225344, 4.898913122106482, 5.217250093723223, 4.150639719202899, 4.819170673076923, 2.8211418704710147), (1.8898359379572727, 4.91298265993266, 5.222240788346188, 4.15486231884058, 4.825692307692308, 2.819465942028986), (1.8962584174714663, 4.9251743252840905, 5.2261546031491, 4.15817730978261, 4.830814903846155, 2.817763654891305), (1.9021849356160379, 4.935439909511785, 5.22897306126821, 4.160567028985508, 4.834509615384616, 2.8160351449275365), (1.9076029704419084, 4.943731203966752, 5.23067768583976, 4.162013813405798, 4.836747596153847, 2.814280548007247), (1.9125000000000003, 4.950000000000001, 5.231250000000001, 4.1625000000000005, 4.8375, 2.8125000000000004), (1.9170822170716115, 4.955207279829545, 5.230820969202899, 4.162412193627452, 4.837226196808512, 2.8100257558720645), (1.92156550511509, 4.960345738636365, 5.229546014492754, 4.162150490196079, 4.836410638297873, 2.8062148550724646), (1.925951878196931, 4.96541473721591, 5.227443342391306, 4.161717463235295, 4.83506210106383, 2.8011046101949026), (1.9302433503836318, 4.970413636363637, 5.22453115942029, 4.161115686274511, 4.833189361702129, 2.794732333833084), (1.9344419357416882, 4.975341796875, 5.22082767210145, 4.160347732843138, 4.830801196808512, 2.78713533858071), (1.9385496483375964, 4.980198579545456, 5.216351086956522, 4.1594161764705895, 4.827906382978725, 2.7783509370314845), (1.9425685022378518, 4.9849833451704555, 5.211119610507247, 4.158323590686275, 4.824513696808511, 2.768416441779111), (1.9465005115089515, 4.989695454545455, 5.2051514492753626, 4.157072549019608, 4.820631914893617, 2.757369165417291), (1.9503476902173915, 4.994334268465909, 5.1984648097826085, 4.155665625000001, 4.816269813829788, 2.7452464205397304), (1.9541120524296678, 4.998899147727274, 5.191077898550725, 4.154105392156863, 4.811436170212766, 2.73208551974013), (1.9577956122122764, 5.003389453125, 5.18300892210145, 4.152394424019608, 4.806139760638298, 2.717923775612195), (1.9614003836317138, 5.0078045454545475, 5.174276086956523, 4.150535294117647, 4.800389361702129, 2.702798500749626), (1.9649283807544762, 5.0121437855113635, 5.164897599637682, 4.148530575980393, 4.794193750000001, 2.6867470077461273), (1.968381617647059, 5.01640653409091, 5.154891666666668, 4.146382843137255, 4.78756170212766, 2.6698066091954025), (1.971762108375959, 5.0205921519886365, 5.144276494565219, 4.1440946691176475, 4.780501994680852, 2.652014617691155), (1.9750718670076732, 5.024700000000001, 5.133070289855074, 4.141668627450981, 4.77302340425532, 2.633408345827087), (1.978312907608696, 5.028729438920456, 5.121291259057971, 4.139107291666667, 4.765134707446809, 2.6140251061969018), (1.981487244245525, 5.032679829545455, 5.108957608695652, 4.136413235294118, 4.7568446808510645, 2.5939022113943038), (1.9845968909846547, 5.0365505326704545, 5.096087545289856, 4.133589031862746, 4.748162101063831, 2.5730769740129937), (1.9876438618925836, 5.040340909090909, 5.0826992753623195, 4.130637254901962, 4.739095744680852, 2.551586706646677), (1.990630171035806, 5.044050319602273, 5.0688110054347835, 4.127560477941177, 4.729654388297873, 2.5294687218890557), (1.9935578324808187, 5.047678125000001, 5.054440942028986, 4.124361274509805, 4.719846808510639, 2.5067603323338337), (1.996428860294118, 5.051223686079546, 5.039607291666667, 4.121042218137255, 4.709681781914894, 2.483498850574713), (1.9992452685422, 5.054686363636364, 5.024328260869566, 4.117605882352942, 4.6991680851063835, 2.4597215892053974), (2.0020090712915604, 5.058065518465909, 5.00862205615942, 4.114054840686276, 4.688314494680852, 2.4354658608195905), (2.0047222826086957, 5.061360511363636, 4.992506884057971, 4.110391666666667, 4.677129787234043, 2.410768978010995), (2.007386916560103, 5.064570703125002, 4.976000951086957, 4.10661893382353, 4.6656227393617025, 2.3856682533733133), (2.0100049872122767, 5.067695454545454, 4.959122463768116, 4.102739215686276, 4.653802127659575, 2.3602009995002504), (0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
passenger_arriving_acc = ((2, 6, 2, 2, 1, 0, 0, 6, 1, 3, 1, 0), (2, 9, 2, 2, 3, 0, 2, 9, 2, 5, 2, 0), (4, 10, 5, 3, 4, 0, 4, 15, 3, 8, 2, 0), (6, 11, 6, 3, 6, 0, 7, 20, 4, 8, 2, 0), (7, 14, 8, 3, 8, 0, 10, 23, 7, 13, 3, 0), (12, 19, 11, 5, 8, 0, 12, 26, 8, 15, 4, 0), (16, 21, 17, 5, 9, 0, 15, 33, 10, 16, 5, 0), (18, 24, 24, 9, 9, 0, 18, 37, 13, 16, 6, 0), (20, 30, 30, 10, 9, 0, 22, 42, 15, 19, 7, 0), (23, 32, 32, 12, 9, 0, 24, 45, 18, 19, 7, 0), (25, 34, 36, 12, 9, 0, 26, 46, 22, 24, 7, 0), (29, 38, 38, 13, 9, 0, 30, 51, 23, 27, 7, 0), (31, 40, 42, 17, 9, 0, 32, 52, 25, 29, 7, 0), (33, 42, 43, 19, 10, 0, 34, 57, 30, 33, 7, 0), (36, 44, 47, 21, 11, 0, 34, 60, 36, 34, 7, 0), (40, 46, 51, 27, 13, 0, 35, 66, 37, 34, 9, 0), (41, 52, 56, 28, 14, 0, 36, 71, 40, 36, 11, 0), (42, 56, 59, 29, 14, 0, 40, 76, 42, 39, 12, 0), (43, 56, 64, 29, 16, 0, 41, 81, 43, 41, 12, 0), (43, 59, 68, 31, 16, 0, 43, 84, 43, 44, 13, 0), (45, 61, 70, 34, 17, 0, 44, 86, 43, 46, 14, 0), (45, 62, 73, 34, 18, 0, 48, 89, 44, 47, 14, 0), (45, 64, 75, 35, 20, 0, 49, 92, 46, 51, 14, 0), (48, 71, 79, 36, 21, 0, 52, 96, 49, 52, 14, 0), (51, 75, 84, 37, 21, 0, 53, 100, 55, 53, 15, 0), (54, 79, 86, 43, 21, 0, 55, 104, 59, 55, 17, 0), (55, 85, 89, 44, 21, 0, 59, 108, 60, 57, 18, 0), (57, 88, 93, 45, 21, 0, 61, 114, 62, 59, 19, 0), (59, 91, 96, 49, 21, 0, 63, 120, 68, 59, 20, 0), (63, 96, 99, 49, 21, 0, 68, 122, 68, 61, 22, 0), (63, 103, 101, 51, 21, 0, 71, 127, 72, 61, 24, 0), (67, 108, 103, 52, 23, 0, 76, 133, 74, 61, 24, 0), (69, 110, 108, 56, 24, 0, 78, 134, 76, 61, 27, 0), (71, 111, 111, 57, 25, 0, 81, 137, 78, 63, 27, 0), (73, 112, 115, 58, 27, 0, 87, 140, 78, 65, 29, 0), (76, 116, 118, 61, 27, 0, 92, 141, 81, 67, 31, 0), (76, 119, 122, 61, 29, 0, 93, 147, 83, 69, 34, 0), (78, 123, 122, 63, 30, 0, 96, 151, 86, 69, 37, 0), (79, 129, 127, 64, 30, 0, 97, 155, 89, 73, 37, 0), (80, 131, 128, 66, 34, 0, 100, 159, 90, 76, 37, 0), (83, 140, 129, 67, 35, 0, 102, 160, 92, 78, 40, 0), (85, 142, 132, 69, 36, 0, 103, 163, 93, 78, 43, 0), (86, 147, 134, 69, 38, 0, 105, 166, 96, 80, 46, 0), (87, 150, 138, 71, 38, 0, 108, 171, 97, 82, 49, 0), (88, 156, 140, 74, 38, 0, 109, 174, 98, 83, 49, 0), (89, 160, 142, 79, 40, 0, 110, 182, 101, 83, 49, 0), (91, 165, 145, 79, 40, 0, 113, 186, 104, 83, 49, 0), (92, 171, 147, 82, 41, 0, 115, 190, 108, 84, 50, 0), (93, 174, 148, 83, 41, 0, 118, 194, 112, 86, 51, 0), (93, 177, 153, 84, 41, 0, 120, 197, 113, 90, 51, 0), (95, 181, 154, 86, 42, 0, 123, 200, 118, 90, 53, 0), (99, 187, 158, 86, 46, 0, 126, 204, 123, 91, 55, 0), (100, 189, 162, 87, 47, 0, 128, 210, 126, 92, 55, 0), (102, 193, 165, 88, 50, 0, 133, 213, 129, 92, 58, 0), (103, 200, 169, 88, 51, 0, 134, 216, 131, 96, 58, 0), (104, 203, 169, 90, 51, 0, 135, 218, 135, 99, 60, 0), (104, 204, 170, 91, 51, 0, 135, 222, 136, 103, 60, 0), (104, 209, 172, 92, 51, 0, 137, 227, 136, 104, 60, 0), (106, 210, 173, 93, 52, 0, 140, 233, 137, 106, 61, 0), (106, 210, 173, 93, 52, 0, 140, 233, 137, 106, 61, 0))
passenger_arriving_rate = ((1.5897909350307289, 3.2623011363636363, 2.877924967866324, 1.5207065217391305, 0.8571634615384615, 0.0, 2.8540760869565225, 3.428653846153846, 2.2810597826086956, 1.918616645244216, 0.8155752840909091, 0.0), (1.6047132060286802, 3.298579967382155, 2.8934695935089985, 1.5291754528985508, 0.8635879807692308, 0.0, 2.853103283514493, 3.4543519230769233, 2.2937631793478266, 1.928979729005999, 0.8246449918455387, 0.0), (1.6194650863330406, 3.3343206734006734, 2.908645244215938, 1.5374579710144929, 0.8698769230769231, 0.0, 2.8521007246376815, 3.4795076923076924, 2.3061869565217394, 1.939096829477292, 0.8335801683501683, 0.0), (1.6340340539947322, 3.369484687500001, 2.9234408338688946, 1.545547010869565, 0.8760245192307694, 0.0, 2.851068546195653, 3.5040980769230776, 2.3183205163043477, 1.9489605559125964, 0.8423711718750002, 0.0), (1.6484075870646768, 3.4040334427609436, 2.9378452763496146, 1.553435507246377, 0.8820250000000001, 0.0, 2.850006884057971, 3.5281000000000002, 2.3301532608695656, 1.9585635175664096, 0.8510083606902359, 0.0), (1.662573163593796, 3.437928372264311, 2.951847485539846, 1.5611163949275362, 0.8878725961538462, 0.0, 2.848915874094203, 3.5514903846153847, 2.3416745923913043, 1.9678983236932306, 0.8594820930660777, 0.0), (1.6765182616330119, 3.4711309090909093, 2.9654363753213375, 1.5685826086956525, 0.8935615384615384, 0.0, 2.8477956521739136, 3.5742461538461536, 2.352873913043479, 1.9769575835475584, 0.8677827272727273, 0.0), (1.690230359233246, 3.5036024863215487, 2.9786008595758355, 1.5758270833333334, 0.8990860576923079, 0.0, 2.8466463541666673, 3.5963442307692315, 2.363740625, 1.9857339063838901, 0.8759006215803872, 0.0), (1.7036969344454203, 3.5353045370370366, 2.991329852185091, 1.5828427536231884, 0.9044403846153848, 0.0, 2.845468115942029, 3.617761538461539, 2.3742641304347827, 1.994219901456727, 0.8838261342592592, 0.0), (1.7169054653204567, 3.566198494318182, 3.003612267030849, 1.5896225543478264, 0.90961875, 0.0, 2.8442610733695655, 3.638475, 2.3844338315217395, 2.002408178020566, 0.8915496235795455, 0.0), (1.7298434299092773, 3.5962457912457917, 3.015437017994859, 1.5961594202898552, 0.9146153846153847, 0.0, 2.8430253623188406, 3.658461538461539, 2.394239130434783, 2.0102913453299056, 0.8990614478114479, 0.0), (1.7424983062628039, 3.625407860900674, 3.0267930189588688, 1.602446286231884, 0.9194245192307693, 0.0, 2.841761118659421, 3.677698076923077, 2.403669429347826, 2.0178620126392457, 0.9063519652251685, 0.0), (1.7548575724319582, 3.653646136363636, 3.0376691838046277, 1.6084760869565218, 0.9240403846153845, 0.0, 2.8404684782608696, 3.696161538461538, 2.4127141304347828, 2.025112789203085, 0.913411534090909, 0.0), (1.7669087064676616, 3.680922050715489, 3.048054426413882, 1.614241757246377, 0.9284572115384617, 0.0, 2.839147576992754, 3.713828846153847, 2.4213626358695657, 2.032036284275921, 0.9202305126788722, 0.0), (1.7786391864208373, 3.7071970370370377, 3.05793766066838, 1.6197362318840578, 0.9326692307692308, 0.0, 2.8377985507246377, 3.7306769230769232, 2.429604347826087, 2.038625107112253, 0.9267992592592594, 0.0), (1.7900364903424055, 3.732432528409091, 3.0673078004498713, 1.624952445652174, 0.9366706730769232, 0.0, 2.8364215353260875, 3.746682692307693, 2.437428668478261, 2.044871866966581, 0.9331081321022727, 0.0), (1.8010880962832896, 3.7565899579124578, 3.0761537596401034, 1.6298833333333334, 0.9404557692307693, 0.0, 2.835016666666667, 3.7618230769230774, 2.4448250000000002, 2.050769173093402, 0.9391474894781144, 0.0), (1.8117814822944105, 3.779630758627946, 3.084464452120823, 1.634521829710145, 0.9440187500000001, 0.0, 2.833584080615943, 3.7760750000000005, 2.4517827445652176, 2.0563096347472154, 0.9449076896569865, 0.0), (1.8221041264266904, 3.8015163636363636, 3.09222879177378, 1.6388608695652176, 0.9473538461538464, 0.0, 2.8321239130434788, 3.7894153846153857, 2.4582913043478265, 2.0614858611825198, 0.9503790909090909, 0.0), (1.8320435067310508, 3.8222082060185185, 3.09943569248072, 1.6428933876811593, 0.9504552884615385, 0.0, 2.830636299818841, 3.801821153846154, 2.464340081521739, 2.0662904616538134, 0.9555520515046296, 0.0), (1.841587101258414, 3.841667718855218, 3.106074068123393, 1.6466123188405797, 0.9533173076923078, 0.0, 2.8291213768115946, 3.8132692307692313, 2.46991847826087, 2.0707160454155953, 0.9604169297138045, 0.0), (1.850722388059702, 3.8598563352272715, 3.1121328325835482, 1.650010597826087, 0.9559341346153846, 0.0, 2.827579279891305, 3.8237365384615383, 2.475015896739131, 2.0747552217223655, 0.9649640838068179, 0.0), (1.8594368451858356, 3.8767354882154885, 3.1176008997429308, 1.65308115942029, 0.9582999999999999, 0.0, 2.8260101449275368, 3.8331999999999997, 2.4796217391304354, 2.0784005998286204, 0.9691838720538721, 0.0), (1.867717950687738, 3.892266610900674, 3.122467183483291, 1.655816938405797, 0.9604091346153847, 0.0, 2.8244141077898557, 3.8416365384615387, 2.483725407608696, 2.0816447889888607, 0.9730666527251685, 0.0), (1.8755531826163303, 3.9064111363636362, 3.1267205976863752, 1.6582108695652176, 0.9622557692307692, 0.0, 2.8227913043478265, 3.8490230769230767, 2.4873163043478264, 2.0844803984575835, 0.9766027840909091, 0.0), (1.8829300190225344, 3.919130497685185, 3.1303500562339335, 1.6602558876811595, 0.9638341346153845, 0.0, 2.8211418704710147, 3.855336538461538, 2.4903838315217395, 2.086900037489289, 0.9797826244212963, 0.0), (1.8898359379572727, 3.930386127946128, 3.1333444730077127, 1.661944927536232, 0.9651384615384615, 0.0, 2.819465942028986, 3.860553846153846, 2.492917391304348, 2.088896315338475, 0.982596531986532, 0.0), (1.8962584174714663, 3.940139460227272, 3.1356927618894597, 1.6632709239130437, 0.966162980769231, 0.0, 2.817763654891305, 3.864651923076924, 2.4949063858695655, 2.0904618412596396, 0.985034865056818, 0.0), (1.9021849356160379, 3.948351927609427, 3.1373838367609257, 1.664226811594203, 0.9669019230769231, 0.0, 2.8160351449275365, 3.8676076923076925, 2.4963402173913045, 2.091589224507284, 0.9870879819023568, 0.0), (1.9076029704419084, 3.954984963173401, 3.138406611503856, 1.664805525362319, 0.9673495192307693, 0.0, 2.814280548007247, 3.869398076923077, 2.4972082880434785, 2.092271074335904, 0.9887462407933503, 0.0), (1.9125000000000003, 3.9600000000000004, 3.1387500000000004, 1.665, 0.9675, 0.0, 2.8125000000000004, 3.87, 2.4975, 2.0925000000000002, 0.9900000000000001, 0.0), (1.9170822170716115, 3.9641658238636355, 3.138492581521739, 1.6649648774509804, 0.9674452393617023, 0.0, 2.8100257558720645, 3.8697809574468094, 2.497447316176471, 2.0923283876811594, 0.9910414559659089, 0.0), (1.92156550511509, 3.9682765909090914, 3.137727608695652, 1.6648601960784315, 0.9672821276595746, 0.0, 2.8062148550724646, 3.869128510638298, 2.497290294117647, 2.091818405797101, 0.9920691477272728, 0.0), (1.925951878196931, 3.9723317897727273, 3.1364660054347833, 1.6646869852941177, 0.9670124202127659, 0.0, 2.8011046101949026, 3.8680496808510636, 2.497030477941177, 2.090977336956522, 0.9930829474431818, 0.0), (1.9302433503836318, 3.976330909090909, 3.134718695652174, 1.664446274509804, 0.9666378723404256, 0.0, 2.794732333833084, 3.8665514893617026, 2.496669411764706, 2.0898124637681157, 0.9940827272727273, 0.0), (1.9344419357416882, 3.9802734374999997, 3.13249660326087, 1.664139093137255, 0.9661602393617023, 0.0, 2.78713533858071, 3.864640957446809, 2.4962086397058827, 2.0883310688405796, 0.9950683593749999, 0.0), (1.9385496483375964, 3.984158863636364, 3.1298106521739135, 1.6637664705882356, 0.9655812765957449, 0.0, 2.7783509370314845, 3.8623251063829795, 2.4956497058823537, 2.086540434782609, 0.996039715909091, 0.0), (1.9425685022378518, 3.987986676136364, 3.126671766304348, 1.66332943627451, 0.9649027393617021, 0.0, 2.768416441779111, 3.8596109574468085, 2.494994154411765, 2.0844478442028986, 0.996996669034091, 0.0), (1.9465005115089515, 3.9917563636363633, 3.1230908695652175, 1.662829019607843, 0.9641263829787234, 0.0, 2.757369165417291, 3.8565055319148938, 2.4942435294117646, 2.082060579710145, 0.9979390909090908, 0.0), (1.9503476902173915, 3.995467414772727, 3.119078885869565, 1.6622662500000003, 0.9632539627659574, 0.0, 2.7452464205397304, 3.8530158510638297, 2.4933993750000005, 2.079385923913043, 0.9988668536931817, 0.0), (1.9541120524296678, 3.9991193181818185, 3.114646739130435, 1.661642156862745, 0.9622872340425531, 0.0, 2.73208551974013, 3.8491489361702125, 2.492463235294118, 2.0764311594202898, 0.9997798295454546, 0.0), (1.9577956122122764, 4.0027115625, 3.10980535326087, 1.660957769607843, 0.9612279521276595, 0.0, 2.717923775612195, 3.844911808510638, 2.4914366544117645, 2.07320356884058, 1.000677890625, 0.0), (1.9614003836317138, 4.006243636363638, 3.1045656521739136, 1.6602141176470588, 0.9600778723404256, 0.0, 2.702798500749626, 3.8403114893617025, 2.490321176470588, 2.0697104347826087, 1.0015609090909094, 0.0), (1.9649283807544762, 4.00971502840909, 3.0989385597826087, 1.6594122303921572, 0.9588387500000001, 0.0, 2.6867470077461273, 3.8353550000000003, 2.4891183455882357, 2.0659590398550725, 1.0024287571022725, 0.0), (1.968381617647059, 4.013125227272727, 3.0929350000000007, 1.6585531372549018, 0.9575123404255319, 0.0, 2.6698066091954025, 3.8300493617021276, 2.487829705882353, 2.061956666666667, 1.0032813068181818, 0.0), (1.971762108375959, 4.016473721590909, 3.086565896739131, 1.657637867647059, 0.9561003989361703, 0.0, 2.652014617691155, 3.824401595744681, 2.4864568014705886, 2.0577105978260875, 1.0041184303977273, 0.0), (1.9750718670076732, 4.019760000000001, 3.0798421739130446, 1.6566674509803923, 0.954604680851064, 0.0, 2.633408345827087, 3.818418723404256, 2.4850011764705884, 2.0532281159420296, 1.0049400000000002, 0.0), (1.978312907608696, 4.022983551136364, 3.0727747554347826, 1.6556429166666666, 0.9530269414893617, 0.0, 2.6140251061969018, 3.812107765957447, 2.483464375, 2.0485165036231883, 1.005745887784091, 0.0), (1.981487244245525, 4.026143863636364, 3.0653745652173914, 1.654565294117647, 0.9513689361702128, 0.0, 2.5939022113943038, 3.805475744680851, 2.4818479411764707, 2.043583043478261, 1.006535965909091, 0.0), (1.9845968909846547, 4.029240426136363, 3.0576525271739134, 1.6534356127450982, 0.9496324202127661, 0.0, 2.5730769740129937, 3.7985296808510642, 2.4801534191176473, 2.0384350181159423, 1.0073101065340908, 0.0), (1.9876438618925836, 4.032272727272726, 3.0496195652173914, 1.6522549019607846, 0.9478191489361703, 0.0, 2.551586706646677, 3.791276595744681, 2.478382352941177, 2.0330797101449276, 1.0080681818181816, 0.0), (1.990630171035806, 4.035240255681818, 3.04128660326087, 1.6510241911764707, 0.9459308776595745, 0.0, 2.5294687218890557, 3.783723510638298, 2.476536286764706, 2.0275244021739134, 1.0088100639204545, 0.0), (1.9935578324808187, 4.0381425, 3.0326645652173916, 1.6497445098039216, 0.9439693617021278, 0.0, 2.5067603323338337, 3.775877446808511, 2.4746167647058828, 2.0217763768115944, 1.009535625, 0.0), (1.996428860294118, 4.0409789488636365, 3.0237643750000003, 1.6484168872549019, 0.9419363563829788, 0.0, 2.483498850574713, 3.767745425531915, 2.472625330882353, 2.0158429166666667, 1.0102447372159091, 0.0), (1.9992452685422, 4.043749090909091, 3.014596956521739, 1.6470423529411766, 0.9398336170212767, 0.0, 2.4597215892053974, 3.7593344680851066, 2.470563529411765, 2.009731304347826, 1.0109372727272727, 0.0), (2.0020090712915604, 4.046452414772727, 3.005173233695652, 1.6456219362745101, 0.9376628989361703, 0.0, 2.4354658608195905, 3.750651595744681, 2.4684329044117654, 2.003448822463768, 1.0116131036931817, 0.0), (2.0047222826086957, 4.049088409090909, 2.995504130434783, 1.6441566666666665, 0.9354259574468086, 0.0, 2.410768978010995, 3.7417038297872343, 2.4662349999999997, 1.9970027536231885, 1.0122721022727272, 0.0), (2.007386916560103, 4.051656562500001, 2.9856005706521738, 1.6426475735294117, 0.9331245478723404, 0.0, 2.3856682533733133, 3.732498191489362, 2.4639713602941176, 1.9904003804347825, 1.0129141406250002, 0.0), (2.0100049872122767, 4.054156363636363, 2.9754734782608696, 1.64109568627451, 0.930760425531915, 0.0, 2.3602009995002504, 3.72304170212766, 2.461643529411765, 1.9836489855072463, 1.0135390909090907, 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))
passenger_allighting_rate = ((0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1))
'\nparameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html\n'
entropy = 258194110137029475889902652135037600173
child_seed_index = (1, 37) |
class IExtension:
""" An interface that supports the additional operation for Extension Status """
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
| class Iextension:
""" An interface that supports the additional operation for Extension Status """
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass |
"""
Assessment Module
Written by Ed Oughton.
Winter 2020
"""
def assess(country, regions, option, global_parameters, country_parameters, timesteps):
"""
For each region, assess the viability level.
Parameters
----------
country : dict
Country information.
regions : dataframe
Geopandas dataframe of all regions.
option : dict
Contains the scenario and strategy. The strategy string controls
the strategy variants being testes in the model and is defined based
on the type of technology generation, core and backhaul, and the level
of sharing, subsidy, spectrum and tax.
global_parameters : dict
All global model parameters.
country_parameters : dict
All country specific parameters.
Returns
-------
output : list of dicts
Contains all output data.
"""
interim = []
strategy = option['strategy']
available_for_cross_subsidy = 0
for region in regions:
# add administration cost
region = get_administration_cost(region, country_parameters,
global_parameters, timesteps)
# npv spectrum cost
region['spectrum_cost'] = get_spectrum_costs(region, option['strategy'],
global_parameters, country_parameters)
#tax on investment
region['tax'] = calculate_tax(region, strategy, country_parameters)
#profit margin value calculated on all costs + taxes
region['profit_margin'] = calculate_profit(region, country_parameters)
region['total_mno_cost'] = (
region['mno_network_cost'] +
region['administration'] +
region['spectrum_cost'] +
region['tax'] +
region['profit_margin']
)
#avoid zero division
if region['total_mno_cost'] > 0 and region['smartphones_on_network'] > 0:
region['cost_per_sp_user'] = (
region['total_mno_cost'] / region['smartphones_on_network'])
else:
region['cost_per_sp_user'] = 0
region = allocate_available_excess(region)
available_for_cross_subsidy += region['available_cross_subsidy']
interim.append(region)
interim = sorted(interim, key=lambda k: k['deficit'], reverse=False)
intermediate_regions = []
for region in interim:
region, available_for_cross_subsidy = estimate_subsidies(
region, available_for_cross_subsidy)
intermediate_regions.append(region)
output = calculate_total_market_costs(
intermediate_regions, option, country_parameters)
return output
def get_administration_cost(region, country_parameters, global_parameters, timesteps):
"""
There is an annual administration cost to deploying and operating all assets.
Parameters
----------
regions : list of dicts
Data for all regions (one dict per region).
country_parameters : dict
All country specific parameters.
Returns
-------
region : dict
Contains all regional data.
"""
annual_cost = (
region['mno_network_cost'] *
(country_parameters['financials']['administration_percentage_of_network_cost'] /
100))
costs = []
for timestep in timesteps:
timestep = timestep - 2020
discounted_cost = discount_admin_cost(annual_cost, timestep, global_parameters)
costs.append(discounted_cost)
region['administration'] = sum(costs)
return region
def allocate_available_excess(region):
"""
Allocate available excess capital (if any).
"""
difference = region['total_mno_revenue'] - region['total_mno_cost']
if difference > 0:
region['available_cross_subsidy'] = difference
region['deficit'] = 0
else:
region['available_cross_subsidy'] = 0
region['deficit'] = abs(difference)
return region
def get_spectrum_costs(region, strategy, global_parameters, country_parameters):
"""
Calculate spectrum costs.
"""
population = int(round(region['population']))
frequencies = country_parameters['frequencies']
generation = strategy.split('_')[0]
frequencies = frequencies[generation]
spectrum_cost = strategy.split('_')[5]
coverage_spectrum_cost = 'spectrum_coverage_baseline_usd_mhz_pop'
capacity_spectrum_cost = 'spectrum_capacity_baseline_usd_mhz_pop'
coverage_cost_usd_mhz_pop = country_parameters['financials'][coverage_spectrum_cost]
capacity_cost_usd_mhz_pop = country_parameters['financials'][capacity_spectrum_cost]
if spectrum_cost == 'low':
coverage_cost_usd_mhz_pop = (coverage_cost_usd_mhz_pop *
(country_parameters['financials']['spectrum_cost_low'] /100))
capacity_cost_usd_mhz_pop = (capacity_cost_usd_mhz_pop *
(country_parameters['financials']['spectrum_cost_low'] /100))
if spectrum_cost == 'high':
coverage_cost_usd_mhz_pop = (coverage_cost_usd_mhz_pop *
(country_parameters['financials']['spectrum_cost_high'] / 100))
capacity_cost_usd_mhz_pop = (capacity_cost_usd_mhz_pop *
(country_parameters['financials']['spectrum_cost_high'] / 100))
all_costs = []
for frequency in frequencies:
channel_number = int(frequency['bandwidth'].split('x')[0])
channel_bandwidth = int(frequency['bandwidth'].split('x')[1])
bandwidth_total = channel_number * channel_bandwidth
if frequency['frequency'] < 1000:
cost = (
coverage_cost_usd_mhz_pop * bandwidth_total *
population)
all_costs.append(cost)
else:
cost = (
capacity_cost_usd_mhz_pop * bandwidth_total *
population)
all_costs.append(cost)
return sum(all_costs)
def calculate_tax(region, strategy, country_parameters):
"""
Calculate tax.
"""
tax_rate = strategy.split('_')[6]
tax_rate = 'tax_{}'.format(tax_rate)
tax_rate = country_parameters['financials'][tax_rate]
investment = region['mno_network_cost']
tax = investment * (tax_rate / 100)
return tax
def calculate_profit(region, country_parameters):
"""
Estimate npv profit.
This is treated as the Net Operating Profit After
Taxes Margin (NOPAT).
NOPAT ranges from ~5-15% depending on the context:
https://static1.squarespace.com/static/54922abde4b0afbec1351c14/t/583c49c8bebafb758437374e
"""
investment = (
region['mno_network_cost'] +
region['administration'] +
region['spectrum_cost'] +
region['tax']
)
profit = investment * (country_parameters['financials']['profit_margin'] / 100)
return profit
def estimate_subsidies(region, available_for_cross_subsidy):
"""
Estimates either the contribution to cross-subsidies, or the
quantity of subsidy required.
Parameters
----------
region : Dict
Contains all variable for a single region.
available_for_cross_subsidy : int
The amount of capital available for cross-subsidization.
Returns
-------
region : Dict
Contains all variable for a single region.
available_for_cross_subsidy : int
The amount of capital available for cross-subsidization.
"""
if region['deficit'] > 0:
if available_for_cross_subsidy >= region['deficit']:
region['used_cross_subsidy'] = region['deficit']
available_for_cross_subsidy -= region['deficit']
elif 0 < available_for_cross_subsidy < region['deficit']:
region['used_cross_subsidy'] = available_for_cross_subsidy
available_for_cross_subsidy = 0
else:
region['used_cross_subsidy'] = 0
else:
region['used_cross_subsidy'] = 0
required_state_subsidy = (region['total_mno_cost'] -
(region['total_mno_revenue'] + region['used_cross_subsidy']))
if required_state_subsidy > 0:
region['required_state_subsidy'] = required_state_subsidy
else:
region['required_state_subsidy'] = 0
return region, available_for_cross_subsidy
def discount_admin_cost(cost, timestep, global_parameters):
"""
Discount admin cost based on return period.
192,744 = 23,773 / (1 + 0.05) ** (0:9)
Parameters
----------
cost : float
Annual admin network running cost.
timestep : int
Time period (year) to discount against.
global_parameters : dict
All global model parameters.
Returns
-------
discounted_cost : float
The discounted admin cost over the desired time period.
"""
discount_rate = global_parameters['discount_rate'] / 100
discounted_cost = cost / (1 + discount_rate) ** timestep
return discounted_cost
def calculate_total_market_costs(regions, option, country_parameters):
"""
Calculate the costs for all Mobile Network Operators (MNOs).
"""
output = []
# generation_core_backhaul_sharing_networks_spectrum_tax
# network_strategy = option['strategy'].split('_')[4]
for region in regions:
geotype = region['geotype'].split(' ')[0]
# net_handle = network_strategy + '_' + geotype
net_handle = 'baseline' + '_' + geotype
networks = country_parameters['networks'][net_handle]
ms = 100 / networks
region['total_phones'] = calc(region, 'phones_on_network', ms)
region['total_smartphones'] = calc(region, 'smartphones_on_network', ms)
region['total_market_revenue'] = calc(region, 'total_mno_revenue', ms)
region['total_upgraded_sites'] = calc(region, 'upgraded_mno_sites', ms)
region['total_new_sites'] = calc(region, 'new_mno_sites', ms)
region['total_ran_capex'] = calc(region, 'ran_capex', ms)
region['total_ran_opex'] = calc(region, 'ran_opex', ms)
region['total_backhaul_capex'] = calc(region, 'backhaul_capex', ms)
region['total_backhaul_opex'] = calc(region, 'backhaul_opex', ms)
region['total_civils_capex'] = calc(region, 'civils_capex', ms)
region['total_core_capex'] = calc(region, 'core_capex', ms)
region['total_core_opex'] = calc(region, 'core_opex', ms)
region['total_network_cost'] = calc(region, 'mno_network_cost', ms)
region['total_network_capex'] = calc(region, 'mno_network_capex', ms)
region['total_network_opex'] = calc(region, 'mno_network_opex', ms)
region['total_administration'] = calc(region, 'administration', ms)
region['total_spectrum_cost'] = calc(region, 'spectrum_cost', ms)
region['total_tax'] = calc(region, 'tax', ms)
region['total_profit_margin'] = calc(region, 'profit_margin', ms)
region['total_market_cost'] = calc(region, 'total_mno_cost', ms)
region['total_available_cross_subsidy'] = calc(region, 'available_cross_subsidy', ms)
region['total_deficit'] = calc(region, 'deficit', ms)
region['total_used_cross_subsidy'] = calc(region, 'used_cross_subsidy', ms)
region['total_required_state_subsidy'] = calc(region, 'required_state_subsidy', ms)
output.append(region)
return output
def calc(region, metric, ms):
"""
"""
if metric in region:
value = region[metric]
return round((value / ms) * 100)
else:
return 0
| """
Assessment Module
Written by Ed Oughton.
Winter 2020
"""
def assess(country, regions, option, global_parameters, country_parameters, timesteps):
"""
For each region, assess the viability level.
Parameters
----------
country : dict
Country information.
regions : dataframe
Geopandas dataframe of all regions.
option : dict
Contains the scenario and strategy. The strategy string controls
the strategy variants being testes in the model and is defined based
on the type of technology generation, core and backhaul, and the level
of sharing, subsidy, spectrum and tax.
global_parameters : dict
All global model parameters.
country_parameters : dict
All country specific parameters.
Returns
-------
output : list of dicts
Contains all output data.
"""
interim = []
strategy = option['strategy']
available_for_cross_subsidy = 0
for region in regions:
region = get_administration_cost(region, country_parameters, global_parameters, timesteps)
region['spectrum_cost'] = get_spectrum_costs(region, option['strategy'], global_parameters, country_parameters)
region['tax'] = calculate_tax(region, strategy, country_parameters)
region['profit_margin'] = calculate_profit(region, country_parameters)
region['total_mno_cost'] = region['mno_network_cost'] + region['administration'] + region['spectrum_cost'] + region['tax'] + region['profit_margin']
if region['total_mno_cost'] > 0 and region['smartphones_on_network'] > 0:
region['cost_per_sp_user'] = region['total_mno_cost'] / region['smartphones_on_network']
else:
region['cost_per_sp_user'] = 0
region = allocate_available_excess(region)
available_for_cross_subsidy += region['available_cross_subsidy']
interim.append(region)
interim = sorted(interim, key=lambda k: k['deficit'], reverse=False)
intermediate_regions = []
for region in interim:
(region, available_for_cross_subsidy) = estimate_subsidies(region, available_for_cross_subsidy)
intermediate_regions.append(region)
output = calculate_total_market_costs(intermediate_regions, option, country_parameters)
return output
def get_administration_cost(region, country_parameters, global_parameters, timesteps):
"""
There is an annual administration cost to deploying and operating all assets.
Parameters
----------
regions : list of dicts
Data for all regions (one dict per region).
country_parameters : dict
All country specific parameters.
Returns
-------
region : dict
Contains all regional data.
"""
annual_cost = region['mno_network_cost'] * (country_parameters['financials']['administration_percentage_of_network_cost'] / 100)
costs = []
for timestep in timesteps:
timestep = timestep - 2020
discounted_cost = discount_admin_cost(annual_cost, timestep, global_parameters)
costs.append(discounted_cost)
region['administration'] = sum(costs)
return region
def allocate_available_excess(region):
"""
Allocate available excess capital (if any).
"""
difference = region['total_mno_revenue'] - region['total_mno_cost']
if difference > 0:
region['available_cross_subsidy'] = difference
region['deficit'] = 0
else:
region['available_cross_subsidy'] = 0
region['deficit'] = abs(difference)
return region
def get_spectrum_costs(region, strategy, global_parameters, country_parameters):
"""
Calculate spectrum costs.
"""
population = int(round(region['population']))
frequencies = country_parameters['frequencies']
generation = strategy.split('_')[0]
frequencies = frequencies[generation]
spectrum_cost = strategy.split('_')[5]
coverage_spectrum_cost = 'spectrum_coverage_baseline_usd_mhz_pop'
capacity_spectrum_cost = 'spectrum_capacity_baseline_usd_mhz_pop'
coverage_cost_usd_mhz_pop = country_parameters['financials'][coverage_spectrum_cost]
capacity_cost_usd_mhz_pop = country_parameters['financials'][capacity_spectrum_cost]
if spectrum_cost == 'low':
coverage_cost_usd_mhz_pop = coverage_cost_usd_mhz_pop * (country_parameters['financials']['spectrum_cost_low'] / 100)
capacity_cost_usd_mhz_pop = capacity_cost_usd_mhz_pop * (country_parameters['financials']['spectrum_cost_low'] / 100)
if spectrum_cost == 'high':
coverage_cost_usd_mhz_pop = coverage_cost_usd_mhz_pop * (country_parameters['financials']['spectrum_cost_high'] / 100)
capacity_cost_usd_mhz_pop = capacity_cost_usd_mhz_pop * (country_parameters['financials']['spectrum_cost_high'] / 100)
all_costs = []
for frequency in frequencies:
channel_number = int(frequency['bandwidth'].split('x')[0])
channel_bandwidth = int(frequency['bandwidth'].split('x')[1])
bandwidth_total = channel_number * channel_bandwidth
if frequency['frequency'] < 1000:
cost = coverage_cost_usd_mhz_pop * bandwidth_total * population
all_costs.append(cost)
else:
cost = capacity_cost_usd_mhz_pop * bandwidth_total * population
all_costs.append(cost)
return sum(all_costs)
def calculate_tax(region, strategy, country_parameters):
"""
Calculate tax.
"""
tax_rate = strategy.split('_')[6]
tax_rate = 'tax_{}'.format(tax_rate)
tax_rate = country_parameters['financials'][tax_rate]
investment = region['mno_network_cost']
tax = investment * (tax_rate / 100)
return tax
def calculate_profit(region, country_parameters):
"""
Estimate npv profit.
This is treated as the Net Operating Profit After
Taxes Margin (NOPAT).
NOPAT ranges from ~5-15% depending on the context:
https://static1.squarespace.com/static/54922abde4b0afbec1351c14/t/583c49c8bebafb758437374e
"""
investment = region['mno_network_cost'] + region['administration'] + region['spectrum_cost'] + region['tax']
profit = investment * (country_parameters['financials']['profit_margin'] / 100)
return profit
def estimate_subsidies(region, available_for_cross_subsidy):
"""
Estimates either the contribution to cross-subsidies, or the
quantity of subsidy required.
Parameters
----------
region : Dict
Contains all variable for a single region.
available_for_cross_subsidy : int
The amount of capital available for cross-subsidization.
Returns
-------
region : Dict
Contains all variable for a single region.
available_for_cross_subsidy : int
The amount of capital available for cross-subsidization.
"""
if region['deficit'] > 0:
if available_for_cross_subsidy >= region['deficit']:
region['used_cross_subsidy'] = region['deficit']
available_for_cross_subsidy -= region['deficit']
elif 0 < available_for_cross_subsidy < region['deficit']:
region['used_cross_subsidy'] = available_for_cross_subsidy
available_for_cross_subsidy = 0
else:
region['used_cross_subsidy'] = 0
else:
region['used_cross_subsidy'] = 0
required_state_subsidy = region['total_mno_cost'] - (region['total_mno_revenue'] + region['used_cross_subsidy'])
if required_state_subsidy > 0:
region['required_state_subsidy'] = required_state_subsidy
else:
region['required_state_subsidy'] = 0
return (region, available_for_cross_subsidy)
def discount_admin_cost(cost, timestep, global_parameters):
"""
Discount admin cost based on return period.
192,744 = 23,773 / (1 + 0.05) ** (0:9)
Parameters
----------
cost : float
Annual admin network running cost.
timestep : int
Time period (year) to discount against.
global_parameters : dict
All global model parameters.
Returns
-------
discounted_cost : float
The discounted admin cost over the desired time period.
"""
discount_rate = global_parameters['discount_rate'] / 100
discounted_cost = cost / (1 + discount_rate) ** timestep
return discounted_cost
def calculate_total_market_costs(regions, option, country_parameters):
"""
Calculate the costs for all Mobile Network Operators (MNOs).
"""
output = []
for region in regions:
geotype = region['geotype'].split(' ')[0]
net_handle = 'baseline' + '_' + geotype
networks = country_parameters['networks'][net_handle]
ms = 100 / networks
region['total_phones'] = calc(region, 'phones_on_network', ms)
region['total_smartphones'] = calc(region, 'smartphones_on_network', ms)
region['total_market_revenue'] = calc(region, 'total_mno_revenue', ms)
region['total_upgraded_sites'] = calc(region, 'upgraded_mno_sites', ms)
region['total_new_sites'] = calc(region, 'new_mno_sites', ms)
region['total_ran_capex'] = calc(region, 'ran_capex', ms)
region['total_ran_opex'] = calc(region, 'ran_opex', ms)
region['total_backhaul_capex'] = calc(region, 'backhaul_capex', ms)
region['total_backhaul_opex'] = calc(region, 'backhaul_opex', ms)
region['total_civils_capex'] = calc(region, 'civils_capex', ms)
region['total_core_capex'] = calc(region, 'core_capex', ms)
region['total_core_opex'] = calc(region, 'core_opex', ms)
region['total_network_cost'] = calc(region, 'mno_network_cost', ms)
region['total_network_capex'] = calc(region, 'mno_network_capex', ms)
region['total_network_opex'] = calc(region, 'mno_network_opex', ms)
region['total_administration'] = calc(region, 'administration', ms)
region['total_spectrum_cost'] = calc(region, 'spectrum_cost', ms)
region['total_tax'] = calc(region, 'tax', ms)
region['total_profit_margin'] = calc(region, 'profit_margin', ms)
region['total_market_cost'] = calc(region, 'total_mno_cost', ms)
region['total_available_cross_subsidy'] = calc(region, 'available_cross_subsidy', ms)
region['total_deficit'] = calc(region, 'deficit', ms)
region['total_used_cross_subsidy'] = calc(region, 'used_cross_subsidy', ms)
region['total_required_state_subsidy'] = calc(region, 'required_state_subsidy', ms)
output.append(region)
return output
def calc(region, metric, ms):
"""
"""
if metric in region:
value = region[metric]
return round(value / ms * 100)
else:
return 0 |
def countDigits(n):
c = 0
while n:
c +=1
n //=10
return c
def match(val,x):
ans = {
1: lambda x: x,
2: lambda x: f'{x//10} * 10 + {x%10}',
3: lambda x: f'{x//100} * 100 + {x//10%10} * 10 + {x%10}',
4: lambda x: f'{x//1000} * 1000 + {x//100%10} * 100 + {x//10%10} * 10 + {x%10}'
}[val](x)
return ans
def main():
n = int(input())
c = countDigits(n)
result = match(c,n)
print(result)
main() | def count_digits(n):
c = 0
while n:
c += 1
n //= 10
return c
def match(val, x):
ans = {1: lambda x: x, 2: lambda x: f'{x // 10} * 10 + {x % 10}', 3: lambda x: f'{x // 100} * 100 + {x // 10 % 10} * 10 + {x % 10}', 4: lambda x: f'{x // 1000} * 1000 + {x // 100 % 10} * 100 + {x // 10 % 10} * 10 + {x % 10}'}[val](x)
return ans
def main():
n = int(input())
c = count_digits(n)
result = match(c, n)
print(result)
main() |
class DocumentPreviewSettings(object,IDisposable):
""" Contains the settings related to the saving of preview images for a given document. """
def Dispose(self):
""" Dispose(self: DocumentPreviewSettings) """
pass
def ForceViewUpdate(self,forceViewUpdate):
"""
ForceViewUpdate(self: DocumentPreviewSettings,forceViewUpdate: bool)
Sets Revit to update the preview view if necessary.
forceViewUpdate: True to force update of the preview view. False to skip update if necessary
(the default).
"""
pass
def IsViewIdValidForPreview(self,viewId):
"""
IsViewIdValidForPreview(self: DocumentPreviewSettings,viewId: ElementId) -> bool
Identifies if the view id is valid as a preview view id.
viewId: The view id.
Returns: True if the view id is valid for preview,false otherwise.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: DocumentPreviewSettings,disposing: bool) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
IsValidObject=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Specifies whether the .NET object represents a valid Revit entity.
Get: IsValidObject(self: DocumentPreviewSettings) -> bool
"""
IsViewUpdateForced=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Identifies if Revit will update the preview view if necessary.
Get: IsViewUpdateForced(self: DocumentPreviewSettings) -> bool
"""
PreviewViewId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The view id that will be used to generate the preview.
Get: PreviewViewId(self: DocumentPreviewSettings) -> ElementId
Set: PreviewViewId(self: DocumentPreviewSettings)=value
"""
| class Documentpreviewsettings(object, IDisposable):
""" Contains the settings related to the saving of preview images for a given document. """
def dispose(self):
""" Dispose(self: DocumentPreviewSettings) """
pass
def force_view_update(self, forceViewUpdate):
"""
ForceViewUpdate(self: DocumentPreviewSettings,forceViewUpdate: bool)
Sets Revit to update the preview view if necessary.
forceViewUpdate: True to force update of the preview view. False to skip update if necessary
(the default).
"""
pass
def is_view_id_valid_for_preview(self, viewId):
"""
IsViewIdValidForPreview(self: DocumentPreviewSettings,viewId: ElementId) -> bool
Identifies if the view id is valid as a preview view id.
viewId: The view id.
Returns: True if the view id is valid for preview,false otherwise.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: DocumentPreviewSettings,disposing: bool) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args):
""" __repr__(self: object) -> str """
pass
is_valid_object = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Specifies whether the .NET object represents a valid Revit entity.\n\n\n\nGet: IsValidObject(self: DocumentPreviewSettings) -> bool\n\n\n\n'
is_view_update_forced = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Identifies if Revit will update the preview view if necessary.\n\n\n\nGet: IsViewUpdateForced(self: DocumentPreviewSettings) -> bool\n\n\n\n'
preview_view_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The view id that will be used to generate the preview.\n\n\n\nGet: PreviewViewId(self: DocumentPreviewSettings) -> ElementId\n\n\n\nSet: PreviewViewId(self: DocumentPreviewSettings)=value\n\n' |
class Constants:
# DR_Net
DRNET_EPOCHS = 100
DRNET_SS_EPOCHS = 1
DRNET_LR = 1e-4
DRNET_LAMBDA = 0.0001
DRNET_BATCH_SIZE = 256
DRNET_INPUT_NODES = 30
DRNET_SHARED_NODES = 200
DRNET_OUTPUT_NODES = 100
ALPHA = 1
BETA = 1
# Adversarial VAE Info GAN
Adversarial_epochs = 1000
Adversarial_VAE_LR = 1e-3
INFO_GAN_G_LR = 1e-4
INFO_GAN_D_LR = 5e-4
Adversarial_LAMBDA = 1e-5
Adversarial_BATCH_SIZE = 256
VAE_BETA = 1
# INFO_GAN_LAMBDA = 1
INFO_GAN_LAMBDA = 1
INFO_GAN_ALPHA = 1
Encoder_shared_nodes = 15
Encoder_x_nodes = 5
Encoder_t_nodes = 1
Encoder_yf_nodes = 1
Encoder_ycf_nodes = 1
Decoder_in_nodes = Encoder_x_nodes + Encoder_t_nodes + Encoder_yf_nodes + Encoder_ycf_nodes
Decoder_shared_nodes = 15
Decoder_out_nodes = DRNET_INPUT_NODES
Info_GAN_Gen_in_nodes = 100
Info_GAN_Gen_shared_nodes = 30
Info_GAN_Gen_out_nodes = 1
# 25 -> covariates, 1 -> y0, 1-> y1
Info_GAN_Dis_in_nodes = DRNET_INPUT_NODES + 2
Info_GAN_Dis_shared_nodes = 30
Info_GAN_Dis_out_nodes = 1
Info_GAN_Q_in_nodes = 1
Info_GAN_Q_shared_nodes = Decoder_in_nodes
Info_GAN_Q_out_nodes = Decoder_in_nodes
| class Constants:
drnet_epochs = 100
drnet_ss_epochs = 1
drnet_lr = 0.0001
drnet_lambda = 0.0001
drnet_batch_size = 256
drnet_input_nodes = 30
drnet_shared_nodes = 200
drnet_output_nodes = 100
alpha = 1
beta = 1
adversarial_epochs = 1000
adversarial_vae_lr = 0.001
info_gan_g_lr = 0.0001
info_gan_d_lr = 0.0005
adversarial_lambda = 1e-05
adversarial_batch_size = 256
vae_beta = 1
info_gan_lambda = 1
info_gan_alpha = 1
encoder_shared_nodes = 15
encoder_x_nodes = 5
encoder_t_nodes = 1
encoder_yf_nodes = 1
encoder_ycf_nodes = 1
decoder_in_nodes = Encoder_x_nodes + Encoder_t_nodes + Encoder_yf_nodes + Encoder_ycf_nodes
decoder_shared_nodes = 15
decoder_out_nodes = DRNET_INPUT_NODES
info_gan__gen_in_nodes = 100
info_gan__gen_shared_nodes = 30
info_gan__gen_out_nodes = 1
info_gan__dis_in_nodes = DRNET_INPUT_NODES + 2
info_gan__dis_shared_nodes = 30
info_gan__dis_out_nodes = 1
info_gan_q_in_nodes = 1
info_gan_q_shared_nodes = Decoder_in_nodes
info_gan_q_out_nodes = Decoder_in_nodes |
#
# PySNMP MIB module Wellfleet-MPLS-LDP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-MPLS-LDP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:40:58 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
TimeTicks, ObjectIdentity, Counter64, Gauge32, iso, NotificationType, Bits, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, ModuleIdentity, Counter32, MibIdentifier, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "ObjectIdentity", "Counter64", "Gauge32", "iso", "NotificationType", "Bits", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "ModuleIdentity", "Counter32", "MibIdentifier", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
wfMplsLdpGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfMplsLdpGroup")
wfMplsLdpSessCfgTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1), )
if mibBuilder.loadTexts: wfMplsLdpSessCfgTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgTable.setDescription('MPLS LDP session table - This tabulates the LDP session within an mpls protocol group. All sessions are indexed according to the physical slot and the associated interface circuit number and session index. There can be more LDP sessions per L2 MPLS interface.')
wfMplsLdpSessCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1), ).setIndexNames((0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpSessCfgSlot"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpSessCfgCircuit"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpSessCfgIndex"))
if mibBuilder.loadTexts: wfMplsLdpSessCfgEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgEntry.setDescription('MPLS LDP session entries.')
wfMplsLdpSessCfgCreate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgCreate.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgCreate.setDescription('Create/Delete parameter. Default is created. Users modify this object in order to create/delete MPLS LDP sessions')
wfMplsLdpSessCfgEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgEnable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgEnable.setDescription('Enable/Disable parameter. Default is enabled.')
wfMplsLdpSessCfgSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessCfgSlot.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgSlot.setDescription('The slot number this LDP session is configured on.')
wfMplsLdpSessCfgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessCfgIndex.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgIndex.setDescription('The Session index identifies this particular LDP session on an interface.')
wfMplsLdpSessCfgCircuit = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessCfgCircuit.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgCircuit.setDescription('The circuit number of the circuit to which the session belongs.')
wfMplsLdpSessCfgLocalIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 6), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgLocalIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgLocalIpAddress.setDescription('The IP address of this MPLS device for the purpose of establishing the LDP peer to peer session.')
wfMplsLdpSessCfgLocalTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(8192)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgLocalTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgLocalTcpPort.setDescription('The TCP port address of this MPLS device for the purpose of establishing the LDP peer to peer session.')
wfMplsLdpSessCfgRemoteIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 8), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgRemoteIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgRemoteIpAddress.setDescription('The IP address of the remote MPLS device for the purpose of establishing the LDP peer to peer session.')
wfMplsLdpSessCfgRemoteTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(8192)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgRemoteTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgRemoteTcpPort.setDescription('The TCP port of the remote MPLS device for the purpose of establishing the LDP peer to peer session.')
wfMplsLdpSessCfgRoutesConfigMode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auto", 1), ("manual", 2))).clone('auto')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgRoutesConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgRoutesConfigMode.setDescription('Indicates whether network routes should be discovered by a routing protocol(auto) or should be Manually configured(manual), see wfMplsLdpCfgRouteTable.')
wfMplsLdpSessCfgHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 240)).clone(40)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgHoldTime.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgHoldTime.setDescription('the Hold Time indicates the maximum time in seconds that may elapse between the receipt of successive PDUs from the LSR peer.')
wfMplsLdpSessCfgProto = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("ospf", 1), ("rip", 2), ("hybridospf", 3), ("hybridrip", 4))).clone('ospf')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgProto.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgProto.setDescription('The routing protocols used by MPLS.')
wfMplsLdpSessCfgAggregation = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgAggregation.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgAggregation.setDescription('Enable/Disable aggregation. Default is disabled.')
wfMplsLdpSessCfgDebugLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("one", 1), ("two", 2), ("three", 3), ("debug", 4))).clone('two')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgDebugLevel.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgDebugLevel.setDescription('Debug Levels - This attribute is used to assign the level of DEBUG message to be logged for each LDP session.')
wfMplsLdpSessCfgReqBindRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 240)).clone(40)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgReqBindRetryTime.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgReqBindRetryTime.setDescription('It indicates the maximum time in seconds that may elapse between two consecutive request bind in case of no reply.')
wfMplsLdpSessCfgReqBindRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 240)).clone(240)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpSessCfgReqBindRetries.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessCfgReqBindRetries.setDescription('It indicates the number of retry times.')
wfMplsLdpSessActualTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2), )
if mibBuilder.loadTexts: wfMplsLdpSessActualTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualTable.setDescription('MPLS LDP interface actual table - read-only table containing LDP peer status, and actual LDP information.')
wfMplsLdpSessActualEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1), ).setIndexNames((0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpSessActualCircuit"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpSessActualIndex"))
if mibBuilder.loadTexts: wfMplsLdpSessActualEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualEntry.setDescription('MPLS LDP interface entries.')
wfMplsLdpSessActualIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualIndex.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualIndex.setDescription('The Session index identifies this particular LDP session on the interface.')
wfMplsLdpSessActualCircuit = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualCircuit.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualCircuit.setDescription('The circuit number of the circuit to which the session belongs.')
wfMplsLdpSessActualState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpresent", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualState.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualState.setDescription('The current state of the MPLS LDP session')
wfMplsLdpSessActualPeerState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("initialized", 1), ("opensend", 2), ("openrec", 3), ("operational", 4))).clone('initialized')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualPeerState.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualPeerState.setDescription('The current state of MPLS LDP session with the remote MPLS device')
wfMplsLdpSessActualLocalIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 5), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualLocalIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualLocalIpAddress.setDescription('The actual IP address that LDP used to establish the LDP peer to peer session.')
wfMplsLdpSessActualLocalTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualLocalTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualLocalTcpPort.setDescription('The actual local TCP port address that this LDP used to establish the LDP peer to peer session.')
wfMplsLdpSessActualRemoteIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 7), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualRemoteIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualRemoteIpAddress.setDescription('The actual remote IP address that LDP used to establish the LDP peer to peer session.')
wfMplsLdpSessActualRemoteTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualRemoteTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualRemoteTcpPort.setDescription('The actual TCP port that LDP used to establish the LDP peer to peer session.')
wfMplsLdpSessActualHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 240))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualHoldTime.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualHoldTime.setDescription('the actual Hold Time that LDP used to indicate the maximum time in seconds that may elapse between the receipt of successive PDUs from the LSR peer.')
wfMplsLdpSessActualRoutesConfigMode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auto", 1), ("manual", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualRoutesConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualRoutesConfigMode.setDescription('Indicates whether network routes are discovered by a routing protocol(auto) or are Manually configured(manual), see wfMplsLdpCfgRouteTable.')
wfMplsLdpSessActualTCPConnectionRole = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("passive", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualTCPConnectionRole.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualTCPConnectionRole.setDescription('Indicates the TCP connection roles between the peers.')
wfMplsLdpSessActualSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpSessActualSlot.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpSessActualSlot.setDescription('Indicates the slot on which the LDP session is running.')
wfMplsLdpCfgRouteTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3), )
if mibBuilder.loadTexts: wfMplsLdpCfgRouteTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteTable.setDescription('MPLS LDP configured route table -')
wfMplsLdpCfgRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1), ).setIndexNames((0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpCfgRouteCct"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpCfgRouteSessId"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpCfgRouteIndex"))
if mibBuilder.loadTexts: wfMplsLdpCfgRouteEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteEntry.setDescription('MPLS LDP configured route entries.')
wfMplsLdpCfgRouteCreate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteCreate.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteCreate.setDescription('Create/Delete parameter. Default is created. Users modify this object in order to create/delete MPLS LSP')
wfMplsLdpCfgRouteEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteEnable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteEnable.setDescription('Enable/Disable parameter. Default is enabled.')
wfMplsLdpCfgRouteCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteCct.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteCct.setDescription('The circuit munber to which the route associates with.')
wfMplsLdpCfgRouteSessId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteSessId.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteSessId.setDescription('The session identification munber to which the route associates with.')
wfMplsLdpCfgRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteIndex.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteIndex.setDescription('The index number of this route.')
wfMplsLdpCfgRouteDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 6), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteDestination.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteDestination.setDescription('The netwrok prefix of this route.')
wfMplsLdpCfgRouteMask = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 7), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteMask.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteMask.setDescription('The mask of this route.')
wfMplsLdpCfgRouteState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2))).clone('down')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpCfgRouteState.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpCfgRouteState.setDescription('The current state of the MPLS LDP session.')
wfMplsLdpLibTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4), )
if mibBuilder.loadTexts: wfMplsLdpLibTable.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibTable.setDescription('MPLS LDP Label Information Base table which contains LSPs that have been set up.')
wfMplsLdpLibEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1), ).setIndexNames((0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpLibCct"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpLibSessId"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpLibDest"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpLibMid"), (0, "Wellfleet-MPLS-LDP-MIB", "wfMplsLdpLibIndex"))
if mibBuilder.loadTexts: wfMplsLdpLibEntry.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibEntry.setDescription('MPLS LDP Label Information Base.')
wfMplsLdpLibCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibCct.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibCct.setDescription('The circuit munber to which the route associates with.')
wfMplsLdpLibSessId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1023))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibSessId.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibSessId.setDescription('The session identification munber to which the LIB entry associates with.')
wfMplsLdpLibDest = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibDest.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibDest.setDescription('The destnation network prefix.')
wfMplsLdpLibMid = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibMid.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibMid.setDescription('The merge id.')
wfMplsLdpLibLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibLabel.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibLabel.setDescription('The label of the lsp that this LIB entry identifies.')
wfMplsLdpLibEncaps = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("llcsnap", 1), ("null", 2))).clone('llcsnap')).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibEncaps.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibEncaps.setDescription('The lsp encapsulation type.')
wfMplsLdpLibDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inbound", 1), ("outbound", 2), ("bidirectional", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibDirection.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibDirection.setDescription('MPLS VC direction.')
wfMplsLdpLibSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibSlot.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibSlot.setDescription('Slot on which this LSP got created')
wfMplsLdpLibIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfMplsLdpLibIndex.setStatus('mandatory')
if mibBuilder.loadTexts: wfMplsLdpLibIndex.setDescription('Index part of instance id')
mibBuilder.exportSymbols("Wellfleet-MPLS-LDP-MIB", wfMplsLdpSessActualTable=wfMplsLdpSessActualTable, wfMplsLdpSessActualLocalTcpPort=wfMplsLdpSessActualLocalTcpPort, wfMplsLdpSessActualLocalIpAddress=wfMplsLdpSessActualLocalIpAddress, wfMplsLdpSessCfgCircuit=wfMplsLdpSessCfgCircuit, wfMplsLdpSessCfgDebugLevel=wfMplsLdpSessCfgDebugLevel, wfMplsLdpSessActualTCPConnectionRole=wfMplsLdpSessActualTCPConnectionRole, wfMplsLdpCfgRouteIndex=wfMplsLdpCfgRouteIndex, wfMplsLdpSessActualCircuit=wfMplsLdpSessActualCircuit, wfMplsLdpLibTable=wfMplsLdpLibTable, wfMplsLdpLibMid=wfMplsLdpLibMid, wfMplsLdpLibCct=wfMplsLdpLibCct, wfMplsLdpSessActualHoldTime=wfMplsLdpSessActualHoldTime, wfMplsLdpSessActualRoutesConfigMode=wfMplsLdpSessActualRoutesConfigMode, wfMplsLdpLibEncaps=wfMplsLdpLibEncaps, wfMplsLdpSessCfgEnable=wfMplsLdpSessCfgEnable, wfMplsLdpCfgRouteCct=wfMplsLdpCfgRouteCct, wfMplsLdpSessActualSlot=wfMplsLdpSessActualSlot, wfMplsLdpSessCfgSlot=wfMplsLdpSessCfgSlot, wfMplsLdpSessCfgRemoteIpAddress=wfMplsLdpSessCfgRemoteIpAddress, wfMplsLdpSessCfgHoldTime=wfMplsLdpSessCfgHoldTime, wfMplsLdpCfgRouteState=wfMplsLdpCfgRouteState, wfMplsLdpSessCfgCreate=wfMplsLdpSessCfgCreate, wfMplsLdpLibLabel=wfMplsLdpLibLabel, wfMplsLdpCfgRouteCreate=wfMplsLdpCfgRouteCreate, wfMplsLdpSessCfgLocalTcpPort=wfMplsLdpSessCfgLocalTcpPort, wfMplsLdpSessCfgAggregation=wfMplsLdpSessCfgAggregation, wfMplsLdpSessActualRemoteTcpPort=wfMplsLdpSessActualRemoteTcpPort, wfMplsLdpSessCfgLocalIpAddress=wfMplsLdpSessCfgLocalIpAddress, wfMplsLdpCfgRouteDestination=wfMplsLdpCfgRouteDestination, wfMplsLdpLibSlot=wfMplsLdpLibSlot, wfMplsLdpSessCfgIndex=wfMplsLdpSessCfgIndex, wfMplsLdpCfgRouteSessId=wfMplsLdpCfgRouteSessId, wfMplsLdpSessCfgTable=wfMplsLdpSessCfgTable, wfMplsLdpSessActualIndex=wfMplsLdpSessActualIndex, wfMplsLdpCfgRouteMask=wfMplsLdpCfgRouteMask, wfMplsLdpLibSessId=wfMplsLdpLibSessId, wfMplsLdpLibDest=wfMplsLdpLibDest, wfMplsLdpCfgRouteTable=wfMplsLdpCfgRouteTable, wfMplsLdpCfgRouteEntry=wfMplsLdpCfgRouteEntry, wfMplsLdpLibDirection=wfMplsLdpLibDirection, wfMplsLdpSessCfgRemoteTcpPort=wfMplsLdpSessCfgRemoteTcpPort, wfMplsLdpSessCfgProto=wfMplsLdpSessCfgProto, wfMplsLdpSessActualRemoteIpAddress=wfMplsLdpSessActualRemoteIpAddress, wfMplsLdpLibIndex=wfMplsLdpLibIndex, wfMplsLdpSessCfgRoutesConfigMode=wfMplsLdpSessCfgRoutesConfigMode, wfMplsLdpSessCfgReqBindRetries=wfMplsLdpSessCfgReqBindRetries, wfMplsLdpCfgRouteEnable=wfMplsLdpCfgRouteEnable, wfMplsLdpSessCfgReqBindRetryTime=wfMplsLdpSessCfgReqBindRetryTime, wfMplsLdpSessCfgEntry=wfMplsLdpSessCfgEntry, wfMplsLdpSessActualEntry=wfMplsLdpSessActualEntry, wfMplsLdpSessActualPeerState=wfMplsLdpSessActualPeerState, wfMplsLdpSessActualState=wfMplsLdpSessActualState, wfMplsLdpLibEntry=wfMplsLdpLibEntry)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_size_constraint, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(time_ticks, object_identity, counter64, gauge32, iso, notification_type, bits, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, module_identity, counter32, mib_identifier, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'ObjectIdentity', 'Counter64', 'Gauge32', 'iso', 'NotificationType', 'Bits', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'ModuleIdentity', 'Counter32', 'MibIdentifier', 'IpAddress')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(wf_mpls_ldp_group,) = mibBuilder.importSymbols('Wellfleet-COMMON-MIB', 'wfMplsLdpGroup')
wf_mpls_ldp_sess_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1))
if mibBuilder.loadTexts:
wfMplsLdpSessCfgTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgTable.setDescription('MPLS LDP session table - This tabulates the LDP session within an mpls protocol group. All sessions are indexed according to the physical slot and the associated interface circuit number and session index. There can be more LDP sessions per L2 MPLS interface.')
wf_mpls_ldp_sess_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1)).setIndexNames((0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpSessCfgSlot'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpSessCfgCircuit'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpSessCfgIndex'))
if mibBuilder.loadTexts:
wfMplsLdpSessCfgEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgEntry.setDescription('MPLS LDP session entries.')
wf_mpls_ldp_sess_cfg_create = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgCreate.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgCreate.setDescription('Create/Delete parameter. Default is created. Users modify this object in order to create/delete MPLS LDP sessions')
wf_mpls_ldp_sess_cfg_enable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgEnable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgEnable.setDescription('Enable/Disable parameter. Default is enabled.')
wf_mpls_ldp_sess_cfg_slot = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgSlot.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgSlot.setDescription('The slot number this LDP session is configured on.')
wf_mpls_ldp_sess_cfg_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgIndex.setDescription('The Session index identifies this particular LDP session on an interface.')
wf_mpls_ldp_sess_cfg_circuit = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgCircuit.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgCircuit.setDescription('The circuit number of the circuit to which the session belongs.')
wf_mpls_ldp_sess_cfg_local_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 6), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgLocalIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgLocalIpAddress.setDescription('The IP address of this MPLS device for the purpose of establishing the LDP peer to peer session.')
wf_mpls_ldp_sess_cfg_local_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(8192)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgLocalTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgLocalTcpPort.setDescription('The TCP port address of this MPLS device for the purpose of establishing the LDP peer to peer session.')
wf_mpls_ldp_sess_cfg_remote_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 8), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRemoteIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRemoteIpAddress.setDescription('The IP address of the remote MPLS device for the purpose of establishing the LDP peer to peer session.')
wf_mpls_ldp_sess_cfg_remote_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(8192)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRemoteTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRemoteTcpPort.setDescription('The TCP port of the remote MPLS device for the purpose of establishing the LDP peer to peer session.')
wf_mpls_ldp_sess_cfg_routes_config_mode = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('auto', 1), ('manual', 2))).clone('auto')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRoutesConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgRoutesConfigMode.setDescription('Indicates whether network routes should be discovered by a routing protocol(auto) or should be Manually configured(manual), see wfMplsLdpCfgRouteTable.')
wf_mpls_ldp_sess_cfg_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 240)).clone(40)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgHoldTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgHoldTime.setDescription('the Hold Time indicates the maximum time in seconds that may elapse between the receipt of successive PDUs from the LSR peer.')
wf_mpls_ldp_sess_cfg_proto = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('ospf', 1), ('rip', 2), ('hybridospf', 3), ('hybridrip', 4))).clone('ospf')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgProto.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgProto.setDescription('The routing protocols used by MPLS.')
wf_mpls_ldp_sess_cfg_aggregation = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgAggregation.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgAggregation.setDescription('Enable/Disable aggregation. Default is disabled.')
wf_mpls_ldp_sess_cfg_debug_level = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('one', 1), ('two', 2), ('three', 3), ('debug', 4))).clone('two')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgDebugLevel.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgDebugLevel.setDescription('Debug Levels - This attribute is used to assign the level of DEBUG message to be logged for each LDP session.')
wf_mpls_ldp_sess_cfg_req_bind_retry_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 240)).clone(40)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgReqBindRetryTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgReqBindRetryTime.setDescription('It indicates the maximum time in seconds that may elapse between two consecutive request bind in case of no reply.')
wf_mpls_ldp_sess_cfg_req_bind_retries = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(1, 240)).clone(240)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgReqBindRetries.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessCfgReqBindRetries.setDescription('It indicates the number of retry times.')
wf_mpls_ldp_sess_actual_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2))
if mibBuilder.loadTexts:
wfMplsLdpSessActualTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualTable.setDescription('MPLS LDP interface actual table - read-only table containing LDP peer status, and actual LDP information.')
wf_mpls_ldp_sess_actual_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1)).setIndexNames((0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpSessActualCircuit'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpSessActualIndex'))
if mibBuilder.loadTexts:
wfMplsLdpSessActualEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualEntry.setDescription('MPLS LDP interface entries.')
wf_mpls_ldp_sess_actual_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualIndex.setDescription('The Session index identifies this particular LDP session on the interface.')
wf_mpls_ldp_sess_actual_circuit = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualCircuit.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualCircuit.setDescription('The circuit number of the circuit to which the session belongs.')
wf_mpls_ldp_sess_actual_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('up', 1), ('down', 2), ('init', 3), ('notpresent', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualState.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualState.setDescription('The current state of the MPLS LDP session')
wf_mpls_ldp_sess_actual_peer_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('initialized', 1), ('opensend', 2), ('openrec', 3), ('operational', 4))).clone('initialized')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualPeerState.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualPeerState.setDescription('The current state of MPLS LDP session with the remote MPLS device')
wf_mpls_ldp_sess_actual_local_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 5), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualLocalIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualLocalIpAddress.setDescription('The actual IP address that LDP used to establish the LDP peer to peer session.')
wf_mpls_ldp_sess_actual_local_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualLocalTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualLocalTcpPort.setDescription('The actual local TCP port address that this LDP used to establish the LDP peer to peer session.')
wf_mpls_ldp_sess_actual_remote_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 7), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRemoteIpAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRemoteIpAddress.setDescription('The actual remote IP address that LDP used to establish the LDP peer to peer session.')
wf_mpls_ldp_sess_actual_remote_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRemoteTcpPort.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRemoteTcpPort.setDescription('The actual TCP port that LDP used to establish the LDP peer to peer session.')
wf_mpls_ldp_sess_actual_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 240))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualHoldTime.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualHoldTime.setDescription('the actual Hold Time that LDP used to indicate the maximum time in seconds that may elapse between the receipt of successive PDUs from the LSR peer.')
wf_mpls_ldp_sess_actual_routes_config_mode = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('auto', 1), ('manual', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRoutesConfigMode.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualRoutesConfigMode.setDescription('Indicates whether network routes are discovered by a routing protocol(auto) or are Manually configured(manual), see wfMplsLdpCfgRouteTable.')
wf_mpls_ldp_sess_actual_tcp_connection_role = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('passive', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualTCPConnectionRole.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualTCPConnectionRole.setDescription('Indicates the TCP connection roles between the peers.')
wf_mpls_ldp_sess_actual_slot = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 2, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpSessActualSlot.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpSessActualSlot.setDescription('Indicates the slot on which the LDP session is running.')
wf_mpls_ldp_cfg_route_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3))
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteTable.setDescription('MPLS LDP configured route table -')
wf_mpls_ldp_cfg_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1)).setIndexNames((0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpCfgRouteCct'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpCfgRouteSessId'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpCfgRouteIndex'))
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteEntry.setDescription('MPLS LDP configured route entries.')
wf_mpls_ldp_cfg_route_create = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteCreate.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteCreate.setDescription('Create/Delete parameter. Default is created. Users modify this object in order to create/delete MPLS LSP')
wf_mpls_ldp_cfg_route_enable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteEnable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteEnable.setDescription('Enable/Disable parameter. Default is enabled.')
wf_mpls_ldp_cfg_route_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteCct.setDescription('The circuit munber to which the route associates with.')
wf_mpls_ldp_cfg_route_sess_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteSessId.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteSessId.setDescription('The session identification munber to which the route associates with.')
wf_mpls_ldp_cfg_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteIndex.setDescription('The index number of this route.')
wf_mpls_ldp_cfg_route_destination = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 6), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteDestination.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteDestination.setDescription('The netwrok prefix of this route.')
wf_mpls_ldp_cfg_route_mask = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 7), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteMask.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteMask.setDescription('The mask of this route.')
wf_mpls_ldp_cfg_route_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2))).clone('down')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteState.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpCfgRouteState.setDescription('The current state of the MPLS LDP session.')
wf_mpls_ldp_lib_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4))
if mibBuilder.loadTexts:
wfMplsLdpLibTable.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibTable.setDescription('MPLS LDP Label Information Base table which contains LSPs that have been set up.')
wf_mpls_ldp_lib_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1)).setIndexNames((0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpLibCct'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpLibSessId'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpLibDest'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpLibMid'), (0, 'Wellfleet-MPLS-LDP-MIB', 'wfMplsLdpLibIndex'))
if mibBuilder.loadTexts:
wfMplsLdpLibEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibEntry.setDescription('MPLS LDP Label Information Base.')
wf_mpls_ldp_lib_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibCct.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibCct.setDescription('The circuit munber to which the route associates with.')
wf_mpls_ldp_lib_sess_id = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1023))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibSessId.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibSessId.setDescription('The session identification munber to which the LIB entry associates with.')
wf_mpls_ldp_lib_dest = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibDest.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibDest.setDescription('The destnation network prefix.')
wf_mpls_ldp_lib_mid = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibMid.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibMid.setDescription('The merge id.')
wf_mpls_ldp_lib_label = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibLabel.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibLabel.setDescription('The label of the lsp that this LIB entry identifies.')
wf_mpls_ldp_lib_encaps = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('llcsnap', 1), ('null', 2))).clone('llcsnap')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibEncaps.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibEncaps.setDescription('The lsp encapsulation type.')
wf_mpls_ldp_lib_direction = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inbound', 1), ('outbound', 2), ('bidirectional', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibDirection.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibDirection.setDescription('MPLS VC direction.')
wf_mpls_ldp_lib_slot = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibSlot.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibSlot.setDescription('Slot on which this LSP got created')
wf_mpls_ldp_lib_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 9, 15, 4, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfMplsLdpLibIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
wfMplsLdpLibIndex.setDescription('Index part of instance id')
mibBuilder.exportSymbols('Wellfleet-MPLS-LDP-MIB', wfMplsLdpSessActualTable=wfMplsLdpSessActualTable, wfMplsLdpSessActualLocalTcpPort=wfMplsLdpSessActualLocalTcpPort, wfMplsLdpSessActualLocalIpAddress=wfMplsLdpSessActualLocalIpAddress, wfMplsLdpSessCfgCircuit=wfMplsLdpSessCfgCircuit, wfMplsLdpSessCfgDebugLevel=wfMplsLdpSessCfgDebugLevel, wfMplsLdpSessActualTCPConnectionRole=wfMplsLdpSessActualTCPConnectionRole, wfMplsLdpCfgRouteIndex=wfMplsLdpCfgRouteIndex, wfMplsLdpSessActualCircuit=wfMplsLdpSessActualCircuit, wfMplsLdpLibTable=wfMplsLdpLibTable, wfMplsLdpLibMid=wfMplsLdpLibMid, wfMplsLdpLibCct=wfMplsLdpLibCct, wfMplsLdpSessActualHoldTime=wfMplsLdpSessActualHoldTime, wfMplsLdpSessActualRoutesConfigMode=wfMplsLdpSessActualRoutesConfigMode, wfMplsLdpLibEncaps=wfMplsLdpLibEncaps, wfMplsLdpSessCfgEnable=wfMplsLdpSessCfgEnable, wfMplsLdpCfgRouteCct=wfMplsLdpCfgRouteCct, wfMplsLdpSessActualSlot=wfMplsLdpSessActualSlot, wfMplsLdpSessCfgSlot=wfMplsLdpSessCfgSlot, wfMplsLdpSessCfgRemoteIpAddress=wfMplsLdpSessCfgRemoteIpAddress, wfMplsLdpSessCfgHoldTime=wfMplsLdpSessCfgHoldTime, wfMplsLdpCfgRouteState=wfMplsLdpCfgRouteState, wfMplsLdpSessCfgCreate=wfMplsLdpSessCfgCreate, wfMplsLdpLibLabel=wfMplsLdpLibLabel, wfMplsLdpCfgRouteCreate=wfMplsLdpCfgRouteCreate, wfMplsLdpSessCfgLocalTcpPort=wfMplsLdpSessCfgLocalTcpPort, wfMplsLdpSessCfgAggregation=wfMplsLdpSessCfgAggregation, wfMplsLdpSessActualRemoteTcpPort=wfMplsLdpSessActualRemoteTcpPort, wfMplsLdpSessCfgLocalIpAddress=wfMplsLdpSessCfgLocalIpAddress, wfMplsLdpCfgRouteDestination=wfMplsLdpCfgRouteDestination, wfMplsLdpLibSlot=wfMplsLdpLibSlot, wfMplsLdpSessCfgIndex=wfMplsLdpSessCfgIndex, wfMplsLdpCfgRouteSessId=wfMplsLdpCfgRouteSessId, wfMplsLdpSessCfgTable=wfMplsLdpSessCfgTable, wfMplsLdpSessActualIndex=wfMplsLdpSessActualIndex, wfMplsLdpCfgRouteMask=wfMplsLdpCfgRouteMask, wfMplsLdpLibSessId=wfMplsLdpLibSessId, wfMplsLdpLibDest=wfMplsLdpLibDest, wfMplsLdpCfgRouteTable=wfMplsLdpCfgRouteTable, wfMplsLdpCfgRouteEntry=wfMplsLdpCfgRouteEntry, wfMplsLdpLibDirection=wfMplsLdpLibDirection, wfMplsLdpSessCfgRemoteTcpPort=wfMplsLdpSessCfgRemoteTcpPort, wfMplsLdpSessCfgProto=wfMplsLdpSessCfgProto, wfMplsLdpSessActualRemoteIpAddress=wfMplsLdpSessActualRemoteIpAddress, wfMplsLdpLibIndex=wfMplsLdpLibIndex, wfMplsLdpSessCfgRoutesConfigMode=wfMplsLdpSessCfgRoutesConfigMode, wfMplsLdpSessCfgReqBindRetries=wfMplsLdpSessCfgReqBindRetries, wfMplsLdpCfgRouteEnable=wfMplsLdpCfgRouteEnable, wfMplsLdpSessCfgReqBindRetryTime=wfMplsLdpSessCfgReqBindRetryTime, wfMplsLdpSessCfgEntry=wfMplsLdpSessCfgEntry, wfMplsLdpSessActualEntry=wfMplsLdpSessActualEntry, wfMplsLdpSessActualPeerState=wfMplsLdpSessActualPeerState, wfMplsLdpSessActualState=wfMplsLdpSessActualState, wfMplsLdpLibEntry=wfMplsLdpLibEntry) |
"""
BSTree implementation
"""
__all__ = [
'is_node',
'new_bstree'
]
class Node:
__slots__ = (
'_key',
'_value',
'_left_child',
'_right_child'
)
def __init__(self, key, value, left_child=None, right_child=None):
self._key = key
self._value = value
self._left_child = left_child
self._right_child = right_child
def __eq__(self, other):
return self.key == other.key
def __lt__(self, other):
return self.key < other.key
def __gt__(self, other):
return self.key > other.key
def __le__(self, other):
return self.key <= other.key
def __ge__(self, other):
return self.key >= other.key
@property
def key(self):
return self._key
@property
def value(self):
return self._value
@value.setter
def value(self, new_value):
self._value = new_value
@property
def left_child(self):
return self._left_child
@left_child.setter
def left_child(self, node):
if node is not None and not is_node(node):
raise TypeError('Value is not node')
self._left_child = node
@property
def right_child(self):
return self._right_child
@right_child.setter
def right_child(self, node):
if node is not None and not is_node(node):
raise TypeError('Value is not node')
self._right_child = node
class BSTree:
def __init__(self):
self._root = None
self._nodes_count = 0
def get(self, key):
current_root = self.root
while current_root is not None:
if key == current_root.key:
return current_root
elif key < current_root.key:
current_root = current_root.left_child
else:
current_root = current_root.right_child
return None
def add(self, key, value):
if self.root is None:
self.root = _new_node(key, value)
self._nodes_count += 1
return None
current_root = self.root
while True:
if key == current_root.key:
current_root.value = value
return None
elif key < current_root.key:
if current_root.left_child is None:
current_root.left_child = _new_node(key, value)
self._nodes_count += 1
return None
current_root = current_root.left_child
else:
if current_root.right_child is None:
current_root.right_child = _new_node(key, value)
self._nodes_count += 1
return None
current_root = current_root.right_child
def remove(self, key):
parent = None
current_root = self.root
while current_root is not None:
if key == current_root.key:
break
parent = current_root
if key < current_root.key:
current_root = current_root.left_child
else:
current_root = current_root.right_child
if current_root is None:
return None
if current_root.right_child is None:
self._swap_node(parent, current_root, current_root.left_child)
elif current_root.left_child is None:
self._swap_node(parent, current_root, current_root.right_child)
else:
min_node = self._find_min_node(current_root)
self._swap_node(parent, current_root, min_node)
self._nodes_count -= 1
def _swap_node(self, parent, current_child, new_child):
if parent is None:
self.root = new_child
elif current_child is parent.left_child:
parent.left_child = new_child
else:
parent.right_child = new_child
@staticmethod
def _find_min_node(node):
if node is None:
return None
while True:
if node.left_child is None:
return node
else:
node = node.left_child
@staticmethod
def _find_max_node(node):
if node is None:
return None
while True:
if node.right_child is None:
return node
else:
node = node.right_child
def find_min(self):
node = self._find_min_node(self.root)
return node.key, node.value
def find_max(self):
node = self._find_max_node(self.root)
return node.key, node.value
@property
def root(self):
return self._root
@root.setter
def root(self, node):
if not is_node(node):
raise TypeError('Value is not node')
self._root = node
def __len__(self):
return self._nodes_count
def __contains__(self, item):
if is_node(item):
key = item.key
else:
key = item
return bool(self.get(key))
def __bool__(self):
return bool(self.root)
def __getitem__(self, key):
return self.get(key).value
def __setitem__(self, key, value):
node = self.get(key)
node.value = value
def _new_node(key, value, left_child=None, right_child=None):
"""
Creates and returns new node of BSTree
"""
return Node(key, value, left_child, right_child)
def is_node(obj):
"""
Returns True if object is node of BSTree
"""
return isinstance(obj, Node)
def new_bstree():
"""
Creates and returns new BSTree
"""
return BSTree()
| """
BSTree implementation
"""
__all__ = ['is_node', 'new_bstree']
class Node:
__slots__ = ('_key', '_value', '_left_child', '_right_child')
def __init__(self, key, value, left_child=None, right_child=None):
self._key = key
self._value = value
self._left_child = left_child
self._right_child = right_child
def __eq__(self, other):
return self.key == other.key
def __lt__(self, other):
return self.key < other.key
def __gt__(self, other):
return self.key > other.key
def __le__(self, other):
return self.key <= other.key
def __ge__(self, other):
return self.key >= other.key
@property
def key(self):
return self._key
@property
def value(self):
return self._value
@value.setter
def value(self, new_value):
self._value = new_value
@property
def left_child(self):
return self._left_child
@left_child.setter
def left_child(self, node):
if node is not None and (not is_node(node)):
raise type_error('Value is not node')
self._left_child = node
@property
def right_child(self):
return self._right_child
@right_child.setter
def right_child(self, node):
if node is not None and (not is_node(node)):
raise type_error('Value is not node')
self._right_child = node
class Bstree:
def __init__(self):
self._root = None
self._nodes_count = 0
def get(self, key):
current_root = self.root
while current_root is not None:
if key == current_root.key:
return current_root
elif key < current_root.key:
current_root = current_root.left_child
else:
current_root = current_root.right_child
return None
def add(self, key, value):
if self.root is None:
self.root = _new_node(key, value)
self._nodes_count += 1
return None
current_root = self.root
while True:
if key == current_root.key:
current_root.value = value
return None
elif key < current_root.key:
if current_root.left_child is None:
current_root.left_child = _new_node(key, value)
self._nodes_count += 1
return None
current_root = current_root.left_child
else:
if current_root.right_child is None:
current_root.right_child = _new_node(key, value)
self._nodes_count += 1
return None
current_root = current_root.right_child
def remove(self, key):
parent = None
current_root = self.root
while current_root is not None:
if key == current_root.key:
break
parent = current_root
if key < current_root.key:
current_root = current_root.left_child
else:
current_root = current_root.right_child
if current_root is None:
return None
if current_root.right_child is None:
self._swap_node(parent, current_root, current_root.left_child)
elif current_root.left_child is None:
self._swap_node(parent, current_root, current_root.right_child)
else:
min_node = self._find_min_node(current_root)
self._swap_node(parent, current_root, min_node)
self._nodes_count -= 1
def _swap_node(self, parent, current_child, new_child):
if parent is None:
self.root = new_child
elif current_child is parent.left_child:
parent.left_child = new_child
else:
parent.right_child = new_child
@staticmethod
def _find_min_node(node):
if node is None:
return None
while True:
if node.left_child is None:
return node
else:
node = node.left_child
@staticmethod
def _find_max_node(node):
if node is None:
return None
while True:
if node.right_child is None:
return node
else:
node = node.right_child
def find_min(self):
node = self._find_min_node(self.root)
return (node.key, node.value)
def find_max(self):
node = self._find_max_node(self.root)
return (node.key, node.value)
@property
def root(self):
return self._root
@root.setter
def root(self, node):
if not is_node(node):
raise type_error('Value is not node')
self._root = node
def __len__(self):
return self._nodes_count
def __contains__(self, item):
if is_node(item):
key = item.key
else:
key = item
return bool(self.get(key))
def __bool__(self):
return bool(self.root)
def __getitem__(self, key):
return self.get(key).value
def __setitem__(self, key, value):
node = self.get(key)
node.value = value
def _new_node(key, value, left_child=None, right_child=None):
"""
Creates and returns new node of BSTree
"""
return node(key, value, left_child, right_child)
def is_node(obj):
"""
Returns True if object is node of BSTree
"""
return isinstance(obj, Node)
def new_bstree():
"""
Creates and returns new BSTree
"""
return bs_tree() |
#
# PySNMP MIB module CPQIDE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CPQIDE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:11:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
compaq, cpqHoTrapFlags = mibBuilder.importSymbols("CPQHOST-MIB", "compaq", "cpqHoTrapFlags")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
sysName, = mibBuilder.importSymbols("SNMPv2-MIB", "sysName")
NotificationType, Counter64, Gauge32, NotificationType, IpAddress, iso, Bits, Integer32, ObjectIdentity, Unsigned32, ModuleIdentity, MibIdentifier, enterprises, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter64", "Gauge32", "NotificationType", "IpAddress", "iso", "Bits", "Integer32", "ObjectIdentity", "Unsigned32", "ModuleIdentity", "MibIdentifier", "enterprises", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
cpqIde = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14))
cpqIdeMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 1))
cpqIdeComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2))
cpqIdeInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 1))
cpqIdeIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 2))
cpqIdeController = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 3))
cpqIdeAtaDisk = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 4))
cpqIdeAtapiDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 5))
cpqIdeLogicalDrive = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 6))
cpqIdeOsCommon = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4))
cpqIdeMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeMibRevMajor.setStatus('mandatory')
cpqIdeMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeMibRevMinor.setStatus('mandatory')
cpqIdeMibCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeMibCondition.setStatus('mandatory')
cpqIdeOsCommonPollFreq = MibScalar((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpqIdeOsCommonPollFreq.setStatus('mandatory')
cpqIdeOsCommonModuleTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2), )
if mibBuilder.loadTexts: cpqIdeOsCommonModuleTable.setStatus('deprecated')
cpqIdeOsCommonModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeOsCommonModuleIndex"))
if mibBuilder.loadTexts: cpqIdeOsCommonModuleEntry.setStatus('deprecated')
cpqIdeOsCommonModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeOsCommonModuleIndex.setStatus('deprecated')
cpqIdeOsCommonModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeOsCommonModuleName.setStatus('deprecated')
cpqIdeOsCommonModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 5))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeOsCommonModuleVersion.setStatus('deprecated')
cpqIdeOsCommonModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7, 7)).setFixedLength(7)).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeOsCommonModuleDate.setStatus('deprecated')
cpqIdeOsCommonModulePurpose = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeOsCommonModulePurpose.setStatus('deprecated')
cpqIdeIdentTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1), )
if mibBuilder.loadTexts: cpqIdeIdentTable.setStatus('mandatory')
cpqIdeIdentEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeIdentIndex"))
if mibBuilder.loadTexts: cpqIdeIdentEntry.setStatus('mandatory')
cpqIdeIdentIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentIndex.setStatus('mandatory')
cpqIdeIdentModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 41))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentModel.setStatus('mandatory')
cpqIdeIdentSerNum = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 21))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentSerNum.setStatus('mandatory')
cpqIdeIdentFWVers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentFWVers.setStatus('mandatory')
cpqIdeIdentCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentCondition.setStatus('deprecated')
cpqIdeIdentErrorNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentErrorNumber.setStatus('mandatory')
cpqIdeIdentType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("other", 1), ("disk", 2), ("tape", 3), ("printer", 4), ("processor", 5), ("wormDrive", 6), ("cd-rom", 7), ("scanner", 8), ("optical", 9), ("jukeBox", 10), ("commDev", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentType.setStatus('mandatory')
cpqIdeIdentTypeExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("pdcd", 2), ("removableDisk", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentTypeExtended.setStatus('mandatory')
cpqIdeIdentCondition2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentCondition2.setStatus('mandatory')
cpqIdeIdentStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("preFailureDegraded", 3), ("ultraAtaDegraded", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentStatus.setStatus('mandatory')
cpqIdeIdentUltraAtaAvailability = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("noNotSupportedByDeviceAndController", 2), ("noNotSupportedByDevice", 3), ("noNotSupportedByController", 4), ("noDisabledInSetup", 5), ("yesEnabledInSetup", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeIdentUltraAtaAvailability.setStatus('mandatory')
cpqIdeControllerTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1), )
if mibBuilder.loadTexts: cpqIdeControllerTable.setStatus('mandatory')
cpqIdeControllerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeControllerIndex"))
if mibBuilder.loadTexts: cpqIdeControllerEntry.setStatus('mandatory')
cpqIdeControllerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerIndex.setStatus('mandatory')
cpqIdeControllerOverallCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerOverallCondition.setStatus('mandatory')
cpqIdeControllerModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerModel.setStatus('mandatory')
cpqIdeControllerFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerFwRev.setStatus('mandatory')
cpqIdeControllerSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerSlot.setStatus('mandatory')
cpqIdeControllerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerStatus.setStatus('mandatory')
cpqIdeControllerCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerCondition.setStatus('mandatory')
cpqIdeControllerSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeControllerSerialNumber.setStatus('mandatory')
cpqIdeAtaDiskTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1), )
if mibBuilder.loadTexts: cpqIdeAtaDiskTable.setStatus('mandatory')
cpqIdeAtaDiskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeAtaDiskControllerIndex"), (0, "CPQIDE-MIB", "cpqIdeAtaDiskIndex"))
if mibBuilder.loadTexts: cpqIdeAtaDiskEntry.setStatus('mandatory')
cpqIdeAtaDiskControllerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskControllerIndex.setStatus('mandatory')
cpqIdeAtaDiskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskIndex.setStatus('mandatory')
cpqIdeAtaDiskModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskModel.setStatus('mandatory')
cpqIdeAtaDiskFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskFwRev.setStatus('mandatory')
cpqIdeAtaDiskSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskSerialNumber.setStatus('mandatory')
cpqIdeAtaDiskStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("smartError", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskStatus.setStatus('mandatory')
cpqIdeAtaDiskCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskCondition.setStatus('mandatory')
cpqIdeAtaDiskCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskCapacity.setStatus('mandatory')
cpqIdeAtaDiskSmartEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskSmartEnabled.setStatus('mandatory')
cpqIdeAtaDiskTransferMode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=NamedValues(("other", 1), ("pioMode0", 2), ("pioMode1", 3), ("pioMode2", 4), ("pioMode3", 5), ("pioMode4", 6), ("dmaMode0", 7), ("dmaMode1", 8), ("dmaMode2", 9), ("ultraDmaMode0", 10), ("ultraDmaMode1", 11), ("ultraDmaMode2", 12), ("ultraDmaMode3", 13), ("ultraDmaMode4", 14), ("ultraDmaMode5", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskTransferMode.setStatus('mandatory')
cpqIdeAtaDiskChannel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("channel0", 2), ("channel1", 3), ("serial", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskChannel.setStatus('mandatory')
cpqIdeAtaDiskNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 23, 24, 25, 26, 27, 28))).clone(namedValues=NamedValues(("other", 1), ("device0", 2), ("device1", 3), ("sataDevice0", 4), ("sataDevice1", 5), ("sataDevice2", 6), ("sataDevice3", 7), ("sataDevice4", 8), ("sataDevice5", 9), ("sataDevice6", 10), ("sataDevice7", 11), ("bay1", 21), ("bay2", 22), ("bay3", 23), ("bay4", 24), ("bay5", 25), ("bay6", 26), ("bay7", 27), ("bay8", 28)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskNumber.setStatus('mandatory')
cpqIdeAtaDiskLogicalDriveMember = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskLogicalDriveMember.setStatus('mandatory')
cpqIdeAtaDiskIsSpare = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskIsSpare.setStatus('mandatory')
cpqIdeAtaDiskOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskOsName.setStatus('mandatory')
cpqIdeAtaDiskType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("ata", 2), ("sata", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskType.setStatus('mandatory')
cpqIdeAtaDiskSataVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("sataOne", 2), ("sataTwo", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtaDiskSataVersion.setStatus('mandatory')
cpqIdeAtapiDeviceTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1), )
if mibBuilder.loadTexts: cpqIdeAtapiDeviceTable.setStatus('mandatory')
cpqIdeAtapiDeviceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeAtapiDeviceControllerIndex"), (0, "CPQIDE-MIB", "cpqIdeAtapiDeviceIndex"))
if mibBuilder.loadTexts: cpqIdeAtapiDeviceEntry.setStatus('mandatory')
cpqIdeAtapiDeviceControllerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceControllerIndex.setStatus('mandatory')
cpqIdeAtapiDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceIndex.setStatus('mandatory')
cpqIdeAtapiDeviceModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceModel.setStatus('mandatory')
cpqIdeAtapiDeviceFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceFwRev.setStatus('mandatory')
cpqIdeAtapiDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("other", 1), ("disk", 2), ("tape", 3), ("printer", 4), ("processor", 5), ("wormDrive", 6), ("cd-rom", 7), ("scanner", 8), ("optical", 9), ("jukeBox", 10), ("commDev", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceType.setStatus('mandatory')
cpqIdeAtapiDeviceTypeExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("pdcd", 2), ("removableDisk", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceTypeExtended.setStatus('mandatory')
cpqIdeAtapiDeviceChannel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("channel0", 2), ("channel1", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceChannel.setStatus('mandatory')
cpqIdeAtapiDeviceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("device0", 2), ("device1", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeAtapiDeviceNumber.setStatus('mandatory')
cpqIdeLogicalDriveTable = MibTable((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1), )
if mibBuilder.loadTexts: cpqIdeLogicalDriveTable.setStatus('mandatory')
cpqIdeLogicalDriveEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1), ).setIndexNames((0, "CPQIDE-MIB", "cpqIdeLogicalDriveControllerIndex"), (0, "CPQIDE-MIB", "cpqIdeLogicalDriveIndex"))
if mibBuilder.loadTexts: cpqIdeLogicalDriveEntry.setStatus('mandatory')
cpqIdeLogicalDriveControllerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveControllerIndex.setStatus('mandatory')
cpqIdeLogicalDriveIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveIndex.setStatus('mandatory')
cpqIdeLogicalDriveRaidLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("other", 1), ("raid0", 2), ("raid1", 3), ("raid0plus1", 4), ("raid5", 5), ("raid15", 6), ("volume", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveRaidLevel.setStatus('mandatory')
cpqIdeLogicalDriveCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveCapacity.setStatus('mandatory')
cpqIdeLogicalDriveStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("rebuilding", 4), ("failed", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveStatus.setStatus('mandatory')
cpqIdeLogicalDriveCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveCondition.setStatus('mandatory')
cpqIdeLogicalDriveDiskIds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveDiskIds.setStatus('mandatory')
cpqIdeLogicalDriveStripeSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveStripeSize.setStatus('mandatory')
cpqIdeLogicalDriveSpareIds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveSpareIds.setStatus('mandatory')
cpqIdeLogicalDriveRebuildingDisk = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveRebuildingDisk.setStatus('mandatory')
cpqIdeLogicalDriveOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpqIdeLogicalDriveOsName.setStatus('mandatory')
cpqIdeDriveDegraded = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,14001)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQIDE-MIB", "cpqIdeIdentIndex"))
cpqIdeDriveOk = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,14002)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQIDE-MIB", "cpqIdeIdentIndex"))
cpqIdeDriveUltraAtaDegraded = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,14003)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQIDE-MIB", "cpqIdeIdentIndex"))
cpqIdeAtaDiskStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,14004)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQIDE-MIB", "cpqIdeAtaDiskControllerIndex"), ("CPQIDE-MIB", "cpqIdeAtaDiskIndex"), ("CPQIDE-MIB", "cpqIdeAtaDiskModel"), ("CPQIDE-MIB", "cpqIdeAtaDiskFwRev"), ("CPQIDE-MIB", "cpqIdeAtaDiskSerialNumber"), ("CPQIDE-MIB", "cpqIdeAtaDiskStatus"), ("CPQIDE-MIB", "cpqIdeAtaDiskChannel"), ("CPQIDE-MIB", "cpqIdeAtaDiskNumber"))
cpqIdeLogicalDriveStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,14005)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQIDE-MIB", "cpqIdeControllerModel"), ("CPQIDE-MIB", "cpqIdeControllerSlot"), ("CPQIDE-MIB", "cpqIdeLogicalDriveControllerIndex"), ("CPQIDE-MIB", "cpqIdeLogicalDriveIndex"), ("CPQIDE-MIB", "cpqIdeLogicalDriveStatus"))
mibBuilder.exportSymbols("CPQIDE-MIB", cpqIdeAtapiDevice=cpqIdeAtapiDevice, cpqIdeOsCommon=cpqIdeOsCommon, cpqIdeOsCommonPollFreq=cpqIdeOsCommonPollFreq, cpqIdeAtaDiskTable=cpqIdeAtaDiskTable, cpqIdeAtapiDeviceModel=cpqIdeAtapiDeviceModel, cpqIdeAtaDiskTransferMode=cpqIdeAtaDiskTransferMode, cpqIdeAtapiDeviceIndex=cpqIdeAtapiDeviceIndex, cpqIdeAtaDiskCondition=cpqIdeAtaDiskCondition, cpqIdeAtapiDeviceFwRev=cpqIdeAtapiDeviceFwRev, cpqIdeOsCommonModuleName=cpqIdeOsCommonModuleName, cpqIdeController=cpqIdeController, cpqIdeLogicalDriveRebuildingDisk=cpqIdeLogicalDriveRebuildingDisk, cpqIdeMibRevMajor=cpqIdeMibRevMajor, cpqIdeControllerSerialNumber=cpqIdeControllerSerialNumber, cpqIdeLogicalDriveStatusChange=cpqIdeLogicalDriveStatusChange, cpqIdeOsCommonModuleIndex=cpqIdeOsCommonModuleIndex, cpqIdeIdentIndex=cpqIdeIdentIndex, cpqIdeIdentErrorNumber=cpqIdeIdentErrorNumber, cpqIdeMibCondition=cpqIdeMibCondition, cpqIdeAtaDiskType=cpqIdeAtaDiskType, cpqIdeControllerSlot=cpqIdeControllerSlot, cpqIdeIdentTypeExtended=cpqIdeIdentTypeExtended, cpqIdeControllerCondition=cpqIdeControllerCondition, cpqIdeLogicalDriveTable=cpqIdeLogicalDriveTable, cpqIdeAtaDiskChannel=cpqIdeAtaDiskChannel, cpqIdeIdentType=cpqIdeIdentType, cpqIdeAtaDiskSerialNumber=cpqIdeAtaDiskSerialNumber, cpqIdeLogicalDriveIndex=cpqIdeLogicalDriveIndex, cpqIdeAtaDiskControllerIndex=cpqIdeAtaDiskControllerIndex, cpqIdeAtaDiskFwRev=cpqIdeAtaDiskFwRev, cpqIdeAtaDisk=cpqIdeAtaDisk, cpqIdeLogicalDriveSpareIds=cpqIdeLogicalDriveSpareIds, cpqIdeDriveDegraded=cpqIdeDriveDegraded, cpqIdeControllerFwRev=cpqIdeControllerFwRev, cpqIdeAtaDiskSataVersion=cpqIdeAtaDiskSataVersion, cpqIdeAtaDiskNumber=cpqIdeAtaDiskNumber, cpqIdeControllerStatus=cpqIdeControllerStatus, cpqIdeControllerEntry=cpqIdeControllerEntry, cpqIdeIdentFWVers=cpqIdeIdentFWVers, cpqIdeAtaDiskCapacity=cpqIdeAtaDiskCapacity, cpqIdeOsCommonModuleTable=cpqIdeOsCommonModuleTable, cpqIdeOsCommonModuleDate=cpqIdeOsCommonModuleDate, cpqIdeIdent=cpqIdeIdent, cpqIdeControllerModel=cpqIdeControllerModel, cpqIdeMibRev=cpqIdeMibRev, cpqIdeLogicalDriveEntry=cpqIdeLogicalDriveEntry, cpqIdeAtapiDeviceNumber=cpqIdeAtapiDeviceNumber, cpqIdeIdentEntry=cpqIdeIdentEntry, cpqIdeLogicalDriveDiskIds=cpqIdeLogicalDriveDiskIds, cpqIdeLogicalDriveControllerIndex=cpqIdeLogicalDriveControllerIndex, cpqIdeAtaDiskEntry=cpqIdeAtaDiskEntry, cpqIdeIdentCondition=cpqIdeIdentCondition, cpqIdeAtaDiskLogicalDriveMember=cpqIdeAtaDiskLogicalDriveMember, cpqIdeIdentModel=cpqIdeIdentModel, cpqIdeAtaDiskStatusChange=cpqIdeAtaDiskStatusChange, cpqIdeAtapiDeviceType=cpqIdeAtapiDeviceType, cpqIdeLogicalDriveStatus=cpqIdeLogicalDriveStatus, cpqIdeOsCommonModulePurpose=cpqIdeOsCommonModulePurpose, cpqIdeControllerIndex=cpqIdeControllerIndex, cpqIdeAtapiDeviceEntry=cpqIdeAtapiDeviceEntry, cpqIdeDriveUltraAtaDegraded=cpqIdeDriveUltraAtaDegraded, cpqIdeInterface=cpqIdeInterface, cpqIdeLogicalDriveCondition=cpqIdeLogicalDriveCondition, cpqIdeAtapiDeviceTypeExtended=cpqIdeAtapiDeviceTypeExtended, cpqIdeOsCommonModuleEntry=cpqIdeOsCommonModuleEntry, cpqIdeOsCommonModuleVersion=cpqIdeOsCommonModuleVersion, cpqIdeAtaDiskModel=cpqIdeAtaDiskModel, cpqIdeLogicalDriveRaidLevel=cpqIdeLogicalDriveRaidLevel, cpqIdeLogicalDriveStripeSize=cpqIdeLogicalDriveStripeSize, cpqIdeAtaDiskSmartEnabled=cpqIdeAtaDiskSmartEnabled, cpqIdeControllerOverallCondition=cpqIdeControllerOverallCondition, cpqIdeLogicalDrive=cpqIdeLogicalDrive, cpqIdeAtaDiskIndex=cpqIdeAtaDiskIndex, cpqIdeLogicalDriveCapacity=cpqIdeLogicalDriveCapacity, cpqIdeIdentTable=cpqIdeIdentTable, cpqIdeAtapiDeviceChannel=cpqIdeAtapiDeviceChannel, cpqIdeAtapiDeviceControllerIndex=cpqIdeAtapiDeviceControllerIndex, cpqIdeComponent=cpqIdeComponent, cpqIdeAtaDiskIsSpare=cpqIdeAtaDiskIsSpare, cpqIdeIdentStatus=cpqIdeIdentStatus, cpqIdeDriveOk=cpqIdeDriveOk, cpqIdeAtapiDeviceTable=cpqIdeAtapiDeviceTable, cpqIdeLogicalDriveOsName=cpqIdeLogicalDriveOsName, cpqIdeIdentSerNum=cpqIdeIdentSerNum, cpqIdeAtaDiskStatus=cpqIdeAtaDiskStatus, cpqIde=cpqIde, cpqIdeIdentCondition2=cpqIdeIdentCondition2, cpqIdeAtaDiskOsName=cpqIdeAtaDiskOsName, cpqIdeIdentUltraAtaAvailability=cpqIdeIdentUltraAtaAvailability, cpqIdeControllerTable=cpqIdeControllerTable, cpqIdeMibRevMinor=cpqIdeMibRevMinor)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(compaq, cpq_ho_trap_flags) = mibBuilder.importSymbols('CPQHOST-MIB', 'compaq', 'cpqHoTrapFlags')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(sys_name,) = mibBuilder.importSymbols('SNMPv2-MIB', 'sysName')
(notification_type, counter64, gauge32, notification_type, ip_address, iso, bits, integer32, object_identity, unsigned32, module_identity, mib_identifier, enterprises, time_ticks, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Counter64', 'Gauge32', 'NotificationType', 'IpAddress', 'iso', 'Bits', 'Integer32', 'ObjectIdentity', 'Unsigned32', 'ModuleIdentity', 'MibIdentifier', 'enterprises', 'TimeTicks', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
cpq_ide = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14))
cpq_ide_mib_rev = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 1))
cpq_ide_component = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2))
cpq_ide_interface = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 1))
cpq_ide_ident = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 2))
cpq_ide_controller = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 3))
cpq_ide_ata_disk = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 4))
cpq_ide_atapi_device = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 5))
cpq_ide_logical_drive = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 6))
cpq_ide_os_common = mib_identifier((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4))
cpq_ide_mib_rev_major = mib_scalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeMibRevMajor.setStatus('mandatory')
cpq_ide_mib_rev_minor = mib_scalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeMibRevMinor.setStatus('mandatory')
cpq_ide_mib_condition = mib_scalar((1, 3, 6, 1, 4, 1, 232, 14, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeMibCondition.setStatus('mandatory')
cpq_ide_os_common_poll_freq = mib_scalar((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cpqIdeOsCommonPollFreq.setStatus('mandatory')
cpq_ide_os_common_module_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2))
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleTable.setStatus('deprecated')
cpq_ide_os_common_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeOsCommonModuleIndex'))
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleEntry.setStatus('deprecated')
cpq_ide_os_common_module_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleIndex.setStatus('deprecated')
cpq_ide_os_common_module_name = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleName.setStatus('deprecated')
cpq_ide_os_common_module_version = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 5))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleVersion.setStatus('deprecated')
cpq_ide_os_common_module_date = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(7, 7)).setFixedLength(7)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeOsCommonModuleDate.setStatus('deprecated')
cpq_ide_os_common_module_purpose = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 1, 4, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeOsCommonModulePurpose.setStatus('deprecated')
cpq_ide_ident_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1))
if mibBuilder.loadTexts:
cpqIdeIdentTable.setStatus('mandatory')
cpq_ide_ident_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeIdentIndex'))
if mibBuilder.loadTexts:
cpqIdeIdentEntry.setStatus('mandatory')
cpq_ide_ident_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentIndex.setStatus('mandatory')
cpq_ide_ident_model = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 41))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentModel.setStatus('mandatory')
cpq_ide_ident_ser_num = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 21))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentSerNum.setStatus('mandatory')
cpq_ide_ident_fw_vers = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentFWVers.setStatus('mandatory')
cpq_ide_ident_condition = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentCondition.setStatus('deprecated')
cpq_ide_ident_error_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentErrorNumber.setStatus('mandatory')
cpq_ide_ident_type = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('other', 1), ('disk', 2), ('tape', 3), ('printer', 4), ('processor', 5), ('wormDrive', 6), ('cd-rom', 7), ('scanner', 8), ('optical', 9), ('jukeBox', 10), ('commDev', 11)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentType.setStatus('mandatory')
cpq_ide_ident_type_extended = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('pdcd', 2), ('removableDisk', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentTypeExtended.setStatus('mandatory')
cpq_ide_ident_condition2 = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentCondition2.setStatus('mandatory')
cpq_ide_ident_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('preFailureDegraded', 3), ('ultraAtaDegraded', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentStatus.setStatus('mandatory')
cpq_ide_ident_ultra_ata_availability = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 2, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('noNotSupportedByDeviceAndController', 2), ('noNotSupportedByDevice', 3), ('noNotSupportedByController', 4), ('noDisabledInSetup', 5), ('yesEnabledInSetup', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeIdentUltraAtaAvailability.setStatus('mandatory')
cpq_ide_controller_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1))
if mibBuilder.loadTexts:
cpqIdeControllerTable.setStatus('mandatory')
cpq_ide_controller_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeControllerIndex'))
if mibBuilder.loadTexts:
cpqIdeControllerEntry.setStatus('mandatory')
cpq_ide_controller_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerIndex.setStatus('mandatory')
cpq_ide_controller_overall_condition = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerOverallCondition.setStatus('mandatory')
cpq_ide_controller_model = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerModel.setStatus('mandatory')
cpq_ide_controller_fw_rev = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerFwRev.setStatus('mandatory')
cpq_ide_controller_slot = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerSlot.setStatus('mandatory')
cpq_ide_controller_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('failed', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerStatus.setStatus('mandatory')
cpq_ide_controller_condition = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerCondition.setStatus('mandatory')
cpq_ide_controller_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 3, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeControllerSerialNumber.setStatus('mandatory')
cpq_ide_ata_disk_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1))
if mibBuilder.loadTexts:
cpqIdeAtaDiskTable.setStatus('mandatory')
cpq_ide_ata_disk_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeAtaDiskControllerIndex'), (0, 'CPQIDE-MIB', 'cpqIdeAtaDiskIndex'))
if mibBuilder.loadTexts:
cpqIdeAtaDiskEntry.setStatus('mandatory')
cpq_ide_ata_disk_controller_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskControllerIndex.setStatus('mandatory')
cpq_ide_ata_disk_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskIndex.setStatus('mandatory')
cpq_ide_ata_disk_model = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskModel.setStatus('mandatory')
cpq_ide_ata_disk_fw_rev = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskFwRev.setStatus('mandatory')
cpq_ide_ata_disk_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskSerialNumber.setStatus('mandatory')
cpq_ide_ata_disk_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('smartError', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskStatus.setStatus('mandatory')
cpq_ide_ata_disk_condition = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskCondition.setStatus('mandatory')
cpq_ide_ata_disk_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskCapacity.setStatus('mandatory')
cpq_ide_ata_disk_smart_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('true', 2), ('false', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskSmartEnabled.setStatus('mandatory')
cpq_ide_ata_disk_transfer_mode = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=named_values(('other', 1), ('pioMode0', 2), ('pioMode1', 3), ('pioMode2', 4), ('pioMode3', 5), ('pioMode4', 6), ('dmaMode0', 7), ('dmaMode1', 8), ('dmaMode2', 9), ('ultraDmaMode0', 10), ('ultraDmaMode1', 11), ('ultraDmaMode2', 12), ('ultraDmaMode3', 13), ('ultraDmaMode4', 14), ('ultraDmaMode5', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskTransferMode.setStatus('mandatory')
cpq_ide_ata_disk_channel = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('channel0', 2), ('channel1', 3), ('serial', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskChannel.setStatus('mandatory')
cpq_ide_ata_disk_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 23, 24, 25, 26, 27, 28))).clone(namedValues=named_values(('other', 1), ('device0', 2), ('device1', 3), ('sataDevice0', 4), ('sataDevice1', 5), ('sataDevice2', 6), ('sataDevice3', 7), ('sataDevice4', 8), ('sataDevice5', 9), ('sataDevice6', 10), ('sataDevice7', 11), ('bay1', 21), ('bay2', 22), ('bay3', 23), ('bay4', 24), ('bay5', 25), ('bay6', 26), ('bay7', 27), ('bay8', 28)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskNumber.setStatus('mandatory')
cpq_ide_ata_disk_logical_drive_member = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('true', 2), ('false', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskLogicalDriveMember.setStatus('mandatory')
cpq_ide_ata_disk_is_spare = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('true', 2), ('false', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskIsSpare.setStatus('mandatory')
cpq_ide_ata_disk_os_name = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 15), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskOsName.setStatus('mandatory')
cpq_ide_ata_disk_type = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('ata', 2), ('sata', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskType.setStatus('mandatory')
cpq_ide_ata_disk_sata_version = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 4, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('sataOne', 2), ('sataTwo', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtaDiskSataVersion.setStatus('mandatory')
cpq_ide_atapi_device_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1))
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceTable.setStatus('mandatory')
cpq_ide_atapi_device_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeAtapiDeviceControllerIndex'), (0, 'CPQIDE-MIB', 'cpqIdeAtapiDeviceIndex'))
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceEntry.setStatus('mandatory')
cpq_ide_atapi_device_controller_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceControllerIndex.setStatus('mandatory')
cpq_ide_atapi_device_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceIndex.setStatus('mandatory')
cpq_ide_atapi_device_model = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceModel.setStatus('mandatory')
cpq_ide_atapi_device_fw_rev = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceFwRev.setStatus('mandatory')
cpq_ide_atapi_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('other', 1), ('disk', 2), ('tape', 3), ('printer', 4), ('processor', 5), ('wormDrive', 6), ('cd-rom', 7), ('scanner', 8), ('optical', 9), ('jukeBox', 10), ('commDev', 11)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceType.setStatus('mandatory')
cpq_ide_atapi_device_type_extended = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('pdcd', 2), ('removableDisk', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceTypeExtended.setStatus('mandatory')
cpq_ide_atapi_device_channel = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('channel0', 2), ('channel1', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceChannel.setStatus('mandatory')
cpq_ide_atapi_device_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 5, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('device0', 2), ('device1', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeAtapiDeviceNumber.setStatus('mandatory')
cpq_ide_logical_drive_table = mib_table((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1))
if mibBuilder.loadTexts:
cpqIdeLogicalDriveTable.setStatus('mandatory')
cpq_ide_logical_drive_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1)).setIndexNames((0, 'CPQIDE-MIB', 'cpqIdeLogicalDriveControllerIndex'), (0, 'CPQIDE-MIB', 'cpqIdeLogicalDriveIndex'))
if mibBuilder.loadTexts:
cpqIdeLogicalDriveEntry.setStatus('mandatory')
cpq_ide_logical_drive_controller_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveControllerIndex.setStatus('mandatory')
cpq_ide_logical_drive_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveIndex.setStatus('mandatory')
cpq_ide_logical_drive_raid_level = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('other', 1), ('raid0', 2), ('raid1', 3), ('raid0plus1', 4), ('raid5', 5), ('raid15', 6), ('volume', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveRaidLevel.setStatus('mandatory')
cpq_ide_logical_drive_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveCapacity.setStatus('mandatory')
cpq_ide_logical_drive_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('rebuilding', 4), ('failed', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveStatus.setStatus('mandatory')
cpq_ide_logical_drive_condition = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveCondition.setStatus('mandatory')
cpq_ide_logical_drive_disk_ids = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveDiskIds.setStatus('mandatory')
cpq_ide_logical_drive_stripe_size = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveStripeSize.setStatus('mandatory')
cpq_ide_logical_drive_spare_ids = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveSpareIds.setStatus('mandatory')
cpq_ide_logical_drive_rebuilding_disk = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveRebuildingDisk.setStatus('mandatory')
cpq_ide_logical_drive_os_name = mib_table_column((1, 3, 6, 1, 4, 1, 232, 14, 2, 6, 1, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cpqIdeLogicalDriveOsName.setStatus('mandatory')
cpq_ide_drive_degraded = notification_type((1, 3, 6, 1, 4, 1, 232) + (0, 14001)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQHOST-MIB', 'cpqHoTrapFlags'), ('CPQIDE-MIB', 'cpqIdeIdentIndex'))
cpq_ide_drive_ok = notification_type((1, 3, 6, 1, 4, 1, 232) + (0, 14002)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQHOST-MIB', 'cpqHoTrapFlags'), ('CPQIDE-MIB', 'cpqIdeIdentIndex'))
cpq_ide_drive_ultra_ata_degraded = notification_type((1, 3, 6, 1, 4, 1, 232) + (0, 14003)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQHOST-MIB', 'cpqHoTrapFlags'), ('CPQIDE-MIB', 'cpqIdeIdentIndex'))
cpq_ide_ata_disk_status_change = notification_type((1, 3, 6, 1, 4, 1, 232) + (0, 14004)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQHOST-MIB', 'cpqHoTrapFlags'), ('CPQIDE-MIB', 'cpqIdeAtaDiskControllerIndex'), ('CPQIDE-MIB', 'cpqIdeAtaDiskIndex'), ('CPQIDE-MIB', 'cpqIdeAtaDiskModel'), ('CPQIDE-MIB', 'cpqIdeAtaDiskFwRev'), ('CPQIDE-MIB', 'cpqIdeAtaDiskSerialNumber'), ('CPQIDE-MIB', 'cpqIdeAtaDiskStatus'), ('CPQIDE-MIB', 'cpqIdeAtaDiskChannel'), ('CPQIDE-MIB', 'cpqIdeAtaDiskNumber'))
cpq_ide_logical_drive_status_change = notification_type((1, 3, 6, 1, 4, 1, 232) + (0, 14005)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQHOST-MIB', 'cpqHoTrapFlags'), ('CPQIDE-MIB', 'cpqIdeControllerModel'), ('CPQIDE-MIB', 'cpqIdeControllerSlot'), ('CPQIDE-MIB', 'cpqIdeLogicalDriveControllerIndex'), ('CPQIDE-MIB', 'cpqIdeLogicalDriveIndex'), ('CPQIDE-MIB', 'cpqIdeLogicalDriveStatus'))
mibBuilder.exportSymbols('CPQIDE-MIB', cpqIdeAtapiDevice=cpqIdeAtapiDevice, cpqIdeOsCommon=cpqIdeOsCommon, cpqIdeOsCommonPollFreq=cpqIdeOsCommonPollFreq, cpqIdeAtaDiskTable=cpqIdeAtaDiskTable, cpqIdeAtapiDeviceModel=cpqIdeAtapiDeviceModel, cpqIdeAtaDiskTransferMode=cpqIdeAtaDiskTransferMode, cpqIdeAtapiDeviceIndex=cpqIdeAtapiDeviceIndex, cpqIdeAtaDiskCondition=cpqIdeAtaDiskCondition, cpqIdeAtapiDeviceFwRev=cpqIdeAtapiDeviceFwRev, cpqIdeOsCommonModuleName=cpqIdeOsCommonModuleName, cpqIdeController=cpqIdeController, cpqIdeLogicalDriveRebuildingDisk=cpqIdeLogicalDriveRebuildingDisk, cpqIdeMibRevMajor=cpqIdeMibRevMajor, cpqIdeControllerSerialNumber=cpqIdeControllerSerialNumber, cpqIdeLogicalDriveStatusChange=cpqIdeLogicalDriveStatusChange, cpqIdeOsCommonModuleIndex=cpqIdeOsCommonModuleIndex, cpqIdeIdentIndex=cpqIdeIdentIndex, cpqIdeIdentErrorNumber=cpqIdeIdentErrorNumber, cpqIdeMibCondition=cpqIdeMibCondition, cpqIdeAtaDiskType=cpqIdeAtaDiskType, cpqIdeControllerSlot=cpqIdeControllerSlot, cpqIdeIdentTypeExtended=cpqIdeIdentTypeExtended, cpqIdeControllerCondition=cpqIdeControllerCondition, cpqIdeLogicalDriveTable=cpqIdeLogicalDriveTable, cpqIdeAtaDiskChannel=cpqIdeAtaDiskChannel, cpqIdeIdentType=cpqIdeIdentType, cpqIdeAtaDiskSerialNumber=cpqIdeAtaDiskSerialNumber, cpqIdeLogicalDriveIndex=cpqIdeLogicalDriveIndex, cpqIdeAtaDiskControllerIndex=cpqIdeAtaDiskControllerIndex, cpqIdeAtaDiskFwRev=cpqIdeAtaDiskFwRev, cpqIdeAtaDisk=cpqIdeAtaDisk, cpqIdeLogicalDriveSpareIds=cpqIdeLogicalDriveSpareIds, cpqIdeDriveDegraded=cpqIdeDriveDegraded, cpqIdeControllerFwRev=cpqIdeControllerFwRev, cpqIdeAtaDiskSataVersion=cpqIdeAtaDiskSataVersion, cpqIdeAtaDiskNumber=cpqIdeAtaDiskNumber, cpqIdeControllerStatus=cpqIdeControllerStatus, cpqIdeControllerEntry=cpqIdeControllerEntry, cpqIdeIdentFWVers=cpqIdeIdentFWVers, cpqIdeAtaDiskCapacity=cpqIdeAtaDiskCapacity, cpqIdeOsCommonModuleTable=cpqIdeOsCommonModuleTable, cpqIdeOsCommonModuleDate=cpqIdeOsCommonModuleDate, cpqIdeIdent=cpqIdeIdent, cpqIdeControllerModel=cpqIdeControllerModel, cpqIdeMibRev=cpqIdeMibRev, cpqIdeLogicalDriveEntry=cpqIdeLogicalDriveEntry, cpqIdeAtapiDeviceNumber=cpqIdeAtapiDeviceNumber, cpqIdeIdentEntry=cpqIdeIdentEntry, cpqIdeLogicalDriveDiskIds=cpqIdeLogicalDriveDiskIds, cpqIdeLogicalDriveControllerIndex=cpqIdeLogicalDriveControllerIndex, cpqIdeAtaDiskEntry=cpqIdeAtaDiskEntry, cpqIdeIdentCondition=cpqIdeIdentCondition, cpqIdeAtaDiskLogicalDriveMember=cpqIdeAtaDiskLogicalDriveMember, cpqIdeIdentModel=cpqIdeIdentModel, cpqIdeAtaDiskStatusChange=cpqIdeAtaDiskStatusChange, cpqIdeAtapiDeviceType=cpqIdeAtapiDeviceType, cpqIdeLogicalDriveStatus=cpqIdeLogicalDriveStatus, cpqIdeOsCommonModulePurpose=cpqIdeOsCommonModulePurpose, cpqIdeControllerIndex=cpqIdeControllerIndex, cpqIdeAtapiDeviceEntry=cpqIdeAtapiDeviceEntry, cpqIdeDriveUltraAtaDegraded=cpqIdeDriveUltraAtaDegraded, cpqIdeInterface=cpqIdeInterface, cpqIdeLogicalDriveCondition=cpqIdeLogicalDriveCondition, cpqIdeAtapiDeviceTypeExtended=cpqIdeAtapiDeviceTypeExtended, cpqIdeOsCommonModuleEntry=cpqIdeOsCommonModuleEntry, cpqIdeOsCommonModuleVersion=cpqIdeOsCommonModuleVersion, cpqIdeAtaDiskModel=cpqIdeAtaDiskModel, cpqIdeLogicalDriveRaidLevel=cpqIdeLogicalDriveRaidLevel, cpqIdeLogicalDriveStripeSize=cpqIdeLogicalDriveStripeSize, cpqIdeAtaDiskSmartEnabled=cpqIdeAtaDiskSmartEnabled, cpqIdeControllerOverallCondition=cpqIdeControllerOverallCondition, cpqIdeLogicalDrive=cpqIdeLogicalDrive, cpqIdeAtaDiskIndex=cpqIdeAtaDiskIndex, cpqIdeLogicalDriveCapacity=cpqIdeLogicalDriveCapacity, cpqIdeIdentTable=cpqIdeIdentTable, cpqIdeAtapiDeviceChannel=cpqIdeAtapiDeviceChannel, cpqIdeAtapiDeviceControllerIndex=cpqIdeAtapiDeviceControllerIndex, cpqIdeComponent=cpqIdeComponent, cpqIdeAtaDiskIsSpare=cpqIdeAtaDiskIsSpare, cpqIdeIdentStatus=cpqIdeIdentStatus, cpqIdeDriveOk=cpqIdeDriveOk, cpqIdeAtapiDeviceTable=cpqIdeAtapiDeviceTable, cpqIdeLogicalDriveOsName=cpqIdeLogicalDriveOsName, cpqIdeIdentSerNum=cpqIdeIdentSerNum, cpqIdeAtaDiskStatus=cpqIdeAtaDiskStatus, cpqIde=cpqIde, cpqIdeIdentCondition2=cpqIdeIdentCondition2, cpqIdeAtaDiskOsName=cpqIdeAtaDiskOsName, cpqIdeIdentUltraAtaAvailability=cpqIdeIdentUltraAtaAvailability, cpqIdeControllerTable=cpqIdeControllerTable, cpqIdeMibRevMinor=cpqIdeMibRevMinor) |
def foo(x):
for i in range(x):
try:
pass
finally:
try:
try:
print(x, i)
finally:
try:
1 / 0
finally:
return 42
finally:
print('continue')
continue
print(foo(4))
| def foo(x):
for i in range(x):
try:
pass
finally:
try:
try:
print(x, i)
finally:
try:
1 / 0
finally:
return 42
finally:
print('continue')
continue
print(foo(4)) |
class Token:
def __init__(self, content):
try:
self.content = int(content)
except ValueError:
raise ValueError("Token content must be a number composed only of digits.")
def __repr__(self):
"""Representation of the Token object as a string mimicking the contructor call."""
return "Token({})".format(self.content)
def __str__(self):
"""String representation of the Token object mimicking the initializer passed to the constructor call."""
return str(self.content)
def __int__(self):
return self.content
def compare(self, token):
return int(self.content) - int(token.content) | class Token:
def __init__(self, content):
try:
self.content = int(content)
except ValueError:
raise value_error('Token content must be a number composed only of digits.')
def __repr__(self):
"""Representation of the Token object as a string mimicking the contructor call."""
return 'Token({})'.format(self.content)
def __str__(self):
"""String representation of the Token object mimicking the initializer passed to the constructor call."""
return str(self.content)
def __int__(self):
return self.content
def compare(self, token):
return int(self.content) - int(token.content) |
class MissingRemote(Exception):
"""
Raise when a remote by name is not found.
"""
pass
class MissingMasterBranch(Exception):
"""
Raise when the "master" branch cannot be located.
"""
pass
class BaseOperation(object):
"""
Base class for all Git-related operations.
"""
def __init__(self, repo, remote_name='origin', master_branch='master'):
self.repo = repo
self.remote_name = remote_name
self.master_branch = master_branch
def _filtered_remotes(self, origin, skip=[]):
"""
Returns a list of remote refs, skipping ones you don't need.
If ``skip`` is empty, it will default to ``['HEAD',
self.master_branch]``.
"""
if not skip:
skip = ['HEAD', self.master_branch]
refs = [i for i in origin.refs if not i.remote_head in skip]
return refs
def _master_ref(self, origin):
"""
Finds the master ref object that matches master branch.
"""
for ref in origin.refs:
if ref.remote_head == self.master_branch:
return ref
raise MissingMasterBranch(
'Could not find ref for {0}'.format(self.master_branch))
@property
def _origin(self):
"""
Gets the remote that references origin by name self.origin_name.
"""
origin = None
for remote in self.repo.remotes:
if remote.name == self.remote_name:
origin = remote
if not origin:
raise MissingRemote('Could not find the remote named {0}'.format(
self.remote_name))
return origin
| class Missingremote(Exception):
"""
Raise when a remote by name is not found.
"""
pass
class Missingmasterbranch(Exception):
"""
Raise when the "master" branch cannot be located.
"""
pass
class Baseoperation(object):
"""
Base class for all Git-related operations.
"""
def __init__(self, repo, remote_name='origin', master_branch='master'):
self.repo = repo
self.remote_name = remote_name
self.master_branch = master_branch
def _filtered_remotes(self, origin, skip=[]):
"""
Returns a list of remote refs, skipping ones you don't need.
If ``skip`` is empty, it will default to ``['HEAD',
self.master_branch]``.
"""
if not skip:
skip = ['HEAD', self.master_branch]
refs = [i for i in origin.refs if not i.remote_head in skip]
return refs
def _master_ref(self, origin):
"""
Finds the master ref object that matches master branch.
"""
for ref in origin.refs:
if ref.remote_head == self.master_branch:
return ref
raise missing_master_branch('Could not find ref for {0}'.format(self.master_branch))
@property
def _origin(self):
"""
Gets the remote that references origin by name self.origin_name.
"""
origin = None
for remote in self.repo.remotes:
if remote.name == self.remote_name:
origin = remote
if not origin:
raise missing_remote('Could not find the remote named {0}'.format(self.remote_name))
return origin |
def funcao(x,y):
return 3*x+4*y
def foldt(function,lista):
x=0
for i in range(0,len(lista)):
x+=function(x,lista[i])
return x
lista=[1,2,3,4]
print(foldt(funcao,lista))
| def funcao(x, y):
return 3 * x + 4 * y
def foldt(function, lista):
x = 0
for i in range(0, len(lista)):
x += function(x, lista[i])
return x
lista = [1, 2, 3, 4]
print(foldt(funcao, lista)) |
class Player(object):
"""docstring for Player"""
def __init__(self, name, money):
self.name = name
self.money = money
def __init__(self, name):
self.name = name
# Default is $500
self.money = 500
def lose_money(self, amt):
self.money -= amt
def gain_money(self, amt):
self.money += amt
| class Player(object):
"""docstring for Player"""
def __init__(self, name, money):
self.name = name
self.money = money
def __init__(self, name):
self.name = name
self.money = 500
def lose_money(self, amt):
self.money -= amt
def gain_money(self, amt):
self.money += amt |
"""
1 - Traversal
When designing iterative functions, take the tree below as an example.
A
B C
Iterative Traversal Model:
# init
res = []
stack = []
node = root
# loop
while node is not None or stack:
- Pre (M -> L -> R)
while node is not None:
res.append(node.val)
stack.append(node)
node = node.left
node = stack.pop()
node = node.right
- In (L -> M -> R)
while node is not None:
stack.append(node)
node = node.left
node = stack.pop()
res.append(node.val)
node = node.right
- Post (M -> R -> L, return [::-1])
while node is not None:
res.append(node.val)
stack.append(node)
node = node.right
node = stack.pop()
node = node.left
# return
Pre/In return res; Post return res[::-1]
Problems:
94(in)
144(pre)
145(post)
102, 103, 107(level) - see BFS
2 - Recursion
<Preorder>
From top to bottom: process node with variables like self.path, self.res; DFS(L), DFS(R).
<Postorder>
From bottom to top: L = DFS(node.left), R = DFS(node.right); process L and R; return something.
<Inorder>
BST: L = DFS(left); process node with self.pre and L; R = DFS(right); may return something.
Problems:
<Preorder>
112/113/437(find path) - self.res.append(self.path[:]) when tar found; self.path.pop() when going up. See 113.
114(flatten tree) - modify M -> L -> R to R -> L -> M, and link the list from end to start
116, 117(link next right node) - find node_next for node's children(linked list); call DFS(right) BEFORE DFS(left)
226(invert) - swap
<Postorder>
101(symmetric) - DFS(root, root), note if conditions; BFS, note the None node processing
104(depth)
105/106(construct) - Locate i and calculate length from INORDER. See 106 annotation for details.
110(balance)
124(max path sum) - recall 53(max sub-array) and 543(diameter)
236(lowest common parent) - L is None and R is None; L is not None and R is not None; return the one not None
543(diameter) - cur_val = L + R; return_val = max(L, R) + 1
617(merge) - recall 2(add linked lists) and 106(tree construction)
<Inorder>
98(valid BST) - self.pre
<TBD>450(delete node in BST)
538(BST conversion) - self.pre_sum
3 - Others:
297(serialization)
Airbnb/Hulu(print N-ary tree) - tree construction/traversal/sort
"""
| """
1 - Traversal
When designing iterative functions, take the tree below as an example.
A
B C
Iterative Traversal Model:
# init
res = []
stack = []
node = root
# loop
while node is not None or stack:
- Pre (M -> L -> R)
while node is not None:
res.append(node.val)
stack.append(node)
node = node.left
node = stack.pop()
node = node.right
- In (L -> M -> R)
while node is not None:
stack.append(node)
node = node.left
node = stack.pop()
res.append(node.val)
node = node.right
- Post (M -> R -> L, return [::-1])
while node is not None:
res.append(node.val)
stack.append(node)
node = node.right
node = stack.pop()
node = node.left
# return
Pre/In return res; Post return res[::-1]
Problems:
94(in)
144(pre)
145(post)
102, 103, 107(level) - see BFS
2 - Recursion
<Preorder>
From top to bottom: process node with variables like self.path, self.res; DFS(L), DFS(R).
<Postorder>
From bottom to top: L = DFS(node.left), R = DFS(node.right); process L and R; return something.
<Inorder>
BST: L = DFS(left); process node with self.pre and L; R = DFS(right); may return something.
Problems:
<Preorder>
112/113/437(find path) - self.res.append(self.path[:]) when tar found; self.path.pop() when going up. See 113.
114(flatten tree) - modify M -> L -> R to R -> L -> M, and link the list from end to start
116, 117(link next right node) - find node_next for node's children(linked list); call DFS(right) BEFORE DFS(left)
226(invert) - swap
<Postorder>
101(symmetric) - DFS(root, root), note if conditions; BFS, note the None node processing
104(depth)
105/106(construct) - Locate i and calculate length from INORDER. See 106 annotation for details.
110(balance)
124(max path sum) - recall 53(max sub-array) and 543(diameter)
236(lowest common parent) - L is None and R is None; L is not None and R is not None; return the one not None
543(diameter) - cur_val = L + R; return_val = max(L, R) + 1
617(merge) - recall 2(add linked lists) and 106(tree construction)
<Inorder>
98(valid BST) - self.pre
<TBD>450(delete node in BST)
538(BST conversion) - self.pre_sum
3 - Others:
297(serialization)
Airbnb/Hulu(print N-ary tree) - tree construction/traversal/sort
""" |
def main():
problem()
#PROBLEM
#Create a task list. A user is presented with the text below. Let them select an option to list all of their tasks, add a task to their list, delete a task, or quit the program.
#Make each option a different function in your program.
# Do NOT use Google. Do NOT use other students. Try to do this on your own.
#Congratulations! You're running [YOUR NAME]'s Task List program.
#What would you like to do next?
#1. List all tasks.
#2. Add a task to the list.
#3. Delete a task.
#0. To quit the program
def problem():
taskArray = ["work", "gym", "cooking", "homework"]
userInput = ''
while(userInput.lower() != "y"):
userInput = input("Do you want to run the Task?\nY or N ")
continue
print("Congratulations! You're running Didi's Task List program.")
userInput2 = input("What would you like to do next?\n1.List all tasks\n2. Add a task to the list\n3. Delete a task.\n0. To quit the program\n")
while(userInput2 != '0'):
if (userInput2 == '1'):
for el in taskArray:
print(el)
userInput2 = input("What would you like to do next?\n")
continue
if (userInput2 == '2'):
userInput2 = input("which task do you want to add?\n ")
taskArray.append(userInput2)
print(taskArray)
userInput2 = input("What would you like to do next?\n")
continue
if(userInput2 == '3'):
userInput2 = input("which task do you want to remove?\n ")
while userInput2 not in taskArray:
print("NOT IN ARRAY!!! TRY AGAIN!")
userInput2 = input("which task do you want to remove?\n ")
else:
taskArray.remove(userInput2)
print(taskArray)
userInput2 = input("What would you like to do next?\n")
else:
continue
##################################################################################
if __name__ == '__main__':
main() | def main():
problem()
def problem():
task_array = ['work', 'gym', 'cooking', 'homework']
user_input = ''
while userInput.lower() != 'y':
user_input = input('Do you want to run the Task?\nY or N ')
continue
print("Congratulations! You're running Didi's Task List program.")
user_input2 = input('What would you like to do next?\n1.List all tasks\n2. Add a task to the list\n3. Delete a task.\n0. To quit the program\n')
while userInput2 != '0':
if userInput2 == '1':
for el in taskArray:
print(el)
user_input2 = input('What would you like to do next?\n')
continue
if userInput2 == '2':
user_input2 = input('which task do you want to add?\n ')
taskArray.append(userInput2)
print(taskArray)
user_input2 = input('What would you like to do next?\n')
continue
if userInput2 == '3':
user_input2 = input('which task do you want to remove?\n ')
while userInput2 not in taskArray:
print('NOT IN ARRAY!!! TRY AGAIN!')
user_input2 = input('which task do you want to remove?\n ')
else:
taskArray.remove(userInput2)
print(taskArray)
user_input2 = input('What would you like to do next?\n')
else:
continue
if __name__ == '__main__':
main() |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 29 14:24:51 2021
@author: Hari Kishan Perugu
"""
| """
Created on Tue Jun 29 14:24:51 2021
@author: Hari Kishan Perugu
""" |
def Kth_max_min(l, n, k):
l.sort()
return (l[k-1], l[-k])
if __name__ == "__main__":
t = int(input())
while t > 0:
n = int(input())
arr = list(map(int, input().split(' ')))
k = int(input())
print(Kth_max_min(arr, n, k))
t -= 1
| def kth_max_min(l, n, k):
l.sort()
return (l[k - 1], l[-k])
if __name__ == '__main__':
t = int(input())
while t > 0:
n = int(input())
arr = list(map(int, input().split(' ')))
k = int(input())
print(kth_max_min(arr, n, k))
t -= 1 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def hasPathSum(self, root: Optional[TreeNode], targetSum: int) -> bool:
if not root:
return False
queue=[(root, root.val)]
while(queue):
cur, val = queue.pop(0)
if not cur.left and not cur.right and val == targetSum:
return True
if cur.left:
queue.append((cur.left, val+cur.left.val))
if cur.right:
queue.append((cur.right, val+cur.right.val))
return False | class Solution:
def has_path_sum(self, root: Optional[TreeNode], targetSum: int) -> bool:
if not root:
return False
queue = [(root, root.val)]
while queue:
(cur, val) = queue.pop(0)
if not cur.left and (not cur.right) and (val == targetSum):
return True
if cur.left:
queue.append((cur.left, val + cur.left.val))
if cur.right:
queue.append((cur.right, val + cur.right.val))
return False |
# Server IP
XXIP = '127.0.0.1'
# Client ports
XXPORT = 5000
XXVIDEOPORT = 5001
XXAUDIOPORT = 5002
XXSCREEENPORT = 5003
BECTRLPORT = 5004 | xxip = '127.0.0.1'
xxport = 5000
xxvideoport = 5001
xxaudioport = 5002
xxscreeenport = 5003
bectrlport = 5004 |
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2017 Vic Chan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
__all__ = ['create_reader']
def open_file(path):
data = []
with open(path, 'r') as ff:
lines = ff.readlines()
for line in lines:
line = line.rstrip('\r\n')
seq = map(int, line.split(','))
data.append(seq)
return data
GO_ID = 1
EOS_ID = 2
# def test():
# answer_path = 'data/train_answers'
# question_path = 'data/train_questions'
#
# answers = open_file(answer_path)
# questions = open_file(question_path)
#
# test()
def create_reader(is_train=True):
def reader():
if is_train:
answer_path = 'data/train_answers'
question_path = 'data/train_questions'
size = 20000
else:
answer_path = 'data/test_answers'
question_path = 'data/test_questions'
size = 9000
questions = open_file(question_path)
answers = open_file(answer_path)
for i in range(size):
yield ([GO_ID]+questions[i]+[EOS_ID]), \
([GO_ID]+answers[i]), \
(answers[i]+[EOS_ID])
return reader
| """
MIT License
Copyright (c) 2017 Vic Chan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
__all__ = ['create_reader']
def open_file(path):
data = []
with open(path, 'r') as ff:
lines = ff.readlines()
for line in lines:
line = line.rstrip('\r\n')
seq = map(int, line.split(','))
data.append(seq)
return data
go_id = 1
eos_id = 2
def create_reader(is_train=True):
def reader():
if is_train:
answer_path = 'data/train_answers'
question_path = 'data/train_questions'
size = 20000
else:
answer_path = 'data/test_answers'
question_path = 'data/test_questions'
size = 9000
questions = open_file(question_path)
answers = open_file(answer_path)
for i in range(size):
yield ([GO_ID] + questions[i] + [EOS_ID], [GO_ID] + answers[i], answers[i] + [EOS_ID])
return reader |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class Solution:
def threeSumSmaller(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
nums.sort()
count = 0
for i in range(len(nums)-2):
if nums[i] * 3 >= target:
return count
start = i+1
end= len(nums)-1
while start < end:
if nums[i] + nums[start] + nums[end] < target:
count += end - start
start += 1
else:
end -= 1
return count
| class Solution:
def three_sum_smaller(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
nums.sort()
count = 0
for i in range(len(nums) - 2):
if nums[i] * 3 >= target:
return count
start = i + 1
end = len(nums) - 1
while start < end:
if nums[i] + nums[start] + nums[end] < target:
count += end - start
start += 1
else:
end -= 1
return count |
#
# @lc app=leetcode id=35 lang=python3
#
# [35] Search Insert Position
#
# @lc code=start
class Solution:
def searchInsert(self, nums: List[int], target: int):
if not nums:
return 0
if target <= nums[0]:
return 0
if target > nums[-1]:
return len(nums)
l, r = 0, len(nums) - 1
while l < r:
m = (l + r) >> 1
if target == nums[m]:
return m
if target > nums[m]:
l = m + 1
else:
r = m - 1
if target > nums[l]:
return l + 1
else:
return l
# @lc code=end
| class Solution:
def search_insert(self, nums: List[int], target: int):
if not nums:
return 0
if target <= nums[0]:
return 0
if target > nums[-1]:
return len(nums)
(l, r) = (0, len(nums) - 1)
while l < r:
m = l + r >> 1
if target == nums[m]:
return m
if target > nums[m]:
l = m + 1
else:
r = m - 1
if target > nums[l]:
return l + 1
else:
return l |
"""Private config items for mqtt-audio-alert."""
sounds = {
# 'NAMEOFSOUND1': '/PATH/TO/AUDIOFILE.mp3',
# 'NAMEOFSOUND2': '/PATH/TO/AUDIOFILE.mp3'
}
# Time ranged where sounds are permitted to play.
# Multiple time ranges are allowed.
active_times = [
#['07:00', '12:00'],
#['13:15', '14:15'],
['00:00', '23:59']
]
mpg123 = '/usr/bin/mpg123'
#audiodevice = 'hw:1,0'
audiodevice = '' # leave blank for default device
topic = 'mqtt-audio-alert' # which MQTT topic to subscribe to
client_id = 'mqtt-audio-alert1' # leave blank for default client_id
mqtt_host = '' # address of MQTT broker
mqtt_port = 1883
log_file = './mqtt-audio-alert.log'
username = '' # leave blank for no username
password = '' # leave blank for no password
#cert = "./root-ca.crt"
cert = '' # leave blank for no TLS
| """Private config items for mqtt-audio-alert."""
sounds = {}
active_times = [['00:00', '23:59']]
mpg123 = '/usr/bin/mpg123'
audiodevice = ''
topic = 'mqtt-audio-alert'
client_id = 'mqtt-audio-alert1'
mqtt_host = ''
mqtt_port = 1883
log_file = './mqtt-audio-alert.log'
username = ''
password = ''
cert = '' |
# -*- coding: utf-8 -*-
class TweetBuilder(object):
"""Constructs tweets to specific users"""
def __init__(self, mention_users):
"""Create a new tweet builder which will mention the given users"""
super(TweetBuilder, self).__init__()
# Convert lists to a space separated string
if not isinstance(mention_users, str):
mention_users = ' '.join(mention_users)
# Ensure that the mention users string contains an @ before all usernames
mention_users = ' '.join(mention_users.split()) # Remove multiple consecutive spaces
mention_users = '@' + mention_users.replace('@', '').replace(' ', ' @')
# The prefix of each tweet is the users to mention
self.tweet_prefix = mention_users + ' '
def create_tweet(self, message):
"""Creates a tweet which mentions the builder's mention users with the given message"""
return self.tweet_prefix + message
| class Tweetbuilder(object):
"""Constructs tweets to specific users"""
def __init__(self, mention_users):
"""Create a new tweet builder which will mention the given users"""
super(TweetBuilder, self).__init__()
if not isinstance(mention_users, str):
mention_users = ' '.join(mention_users)
mention_users = ' '.join(mention_users.split())
mention_users = '@' + mention_users.replace('@', '').replace(' ', ' @')
self.tweet_prefix = mention_users + ' '
def create_tweet(self, message):
"""Creates a tweet which mentions the builder's mention users with the given message"""
return self.tweet_prefix + message |
class Vec2:
x: float
y: float
def __init__(self, x:float, y:float) -> None:
self.x = x
self.y = y
| class Vec2:
x: float
y: float
def __init__(self, x: float, y: float) -> None:
self.x = x
self.y = y |
while(True):
try:
a = int(input())
if(a==2002):
print("Acesso Permitido")
break
else:
print("Senha Invalida")
except EOFError:
break | while True:
try:
a = int(input())
if a == 2002:
print('Acesso Permitido')
break
else:
print('Senha Invalida')
except EOFError:
break |
BYTES_PREFIXES = ("", "K", "M", "G", "T")
PREFIX_FACTOR_BYTES = 1024.0
def bytes_for_humans(size, suffix="B"):
"""
Function to get bytes in more human readable format, untranslated, for logging purposes only.
:type size: int
:type suffix: str
:rtype: str
"""
for prefix in BYTES_PREFIXES:
if size < PREFIX_FACTOR_BYTES:
if prefix == "":
return "{}{}".format(size, suffix)
return "{:.2f}{}{}".format(size, prefix, suffix)
size /= PREFIX_FACTOR_BYTES
return "{:.2f}{}{}".format(size, "P", suffix)
| bytes_prefixes = ('', 'K', 'M', 'G', 'T')
prefix_factor_bytes = 1024.0
def bytes_for_humans(size, suffix='B'):
"""
Function to get bytes in more human readable format, untranslated, for logging purposes only.
:type size: int
:type suffix: str
:rtype: str
"""
for prefix in BYTES_PREFIXES:
if size < PREFIX_FACTOR_BYTES:
if prefix == '':
return '{}{}'.format(size, suffix)
return '{:.2f}{}{}'.format(size, prefix, suffix)
size /= PREFIX_FACTOR_BYTES
return '{:.2f}{}{}'.format(size, 'P', suffix) |
#!/usr/bin/env python3
def gregorian_to_ifc(day, month, leap=False):
month = month - 1
day = day - 1
days_per_month = [31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31]
if leap: days_per_month[1] = 29
day_number = 0
for m in range(month):
day_number += days_per_month[m]
day_number += day
if day_number in [364, 365]:
return "Year Day"
ifc_month = day_number // 28
ifc_day = day_number % 28
return ifc_day+1, ifc_month+1
| def gregorian_to_ifc(day, month, leap=False):
month = month - 1
day = day - 1
days_per_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if leap:
days_per_month[1] = 29
day_number = 0
for m in range(month):
day_number += days_per_month[m]
day_number += day
if day_number in [364, 365]:
return 'Year Day'
ifc_month = day_number // 28
ifc_day = day_number % 28
return (ifc_day + 1, ifc_month + 1) |
# Finding the second largest number in a list.
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split())) # Converting input string into list by map and list()
new = [x for x in arr if x != max(arr)] # Using list compressions building new list removing the highest number
print(max(new)) # Since we removed the max number in list, now the max will give the second largest from original list. | if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split()))
new = [x for x in arr if x != max(arr)]
print(max(new)) |
# someone in the internet do that
i = 1
for k in (range(1, 21)):
if i % k > 0:
for j in range(1, 21):
if (i * j) % k == 0:
i *= j
break
print(i)
| i = 1
for k in range(1, 21):
if i % k > 0:
for j in range(1, 21):
if i * j % k == 0:
i *= j
break
print(i) |
async def commands_help(ctx, help_ins):
message = help_ins.get_help()
if message is None:
message = 'No such command available!'
await ctx.send(message) | async def commands_help(ctx, help_ins):
message = help_ins.get_help()
if message is None:
message = 'No such command available!'
await ctx.send(message) |
n = int(input())
while n > 0:
c = input()
print('gzuz')
n -= 1 | n = int(input())
while n > 0:
c = input()
print('gzuz')
n -= 1 |
# This file is part of VoltDB.
# Copyright (C) 2008-2020 VoltDB Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with VoltDB. If not, see <http://www.gnu.org/licenses/>.
@VOLT.Command(
bundles = VOLT.AdminBundle(),
description = 'Resume a paused VoltDB cluster that is in admin mode.'
)
def resume(runner):
# Check the STATUS column. runner.call_proc() detects and aborts on errors.
status = runner.call_proc('@Resume', [], []).table(0).tuple(0).column_integer(0)
if status == 0:
runner.info('The cluster has resumed.')
else:
runner.abort('The cluster has failed to resume with status: %d' % status)
| @VOLT.Command(bundles=VOLT.AdminBundle(), description='Resume a paused VoltDB cluster that is in admin mode.')
def resume(runner):
status = runner.call_proc('@Resume', [], []).table(0).tuple(0).column_integer(0)
if status == 0:
runner.info('The cluster has resumed.')
else:
runner.abort('The cluster has failed to resume with status: %d' % status) |
p,q = [int(i) for i in input().split()]
if (p % 2 == 1 and q % 2 == 1):
print(1)
elif (p % 2 == 0):
print(0)
elif (q > p):
print(2)
else:
print(0)
| (p, q) = [int(i) for i in input().split()]
if p % 2 == 1 and q % 2 == 1:
print(1)
elif p % 2 == 0:
print(0)
elif q > p:
print(2)
else:
print(0) |
# Snippets from Actual Settings.py
TEMPLATES = [
{
'BACKEND': 'django_jinja.backend.Jinja2',
"DIRS": ["PROJECT_ROOT_DIRECTORY", "..."],
'APP_DIRS': True,
'OPTIONS': {
'match_extension': '.html',
'context_processors': [
'django.template.context_processors.request',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz'
],
'globals': {
},
'extensions': DEFAULT_EXTENSIONS + [
'pipeline.templatetags.ext.PipelineExtension',
],
},
},
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True
},
]
# Auto Register Template Globals
_template_globals = {}
for object_name in dir(app_template_globals):
_obj = getattr(app_template_globals, object_name)
if callable(_obj) and not object_name.startswith('__'):
_template_globals[object_name] = _obj.__module__ + '.' + _obj.__qualname__
TEMPLATES[0]['OPTIONS']['globals'].update(_template_globals)
| templates = [{'BACKEND': 'django_jinja.backend.Jinja2', 'DIRS': ['PROJECT_ROOT_DIRECTORY', '...'], 'APP_DIRS': True, 'OPTIONS': {'match_extension': '.html', 'context_processors': ['django.template.context_processors.request', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz'], 'globals': {}, 'extensions': DEFAULT_EXTENSIONS + ['pipeline.templatetags.ext.PipelineExtension']}}, {'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True}]
_template_globals = {}
for object_name in dir(app_template_globals):
_obj = getattr(app_template_globals, object_name)
if callable(_obj) and (not object_name.startswith('__')):
_template_globals[object_name] = _obj.__module__ + '.' + _obj.__qualname__
TEMPLATES[0]['OPTIONS']['globals'].update(_template_globals) |
class Solution:
def solve(self, nums):
rights = []
left_ans = []
for num in nums:
if num < 0:
while rights and rights[-1] < abs(num):
rights.pop()
if not rights:
left_ans.append(num)
if rights and rights[-1] == abs(num):
rights.pop()
else:
rights.append(num)
lefts = []
right_ans = []
for num in reversed(nums):
if num > 0:
while lefts and abs(lefts[-1]) < num:
lefts.pop()
if not lefts:
right_ans.append(num)
if lefts and abs(lefts[-1]) == num:
lefts.pop()
else:
lefts.append(num)
right_ans = right_ans[::-1]
return left_ans + right_ans
| class Solution:
def solve(self, nums):
rights = []
left_ans = []
for num in nums:
if num < 0:
while rights and rights[-1] < abs(num):
rights.pop()
if not rights:
left_ans.append(num)
if rights and rights[-1] == abs(num):
rights.pop()
else:
rights.append(num)
lefts = []
right_ans = []
for num in reversed(nums):
if num > 0:
while lefts and abs(lefts[-1]) < num:
lefts.pop()
if not lefts:
right_ans.append(num)
if lefts and abs(lefts[-1]) == num:
lefts.pop()
else:
lefts.append(num)
right_ans = right_ans[::-1]
return left_ans + right_ans |
#
# This file contains the Python code from Program 2.7 of
# "Data Structures and Algorithms
# with Object-Oriented Design Patterns in Python"
# by Bruno R. Preiss.
#
# Copyright (c) 2003 by Bruno R. Preiss, P.Eng. All rights reserved.
#
# http://www.brpreiss.com/books/opus7/programs/pgm02_07.txt
#
def geometricSeriesSum(x, n):
sum = 0
i = 0
while i <= n:
sum = sum * x + 1
i += 1
return sum
# 1 + x + x^2 + x^3 + ... + x^n
# = 1 + x * (1 + x * (1 + x * (1 + x * ...))) | def geometric_series_sum(x, n):
sum = 0
i = 0
while i <= n:
sum = sum * x + 1
i += 1
return sum |
# Author: BHARATHI KANNAN N - Github: https://github.com/bharathikannann, linkedin: https://linkedin.com/in/bharathikannann
# ## Linked List
#
# - Linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next.
# - In its most basic form, each node contains: data, and a reference
# - This structure allows for efficient insertion or removal of elements from any position in the sequence during iteration.
# - Linked lists are among the simplest and most common data structures. They can be used to implement several other common abstract data types, including lists, stacks, queues, etc..,
#
# ### Time Complexity:
# - Insertion: O(1)
# - Insertion at front: O(1)
# - Insertion in between: O(1)
# - Insertion at End: O(n)
# - Deletion: O(1)
# - Indexing: O(n)
# - Searching: O(n)
#Structure of the node for our linked list
class Node():
#Each node has its data and a pointer which points to the next data
def __init__(self, data, next=None):
self.data=data
self.next=next
# Setter and Getter Functions
#To set data
def setData(self, data):
self.data = data
#To det data
def getData(self):
return self.data
#To set next
def setNext(self, data):
self.data = data
#To get next
def getNext(self):
return self.next
class LinkedList(object):
# Head of the linked list
def __init__(self):
self.head = None
# ------------------------------------------------------------------------------------------
# Inserting the element at the start of the linked list
# Steps
# 1. Creating the new node with the data.
# 2. Assigning the next of the new node to the head
# 3. Changing the head to the newnode since it has been changed as the first element
def insertAtFirst(self, data):
newNode = Node(data)
newNode.next = self.head
self.head = newNode
# ------------------------------------------------------------------------------------------
# Printing all the elements of the linked list
# Steps
# 1. Creating a temporary variable and assigining it to the first element (head)
# 2. Traversing and printing the data till the end untill it is null
def show(self):
if(self.head == None):
print("No element present in the list")
return
temp = self.head
while(temp):
print(temp.data, end='->')
temp=temp.next
print()
# print("NONE") (for understanding since last element is null)
# ------------------------------------------------------------------------------------------
# Inserting the data at a specific position. Here the indexing starts from 1
# Steps
# 1. If position is 1 then insert at first
# 2. Else traverse to the previous node and change the next of new node to the next of temp node and
# change the next of temp node to new node
# In step 2 order matters, because if we change the next of tempnode first we loss the position.
def insertAtPosition(self, data, position):
newNode = Node(data)
if (position == 1):
self.insertAtFirst(data)
else:
temp = self.head
for i in range(position-2):
temp = temp.next
newNode.next = temp.next
temp.next = newNode
# ------------------------------------------------------------------------------------------
# Deleting the data at any position
# Steps
# 1. If head is the data to be deleted and if is none return none and if it the element to be deleted
# change the head to the next of head by using temp node
# 2. Else traverse untill the element is found and while traversing keep track of pevious node
# 3. check if temp is none it means the traversing the reached till the end and no element is found
# 4. connect next of previous to next of temp by skipping the temp which is the element to be deleted
def delete(self, data):
if (self.head == None):
return None
temp = self.head
if(temp.data == data):
self.head = temp.next
return
else:
while(temp):
if(temp.data == data):
break
prev = temp
temp = temp.next
if temp == None:
return
prev.next = temp.next
return
# ------------------------------------------------------------------------------------------
# Insert the data at last
# Steps:
# 1. If no element is present just insert at first
# 2. Else traverse till the last and connect the new node with the temp which is the last node
def insertAtLast(self, data):
if self.head == None:
self.insertAtFirst(data)
return
newNode = Node(data)
temp = self.head
while(temp.next is not None):
temp = temp.next
temp.next = newNode
# ------------------------------------------------------------------------------------------
# Length of the LinkedList
# Steps:
# 1. If head is none the length is 0 else traverse and for each traversal increment count by 1
def length(self):
count = 0
if(self.head is None):
return count
else:
temp = self.head
while(temp is not None):
count+=1
temp = temp.next
return count
# ------------------------------------------------------------------------------------------
# If a data exists in any node (Search method)
#Steps:
# 1: If head is none then no element present and false
# 2: Else traverse the list and find if any data is present in any node and at last return false
def ifNodeExists(self, data):
if (self.head == None):
return False
else:
temp = self.head
while(temp):
if (temp.data == data):
return True
temp = temp.next
return False
# ------------------------------------------------------------------------------------------
# Clockwise in linkedlist
# Example: 1->2->3->4->5->None, n=2, Then: 4->-5>->1->2->3->None
def rotateClockwise (self, n):
# If head is null or only head is present or n is less than or equal to 0 no operation can be done
if (self.head == None or self.head.next == None or n<=0):
return
# Get the length of the linkedlist
length = self.length()
# If n is greater than length then a whole rotation is done and nothing is changed is our list.
# So inorder to reduce operations we can get the remainder of n%length.
# Example if length is 4 and n is 6 then a complete rotation is done and then it is done two times.
# So we can get the remainder and do the operation
n = n % length
# If n == 0 no operation is done (whole rotation)
if (n == 0):
return
# 1(start,temp1,head)->2->3->4->None
start = self.head
temp1 = self.head
# 1(start,head)->2(temp1)->3->4->None
for i in range(length - n - 1):
temp1 = temp1.next
# 1(start)->2(temp1)->3(head)->4->None
# 1(start)->2(temp1)->3(head,temp2)->4->None
self.head = temp1.next
temp2 = temp1.next
# 1(start)->2->None
# 3(head,temp2)->4->None
temp1.next = None
# 1(start)->2->None
# 3(head)->4(temp2)->None
for i in range(n - 1):
temp2 = temp2.next
# 3(head)->4(temp2)->1(start)->2->None
temp2.next = start
# ------------------------------------------------------------------------------------------
# Rotate Anticlockwise
# Example: 1->2->3->4->5->None, n=2, Then: 3->4->5->1->2->None
# Steps are same as before only the last step changes and the range in for loop changes
def rotateAntiClockwise(self, n):
if (self.head == None or self.head.next == None or n<=0):
return
start = self.head
temp1 = self.head
length = self.length()
n = n % length
if (n == 0):
return
for i in range(n -1):
temp1 = temp1.next
self.head = temp1.next
temp2 = temp1.next
temp1.next = None
for i in range(length -n -1):
temp2 = temp2.next
temp2.next = start
# ------------------------------------------------------------------------------------------
# Reverse the linked list
# Here we need three variables prev, current, after
def reverse(self):
prev = None
# Set current to head and traverse till end
current = self.head
# Ex: 1(head,current)->2->3->None
while(current is not None):
# change after to next of current. Ex: 1(head,current)->2(after)->3->None
after = current.next
# then change next to current to prev (here the link changes backwards direction for linked list).
# Ex: None(prev)<-1(head,current) 2(after)->3->None
current.next = prev
# Now change the prev and current and do the same for next nodes.
# Ex: None<-1(head,prev) 2(after,current)->3->None
prev = current
current = after
# Finally you end up in None<-1(head)<-2<-3(prev)<-None(current,after), so change the head node to prev
self.head = prev
# ------------------------------------------------------------------------------------------
# Same reverse function usinf recursion
# Made two functionso that we don't need to use list.head in the main function
def reverseRecursion(self):
return self.reverseRecursionLL(self.head)
# The reverse function using recursion
def reverseRecursionLL(self, temp):
# If the last node is reached make it as head and return
if(temp.next == None):
self.head = temp
return
self.reverseRecursionLL(temp.next)
# Make new temp variable and make it as next of temp
# 1->2->3(temp)->None(temp2)
temp2 = temp.next
# 1->2->3(temp,head)->None(temp2)
# None(temp2)->3(temp,head)
temp2.next = temp
# None(temp2)->3(head)->None
temp.next = None
# The value of temp changes in every recursion so we don't need to change the temp to the previous node
# ------------------------------------------------------------------------------------------
# Get the middle element
def getMiddleElement(self, printelement=False):
# Make two nodes slow and fast
slow = self.head
fast = self.head.next
# Ex: 1(head,slow)->2(fast)->3->4->None
# Here slow moves one step and fast moves two steps in a single iteration
while(fast!=None and fast.next != None):
# Ex: 1(head)->2(slow)->3->4(fast)->None
slow = slow.next
fast = fast.next.next
# At last print the slow node data
# If the length is even the middle element is (length/2)-1. Slow works for both even and odd.
if (printelement):
print("The middle element is: " + str(slow.data))
return slow.data
# ------------------------------------------------------------------------------------------
# Does First half and second half match we can use the same concept as before
def isFirstSecondHalfMatch(self):
slow = self.head
fast = self.head.next
while(fast != None and fast.next != None):
slow = slow.next
fast = fast.next.next
# We can traverse from head and next of slow node and can check each data on both sides
# Ex: 1(head,temp)->2(slow)->3->4->None
temp = self.head # Ex: 1(head,temp)->2->3(slow)->4->None
slow = slow.next
# If the length is odd we don't need to check the middle element
while(slow):
if(temp.data != slow.data):
return False
slow = slow.next
temp = temp.next
return True
# ------------------------------------------------------------------------------------------
# Return true if a linked list is palindrome
# Ex: 1->2->2->1->None
def isPalindrome(self):
# Use stack to store all the fist half elements
stack = []
slow = self.head
fast = self.head.next
stack.append(slow.data)
while(fast != None and fast.next != None):
slow = slow.next
fast = fast.next.next
stack.append(slow.data)
# If fast is none then it is an off length linked list and we don't need to check middle element
if(fast == None):
stack.pop()
# Traverse from next of slow and check each element from stack and slow
# Pop of the stack gives first half if linkedlist in reverse
slow = slow.next
while(slow):
if(slow.data != stack.pop()):
return False
slow = slow.next
return True
# ------------------------------------------------------------------------------------------
# Deleting the entire linked list
def deleteList(self):
self.head = None
# ------------------------------------------------------------------------------------------
# Delete an element if it's right node is grater than it
# Example: I/P - 5->1->3->2->7-None
# O/P - 5->3->None
def deleteGreaterValuesOnRight(self):
# Check if only 1 node is present or head is none
if(self.head == None and self.head.next == None):
return
temp = self.head
# Traverse and check if the next node is grater anf if it is then delete the current node
while(temp.next != None):
if(temp.data < temp.next.data):
self.delete(temp.data)
temp = temp.next
# ------------------------------------------------------------------------------------------
# Swapping pairwise elements
# Ex: 1->2->3->4->None - 2->1->4->3->none
def pairwiseSwapElements(self):
# If head is none or next of head is null return
if(self.head == None and self.head.next == None):
return
temp = self.head
while(temp != None and temp.next != None):
# Normal swapping
n = temp.data
temp.data = temp.next.data
temp.next.data = n
temp = temp.next.next
# ------------------------------------------------------------------------------------------
# Delete alternate nodes
def deleteAlternateNodes(self):
# If head is none or next of head is null return
if(self.head == None and self.head.next == None):
return
temp = self.head
# While traversing eachtime skip next node
while(temp != None and temp.next != None):
temp.next = temp.next.next
temp = temp.next
# ------------------------------------------------------------------------------------------
# Move last node to front
def moveLastNodeToFront(self):
if(self.head == None or self.head.next == None):
return
temp = self.head
# Traverse to the second last element in the linkedlist
while(temp.next.next is not None):
temp = temp.next
# Get last node data and insert at first
val = temp.next.data
temp.next = None
self.insertAtFirst(val)
# ------------------------------------------------------------------------------------------
# Get count of a data in linkedlist
def getCountOfValue(self, n):
if(self.head == None):
return
temp = self.head
count=0
while(temp):
if(temp.data == n):
count+=1
temp=temp.next
return count
# Execute only in main file
if __name__ == '__main__':
LList = LinkedList()
print("Insert at first")
LList.insertAtFirst(10)
LList.insertAtFirst(20)
LList.show()
print("Insert at position")
LList.insertAtPosition(5,3)
LList.show()
print("Delete")
LList.delete(50)
LList.show()
print("Insert at last")
LList.insertAtLast(2)
LList.insertAtLast(1)
LList.delete(10)
LList.show()
print("If Node 20 Exists: " + str(LList.ifNodeExists(20)))
print("Length: " + str(LList.length()))
print("Rotate Clockwise")
LList.rotateClockwise(2)
LList.show()
print("Rotate Anticlockwise")
LList.rotateAntiClockwise(2)
LList.show()
print("Reverse")
LList.reverse()
LList.show()
LList.reverseRecursion()
LList.show()
LList.getMiddleElement(printelement=True)
LList.insertAtLast(1)
LList.insertAtLast(2)
LList.insertAtLast(5)
LList.insertAtLast(20)
LList.show()
print("First and second half match")
print(LList.isFirstSecondHalfMatch())
print("Is Palindrome")
print(LList.isPalindrome())
LList.deleteGreaterValuesOnRight()
LList.show()
print("Pair wise swap elements")
LList.pairwiseSwapElements()
LList.show()
print("Delete alterntive nodes")
LList.deleteAlternateNodes()
LList.show()
print("Move last node to front")
LList.moveLastNodeToFront()
LList.show()
print("Get count of value")
LList.insertAtFirst(20)
print(LList.getCountOfValue(20))
print("Delete entire list")
LList.deleteList()
LList.show()
'''
Output
Insert at first
20->10->
Insert at position
20->10->5->
Delete
20->10->5->
Insert at last
20->5->2->1->
If Node 20 Exists: True
Length: 4
Rotate Clockwise
2->1->20->5->
Rotate Anticlockwise
20->5->2->1->
Reverse
1->2->5->20->
20->5->2->1->
The middle element is: 5
20->5->2->1->1->2->5->20->
First and second half match
False
Is Palindrome
True
20->1->2->5->20->
Pair wise swap elements
1->20->5->2->20->
Delete alterntive nodes
1->5->20->
Move last node to front
20->1->5->
Get count of value
2
Delete entire list
No element present in the list
''' | class Node:
def __init__(self, data, next=None):
self.data = data
self.next = next
def set_data(self, data):
self.data = data
def get_data(self):
return self.data
def set_next(self, data):
self.data = data
def get_next(self):
return self.next
class Linkedlist(object):
def __init__(self):
self.head = None
def insert_at_first(self, data):
new_node = node(data)
newNode.next = self.head
self.head = newNode
def show(self):
if self.head == None:
print('No element present in the list')
return
temp = self.head
while temp:
print(temp.data, end='->')
temp = temp.next
print()
def insert_at_position(self, data, position):
new_node = node(data)
if position == 1:
self.insertAtFirst(data)
else:
temp = self.head
for i in range(position - 2):
temp = temp.next
newNode.next = temp.next
temp.next = newNode
def delete(self, data):
if self.head == None:
return None
temp = self.head
if temp.data == data:
self.head = temp.next
return
else:
while temp:
if temp.data == data:
break
prev = temp
temp = temp.next
if temp == None:
return
prev.next = temp.next
return
def insert_at_last(self, data):
if self.head == None:
self.insertAtFirst(data)
return
new_node = node(data)
temp = self.head
while temp.next is not None:
temp = temp.next
temp.next = newNode
def length(self):
count = 0
if self.head is None:
return count
else:
temp = self.head
while temp is not None:
count += 1
temp = temp.next
return count
def if_node_exists(self, data):
if self.head == None:
return False
else:
temp = self.head
while temp:
if temp.data == data:
return True
temp = temp.next
return False
def rotate_clockwise(self, n):
if self.head == None or self.head.next == None or n <= 0:
return
length = self.length()
n = n % length
if n == 0:
return
start = self.head
temp1 = self.head
for i in range(length - n - 1):
temp1 = temp1.next
self.head = temp1.next
temp2 = temp1.next
temp1.next = None
for i in range(n - 1):
temp2 = temp2.next
temp2.next = start
def rotate_anti_clockwise(self, n):
if self.head == None or self.head.next == None or n <= 0:
return
start = self.head
temp1 = self.head
length = self.length()
n = n % length
if n == 0:
return
for i in range(n - 1):
temp1 = temp1.next
self.head = temp1.next
temp2 = temp1.next
temp1.next = None
for i in range(length - n - 1):
temp2 = temp2.next
temp2.next = start
def reverse(self):
prev = None
current = self.head
while current is not None:
after = current.next
current.next = prev
prev = current
current = after
self.head = prev
def reverse_recursion(self):
return self.reverseRecursionLL(self.head)
def reverse_recursion_ll(self, temp):
if temp.next == None:
self.head = temp
return
self.reverseRecursionLL(temp.next)
temp2 = temp.next
temp2.next = temp
temp.next = None
def get_middle_element(self, printelement=False):
slow = self.head
fast = self.head.next
while fast != None and fast.next != None:
slow = slow.next
fast = fast.next.next
if printelement:
print('The middle element is: ' + str(slow.data))
return slow.data
def is_first_second_half_match(self):
slow = self.head
fast = self.head.next
while fast != None and fast.next != None:
slow = slow.next
fast = fast.next.next
temp = self.head
slow = slow.next
while slow:
if temp.data != slow.data:
return False
slow = slow.next
temp = temp.next
return True
def is_palindrome(self):
stack = []
slow = self.head
fast = self.head.next
stack.append(slow.data)
while fast != None and fast.next != None:
slow = slow.next
fast = fast.next.next
stack.append(slow.data)
if fast == None:
stack.pop()
slow = slow.next
while slow:
if slow.data != stack.pop():
return False
slow = slow.next
return True
def delete_list(self):
self.head = None
def delete_greater_values_on_right(self):
if self.head == None and self.head.next == None:
return
temp = self.head
while temp.next != None:
if temp.data < temp.next.data:
self.delete(temp.data)
temp = temp.next
def pairwise_swap_elements(self):
if self.head == None and self.head.next == None:
return
temp = self.head
while temp != None and temp.next != None:
n = temp.data
temp.data = temp.next.data
temp.next.data = n
temp = temp.next.next
def delete_alternate_nodes(self):
if self.head == None and self.head.next == None:
return
temp = self.head
while temp != None and temp.next != None:
temp.next = temp.next.next
temp = temp.next
def move_last_node_to_front(self):
if self.head == None or self.head.next == None:
return
temp = self.head
while temp.next.next is not None:
temp = temp.next
val = temp.next.data
temp.next = None
self.insertAtFirst(val)
def get_count_of_value(self, n):
if self.head == None:
return
temp = self.head
count = 0
while temp:
if temp.data == n:
count += 1
temp = temp.next
return count
if __name__ == '__main__':
l_list = linked_list()
print('Insert at first')
LList.insertAtFirst(10)
LList.insertAtFirst(20)
LList.show()
print('Insert at position')
LList.insertAtPosition(5, 3)
LList.show()
print('Delete')
LList.delete(50)
LList.show()
print('Insert at last')
LList.insertAtLast(2)
LList.insertAtLast(1)
LList.delete(10)
LList.show()
print('If Node 20 Exists: ' + str(LList.ifNodeExists(20)))
print('Length: ' + str(LList.length()))
print('Rotate Clockwise')
LList.rotateClockwise(2)
LList.show()
print('Rotate Anticlockwise')
LList.rotateAntiClockwise(2)
LList.show()
print('Reverse')
LList.reverse()
LList.show()
LList.reverseRecursion()
LList.show()
LList.getMiddleElement(printelement=True)
LList.insertAtLast(1)
LList.insertAtLast(2)
LList.insertAtLast(5)
LList.insertAtLast(20)
LList.show()
print('First and second half match')
print(LList.isFirstSecondHalfMatch())
print('Is Palindrome')
print(LList.isPalindrome())
LList.deleteGreaterValuesOnRight()
LList.show()
print('Pair wise swap elements')
LList.pairwiseSwapElements()
LList.show()
print('Delete alterntive nodes')
LList.deleteAlternateNodes()
LList.show()
print('Move last node to front')
LList.moveLastNodeToFront()
LList.show()
print('Get count of value')
LList.insertAtFirst(20)
print(LList.getCountOfValue(20))
print('Delete entire list')
LList.deleteList()
LList.show()
'\n Output\n Insert at first\n 20->10->\n Insert at position\n 20->10->5->\n Delete\n 20->10->5->\n Insert at last\n 20->5->2->1->\n If Node 20 Exists: True\n Length: 4\n Rotate Clockwise\n 2->1->20->5->\n Rotate Anticlockwise\n 20->5->2->1->\n Reverse\n 1->2->5->20->\n 20->5->2->1->\n The middle element is: 5\n 20->5->2->1->1->2->5->20->\n First and second half match\n False\n Is Palindrome\n True\n 20->1->2->5->20->\n Pair wise swap elements\n 1->20->5->2->20->\n Delete alterntive nodes\n 1->5->20->\n Move last node to front\n 20->1->5->\n Get count of value\n 2\n Delete entire list\n No element present in the list\n ' |
test = { 'name': 'q3_2_2',
'points': 1,
'suites': [ { 'cases': [ { 'code': '>>> from collections import Counter;\n'
">>> g = train_movies.column('Genre');\n"
">>> r = np.where(test_movies['Title'] == 'tron')[0][0];\n"
'>>> t = test_my_features.row(r);\n'
'>>> tron_expected_genre = Counter(np.take(g, np.argsort(fast_distances(t, train_my_features))[:13])).most_common(1)[0][0];\n'
'>>> tron_genre == tron_expected_genre\n'
'True',
'hidden': False,
'locked': False}],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'}]}
| test = {'name': 'q3_2_2', 'points': 1, 'suites': [{'cases': [{'code': ">>> from collections import Counter;\n>>> g = train_movies.column('Genre');\n>>> r = np.where(test_movies['Title'] == 'tron')[0][0];\n>>> t = test_my_features.row(r);\n>>> tron_expected_genre = Counter(np.take(g, np.argsort(fast_distances(t, train_my_features))[:13])).most_common(1)[0][0];\n>>> tron_genre == tron_expected_genre\nTrue", 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]} |
# -*- coding: utf-8 -*-
"""
FlowrouteMessagingLib.APIException
Copyright Flowroute, Inc. 2016
"""
class APIException(Exception):
"""
Class that handles HTTP Exceptions when fetching API Endpoints.
Attributes:
reason (string): The reason (or error message) for the Exception to be
raised.
response_code (int): The HTTP Response Code from the API Request that
caused this exception to be raised.
response_body (string): The body that was retrieved during the API
request.
"""
def __init__(self, reason, response_code, response_body):
Exception.__init__(self, reason)
self.response_code = response_code
self.response_body = response_body
| """
FlowrouteMessagingLib.APIException
Copyright Flowroute, Inc. 2016
"""
class Apiexception(Exception):
"""
Class that handles HTTP Exceptions when fetching API Endpoints.
Attributes:
reason (string): The reason (or error message) for the Exception to be
raised.
response_code (int): The HTTP Response Code from the API Request that
caused this exception to be raised.
response_body (string): The body that was retrieved during the API
request.
"""
def __init__(self, reason, response_code, response_body):
Exception.__init__(self, reason)
self.response_code = response_code
self.response_body = response_body |
x=10
y=50
z=30
a=3.9
b="roman regions"
c="brock leasner suplex city"
| x = 10
y = 50
z = 30
a = 3.9
b = 'roman regions'
c = 'brock leasner suplex city' |
"""NICOS GUI default configuration."""
main_window = tabbed(
('Instrument', docked(
vsplit(
panel('nicos.clients.gui.panels.status.ScriptStatusPanel'),
# panel('nicos.clients.gui.panels.watch.WatchPanel'),
panel('nicos.clients.gui.panels.console.ConsolePanel',
watermark='nicos_mlz/reseda/gui/watermark.png'),
),
('NICOS devices',
panel('nicos.clients.gui.panels.devices.DevicesPanel', icons=True,
dockpos='right',)
),
('Experiment Information and Setup',
panel('nicos.clients.gui.panels.expinfo.ExpInfoPanel',)
),
)
),
('Tunewave table',
panel('nicos_mlz.gui.tunewavetable.TunewaveTablePanel',
tabledev='echotime')
),
('Mieze display',
panel('nicos_mlz.reseda.gui.mieze_display.MiezePanel',
setups='det_cascade',
columns=3, rows=2, foils=[7, 6, 5, 0, 1, 2])
),
('Mieze display (Reseda II)',
panel('nicos_mlz.reseda.gui.mieze_display.MiezePanel',
setups='det_cascade2',
columns=4, rows=2, foils=[6, 5, 4, 3, 2, 1, 0])
),
)
windows = [
window('Editor', 'editor',
panel('nicos.clients.gui.panels.editor.EditorPanel')),
window('Scans', 'plotter',
panel('nicos.clients.gui.panels.scans.ScansPanel',
fit_functions={
'Resonance': (['Vmax = 0.1', 'R = 0.6'], 'Vmax / sqrt(R**2 + (f*L-1/(f*C))**2)'),
'Echo': ([], 'y_0 * (1 - pol * cos((pi * (t - x_0)) / (2 * echo2pistep)) *'
'sinc((st * (t - x_1))/(2 * echo2pistep))**2)'),
},
)
),
window('History', 'find',
panel('nicos.clients.gui.panels.history.HistoryPanel')),
window('Logbook', 'table',
panel('nicos.clients.gui.panels.elog.ELogPanel')),
window('Log files', 'table',
panel('nicos.clients.gui.panels.logviewer.LogViewerPanel')),
window('Errors', 'errors',
panel('nicos.clients.gui.panels.errors.ErrorPanel')),
window('Live data', 'live',
panel('nicos_mlz.reseda.gui.live.CascadeLiveDataPanel',
filetypes=['pad', 'tof'],
defaults={'logscale': True},)),
]
tools = [
tool('Downtime report', 'nicos.clients.gui.tools.downtime.DownTimeTool',
sender='reseda@frm2.tum.de',
),
tool('Calculator', 'nicos.clients.gui.tools.calculator.CalculatorTool'),
tool('Neutron cross-sections',
'nicos.clients.gui.tools.website.WebsiteTool',
url='http://www.ncnr.nist.gov/resources/n-lengths/'),
tool('Neutron activation', 'nicos.clients.gui.tools.website.WebsiteTool',
url='https://webapps.frm2.tum.de/intranet/activation/'),
tool('Neutron calculations', 'nicos.clients.gui.tools.website.WebsiteTool',
url='https://webapps.frm2.tum.de/intranet/neutroncalc/'),
tool('Report NICOS bug or request enhancement',
'nicos.clients.gui.tools.bugreport.BugreportTool'),
tool('Emergency stop button',
'nicos.clients.gui.tools.estop.EmergencyStopTool',
runatstartup=False),
]
options = {
'reader_classes': ['nicos_mlz.reseda.devices.cascade.CascadeImageReader'],
}
| """NICOS GUI default configuration."""
main_window = tabbed(('Instrument', docked(vsplit(panel('nicos.clients.gui.panels.status.ScriptStatusPanel'), panel('nicos.clients.gui.panels.console.ConsolePanel', watermark='nicos_mlz/reseda/gui/watermark.png')), ('NICOS devices', panel('nicos.clients.gui.panels.devices.DevicesPanel', icons=True, dockpos='right')), ('Experiment Information and Setup', panel('nicos.clients.gui.panels.expinfo.ExpInfoPanel')))), ('Tunewave table', panel('nicos_mlz.gui.tunewavetable.TunewaveTablePanel', tabledev='echotime')), ('Mieze display', panel('nicos_mlz.reseda.gui.mieze_display.MiezePanel', setups='det_cascade', columns=3, rows=2, foils=[7, 6, 5, 0, 1, 2])), ('Mieze display (Reseda II)', panel('nicos_mlz.reseda.gui.mieze_display.MiezePanel', setups='det_cascade2', columns=4, rows=2, foils=[6, 5, 4, 3, 2, 1, 0])))
windows = [window('Editor', 'editor', panel('nicos.clients.gui.panels.editor.EditorPanel')), window('Scans', 'plotter', panel('nicos.clients.gui.panels.scans.ScansPanel', fit_functions={'Resonance': (['Vmax = 0.1', 'R = 0.6'], 'Vmax / sqrt(R**2 + (f*L-1/(f*C))**2)'), 'Echo': ([], 'y_0 * (1 - pol * cos((pi * (t - x_0)) / (2 * echo2pistep)) *sinc((st * (t - x_1))/(2 * echo2pistep))**2)')})), window('History', 'find', panel('nicos.clients.gui.panels.history.HistoryPanel')), window('Logbook', 'table', panel('nicos.clients.gui.panels.elog.ELogPanel')), window('Log files', 'table', panel('nicos.clients.gui.panels.logviewer.LogViewerPanel')), window('Errors', 'errors', panel('nicos.clients.gui.panels.errors.ErrorPanel')), window('Live data', 'live', panel('nicos_mlz.reseda.gui.live.CascadeLiveDataPanel', filetypes=['pad', 'tof'], defaults={'logscale': True}))]
tools = [tool('Downtime report', 'nicos.clients.gui.tools.downtime.DownTimeTool', sender='reseda@frm2.tum.de'), tool('Calculator', 'nicos.clients.gui.tools.calculator.CalculatorTool'), tool('Neutron cross-sections', 'nicos.clients.gui.tools.website.WebsiteTool', url='http://www.ncnr.nist.gov/resources/n-lengths/'), tool('Neutron activation', 'nicos.clients.gui.tools.website.WebsiteTool', url='https://webapps.frm2.tum.de/intranet/activation/'), tool('Neutron calculations', 'nicos.clients.gui.tools.website.WebsiteTool', url='https://webapps.frm2.tum.de/intranet/neutroncalc/'), tool('Report NICOS bug or request enhancement', 'nicos.clients.gui.tools.bugreport.BugreportTool'), tool('Emergency stop button', 'nicos.clients.gui.tools.estop.EmergencyStopTool', runatstartup=False)]
options = {'reader_classes': ['nicos_mlz.reseda.devices.cascade.CascadeImageReader']} |
# 914000500
ATHENA = 1209007
sm.setSpeakerID(ATHENA)
if sm.sendAskYesNo("You made it back safely! What about the child?! Did you bring the child with you?!"):
sm.completeQuest(parentID)
sm.consumeItem(4001271)
sm.flipSpeaker()
sm.sendNext("Oh, what a relief. I'm so glad...")
sm.setPlayerAsSpeaker()
sm.sendSay("Hurry and board the ship! We don't have much time!")
sm.setSpeakerID(ATHENA)
sm.flipSpeaker()
sm.sendSay("We don't have any time to waste. The Black Mage's forces are getting closer and closer! We're doomed if we don't leave right this moment!")
sm.setPlayerAsSpeaker()
sm.sendSay("Leave, now!")
sm.setSpeakerID(ATHENA)
sm.flipSpeaker()
sm.sendSay("Aran, please! I know you want to stay and fight the Black Mage, but it's too late! Leave it to the others and come to Victoria Island with us! ")
sm.setPlayerAsSpeaker()
sm.sendSay("No, I can't!")
sm.sendSay("Athena Pierce, why don't you leave for Victoria Island first? I promise I'll come for you later. I'll be alright. I must fight the Black Mage with the other heroes!")
sm.lockInGameUI(True, False)
sm.warp(914090010, 0)
else:
sm.sendNext("What about the child? Please give me the child.")
sm.dispose()
| athena = 1209007
sm.setSpeakerID(ATHENA)
if sm.sendAskYesNo('You made it back safely! What about the child?! Did you bring the child with you?!'):
sm.completeQuest(parentID)
sm.consumeItem(4001271)
sm.flipSpeaker()
sm.sendNext("Oh, what a relief. I'm so glad...")
sm.setPlayerAsSpeaker()
sm.sendSay("Hurry and board the ship! We don't have much time!")
sm.setSpeakerID(ATHENA)
sm.flipSpeaker()
sm.sendSay("We don't have any time to waste. The Black Mage's forces are getting closer and closer! We're doomed if we don't leave right this moment!")
sm.setPlayerAsSpeaker()
sm.sendSay('Leave, now!')
sm.setSpeakerID(ATHENA)
sm.flipSpeaker()
sm.sendSay("Aran, please! I know you want to stay and fight the Black Mage, but it's too late! Leave it to the others and come to Victoria Island with us! ")
sm.setPlayerAsSpeaker()
sm.sendSay("No, I can't!")
sm.sendSay("Athena Pierce, why don't you leave for Victoria Island first? I promise I'll come for you later. I'll be alright. I must fight the Black Mage with the other heroes!")
sm.lockInGameUI(True, False)
sm.warp(914090010, 0)
else:
sm.sendNext('What about the child? Please give me the child.')
sm.dispose() |
"""
P/L -- profit/loss
Calls (break_even and P/L)
Puts (break_even and P/L)
Options are made up of:
- Intrinsic Value
- Extrinsic Value
Add the shebang (first line):
!/usr/bin/env python3
Make it executable:
chmod +x options.py
Run it with:
./options.py
Variables:
S - current price
K - strike price
cprice - call contract price
pprice - put contract price
call_be - break even call
put_be - break even put
"""
class Options:
def __init__(self, S, K):
self.S = S
self.K = K
def call_be(self, cprice):
self.call_be = self.K + cprice
return self.call_be
def put_be(self, pprice):
self.put_be = self.K - pprice
return self.put_be
def call(self, end):
profitability = []
prices = []
for i in range(self.S, end+5, 5):
prices.append(i)
profitability.append(round(max(0, i - self.call_be), 2))
ans = zip(prices, profitability)
print("P/L Call Options")
for i,j in ans:
print(i, j)
#return print(f"P/L Call Option: ", *zip(prices, profitability))
def put(self, end):
profitability = []
prices = []
for i in range(self.S, end+5, 5):
prices.append(i)
profitability.append(round(max(0, self.put_be - i)))
ans = zip(prices, profitability)
print("P/L Put Options")
for i,j in ans:
print(i, j)
#return print(f"P/L Put Option: ", *zip(prices, profitability))
# Tests
current_price = 110
strike_price = 90
#creating an object -- test
test = Options(current_price, strike_price)
#cprice -- contract price per contract (each contract 100 shares)
cprice = 1.20
#end value for the loop
end_value = 150
#answers
print("Break Even: ", test.call_be(cprice))
test.call(end_value)
| """
P/L -- profit/loss
Calls (break_even and P/L)
Puts (break_even and P/L)
Options are made up of:
- Intrinsic Value
- Extrinsic Value
Add the shebang (first line):
!/usr/bin/env python3
Make it executable:
chmod +x options.py
Run it with:
./options.py
Variables:
S - current price
K - strike price
cprice - call contract price
pprice - put contract price
call_be - break even call
put_be - break even put
"""
class Options:
def __init__(self, S, K):
self.S = S
self.K = K
def call_be(self, cprice):
self.call_be = self.K + cprice
return self.call_be
def put_be(self, pprice):
self.put_be = self.K - pprice
return self.put_be
def call(self, end):
profitability = []
prices = []
for i in range(self.S, end + 5, 5):
prices.append(i)
profitability.append(round(max(0, i - self.call_be), 2))
ans = zip(prices, profitability)
print('P/L Call Options')
for (i, j) in ans:
print(i, j)
def put(self, end):
profitability = []
prices = []
for i in range(self.S, end + 5, 5):
prices.append(i)
profitability.append(round(max(0, self.put_be - i)))
ans = zip(prices, profitability)
print('P/L Put Options')
for (i, j) in ans:
print(i, j)
current_price = 110
strike_price = 90
test = options(current_price, strike_price)
cprice = 1.2
end_value = 150
print('Break Even: ', test.call_be(cprice))
test.call(end_value) |
##Clock in pt2thon##
t1 = input("Init schedule : ") # first schedule
HH1 = int(t1[0]+t1[1])
MM1 = int(t1[3]+t1[4])
SS1 = int(t1[6]+t1[7])
t2 = input("Final schedule : ") # second schedule
HH2 = int(t2[0]+t2[1])
MM2 = int(t2[3]+t2[4])
SS2 = int(t2[6]+t2[7])
tt1 = (HH1*3600)+(MM1*60)+SS1 # total schedule 1
tt2 = (HH2*3600)+(MM2*60)+SS2 # total schedule 2
tt3 = tt2-tt1 # difference between tt2 e tt1
# Part Math
if (tt3 < 0):
# If the difference between tt2 e tt1 for negative :
a = 86400 - tt1 # 86400 is seconds in 1 day;
a2 = a + tt2 # a2 is the difference between 1 day e the <hours var>;
Ht = a2//3600 # Ht is hours calculated;
a = a2 % 3600 # Convert 'a' in seconds;
Mt = a//60 # Mt is minutes calculated;
St = a % 60 # St is seconds calculated;
else:
# If the difference between tt2 e tt1 for positive :
Ht = tt3//3600 # Ht is hours calculated;
z = tt3 % 3600 # 'z' is tt3 converting in hours by seconds
Mt = z//60 # Mt is minutes calculated;
St = tt3 % 60 # St is seconds calculated;
# special condition below :
if (Ht < 10):
h = '0'+ str(Ht)
Ht = h
if (Mt < 10):
m = '0'+ str(Mt)
Mt = m
if (St < 10):
s = '0'+ str(St)
St = s
# add '0' to the empty spaces (caused by previous operations) in the final result!
print("final result is :", str(Ht)+":"+str(Mt)+":"+str(St)) # final result (formatted in clock) | t1 = input('Init schedule : ')
hh1 = int(t1[0] + t1[1])
mm1 = int(t1[3] + t1[4])
ss1 = int(t1[6] + t1[7])
t2 = input('Final schedule : ')
hh2 = int(t2[0] + t2[1])
mm2 = int(t2[3] + t2[4])
ss2 = int(t2[6] + t2[7])
tt1 = HH1 * 3600 + MM1 * 60 + SS1
tt2 = HH2 * 3600 + MM2 * 60 + SS2
tt3 = tt2 - tt1
if tt3 < 0:
a = 86400 - tt1
a2 = a + tt2
ht = a2 // 3600
a = a2 % 3600
mt = a // 60
st = a % 60
else:
ht = tt3 // 3600
z = tt3 % 3600
mt = z // 60
st = tt3 % 60
if Ht < 10:
h = '0' + str(Ht)
ht = h
if Mt < 10:
m = '0' + str(Mt)
mt = m
if St < 10:
s = '0' + str(St)
st = s
print('final result is :', str(Ht) + ':' + str(Mt) + ':' + str(St)) |
class PostmarkerException(Exception):
"""Base class for all exceptions in Postmarker."""
class ClientError(PostmarkerException):
"""Indicates client's error."""
def __init__(self, *args, **kwargs):
self.error_code = kwargs.pop("error_code")
super().__init__(*args, **kwargs)
class SpamAssassinError(PostmarkerException):
pass
| class Postmarkerexception(Exception):
"""Base class for all exceptions in Postmarker."""
class Clienterror(PostmarkerException):
"""Indicates client's error."""
def __init__(self, *args, **kwargs):
self.error_code = kwargs.pop('error_code')
super().__init__(*args, **kwargs)
class Spamassassinerror(PostmarkerException):
pass |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.