content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
dic_cal = {} def cal(a, b): if (a, b) in dic_cal: return dic_cal[(a, b)] return cal(a - 1, b) + cal(a, b - 1) if __name__ == '__main__': for j in range(0, 1): for k in range(0, 21): dic_cal[(j, k)] = 1 for j in range(0, 21): for k in range(0, 1): dic_cal[(j, k)] = 1 for j in range(0, 21): for k in range(0, 21): dic_cal[(j, k)] = cal(j, k) print(cal(20, 20))
dic_cal = {} def cal(a, b): if (a, b) in dic_cal: return dic_cal[a, b] return cal(a - 1, b) + cal(a, b - 1) if __name__ == '__main__': for j in range(0, 1): for k in range(0, 21): dic_cal[j, k] = 1 for j in range(0, 21): for k in range(0, 1): dic_cal[j, k] = 1 for j in range(0, 21): for k in range(0, 21): dic_cal[j, k] = cal(j, k) print(cal(20, 20))
# shorthand for tabulation def get_tabs(num): ret = "" for _ in range(num): ret += "\t" return ret
def get_tabs(num): ret = '' for _ in range(num): ret += '\t' return ret
n = int(input()) chars_of_each_string = [[char for char in input()] for _ in range(n)] chars = [] for characters in chars_of_each_string: chars += list(set(characters)) chars_used_in_all = [] for char in set(chars): if chars.count(char) == n: chars_used_in_all.append(char) if not chars_used_in_all: print("") exit() chars_used_in_all.sort() accepted_chars_of_each_string = [ [char for char in chars if char in chars_used_in_all] for chars in chars_of_each_string ] print(accepted_chars_of_each_string) each_count = dict([(char, 0) for char in chars_used_in_all]) for char in chars_used_in_all: for i in range(n): count = accepted_chars_of_each_string[i].count(char) if i == 0: min_count = count min_count = min(min_count, count) each_count[char] = min_count # res = '' # for char, count in each_count.items(): # res += char * count # print(res) res = [] for char, count in each_count.items(): res.append(char * count) ans = "".join(res) print(ans)
n = int(input()) chars_of_each_string = [[char for char in input()] for _ in range(n)] chars = [] for characters in chars_of_each_string: chars += list(set(characters)) chars_used_in_all = [] for char in set(chars): if chars.count(char) == n: chars_used_in_all.append(char) if not chars_used_in_all: print('') exit() chars_used_in_all.sort() accepted_chars_of_each_string = [[char for char in chars if char in chars_used_in_all] for chars in chars_of_each_string] print(accepted_chars_of_each_string) each_count = dict([(char, 0) for char in chars_used_in_all]) for char in chars_used_in_all: for i in range(n): count = accepted_chars_of_each_string[i].count(char) if i == 0: min_count = count min_count = min(min_count, count) each_count[char] = min_count res = [] for (char, count) in each_count.items(): res.append(char * count) ans = ''.join(res) print(ans)
''' Description: exercise: finding the area Version: 1.0.0.20210113 Author: Arvin Zhao Date: 2021-01-13 12:20:06 Last Editors: Arvin Zhao LastEditTime: 2021-01-13 12:48:56 ''' def display_square_area() -> None: ''' Calculate and display the area of a square. ''' while True: try: side = float(input('Enter the length of a square\'s side: ')) print('Area:', side * side) # Calculate the area of a square by the formula "side length * side length". break except ValueError: print('Error! Invalid input!') def display_triangle_area() -> None: ''' Calculate and display the area of a triangle. ''' while True: try: base, height = [float(value) for value in input("Enter the base and height separated by space: ").split()] if base > 0 and height > 0: print('Area:', base * height / 2) # Calculate the area of a triangle by the formula "base * height / 2". break else: raise ValueError except ValueError: print('Error! Invalid input!') if __name__ == '__main__': print('1) Square') print('2) Triangle') while True: choice = input('Enter 1 or 2 as your choice: ').strip() if choice == '1': display_square_area() break elif choice == '2': display_triangle_area() break else: print('Error! No such option!')
""" Description: exercise: finding the area Version: 1.0.0.20210113 Author: Arvin Zhao Date: 2021-01-13 12:20:06 Last Editors: Arvin Zhao LastEditTime: 2021-01-13 12:48:56 """ def display_square_area() -> None: """ Calculate and display the area of a square. """ while True: try: side = float(input("Enter the length of a square's side: ")) print('Area:', side * side) break except ValueError: print('Error! Invalid input!') def display_triangle_area() -> None: """ Calculate and display the area of a triangle. """ while True: try: (base, height) = [float(value) for value in input('Enter the base and height separated by space: ').split()] if base > 0 and height > 0: print('Area:', base * height / 2) break else: raise ValueError except ValueError: print('Error! Invalid input!') if __name__ == '__main__': print('1) Square') print('2) Triangle') while True: choice = input('Enter 1 or 2 as your choice: ').strip() if choice == '1': display_square_area() break elif choice == '2': display_triangle_area() break else: print('Error! No such option!')
class MultiheadAttention(Module): __parameters__ = ["in_proj_weight", "in_proj_bias", ] __buffers__ = [] in_proj_weight : Tensor in_proj_bias : Tensor training : bool out_proj : __torch__.torch.nn.modules.linear.___torch_mangle_9395._LinearWithBias def forward(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _0 = self.out_proj.bias _1 = self.out_proj.weight _2 = self.in_proj_bias _3 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _4 = int(tgt_len) _5 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _6 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _7 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _8 = int(head_dim) _9 = int(head_dim) _10 = int(head_dim) output = torch.matmul(argument_1.float(), torch.t(_3).float()) _11 = torch.chunk(torch.add_(output, _2, alpha=1), 3, -1) q, k, v, = _11 q0 = torch.mul(q, CONSTANTS.c1) q1 = torch.contiguous(q0, memory_format=0) _12 = [_5, int(torch.mul(bsz, CONSTANTS.c0)), _10] q2 = torch.transpose(torch.view(q1, _12), 0, 1) _13 = torch.contiguous(k, memory_format=0) _14 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _9] k0 = torch.transpose(torch.view(_13, _14), 0, 1) _15 = torch.contiguous(v, memory_format=0) _16 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _8] v0 = torch.transpose(torch.view(_15, _16), 0, 1) attn_output_weights = torch.bmm(q2, torch.transpose(k0, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights0 = torch.dropout(input, 0., True) attn_output = torch.bmm(attn_output_weights0, v0) _17 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input0 = torch.view(_17, [_4, _6, _7]) output0 = torch.matmul(input0, torch.t(_1)) return torch.add_(output0, _0, alpha=1) def forward1(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _18 = self.out_proj.bias _19 = self.out_proj.weight _20 = self.in_proj_bias _21 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _22 = int(tgt_len) _23 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _24 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _25 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _26 = int(head_dim) _27 = int(head_dim) _28 = int(head_dim) output = torch.matmul(argument_1, torch.t(_21)) _29 = torch.chunk(torch.add_(output, _20, alpha=1), 3, -1) q, k, v, = _29 q3 = torch.mul(q, CONSTANTS.c1) q4 = torch.contiguous(q3, memory_format=0) _30 = [_23, int(torch.mul(bsz, CONSTANTS.c0)), _28] q5 = torch.transpose(torch.view(q4, _30), 0, 1) _31 = torch.contiguous(k, memory_format=0) _32 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _27] k1 = torch.transpose(torch.view(_31, _32), 0, 1) _33 = torch.contiguous(v, memory_format=0) _34 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _26] v1 = torch.transpose(torch.view(_33, _34), 0, 1) attn_output_weights = torch.bmm(q5, torch.transpose(k1, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights1 = torch.dropout(input, 0., True) attn_output = torch.bmm(attn_output_weights1, v1) _35 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input1 = torch.view(_35, [_22, _24, _25]) output1 = torch.matmul(input1, torch.t(_19)) return torch.add_(output1, _18, alpha=1)
class Multiheadattention(Module): __parameters__ = ['in_proj_weight', 'in_proj_bias'] __buffers__ = [] in_proj_weight: Tensor in_proj_bias: Tensor training: bool out_proj: __torch__.torch.nn.modules.linear.___torch_mangle_9395._LinearWithBias def forward(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _0 = self.out_proj.bias _1 = self.out_proj.weight _2 = self.in_proj_bias _3 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _4 = int(tgt_len) _5 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _6 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _7 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _8 = int(head_dim) _9 = int(head_dim) _10 = int(head_dim) output = torch.matmul(argument_1.float(), torch.t(_3).float()) _11 = torch.chunk(torch.add_(output, _2, alpha=1), 3, -1) (q, k, v) = _11 q0 = torch.mul(q, CONSTANTS.c1) q1 = torch.contiguous(q0, memory_format=0) _12 = [_5, int(torch.mul(bsz, CONSTANTS.c0)), _10] q2 = torch.transpose(torch.view(q1, _12), 0, 1) _13 = torch.contiguous(k, memory_format=0) _14 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _9] k0 = torch.transpose(torch.view(_13, _14), 0, 1) _15 = torch.contiguous(v, memory_format=0) _16 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _8] v0 = torch.transpose(torch.view(_15, _16), 0, 1) attn_output_weights = torch.bmm(q2, torch.transpose(k0, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights0 = torch.dropout(input, 0.0, True) attn_output = torch.bmm(attn_output_weights0, v0) _17 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input0 = torch.view(_17, [_4, _6, _7]) output0 = torch.matmul(input0, torch.t(_1)) return torch.add_(output0, _0, alpha=1) def forward1(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _18 = self.out_proj.bias _19 = self.out_proj.weight _20 = self.in_proj_bias _21 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _22 = int(tgt_len) _23 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _24 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _25 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _26 = int(head_dim) _27 = int(head_dim) _28 = int(head_dim) output = torch.matmul(argument_1, torch.t(_21)) _29 = torch.chunk(torch.add_(output, _20, alpha=1), 3, -1) (q, k, v) = _29 q3 = torch.mul(q, CONSTANTS.c1) q4 = torch.contiguous(q3, memory_format=0) _30 = [_23, int(torch.mul(bsz, CONSTANTS.c0)), _28] q5 = torch.transpose(torch.view(q4, _30), 0, 1) _31 = torch.contiguous(k, memory_format=0) _32 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _27] k1 = torch.transpose(torch.view(_31, _32), 0, 1) _33 = torch.contiguous(v, memory_format=0) _34 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _26] v1 = torch.transpose(torch.view(_33, _34), 0, 1) attn_output_weights = torch.bmm(q5, torch.transpose(k1, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights1 = torch.dropout(input, 0.0, True) attn_output = torch.bmm(attn_output_weights1, v1) _35 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input1 = torch.view(_35, [_22, _24, _25]) output1 = torch.matmul(input1, torch.t(_19)) return torch.add_(output1, _18, alpha=1)
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-DataCollectionMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-DataCollectionMIB # Produced by pysmi-0.3.4 at Wed May 1 14:29:37 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection") Unsigned32, RowStatus, Integer32, Gauge32, DisplayString, Counter32, StorageType = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB", "Unsigned32", "RowStatus", "Integer32", "Gauge32", "DisplayString", "Counter32", "StorageType") NonReplicated, EnterpriseDateAndTime, AsciiString = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-TextualConventionsMIB", "NonReplicated", "EnterpriseDateAndTime", "AsciiString") mscComponents, mscPassportMIBs = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB", "mscComponents", "mscPassportMIBs") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, TimeTicks, Counter64, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Bits, Gauge32, IpAddress, Counter32, NotificationType, iso, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "TimeTicks", "Counter64", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Bits", "Gauge32", "IpAddress", "Counter32", "NotificationType", "iso", "ModuleIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") dataCollectionMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14)) mscCol = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21)) mscColRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1), ) if mibBuilder.loadTexts: mscColRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusTable.setDescription('This entry controls the addition and deletion of mscCol components.') mscColRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusEntry.setDescription('A single entry in the table represents a single mscCol component.') mscColRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 1), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscCol components. These components can be added.') mscColComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColStorageType.setDescription('This variable represents the storage type value for the mscCol tables.') mscColIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("accounting", 0), ("alarm", 1), ("log", 2), ("debug", 3), ("scn", 4), ("trap", 5), ("stats", 6)))) if mibBuilder.loadTexts: mscColIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColIndex.setDescription('This variable represents the index for the mscCol tables.') mscColProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10), ) if mibBuilder.loadTexts: mscColProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvTable.setDescription('This group specifies all of the provisioning data for a DCS Collector.') mscColProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvEntry.setDescription('An entry in the mscColProvTable.') mscColAgentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(20, 10000), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColAgentQueueSize.setStatus('obsolete') if mibBuilder.loadTexts: mscColAgentQueueSize.setDescription("This attribute has been replaced with the agentQueueSize attribute in the Lp Engineering DataStream Ov component. Upon migration, if the existing provisioned value of this attribute is the same as the system default for this type of data, no new components are added because the default is what the DataStream component already would be using. Otherwise, if the value is not the same as the system default, then for each Lp which is provisioned at the time of the migration, a DataStream is provisioned and the Ov's agentQueueSize is set to the non-default value.") mscColStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11), ) if mibBuilder.loadTexts: mscColStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsEntry.setDescription('An entry in the mscColStatsTable.') mscColCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColTimesTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266), ) if mibBuilder.loadTexts: mscColTimesTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesTable.setDescription('This attribute specifies the scheduled times at which data should be collected. Only accounting applications need the capability to generate data in this way. Setting this attribute for other streams has no effect. The user can enter the times in any order and duplicates are prevented at data entry. There is a limit of 24 entries, which is imposed at semantic check time. The collection times are triggered in chronological order. A semantic check error is issued if any 2 entries are less than 1 hour apart or if any 2 entries are more than 12 hours apart (which implies that if any entries are provided, there must be at least 2 entries). Note that by default (that is, in the absence of a provisioned schedule), a Virtual Circuit (VC) starts its own 12-hour accounting timer. If any collection times are provisioned here, then the Time- Of-Day-Accounting (TODA) method is used in place of 12-hour accounting. This is applicable to both Switched VCs and Permanent VCs.') mscColTimesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColTimesValue")) if mibBuilder.loadTexts: mscColTimesEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesEntry.setDescription('An entry in the mscColTimesTable.') mscColTimesValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 1), EnterpriseDateAndTime().subtype(subtypeSpec=ValueSizeConstraint(5, 5)).setFixedLength(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColTimesValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesValue.setDescription('This variable represents both the value and the index for the mscColTimesTable.') mscColTimesRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 2), RowStatus()).setMaxAccess("writeonly") if mibBuilder.loadTexts: mscColTimesRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColTimesTable.') mscColLastTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275), ) if mibBuilder.loadTexts: mscColLastTable.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastTable.setDescription('Note: This was made obsolete in R4.1 (BD0108A). This attribute is used for Collector/stats and Collector/account. For statistics, when collection is turned off, or prior to the very first probe, the value is the empty list. Otherwise, this is the network time at which the last probe was sent out (that is, the last time that statistics were collected from, or at least reset by, the applications providing them). For accounting, when no entries exist in collectionTimes, or prior to the very first collection time, the value is the empty list. Otherwise, this is the network time at which the last time-of-day changeover occurred.') mscColLastEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColLastValue")) if mibBuilder.loadTexts: mscColLastEntry.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastEntry.setDescription('An entry in the mscColLastTable.') mscColLastValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1, 1), EnterpriseDateAndTime().subtype(subtypeSpec=ValueSizeConstraint(19, 19)).setFixedLength(19)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColLastValue.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastValue.setDescription('This variable represents both the value and the index for the mscColLastTable.') mscColPeakTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279), ) if mibBuilder.loadTexts: mscColPeakTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakTable.setDescription('This attribute specifies the length of the accounting peak water mark interval. It is at least one minute and at most 15 minutes long. An accounting peak water mark within a given accounting interval is the accounting count which occured during a peak water mark interval with the highest traffic. Peak water marks are used to determine traffic bursts. If no value is provisioned for this attribute value of 5 minutes is assumed. Peak water mark is only measured if attribute collectionTimes in Collector/account is provisioned.') mscColPeakEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColPeakValue")) if mibBuilder.loadTexts: mscColPeakEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakEntry.setDescription('An entry in the mscColPeakTable.') mscColPeakValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColPeakValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakValue.setDescription('This variable represents both the value and the index for the mscColPeakTable.') mscColPeakRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 2), RowStatus()).setMaxAccess("writeonly") if mibBuilder.loadTexts: mscColPeakRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColPeakTable.') mscColSp = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2)) mscColSpRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1), ) if mibBuilder.loadTexts: mscColSpRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusTable.setDescription('This entry controls the addition and deletion of mscColSp components.') mscColSpRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusEntry.setDescription('A single entry in the table represents a single mscColSp component.') mscColSpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColSp components. These components cannot be added nor deleted.') mscColSpComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColSpStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStorageType.setDescription('This variable represents the storage type value for the mscColSp tables.') mscColSpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 10), NonReplicated()) if mibBuilder.loadTexts: mscColSpIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpIndex.setDescription('This variable represents the index for the mscColSp tables.') mscColSpProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10), ) if mibBuilder.loadTexts: mscColSpProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvTable.setDescription('This group specifies all of the provisioning data for a DCS Spooler.') mscColSpProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvEntry.setDescription('An entry in the mscColSpProvTable.') mscColSpSpooling = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColSpSpooling.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpooling.setDescription('This attribute specifies whether or not this type of data is spooled to the disk. If set to off, it is roughly equivalent to Locking the Spooler (except this will survive processor restarts). The following defaults are used: - alarm: on - accounting: on - log: on - debug: off - scn: on - trap: off (see Note below) - stats: on Note that SNMP Traps cannot be spooled. A semantic check prevents the user from setting the value to on for the trap stream.') mscColSpMaximumNumberOfFiles = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setDescription("This attribute specifies the maximum number of files that should be kept on the disk in the directory containing the closed files of this type. The value 0 is defined to mean 'unlimited'. A different default for each type of Spooler is defined as follows: - alarm: 30 - accounting: 200 - debug: 2 - log: 10 - scn: 10 - trap: 2 (this value is meaningless and is ignored) - stats: 200") mscColSpStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11), ) if mibBuilder.loadTexts: mscColSpStateTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateTable.setDescription('This group contains the three OSI State attributes and the six OSI Status attributes. The descriptions generically indicate what each attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241- 7001-150, Passport Operations and Maintenance Guide.') mscColSpStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpStateEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateEntry.setDescription('An entry in the mscColSpStateTable.') mscColSpAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAdminState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpUsageState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpAvailabilityStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setDescription('If supported by the component, this attribute indicates the OSI Availability status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value inTest indicates that the resource is undergoing a test procedure. If adminState is locked or shuttingDown, the normal users are precluded from using the resource and controlStatus is reservedForTest. Tests that do not exclude additional users can be present in any operational or administrative state but the reservedForTest condition should not be present. The value failed indicates that the component has an internal fault that prevents it from operating. The operationalState is disabled. The value dependency indicates that the component cannot operate because some other resource on which it depends is unavailable. The operationalState is disabled. The value powerOff indicates the resource requires power to be applied and it is not powered on. The operationalState is disabled. The value offLine indicates the resource requires a routine operation (either manual, automatic, or both) to be performed to place it on-line and make it available for use. The operationalState is disabled. The value offDuty indicates the resource is inactive in accordance with a predetermined time schedule. In the absence of other disabling conditions, the operationalState is enabled or disabled. The value degraded indicates the service provided by the component is degraded in some way, such as in speed or operating capacity. However, the resource remains available for service. The operationalState is enabled. The value notInstalled indicates the resource is not present. The operationalState is disabled. The value logFull is not used. Description of bits: inTest(0) failed(1) powerOff(2) offLine(3) offDuty(4) dependency(5) degraded(6) notInstalled(7) logFull(8)') mscColSpProceduralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpProceduralStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProceduralStatus.setDescription("If supported by the component, this attribute indicates the OSI Procedural status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value initializationRequired indicates (for a resource which doesn't initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState is disabled. The value notInitialized indicates (for a resource which does initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState may be enabled or disabled. The value initializing indicates that initialization has been initiated but is not yet complete. The operationalState may be enabled or disabled. The value reporting indicates the resource has completed some processing operation and is notifying the results. The operationalState is enabled. The value terminating indicates the component is in a termination phase. If the resource doesn't reinitialize autonomously, operationalState is disabled; otherwise it is enabled or disabled. Description of bits: initializationRequired(0) notInitialized(1) initializing(2) reporting(3) terminating(4)") mscColSpControlStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpControlStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpControlStatus.setDescription('If supported by the component, this attribute indicates the OSI Control status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value subjectToTest indicates the resource is available but tests may be conducted simultaneously at unpredictable times, which may cause it to exhibit unusual characteristics. The value partOfServicesLocked indicates that part of the service is restricted from users of a resource. The adminState is unlocked. The value reservedForTest indicates that the component is administratively unavailable because it is undergoing a test procedure. The adminState is locked. The value suspended indicates that the service has been administratively suspended. Description of bits: subjectToTest(0) partOfServicesLocked(1) reservedForTest(2) suspended(3)') mscColSpAlarmStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAlarmStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAlarmStatus.setDescription('If supported by the component, this attribute indicates the OSI Alarm status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value underRepair indicates the component is currently being repaired. The operationalState is enabled or disabled. The value critical indicates one or more critical alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value major indicates one or more major alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value minor indicates one or more minor alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value alarmOutstanding generically indicates that an alarm of some severity is outstanding against the component. Description of bits: underRepair(0) critical(1) major(2) minor(3) alarmOutstanding(4)') mscColSpStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 15))).clone(namedValues=NamedValues(("hotStandby", 0), ("coldStandby", 1), ("providingService", 2), ("notSet", 15))).clone('notSet')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpStandbyStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStandbyStatus.setDescription('If supported by the component, this attribute indicates the OSI Standby status of the component. The value notSet indicates that either the attribute is not supported or that none of the status conditions described below are present. Note that this is a non-standard value, used because the original specification indicated this attribute was set-valued and thus, did not provide a value to indicate that none of the other three are applicable. The value hotStandby indicates that the resource is not providing service but will be immediately able to take over the role of the resource to be backed up, without initialization activity, and containing the same information as the resource to be backed up. The value coldStandby indicates the resource is a backup for another resource but will not be immediately able to take over the role of the backed up resource and will require some initialization activity. The value providingService indicates that this component, as a backup resource, is currently backing up another resource.') mscColSpUnknownStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("false", 0), ("true", 1))).clone('false')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpUnknownStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUnknownStatus.setDescription('This attribute indicates the OSI Unknown status of the component. The value false indicates that all of the other OSI State and Status attribute values can be considered accurate. The value true indicates that the actual state of the component is not known for sure.') mscColSpOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12), ) if mibBuilder.loadTexts: mscColSpOperTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperTable.setDescription('This group contains the operational attributes specific to a DCS Spooler.') mscColSpOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpOperEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperEntry.setDescription('An entry in the mscColSpOperTable.') mscColSpSpoolingFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpSpoolingFileName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setDescription('When spooling is on, this attribute contains the name of the open file into which data is currently being spooled. When spooling is off, the value of this attribute is the empty string.') mscColSpStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13), ) if mibBuilder.loadTexts: mscColSpStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColSpStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsEntry.setDescription('An entry in the mscColSpStatsTable.') mscColSpCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColSpRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColSpRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAg = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3)) mscColAgRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1), ) if mibBuilder.loadTexts: mscColAgRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of mscColAg components.') mscColAgRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusEntry.setDescription('A single entry in the table represents a single mscColAg component.') mscColAgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 1), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColAg components. These components cannot be added nor deleted.') mscColAgComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColAgStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStorageType.setDescription('This variable represents the storage type value for the mscColAg tables.') mscColAgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))) if mibBuilder.loadTexts: mscColAgIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgIndex.setDescription('This variable represents the index for the mscColAg tables.') mscColAgStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10), ) if mibBuilder.loadTexts: mscColAgStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColAgStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsEntry.setDescription('An entry in the mscColAgStatsTable.') mscColAgCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColAgRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAgRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAgAgentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11), ) if mibBuilder.loadTexts: mscColAgAgentStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the statistical attributes specific to the DCS Agent components.') mscColAgAgentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setDescription('An entry in the mscColAgAgentStatsTable.') mscColAgRecordsNotGenerated = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setDescription('This attribute counts the records of a particular event type on this Card which could not be generated by some application due to some problem such as insufficient resources. One cannot tell exactly which event could not be generated, nor which application instance tried to generate it, but when this count increases, it is an indicator that some re-engineering may be required and will provide some idea as to why a record is missing. This counter wraps to 0 when the maximum value is exceeded.') dataCollectionGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1)) dataCollectionGroupCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1)) dataCollectionGroupCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3)) dataCollectionGroupCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3, 2)) dataCollectionCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3)) dataCollectionCapabilitiesCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1)) dataCollectionCapabilitiesCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3)) dataCollectionCapabilitiesCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3, 2)) mibBuilder.exportSymbols("Nortel-MsCarrier-MscPassport-DataCollectionMIB", mscColSpComponentName=mscColSpComponentName, dataCollectionCapabilitiesCA02=dataCollectionCapabilitiesCA02, mscColAgCurrentQueueSize=mscColAgCurrentQueueSize, mscColProvEntry=mscColProvEntry, mscColAgRowStatus=mscColAgRowStatus, mscColTimesRowStatus=mscColTimesRowStatus, mscColRowStatusTable=mscColRowStatusTable, mscColStorageType=mscColStorageType, mscColSpStorageType=mscColSpStorageType, mscColSpCurrentQueueSize=mscColSpCurrentQueueSize, mscColSpRowStatusEntry=mscColSpRowStatusEntry, mscColSpRowStatusTable=mscColSpRowStatusTable, mscColStatsEntry=mscColStatsEntry, mscColProvTable=mscColProvTable, mscColRecordsDiscarded=mscColRecordsDiscarded, mscColTimesValue=mscColTimesValue, mscColPeakRowStatus=mscColPeakRowStatus, mscColSpSpoolingFileName=mscColSpSpoolingFileName, mscColRecordsRx=mscColRecordsRx, mscColSpSpooling=mscColSpSpooling, mscColAgStatsTable=mscColAgStatsTable, dataCollectionCapabilitiesCA=dataCollectionCapabilitiesCA, mscColLastEntry=mscColLastEntry, mscColSpRowStatus=mscColSpRowStatus, dataCollectionGroupCA02=dataCollectionGroupCA02, mscColAg=mscColAg, mscColAgentQueueSize=mscColAgentQueueSize, mscColAgComponentName=mscColAgComponentName, mscColAgAgentStatsTable=mscColAgAgentStatsTable, mscColSpStateTable=mscColSpStateTable, mscColSpMaximumNumberOfFiles=mscColSpMaximumNumberOfFiles, mscColSpStatsTable=mscColSpStatsTable, mscColPeakValue=mscColPeakValue, mscColSpOperEntry=mscColSpOperEntry, mscColAgIndex=mscColAgIndex, mscColSpProceduralStatus=mscColSpProceduralStatus, dataCollectionMIB=dataCollectionMIB, dataCollectionGroupCA=dataCollectionGroupCA, mscColSpAvailabilityStatus=mscColSpAvailabilityStatus, mscColTimesTable=mscColTimesTable, mscColSpRecordsRx=mscColSpRecordsRx, mscColRowStatusEntry=mscColRowStatusEntry, mscColSpProvEntry=mscColSpProvEntry, dataCollectionCapabilities=dataCollectionCapabilities, mscColSpIndex=mscColSpIndex, mscColIndex=mscColIndex, mscColSpOperationalState=mscColSpOperationalState, mscColSpStateEntry=mscColSpStateEntry, mscColLastTable=mscColLastTable, mscColAgRecordsRx=mscColAgRecordsRx, mscColAgRowStatusTable=mscColAgRowStatusTable, mscColSp=mscColSp, mscColSpUnknownStatus=mscColSpUnknownStatus, mscColAgStatsEntry=mscColAgStatsEntry, mscColLastValue=mscColLastValue, mscColSpStandbyStatus=mscColSpStandbyStatus, dataCollectionGroup=dataCollectionGroup, mscColAgRowStatusEntry=mscColAgRowStatusEntry, mscColStatsTable=mscColStatsTable, mscColSpProvTable=mscColSpProvTable, mscColAgAgentStatsEntry=mscColAgAgentStatsEntry, mscColSpAdminState=mscColSpAdminState, mscColComponentName=mscColComponentName, mscColCurrentQueueSize=mscColCurrentQueueSize, mscColPeakEntry=mscColPeakEntry, mscColAgRecordsDiscarded=mscColAgRecordsDiscarded, mscColRowStatus=mscColRowStatus, mscColPeakTable=mscColPeakTable, mscColAgRecordsNotGenerated=mscColAgRecordsNotGenerated, dataCollectionCapabilitiesCA02A=dataCollectionCapabilitiesCA02A, mscCol=mscCol, mscColSpStatsEntry=mscColSpStatsEntry, mscColSpRecordsDiscarded=mscColSpRecordsDiscarded, mscColTimesEntry=mscColTimesEntry, mscColSpControlStatus=mscColSpControlStatus, mscColSpUsageState=mscColSpUsageState, dataCollectionGroupCA02A=dataCollectionGroupCA02A, mscColAgStorageType=mscColAgStorageType, mscColSpAlarmStatus=mscColSpAlarmStatus, mscColSpOperTable=mscColSpOperTable)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, single_value_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (unsigned32, row_status, integer32, gauge32, display_string, counter32, storage_type) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB', 'Unsigned32', 'RowStatus', 'Integer32', 'Gauge32', 'DisplayString', 'Counter32', 'StorageType') (non_replicated, enterprise_date_and_time, ascii_string) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-TextualConventionsMIB', 'NonReplicated', 'EnterpriseDateAndTime', 'AsciiString') (msc_components, msc_passport_mi_bs) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB', 'mscComponents', 'mscPassportMIBs') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (object_identity, time_ticks, counter64, unsigned32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, bits, gauge32, ip_address, counter32, notification_type, iso, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'TimeTicks', 'Counter64', 'Unsigned32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Bits', 'Gauge32', 'IpAddress', 'Counter32', 'NotificationType', 'iso', 'ModuleIdentity') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') data_collection_mib = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14)) msc_col = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21)) msc_col_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1)) if mibBuilder.loadTexts: mscColRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusTable.setDescription('This entry controls the addition and deletion of mscCol components.') msc_col_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusEntry.setDescription('A single entry in the table represents a single mscCol component.') msc_col_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 1), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscCol components. These components can be added.') msc_col_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColStorageType.setDescription('This variable represents the storage type value for the mscCol tables.') msc_col_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('accounting', 0), ('alarm', 1), ('log', 2), ('debug', 3), ('scn', 4), ('trap', 5), ('stats', 6)))) if mibBuilder.loadTexts: mscColIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColIndex.setDescription('This variable represents the index for the mscCol tables.') msc_col_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10)) if mibBuilder.loadTexts: mscColProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvTable.setDescription('This group specifies all of the provisioning data for a DCS Collector.') msc_col_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvEntry.setDescription('An entry in the mscColProvTable.') msc_col_agent_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(20, 10000)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColAgentQueueSize.setStatus('obsolete') if mibBuilder.loadTexts: mscColAgentQueueSize.setDescription("This attribute has been replaced with the agentQueueSize attribute in the Lp Engineering DataStream Ov component. Upon migration, if the existing provisioned value of this attribute is the same as the system default for this type of data, no new components are added because the default is what the DataStream component already would be using. Otherwise, if the value is not the same as the system default, then for each Lp which is provisioned at the time of the migration, a DataStream is provisioned and the Ov's agentQueueSize is set to the non-default value.") msc_col_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11)) if mibBuilder.loadTexts: mscColStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsEntry.setDescription('An entry in the mscColStatsTable.') msc_col_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_times_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266)) if mibBuilder.loadTexts: mscColTimesTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesTable.setDescription('This attribute specifies the scheduled times at which data should be collected. Only accounting applications need the capability to generate data in this way. Setting this attribute for other streams has no effect. The user can enter the times in any order and duplicates are prevented at data entry. There is a limit of 24 entries, which is imposed at semantic check time. The collection times are triggered in chronological order. A semantic check error is issued if any 2 entries are less than 1 hour apart or if any 2 entries are more than 12 hours apart (which implies that if any entries are provided, there must be at least 2 entries). Note that by default (that is, in the absence of a provisioned schedule), a Virtual Circuit (VC) starts its own 12-hour accounting timer. If any collection times are provisioned here, then the Time- Of-Day-Accounting (TODA) method is used in place of 12-hour accounting. This is applicable to both Switched VCs and Permanent VCs.') msc_col_times_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColTimesValue')) if mibBuilder.loadTexts: mscColTimesEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesEntry.setDescription('An entry in the mscColTimesTable.') msc_col_times_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 1), enterprise_date_and_time().subtype(subtypeSpec=value_size_constraint(5, 5)).setFixedLength(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColTimesValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesValue.setDescription('This variable represents both the value and the index for the mscColTimesTable.') msc_col_times_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 2), row_status()).setMaxAccess('writeonly') if mibBuilder.loadTexts: mscColTimesRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColTimesTable.') msc_col_last_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275)) if mibBuilder.loadTexts: mscColLastTable.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastTable.setDescription('Note: This was made obsolete in R4.1 (BD0108A). This attribute is used for Collector/stats and Collector/account. For statistics, when collection is turned off, or prior to the very first probe, the value is the empty list. Otherwise, this is the network time at which the last probe was sent out (that is, the last time that statistics were collected from, or at least reset by, the applications providing them). For accounting, when no entries exist in collectionTimes, or prior to the very first collection time, the value is the empty list. Otherwise, this is the network time at which the last time-of-day changeover occurred.') msc_col_last_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColLastValue')) if mibBuilder.loadTexts: mscColLastEntry.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastEntry.setDescription('An entry in the mscColLastTable.') msc_col_last_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1, 1), enterprise_date_and_time().subtype(subtypeSpec=value_size_constraint(19, 19)).setFixedLength(19)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColLastValue.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastValue.setDescription('This variable represents both the value and the index for the mscColLastTable.') msc_col_peak_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279)) if mibBuilder.loadTexts: mscColPeakTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakTable.setDescription('This attribute specifies the length of the accounting peak water mark interval. It is at least one minute and at most 15 minutes long. An accounting peak water mark within a given accounting interval is the accounting count which occured during a peak water mark interval with the highest traffic. Peak water marks are used to determine traffic bursts. If no value is provisioned for this attribute value of 5 minutes is assumed. Peak water mark is only measured if attribute collectionTimes in Collector/account is provisioned.') msc_col_peak_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColPeakValue')) if mibBuilder.loadTexts: mscColPeakEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakEntry.setDescription('An entry in the mscColPeakTable.') msc_col_peak_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColPeakValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakValue.setDescription('This variable represents both the value and the index for the mscColPeakTable.') msc_col_peak_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 2), row_status()).setMaxAccess('writeonly') if mibBuilder.loadTexts: mscColPeakRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColPeakTable.') msc_col_sp = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2)) msc_col_sp_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1)) if mibBuilder.loadTexts: mscColSpRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusTable.setDescription('This entry controls the addition and deletion of mscColSp components.') msc_col_sp_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusEntry.setDescription('A single entry in the table represents a single mscColSp component.') msc_col_sp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 1), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColSp components. These components cannot be added nor deleted.') msc_col_sp_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_sp_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStorageType.setDescription('This variable represents the storage type value for the mscColSp tables.') msc_col_sp_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 10), non_replicated()) if mibBuilder.loadTexts: mscColSpIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpIndex.setDescription('This variable represents the index for the mscColSp tables.') msc_col_sp_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10)) if mibBuilder.loadTexts: mscColSpProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvTable.setDescription('This group specifies all of the provisioning data for a DCS Spooler.') msc_col_sp_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvEntry.setDescription('An entry in the mscColSpProvTable.') msc_col_sp_spooling = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColSpSpooling.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpooling.setDescription('This attribute specifies whether or not this type of data is spooled to the disk. If set to off, it is roughly equivalent to Locking the Spooler (except this will survive processor restarts). The following defaults are used: - alarm: on - accounting: on - log: on - debug: off - scn: on - trap: off (see Note below) - stats: on Note that SNMP Traps cannot be spooled. A semantic check prevents the user from setting the value to on for the trap stream.') msc_col_sp_maximum_number_of_files = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setDescription("This attribute specifies the maximum number of files that should be kept on the disk in the directory containing the closed files of this type. The value 0 is defined to mean 'unlimited'. A different default for each type of Spooler is defined as follows: - alarm: 30 - accounting: 200 - debug: 2 - log: 10 - scn: 10 - trap: 2 (this value is meaningless and is ignored) - stats: 200") msc_col_sp_state_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11)) if mibBuilder.loadTexts: mscColSpStateTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateTable.setDescription('This group contains the three OSI State attributes and the six OSI Status attributes. The descriptions generically indicate what each attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241- 7001-150, Passport Operations and Maintenance Guide.') msc_col_sp_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpStateEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateEntry.setDescription('An entry in the mscColSpStateTable.') msc_col_sp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('locked', 0), ('unlocked', 1), ('shuttingDown', 2))).clone('unlocked')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAdminState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_usage_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('idle', 0), ('active', 1), ('busy', 2))).clone('idle')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpUsageState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_availability_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setDescription('If supported by the component, this attribute indicates the OSI Availability status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value inTest indicates that the resource is undergoing a test procedure. If adminState is locked or shuttingDown, the normal users are precluded from using the resource and controlStatus is reservedForTest. Tests that do not exclude additional users can be present in any operational or administrative state but the reservedForTest condition should not be present. The value failed indicates that the component has an internal fault that prevents it from operating. The operationalState is disabled. The value dependency indicates that the component cannot operate because some other resource on which it depends is unavailable. The operationalState is disabled. The value powerOff indicates the resource requires power to be applied and it is not powered on. The operationalState is disabled. The value offLine indicates the resource requires a routine operation (either manual, automatic, or both) to be performed to place it on-line and make it available for use. The operationalState is disabled. The value offDuty indicates the resource is inactive in accordance with a predetermined time schedule. In the absence of other disabling conditions, the operationalState is enabled or disabled. The value degraded indicates the service provided by the component is degraded in some way, such as in speed or operating capacity. However, the resource remains available for service. The operationalState is enabled. The value notInstalled indicates the resource is not present. The operationalState is disabled. The value logFull is not used. Description of bits: inTest(0) failed(1) powerOff(2) offLine(3) offDuty(4) dependency(5) degraded(6) notInstalled(7) logFull(8)') msc_col_sp_procedural_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpProceduralStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProceduralStatus.setDescription("If supported by the component, this attribute indicates the OSI Procedural status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value initializationRequired indicates (for a resource which doesn't initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState is disabled. The value notInitialized indicates (for a resource which does initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState may be enabled or disabled. The value initializing indicates that initialization has been initiated but is not yet complete. The operationalState may be enabled or disabled. The value reporting indicates the resource has completed some processing operation and is notifying the results. The operationalState is enabled. The value terminating indicates the component is in a termination phase. If the resource doesn't reinitialize autonomously, operationalState is disabled; otherwise it is enabled or disabled. Description of bits: initializationRequired(0) notInitialized(1) initializing(2) reporting(3) terminating(4)") msc_col_sp_control_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpControlStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpControlStatus.setDescription('If supported by the component, this attribute indicates the OSI Control status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value subjectToTest indicates the resource is available but tests may be conducted simultaneously at unpredictable times, which may cause it to exhibit unusual characteristics. The value partOfServicesLocked indicates that part of the service is restricted from users of a resource. The adminState is unlocked. The value reservedForTest indicates that the component is administratively unavailable because it is undergoing a test procedure. The adminState is locked. The value suspended indicates that the service has been administratively suspended. Description of bits: subjectToTest(0) partOfServicesLocked(1) reservedForTest(2) suspended(3)') msc_col_sp_alarm_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAlarmStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAlarmStatus.setDescription('If supported by the component, this attribute indicates the OSI Alarm status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value underRepair indicates the component is currently being repaired. The operationalState is enabled or disabled. The value critical indicates one or more critical alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value major indicates one or more major alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value minor indicates one or more minor alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value alarmOutstanding generically indicates that an alarm of some severity is outstanding against the component. Description of bits: underRepair(0) critical(1) major(2) minor(3) alarmOutstanding(4)') msc_col_sp_standby_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 15))).clone(namedValues=named_values(('hotStandby', 0), ('coldStandby', 1), ('providingService', 2), ('notSet', 15))).clone('notSet')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpStandbyStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStandbyStatus.setDescription('If supported by the component, this attribute indicates the OSI Standby status of the component. The value notSet indicates that either the attribute is not supported or that none of the status conditions described below are present. Note that this is a non-standard value, used because the original specification indicated this attribute was set-valued and thus, did not provide a value to indicate that none of the other three are applicable. The value hotStandby indicates that the resource is not providing service but will be immediately able to take over the role of the resource to be backed up, without initialization activity, and containing the same information as the resource to be backed up. The value coldStandby indicates the resource is a backup for another resource but will not be immediately able to take over the role of the backed up resource and will require some initialization activity. The value providingService indicates that this component, as a backup resource, is currently backing up another resource.') msc_col_sp_unknown_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('false', 0), ('true', 1))).clone('false')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpUnknownStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUnknownStatus.setDescription('This attribute indicates the OSI Unknown status of the component. The value false indicates that all of the other OSI State and Status attribute values can be considered accurate. The value true indicates that the actual state of the component is not known for sure.') msc_col_sp_oper_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12)) if mibBuilder.loadTexts: mscColSpOperTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperTable.setDescription('This group contains the operational attributes specific to a DCS Spooler.') msc_col_sp_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpOperEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperEntry.setDescription('An entry in the mscColSpOperTable.') msc_col_sp_spooling_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1, 1), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setDescription('When spooling is on, this attribute contains the name of the open file into which data is currently being spooled. When spooling is off, the value of this attribute is the empty string.') msc_col_sp_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13)) if mibBuilder.loadTexts: mscColSpStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_sp_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsEntry.setDescription('An entry in the mscColSpStatsTable.') msc_col_sp_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_sp_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_sp_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3)) msc_col_ag_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1)) if mibBuilder.loadTexts: mscColAgRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of mscColAg components.') msc_col_ag_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusEntry.setDescription('A single entry in the table represents a single mscColAg component.') msc_col_ag_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 1), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColAg components. These components cannot be added nor deleted.') msc_col_ag_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_ag_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStorageType.setDescription('This variable represents the storage type value for the mscColAg tables.') msc_col_ag_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))) if mibBuilder.loadTexts: mscColAgIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgIndex.setDescription('This variable represents the index for the mscColAg tables.') msc_col_ag_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10)) if mibBuilder.loadTexts: mscColAgStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_ag_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsEntry.setDescription('An entry in the mscColAgStatsTable.') msc_col_ag_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_ag_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag_agent_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11)) if mibBuilder.loadTexts: mscColAgAgentStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the statistical attributes specific to the DCS Agent components.') msc_col_ag_agent_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setDescription('An entry in the mscColAgAgentStatsTable.') msc_col_ag_records_not_generated = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setDescription('This attribute counts the records of a particular event type on this Card which could not be generated by some application due to some problem such as insufficient resources. One cannot tell exactly which event could not be generated, nor which application instance tried to generate it, but when this count increases, it is an indicator that some re-engineering may be required and will provide some idea as to why a record is missing. This counter wraps to 0 when the maximum value is exceeded.') data_collection_group = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1)) data_collection_group_ca = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1)) data_collection_group_ca02 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3)) data_collection_group_ca02_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3, 2)) data_collection_capabilities = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3)) data_collection_capabilities_ca = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1)) data_collection_capabilities_ca02 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3)) data_collection_capabilities_ca02_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3, 2)) mibBuilder.exportSymbols('Nortel-MsCarrier-MscPassport-DataCollectionMIB', mscColSpComponentName=mscColSpComponentName, dataCollectionCapabilitiesCA02=dataCollectionCapabilitiesCA02, mscColAgCurrentQueueSize=mscColAgCurrentQueueSize, mscColProvEntry=mscColProvEntry, mscColAgRowStatus=mscColAgRowStatus, mscColTimesRowStatus=mscColTimesRowStatus, mscColRowStatusTable=mscColRowStatusTable, mscColStorageType=mscColStorageType, mscColSpStorageType=mscColSpStorageType, mscColSpCurrentQueueSize=mscColSpCurrentQueueSize, mscColSpRowStatusEntry=mscColSpRowStatusEntry, mscColSpRowStatusTable=mscColSpRowStatusTable, mscColStatsEntry=mscColStatsEntry, mscColProvTable=mscColProvTable, mscColRecordsDiscarded=mscColRecordsDiscarded, mscColTimesValue=mscColTimesValue, mscColPeakRowStatus=mscColPeakRowStatus, mscColSpSpoolingFileName=mscColSpSpoolingFileName, mscColRecordsRx=mscColRecordsRx, mscColSpSpooling=mscColSpSpooling, mscColAgStatsTable=mscColAgStatsTable, dataCollectionCapabilitiesCA=dataCollectionCapabilitiesCA, mscColLastEntry=mscColLastEntry, mscColSpRowStatus=mscColSpRowStatus, dataCollectionGroupCA02=dataCollectionGroupCA02, mscColAg=mscColAg, mscColAgentQueueSize=mscColAgentQueueSize, mscColAgComponentName=mscColAgComponentName, mscColAgAgentStatsTable=mscColAgAgentStatsTable, mscColSpStateTable=mscColSpStateTable, mscColSpMaximumNumberOfFiles=mscColSpMaximumNumberOfFiles, mscColSpStatsTable=mscColSpStatsTable, mscColPeakValue=mscColPeakValue, mscColSpOperEntry=mscColSpOperEntry, mscColAgIndex=mscColAgIndex, mscColSpProceduralStatus=mscColSpProceduralStatus, dataCollectionMIB=dataCollectionMIB, dataCollectionGroupCA=dataCollectionGroupCA, mscColSpAvailabilityStatus=mscColSpAvailabilityStatus, mscColTimesTable=mscColTimesTable, mscColSpRecordsRx=mscColSpRecordsRx, mscColRowStatusEntry=mscColRowStatusEntry, mscColSpProvEntry=mscColSpProvEntry, dataCollectionCapabilities=dataCollectionCapabilities, mscColSpIndex=mscColSpIndex, mscColIndex=mscColIndex, mscColSpOperationalState=mscColSpOperationalState, mscColSpStateEntry=mscColSpStateEntry, mscColLastTable=mscColLastTable, mscColAgRecordsRx=mscColAgRecordsRx, mscColAgRowStatusTable=mscColAgRowStatusTable, mscColSp=mscColSp, mscColSpUnknownStatus=mscColSpUnknownStatus, mscColAgStatsEntry=mscColAgStatsEntry, mscColLastValue=mscColLastValue, mscColSpStandbyStatus=mscColSpStandbyStatus, dataCollectionGroup=dataCollectionGroup, mscColAgRowStatusEntry=mscColAgRowStatusEntry, mscColStatsTable=mscColStatsTable, mscColSpProvTable=mscColSpProvTable, mscColAgAgentStatsEntry=mscColAgAgentStatsEntry, mscColSpAdminState=mscColSpAdminState, mscColComponentName=mscColComponentName, mscColCurrentQueueSize=mscColCurrentQueueSize, mscColPeakEntry=mscColPeakEntry, mscColAgRecordsDiscarded=mscColAgRecordsDiscarded, mscColRowStatus=mscColRowStatus, mscColPeakTable=mscColPeakTable, mscColAgRecordsNotGenerated=mscColAgRecordsNotGenerated, dataCollectionCapabilitiesCA02A=dataCollectionCapabilitiesCA02A, mscCol=mscCol, mscColSpStatsEntry=mscColSpStatsEntry, mscColSpRecordsDiscarded=mscColSpRecordsDiscarded, mscColTimesEntry=mscColTimesEntry, mscColSpControlStatus=mscColSpControlStatus, mscColSpUsageState=mscColSpUsageState, dataCollectionGroupCA02A=dataCollectionGroupCA02A, mscColAgStorageType=mscColAgStorageType, mscColSpAlarmStatus=mscColSpAlarmStatus, mscColSpOperTable=mscColSpOperTable)
# Algocia is placed on a great dessert and consists of cities and oases connected by roads. There is # exactly one road leading from each gate to one oasis (but any given oasis can have any number of roads # leading to them, oases can also be interconnected by roads). Algocian law requires that if someone # enters a city through one gate, they must leave the other. Check of Algocia decided to send a bishop # who will read the prohibition of formulating tasks "about the chessboard" (insult majesty) task in # every city. Check wants the bishop to visit each city exactly once (but there is no limit how many # times the bishop will visit each oasis). Bishop departs from the capital of Algocia city x, and after # visiting all cities the bishop has to come back to city x. Find algorithm that determines if there # is a suitable route for bishop. def check_and_bishop(graph, oasis): changed_graph = [] for i in range(len(graph)): if i not in oasis: changed_graph.append([graph[i][0], graph[i][1], 0]) else: for j in range(len(graph[i])): if graph[i][j] in oasis: if [graph[i][j], i, 1] not in changed_graph: changed_graph.append([i, graph[i][j], 1]) count = 0 vertices = [] for i in range(len(changed_graph)): if changed_graph[i][2] == 1: vertices.append((changed_graph[i][0], changed_graph[i][1])) count += 1 for i in range(len(vertices)): for j in range(len(changed_graph)): if changed_graph[j][0] in vertices[i]: changed_graph[j][0] = min(vertices[i]) if changed_graph[j][1] in vertices[i]: changed_graph[j][1] = min(vertices[i]) i = 0 while i < len(changed_graph): j = i + 1 while j < len(changed_graph): if changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and \ changed_graph[i][2] == 1: changed_graph.remove(changed_graph[i]) elif changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and \ changed_graph[j][2] == 1: changed_graph.remove(changed_graph[j]) j += 1 i += 1 new_graph = [] for i in range(len(changed_graph)): if changed_graph[i][0] not in new_graph: new_graph.append(changed_graph[i][0]) if changed_graph[i][1] not in new_graph: new_graph.append(changed_graph[i][1]) for i in range(len(new_graph)): new_graph[i] = [new_graph[i], 0] for i in range(len(new_graph)): for j in range(len(changed_graph)): if new_graph[i][0] == changed_graph[j][0]: new_graph[i][1] += 1 if new_graph[i][0] == changed_graph[j][1]: new_graph[i][1] += 1 for i in range(len(new_graph)): if new_graph[i][1] % 2 == 1: return False return True oasis = [2, 4, 5, 7, 9] graph = [[2, 4], [2, 9], [0, 4, 3], [2, 5], [0, 2, 6], [3, 7, 8], [4, 7], [5, 6, 8], [5, 7], [1]] print(check_and_bishop(graph, oasis))
def check_and_bishop(graph, oasis): changed_graph = [] for i in range(len(graph)): if i not in oasis: changed_graph.append([graph[i][0], graph[i][1], 0]) else: for j in range(len(graph[i])): if graph[i][j] in oasis: if [graph[i][j], i, 1] not in changed_graph: changed_graph.append([i, graph[i][j], 1]) count = 0 vertices = [] for i in range(len(changed_graph)): if changed_graph[i][2] == 1: vertices.append((changed_graph[i][0], changed_graph[i][1])) count += 1 for i in range(len(vertices)): for j in range(len(changed_graph)): if changed_graph[j][0] in vertices[i]: changed_graph[j][0] = min(vertices[i]) if changed_graph[j][1] in vertices[i]: changed_graph[j][1] = min(vertices[i]) i = 0 while i < len(changed_graph): j = i + 1 while j < len(changed_graph): if changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and (changed_graph[i][2] == 1): changed_graph.remove(changed_graph[i]) elif changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and (changed_graph[j][2] == 1): changed_graph.remove(changed_graph[j]) j += 1 i += 1 new_graph = [] for i in range(len(changed_graph)): if changed_graph[i][0] not in new_graph: new_graph.append(changed_graph[i][0]) if changed_graph[i][1] not in new_graph: new_graph.append(changed_graph[i][1]) for i in range(len(new_graph)): new_graph[i] = [new_graph[i], 0] for i in range(len(new_graph)): for j in range(len(changed_graph)): if new_graph[i][0] == changed_graph[j][0]: new_graph[i][1] += 1 if new_graph[i][0] == changed_graph[j][1]: new_graph[i][1] += 1 for i in range(len(new_graph)): if new_graph[i][1] % 2 == 1: return False return True oasis = [2, 4, 5, 7, 9] graph = [[2, 4], [2, 9], [0, 4, 3], [2, 5], [0, 2, 6], [3, 7, 8], [4, 7], [5, 6, 8], [5, 7], [1]] print(check_and_bishop(graph, oasis))
''' You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, if it's negative (-k), move backward k steps. Since the array is circular, you may assume that the last element's next element is the first element, and the first element's previous element is the last element. Determine if there is a loop (or a cycle) in nums. A cycle must start and end at the same index and the cycle's length > 1. Furthermore, movements in a cycle must all follow a single direction. In other words, a cycle must not consist of both forward and backward movements. Example 1: Input: [2,-1,1,2,2] Output: true Explanation: There is a cycle, from index 0 -> 2 -> 3 -> 0. The cycle's length is 3. Example 2: Input: [-1,2] Output: false Explanation: The movement from index 1 -> 1 -> 1 ... is not a cycle, because the cycle's length is 1. By definition the cycle's length must be greater than 1. Example 3: Input: [-2,1,-1,-2,-2] Output: false Explanation: The movement from index 1 -> 2 -> 1 -> ... is not a cycle, because movement from index 1 -> 2 is a forward movement, but movement from index 2 -> 1 is a backward movement. All movements in a cycle must follow a single direction. SOLUTION: Lets first think how to detect cycles only in the forward direction. We can start traversing from index 0. We will maintain a visited set during a traversal. If we encounter an index which is already visited before in this traversal, then cycle exits. On the other hand, if we encounter a -ve element, the cycle cannot exist in this traversal. If the current traversal is not cyclic, then at the end of the traversal, we can mark all the elements of this traversal as 'safe'. This is the basic idea. See the code for detail. Also, for the other direction, we just reverse the array and reverse the sign of the elements and re-run the exact same algo on that. For O(1) solution, we can detect cycle using slow and fast pointer, and for marking 'safe' indices, we can use some dummy -ve value. But its not that simple; we need to distinguish between 'safe' indices and 'visited' (in current run) indices. For that we can use 2 dummy values; We can first modify every arr[i] to arr[i]%n; it will not affect the final result. Then we can use the dummy value 'n' for round 1, '2n' for round 2 and so on... VARIATION: What if forward and backward steps are allowed in one cycle? Then we can just model the array as a directed graph and find cycle in that. ''' def is_cycle(arr, start, safe): i = start visited = set() visited.add(i) while True: i = (i + arr[i]) % len(arr) if i in safe: break if i in visited: if len(visited) == 1: # We cannot mark it as safe yet. # What if some other vertex redirects to here? return False return True visited.add(i) for i in visited: safe.add(i) return False def is_cyclic(arr): i = 0 start = 0 safe = set() for i in range(len(arr)): if arr[i] <= 0: safe.add(i) while start < len(arr): if start in safe: start += 1 continue if is_cycle(arr, start, safe): return True return False def is_cyclic_outer(arr): arr_copy = list(arr) if is_cyclic(arr): return True arr = arr_copy arr.reverse() for i in range(len(arr)): arr[i] = -arr[i] return is_cyclic(arr) def main(): arr = [2, -1, 1, 2, 2] arr = [-1, 2] arr = [-2, 1, -1, -2, -2] arr = [1, 2] ans = is_cyclic_outer(arr) print(ans) main()
""" You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, if it's negative (-k), move backward k steps. Since the array is circular, you may assume that the last element's next element is the first element, and the first element's previous element is the last element. Determine if there is a loop (or a cycle) in nums. A cycle must start and end at the same index and the cycle's length > 1. Furthermore, movements in a cycle must all follow a single direction. In other words, a cycle must not consist of both forward and backward movements. Example 1: Input: [2,-1,1,2,2] Output: true Explanation: There is a cycle, from index 0 -> 2 -> 3 -> 0. The cycle's length is 3. Example 2: Input: [-1,2] Output: false Explanation: The movement from index 1 -> 1 -> 1 ... is not a cycle, because the cycle's length is 1. By definition the cycle's length must be greater than 1. Example 3: Input: [-2,1,-1,-2,-2] Output: false Explanation: The movement from index 1 -> 2 -> 1 -> ... is not a cycle, because movement from index 1 -> 2 is a forward movement, but movement from index 2 -> 1 is a backward movement. All movements in a cycle must follow a single direction. SOLUTION: Lets first think how to detect cycles only in the forward direction. We can start traversing from index 0. We will maintain a visited set during a traversal. If we encounter an index which is already visited before in this traversal, then cycle exits. On the other hand, if we encounter a -ve element, the cycle cannot exist in this traversal. If the current traversal is not cyclic, then at the end of the traversal, we can mark all the elements of this traversal as 'safe'. This is the basic idea. See the code for detail. Also, for the other direction, we just reverse the array and reverse the sign of the elements and re-run the exact same algo on that. For O(1) solution, we can detect cycle using slow and fast pointer, and for marking 'safe' indices, we can use some dummy -ve value. But its not that simple; we need to distinguish between 'safe' indices and 'visited' (in current run) indices. For that we can use 2 dummy values; We can first modify every arr[i] to arr[i]%n; it will not affect the final result. Then we can use the dummy value 'n' for round 1, '2n' for round 2 and so on... VARIATION: What if forward and backward steps are allowed in one cycle? Then we can just model the array as a directed graph and find cycle in that. """ def is_cycle(arr, start, safe): i = start visited = set() visited.add(i) while True: i = (i + arr[i]) % len(arr) if i in safe: break if i in visited: if len(visited) == 1: return False return True visited.add(i) for i in visited: safe.add(i) return False def is_cyclic(arr): i = 0 start = 0 safe = set() for i in range(len(arr)): if arr[i] <= 0: safe.add(i) while start < len(arr): if start in safe: start += 1 continue if is_cycle(arr, start, safe): return True return False def is_cyclic_outer(arr): arr_copy = list(arr) if is_cyclic(arr): return True arr = arr_copy arr.reverse() for i in range(len(arr)): arr[i] = -arr[i] return is_cyclic(arr) def main(): arr = [2, -1, 1, 2, 2] arr = [-1, 2] arr = [-2, 1, -1, -2, -2] arr = [1, 2] ans = is_cyclic_outer(arr) print(ans) main()
revision = "a6d2d466e5" revision_down = None message = "create company model" async def upgrade(connection): sql = """ CREATE TABLE companies ( id MEDIUMINT NOT NULL AUTO_INCREMENT, name CHAR(200) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE utf8_unicode_ci; """ async with connection.cursor() as cur: await cur.execute(sql) async def downgrade(connection): sql = "DROP TABLE companies" async with connection.cursor() as cur: await cur.execute(sql)
revision = 'a6d2d466e5' revision_down = None message = 'create company model' async def upgrade(connection): sql = '\n CREATE TABLE companies (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(200) NOT NULL,\n PRIMARY KEY (id)\n ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE utf8_unicode_ci;\n ' async with connection.cursor() as cur: await cur.execute(sql) async def downgrade(connection): sql = 'DROP TABLE companies' async with connection.cursor() as cur: await cur.execute(sql)
class PartyAnimal: x = 0 name = "" def __init__(self, nameCons): self.name = nameCons print("name: ", self.name) def party(self): self.x = self.x + 1 print(self.name," - party count: ", self.x) class FootballFan(PartyAnimal): points = 0 def touchdown(self): self.points = self.points + 7 self.party() print(self.name, "points", self.points) s = FootballFan("Sally") s.party() j = FootballFan("Jim") j.party() j.touchdown()
class Partyanimal: x = 0 name = '' def __init__(self, nameCons): self.name = nameCons print('name: ', self.name) def party(self): self.x = self.x + 1 print(self.name, ' - party count: ', self.x) class Footballfan(PartyAnimal): points = 0 def touchdown(self): self.points = self.points + 7 self.party() print(self.name, 'points', self.points) s = football_fan('Sally') s.party() j = football_fan('Jim') j.party() j.touchdown()
__author__ = 'Nathen' input_str = input('Paste input nums: ') k, m, n = map(lambda num: float(num), input_str.split(' ')) population = k + m + n # odds when dominant first pK = k / population # odds when heterozygous first pMK = (m / population) * (k / (population - 1.0)) pMM = (m / population) * ((m - 1.0) / (population - 1.0)) * 0.75 pMN = (m / population) * (n / (population - 1.0)) * 0.5 # odds when we choose recessive first pNK = (n / population) * (k / (population - 1.0)) pNM = (n / population) * (m / (population - 1.0)) * 0.5 result = pK + pMK + pMM + pMN + pNK + pNM print(result)
__author__ = 'Nathen' input_str = input('Paste input nums: ') (k, m, n) = map(lambda num: float(num), input_str.split(' ')) population = k + m + n p_k = k / population p_mk = m / population * (k / (population - 1.0)) p_mm = m / population * ((m - 1.0) / (population - 1.0)) * 0.75 p_mn = m / population * (n / (population - 1.0)) * 0.5 p_nk = n / population * (k / (population - 1.0)) p_nm = n / population * (m / (population - 1.0)) * 0.5 result = pK + pMK + pMM + pMN + pNK + pNM print(result)
with open("tinder_api/utils/token.txt", "r") as f: tinder_token = f.read() # it is best for you to write in the token to save yourself the file I/O # especially if you have python byte code off #tinder_token = "" headers = { 'app_version': '6.9.4', 'platform': 'ios', 'content-type': 'application/json', 'User-agent': 'Tinder/7.5.3 (iPohone; iOS 10.3.2; Scale/2.00)', 'X-Auth-Token': 'enter_auth_token', } host = 'https://api.gotinder.com' if __name__ == '__main__': pass
with open('tinder_api/utils/token.txt', 'r') as f: tinder_token = f.read() headers = {'app_version': '6.9.4', 'platform': 'ios', 'content-type': 'application/json', 'User-agent': 'Tinder/7.5.3 (iPohone; iOS 10.3.2; Scale/2.00)', 'X-Auth-Token': 'enter_auth_token'} host = 'https://api.gotinder.com' if __name__ == '__main__': pass
with open('day9.txt') as f: data = f.read().splitlines()[0].split(' ') nPlayers = int(data[0]) nMarbles = int(data[6]) # Players playerScores = [0] * nPlayers currentPlayer = -1 # Marbles right = [None] * nMarbles left = [None] * nMarbles # Initialise current = 0 total = 1 right[current] = current left[current] = current for i in range(1, nMarbles): # Update player currentPlayer = (currentPlayer + 1) % nPlayers # Update marbles if i % 23 == 0: # Add new marble to score playerScores[currentPlayer] += i # Remove the 7th marble counterclockwise and keep marble7 = left[left[left[left[left[left[left[current]]]]]]] playerScores[currentPlayer] += marble7 # Set new current current = right[marble7] # Redo the adjacency lists posLeft = left[marble7] posRight = right[marble7] right[posLeft] = posRight left[posRight] = posLeft right[marble7] = None left[marble7] = None else: posLeft = right[current] posRight = right[right[current]] right[posLeft] = i right[i] = posRight left[i] = posLeft left[posRight] = i current = i print(max(playerScores))
with open('day9.txt') as f: data = f.read().splitlines()[0].split(' ') n_players = int(data[0]) n_marbles = int(data[6]) player_scores = [0] * nPlayers current_player = -1 right = [None] * nMarbles left = [None] * nMarbles current = 0 total = 1 right[current] = current left[current] = current for i in range(1, nMarbles): current_player = (currentPlayer + 1) % nPlayers if i % 23 == 0: playerScores[currentPlayer] += i marble7 = left[left[left[left[left[left[left[current]]]]]]] playerScores[currentPlayer] += marble7 current = right[marble7] pos_left = left[marble7] pos_right = right[marble7] right[posLeft] = posRight left[posRight] = posLeft right[marble7] = None left[marble7] = None else: pos_left = right[current] pos_right = right[right[current]] right[posLeft] = i right[i] = posRight left[i] = posLeft left[posRight] = i current = i print(max(playerScores))
# 280. Wiggle Sort # ttungl@gmail.com # Given an unsorted array nums, reorder it in-place # such that nums[0] <= nums[1] >= nums[2] <= nums[3].... # For example, given nums = [3, 5, 2, 1, 6, 4], # one possible answer is [1, 6, 2, 5, 3, 4]. class Solution(object): def wiggleSort(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ # sol 1: # wiggle constraint: nums[i-1] <= nums[i] >= nums[i+1] # otherwise, swap them. # runtime: 120ms if not nums: return n = len(nums) for i in range(1, n, 2): if nums[i-1] > nums[i]: nums[i-1], nums[i] = nums[i], nums[i-1] if i+1 < n and nums[i] < nums[i+1]: nums[i], nums[i+1] = nums[i+1], nums[i] # sol 2: # runtime: 126ms if not nums: return for i in range(len(nums)-1): if (i%2 == 0 and (nums[i] > nums[i+1])) or (i%2 == 1 and nums[i] < nums[i+1]): nums[i], nums[i+1] = nums[i+1], nums[i] # sol 3: # runtime: 115ms m = (len(nums)+1)//2 nums.sort() nums[::2], nums[1::2] = nums[:m][::-1], nums[m:][::-1]
class Solution(object): def wiggle_sort(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ if not nums: return n = len(nums) for i in range(1, n, 2): if nums[i - 1] > nums[i]: (nums[i - 1], nums[i]) = (nums[i], nums[i - 1]) if i + 1 < n and nums[i] < nums[i + 1]: (nums[i], nums[i + 1]) = (nums[i + 1], nums[i]) if not nums: return for i in range(len(nums) - 1): if i % 2 == 0 and nums[i] > nums[i + 1] or (i % 2 == 1 and nums[i] < nums[i + 1]): (nums[i], nums[i + 1]) = (nums[i + 1], nums[i]) m = (len(nums) + 1) // 2 nums.sort() (nums[::2], nums[1::2]) = (nums[:m][::-1], nums[m:][::-1])
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Using the classifier -------------------- .. toctree:: :maxdepth: 3 cv/base cv/data cv/helper Cross-validation in MRIQC ------------------------- .. toctree:: :maxdepth: 3 cv/experiments """
""" Using the classifier -------------------- .. toctree:: :maxdepth: 3 cv/base cv/data cv/helper Cross-validation in MRIQC ------------------------- .. toctree:: :maxdepth: 3 cv/experiments """
def arithmeticExpression(a, b, c): """ Consider an arithmetic expression of the form a#b=c. Check whether it is possible to replace # with one of the four signs: +, -, * or / to obtain a correct """ return ( True if (a + b == c) or (a - b == c) or (a * b == c) or (a / b == c) else False )
def arithmetic_expression(a, b, c): """ Consider an arithmetic expression of the form a#b=c. Check whether it is possible to replace # with one of the four signs: +, -, * or / to obtain a correct """ return True if a + b == c or a - b == c or a * b == c or (a / b == c) else False
LUCYFER_SETTINGS = { "SAVED_SEARCHES_ENABLE": False, "SAVED_SEARCHES_KEY": None, }
lucyfer_settings = {'SAVED_SEARCHES_ENABLE': False, 'SAVED_SEARCHES_KEY': None}
r = 'S' while r == "S": n = int(input('Digite um numero: ')) r = str(input('Quer continuar [S/N]: ')).upper() print('Acabou')
r = 'S' while r == 'S': n = int(input('Digite um numero: ')) r = str(input('Quer continuar [S/N]: ')).upper() print('Acabou')
def reverse(number): stack = [] result = "" for num in str(number): stack.append(num) for i in range(len(stack)): result += stack.pop() print(result) return int(result) reverse(3479)
def reverse(number): stack = [] result = '' for num in str(number): stack.append(num) for i in range(len(stack)): result += stack.pop() print(result) return int(result) reverse(3479)
T_Call = 0 T_Squat = 1 T_Shank = 2 T_Jump = 3 T_Slap = 4 T_EyeContact = 5 function_name_dict = { T_Call: "call", T_Squat: "squat", T_Shank: "shank", T_Jump: "jump", T_Slap: "slap", T_EyeContact: "eye_contact" } RESPECT_MAX = 255
t__call = 0 t__squat = 1 t__shank = 2 t__jump = 3 t__slap = 4 t__eye_contact = 5 function_name_dict = {T_Call: 'call', T_Squat: 'squat', T_Shank: 'shank', T_Jump: 'jump', T_Slap: 'slap', T_EyeContact: 'eye_contact'} respect_max = 255
def power_of_two(x): if x == 1: return True if x < 1: return False return power_of_two(x / 2)
def power_of_two(x): if x == 1: return True if x < 1: return False return power_of_two(x / 2)
class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: def search(lo, hi): if nums[lo] == target == nums[hi]: return [lo, hi] if nums[lo] <= target <= nums[hi]: mid = (lo + hi) // 2 l, r = search(lo, mid), search(mid+1, hi) return max(l, r) if -1 in l+r else [l[0], r[1]] return [-1, -1] if len(nums)==0: return [-1,-1] return search(0, len(nums)-1)
class Solution: def search_range(self, nums: List[int], target: int) -> List[int]: def search(lo, hi): if nums[lo] == target == nums[hi]: return [lo, hi] if nums[lo] <= target <= nums[hi]: mid = (lo + hi) // 2 (l, r) = (search(lo, mid), search(mid + 1, hi)) return max(l, r) if -1 in l + r else [l[0], r[1]] return [-1, -1] if len(nums) == 0: return [-1, -1] return search(0, len(nums) - 1)
#15 Distance units # Askng for distance in feet. x = float(input("Enter the distance in feet = ")) inches = x * 12 yards = x * 0.33333 miles = x * 0.000189 print("Inches = ",inches," Yards = ",yards," Miles = ",miles)
x = float(input('Enter the distance in feet = ')) inches = x * 12 yards = x * 0.33333 miles = x * 0.000189 print('Inches = ', inches, ' Yards = ', yards, ' Miles = ', miles)
# Generate n colors along a vector def get_vector(a, b): """Given two points (3D), Returns the common vector""" vector = ((b[0] - a[0]), (b[1] - a[1]), (b[2] - a[2])) return vector def get_t(n): if n <= 2: return [0, 1] else: t = [] for i in range(n): if i == 0: t.append(0) i += 1 elif i < n - 1: t.append(1/(n - 1) * i) i += 1 else: t.append(1) i += 1 return t def get_palette(a, b, n): vector = get_vector(a, b) t = get_t(n) palette = [] for i in range(n): scalar = ((t[i] * vector[0]), (t[i] * vector[1]), (t[i] * vector[2])) palette.append((round(scalar[0] + a[0]), round(scalar[1] + a[1]), round(scalar[2] + a[2]))) return palette
def get_vector(a, b): """Given two points (3D), Returns the common vector""" vector = (b[0] - a[0], b[1] - a[1], b[2] - a[2]) return vector def get_t(n): if n <= 2: return [0, 1] else: t = [] for i in range(n): if i == 0: t.append(0) i += 1 elif i < n - 1: t.append(1 / (n - 1) * i) i += 1 else: t.append(1) i += 1 return t def get_palette(a, b, n): vector = get_vector(a, b) t = get_t(n) palette = [] for i in range(n): scalar = (t[i] * vector[0], t[i] * vector[1], t[i] * vector[2]) palette.append((round(scalar[0] + a[0]), round(scalar[1] + a[1]), round(scalar[2] + a[2]))) return palette
load("@berty_go//:config.bzl", "berty_go_config") load("@co_znly_rules_gomobile//:repositories.bzl", "gomobile_repositories") load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") def berty_bridge_config(): # fetch and config berty go dependencies berty_go_config() # config gomobile repositories gomobile_repositories() # config ios apple_support_dependencies() swift_rules_dependencies()
load('@berty_go//:config.bzl', 'berty_go_config') load('@co_znly_rules_gomobile//:repositories.bzl', 'gomobile_repositories') load('@build_bazel_apple_support//lib:repositories.bzl', 'apple_support_dependencies') load('@build_bazel_rules_swift//swift:repositories.bzl', 'swift_rules_dependencies') def berty_bridge_config(): berty_go_config() gomobile_repositories() apple_support_dependencies() swift_rules_dependencies()
n = 95 for i in range(1,1000): a = n ^ i print(bin(a),a) print(i,bin(n),n) print()
n = 95 for i in range(1, 1000): a = n ^ i print(bin(a), a) print(i, bin(n), n) print()
''' Description : Use Of Basic Input / Output Function Date : 07 Feb 2021 Function Author : Prasad Dangare Input : Str Output : -- ''' print("Enter One Number") # to display on screen no = input() # to accept the standard input device ie keyword print ("Your Number Is : ", no) print ("Data Type Of Give Number Is : ", type(no))
""" Description : Use Of Basic Input / Output Function Date : 07 Feb 2021 Function Author : Prasad Dangare Input : Str Output : -- """ print('Enter One Number') no = input() print('Your Number Is : ', no) print('Data Type Of Give Number Is : ', type(no))
# Global Reach # Demonstrates global variables def read_global(): print("From inside the local scope of read_global(), value is:", value) def shadow_global(): value = -10 print("From inside the local scope of shadow_global(), value is:", value) def change_global(): global value value = -10 print("From inside the local scope of change_global(), value is:", value) # main # value is a global variable because we're in the global scope here value = 10 print("In the global scope, value has been set to:", value, "\n") read_global() print("Back in the global scope, value is still:", value, "\n") shadow_global() print("Back in the global scope, value is still:", value, "\n") change_global() print("Back in the global scope, value has now changed to:", value) input("\n\nPress the enter key to exit.")
def read_global(): print('From inside the local scope of read_global(), value is:', value) def shadow_global(): value = -10 print('From inside the local scope of shadow_global(), value is:', value) def change_global(): global value value = -10 print('From inside the local scope of change_global(), value is:', value) value = 10 print('In the global scope, value has been set to:', value, '\n') read_global() print('Back in the global scope, value is still:', value, '\n') shadow_global() print('Back in the global scope, value is still:', value, '\n') change_global() print('Back in the global scope, value has now changed to:', value) input('\n\nPress the enter key to exit.')
a = int(input("Enter: ")) reserve = a temp = 0 rev=0 while a>0: temp = a%10 a = a//10 rev = rev*10 + temp if reserve == rev: print("Palindrome") else: print("not")
a = int(input('Enter: ')) reserve = a temp = 0 rev = 0 while a > 0: temp = a % 10 a = a // 10 rev = rev * 10 + temp if reserve == rev: print('Palindrome') else: print('not')
class Track(object): id = 0 header_line = 1 filename = "" key_color = "#FF4D55" name = "" description = "" track_image_url = "http://lorempixel.com/400/200" location = "" gid = "" order = -1 def __init__(self, id, name, header_line, key_color, location, gid, order): super(Track, self).__init__() self.id = id self.name = name self.header_line = header_line self.key_color = key_color self.track_image_url = "http://lorempixel.com/400/200" self.location = location self.gid = gid self.order = order class Service(object): id = 0 service = "" url = "" def __init__(self, id, service, url): super(Service, self).__init__() self.id = id self.service = service self.url = url class LogoIco(object): logo_url = "" ico_url = "" main_page_url = "" def __init__(self, logo_url, ico_url, main_page_url): super(LogoIco, self).__init__() self.logo_url = logo_url self.ico_url = ico_url self.main_page_url = main_page_url class Speaker(object): def __init__(self): super(Speaker, self).__init__() class Copyright(object): def __init__(self): super(Copyright, self).__init__() class Session(object): def __init__(self): super(Session, self).__init__() class Sponsor(object): def __init__(self): super(Sponsor, self).__init__() class Microlocation(object): def __init__(self): super(Microlocation, self).__init__()
class Track(object): id = 0 header_line = 1 filename = '' key_color = '#FF4D55' name = '' description = '' track_image_url = 'http://lorempixel.com/400/200' location = '' gid = '' order = -1 def __init__(self, id, name, header_line, key_color, location, gid, order): super(Track, self).__init__() self.id = id self.name = name self.header_line = header_line self.key_color = key_color self.track_image_url = 'http://lorempixel.com/400/200' self.location = location self.gid = gid self.order = order class Service(object): id = 0 service = '' url = '' def __init__(self, id, service, url): super(Service, self).__init__() self.id = id self.service = service self.url = url class Logoico(object): logo_url = '' ico_url = '' main_page_url = '' def __init__(self, logo_url, ico_url, main_page_url): super(LogoIco, self).__init__() self.logo_url = logo_url self.ico_url = ico_url self.main_page_url = main_page_url class Speaker(object): def __init__(self): super(Speaker, self).__init__() class Copyright(object): def __init__(self): super(Copyright, self).__init__() class Session(object): def __init__(self): super(Session, self).__init__() class Sponsor(object): def __init__(self): super(Sponsor, self).__init__() class Microlocation(object): def __init__(self): super(Microlocation, self).__init__()
#!/usr/bin/env python3 if __name__ == '__main__': students_list = [] while True: command = input("Add, list, exit: ").lower() if command == 'exit': break elif command == 'add': last_name = input('Your last name^ ') class_name = input('Class ') grades = [] n = 0 while n < 5: grades.append(int(input('Your grades '))) n += 1 student = { 'Last name': last_name, 'Class': class_name, 'Grades': grades, } students_list.append(student) if len(students_list) > 1: students_list.sort(key=lambda item: item.get('Last name', '')) print(students_list) elif command == 'list': for index in range(len(students_list)): for key in students_list: print(students_list[index][key])
if __name__ == '__main__': students_list = [] while True: command = input('Add, list, exit: ').lower() if command == 'exit': break elif command == 'add': last_name = input('Your last name^ ') class_name = input('Class ') grades = [] n = 0 while n < 5: grades.append(int(input('Your grades '))) n += 1 student = {'Last name': last_name, 'Class': class_name, 'Grades': grades} students_list.append(student) if len(students_list) > 1: students_list.sort(key=lambda item: item.get('Last name', '')) print(students_list) elif command == 'list': for index in range(len(students_list)): for key in students_list: print(students_list[index][key])
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', # pretrained='checkpoints/metanet-b4/det_fmtb4_v1.pth.tar', backbone=dict( type='Central_Model', backbone_name='MTB4', task_names=('gv_patch', 'gv_global'), main_task_name='gv_global', trans_type='crossconvhrnetlayer', task_name_to_backbone={ 'gv_global': { 'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256 }, 'gv_patch': { 'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256 } }, layer2channel={ 'layer1': 64, 'layer2': 128, 'layer3': 192 }, layer2auxlayers={ 'layer1': [ 'layer1', ], 'layer2': [ 'layer1', 'layer2', ], 'layer3': ['layer1', 'layer2', 'layer3'], }, trans_layers=['layer1', 'layer2', 'layer3'], channels=[64, 128, 192], ), decode_head=dict(type='ASPPHead', in_channels=384, in_index=3, channels=512, dilations=(1, 12, 24, 36), dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)), auxiliary_head=dict(type='FCNHead', in_channels=192, in_index=2, channels=256, num_convs=1, concat_input=False, dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), # model training and testing settings train_cfg=dict(), test_cfg=dict(mode='whole')) custom_imports = dict(imports=[ 'gvbenchmark.seg.models.backbones.central_model', ], allow_failed_imports=False)
norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict(type='EncoderDecoder', backbone=dict(type='Central_Model', backbone_name='MTB4', task_names=('gv_patch', 'gv_global'), main_task_name='gv_global', trans_type='crossconvhrnetlayer', task_name_to_backbone={'gv_global': {'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256}, 'gv_patch': {'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256}}, layer2channel={'layer1': 64, 'layer2': 128, 'layer3': 192}, layer2auxlayers={'layer1': ['layer1'], 'layer2': ['layer1', 'layer2'], 'layer3': ['layer1', 'layer2', 'layer3']}, trans_layers=['layer1', 'layer2', 'layer3'], channels=[64, 128, 192]), decode_head=dict(type='ASPPHead', in_channels=384, in_index=3, channels=512, dilations=(1, 12, 24, 36), dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)), auxiliary_head=dict(type='FCNHead', in_channels=192, in_index=2, channels=256, num_convs=1, concat_input=False, dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), train_cfg=dict(), test_cfg=dict(mode='whole')) custom_imports = dict(imports=['gvbenchmark.seg.models.backbones.central_model'], allow_failed_imports=False)
# OpenWeatherMap API Key weather_api_key = "2e751db150eed8a2a8ae9dc91e31a091" # Google API Key g_key = "AIzaSyBqrWs9x-quXSBQkAVuz-x7PP3t64gJj7E"
weather_api_key = '2e751db150eed8a2a8ae9dc91e31a091' g_key = 'AIzaSyBqrWs9x-quXSBQkAVuz-x7PP3t64gJj7E'
def main(): s = input() weathers = ['Sunny', 'Cloudy', 'Rainy'] length = weathers.__len__() index = weathers.index(s) + 1 if index >= length: index = 0 print(weathers[index]) if __name__ == "__main__": main()
def main(): s = input() weathers = ['Sunny', 'Cloudy', 'Rainy'] length = weathers.__len__() index = weathers.index(s) + 1 if index >= length: index = 0 print(weathers[index]) if __name__ == '__main__': main()
# Find height of a given binary tree class Node(): def __init__(self, value): self.left = None self.right = None self.value = value class Tree(): def height(self, node: Node): if node is None or (node.left is None and node.right is None): return 0 else: left_sub_tree_height = self.height(node.left) right_sub_tree_height = self.height(node.right) return max(left_sub_tree_height, right_sub_tree_height) + 1 n = Node(15) n.left = Node(10) n.right = Node(20) n.left.right = Node(12) n.right.left = Node(18) n.right.right = Node(30) # Creating left skewed tree n1 = Node(5) n1.left = Node(0) n1.left.left = Node(0) n1.left.left.left = Node(0) n1.left.left.left.left = Node(0) n1.left.left.left.left.left = Node(0) n1.left.left.left.left.left.left = Node(0) n.left.left = n1 print(f'The height of the tree is {Tree().height(n)}')
class Node: def __init__(self, value): self.left = None self.right = None self.value = value class Tree: def height(self, node: Node): if node is None or (node.left is None and node.right is None): return 0 else: left_sub_tree_height = self.height(node.left) right_sub_tree_height = self.height(node.right) return max(left_sub_tree_height, right_sub_tree_height) + 1 n = node(15) n.left = node(10) n.right = node(20) n.left.right = node(12) n.right.left = node(18) n.right.right = node(30) n1 = node(5) n1.left = node(0) n1.left.left = node(0) n1.left.left.left = node(0) n1.left.left.left.left = node(0) n1.left.left.left.left.left = node(0) n1.left.left.left.left.left.left = node(0) n.left.left = n1 print(f'The height of the tree is {tree().height(n)}')
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. SERVICE_TYPE = 'loadbalancer' NEUTRON = 'neutron' LBAAS_AGENT_RPC_TOPIC = 'lbaas_agent' LBAAS_GENERIC_CONFIG_RPC_TOPIC = 'lbaas_generic_config' LBAAS_PLUGIN_RPC_TOPIC = 'n-lbaas-plugin' AGENT_TYPE_LOADBALANCER = 'OC Loadbalancer agent' # Service operation status constants ACTIVE = "ACTIVE" DOWN = "DOWN" CREATED = "CREATED" PENDING_CREATE = "PENDING_CREATE" PENDING_UPDATE = "PENDING_UPDATE" PENDING_DELETE = "PENDING_DELETE" INACTIVE = "INACTIVE" ERROR = "ERROR" STATUS_SUCCESS = "SUCCESS" ACTIVE_PENDING_STATUSES = ( ACTIVE, PENDING_CREATE, PENDING_UPDATE ) """ HTTP request/response """ HAPROXY_AGENT_LISTEN_PORT = 1234 REQUEST_URL = "http://%s:%s/%s" HTTP_REQ_METHOD_POST = 'POST' HTTP_REQ_METHOD_GET = 'GET' HTTP_REQ_METHOD_PUT = 'PUT' HTTP_REQ_METHOD_DELETE = 'DELETE' CONTENT_TYPE_HEADER = 'Content-type' JSON_CONTENT_TYPE = 'application/json' LB_METHOD_ROUND_ROBIN = 'ROUND_ROBIN' LB_METHOD_LEAST_CONNECTIONS = 'LEAST_CONNECTIONS' LB_METHOD_SOURCE_IP = 'SOURCE_IP' PROTOCOL_TCP = 'TCP' PROTOCOL_HTTP = 'HTTP' PROTOCOL_HTTPS = 'HTTPS' HEALTH_MONITOR_PING = 'PING' HEALTH_MONITOR_TCP = 'TCP' HEALTH_MONITOR_HTTP = 'HTTP' HEALTH_MONITOR_HTTPS = 'HTTPS' LBAAS = 'lbaas' PROTOCOL_MAP = { PROTOCOL_TCP: 'tcp', PROTOCOL_HTTP: 'http', PROTOCOL_HTTPS: 'https', } BALANCE_MAP = { LB_METHOD_ROUND_ROBIN: 'roundrobin', LB_METHOD_LEAST_CONNECTIONS: 'leastconn', LB_METHOD_SOURCE_IP: 'source' } REQUEST_RETRIES = 0 REQUEST_TIMEOUT = 120 # Operations CREATE = 'create' UPDATE = 'update' DELETE = 'delete' """ Event ids """ EVENT_CREATE_POOL = 'CREATE_POOL' EVENT_UPDATE_POOL = 'UPDATE_POOL' EVENT_DELETE_POOL = 'DELETE_POOL' EVENT_CREATE_VIP = 'CREATE_VIP' EVENT_UPDATE_VIP = 'UPDATE_VIP' EVENT_DELETE_VIP = 'DELETE_VIP' EVENT_CREATE_MEMBER = 'CREATE_MEMBER' EVENT_UPDATE_MEMBER = 'UPDATE_MEMBER' EVENT_DELETE_MEMBER = 'DELETE_MEMBER' EVENT_CREATE_POOL_HEALTH_MONITOR = 'CREATE_POOL_HEALTH_MONITOR' EVENT_UPDATE_POOL_HEALTH_MONITOR = 'UPDATE_POOL_HEALTH_MONITOR' EVENT_DELETE_POOL_HEALTH_MONITOR = 'DELETE_POOL_HEALTH_MONITOR' EVENT_AGENT_UPDATED = 'AGENT_UPDATED' EVENT_COLLECT_STATS = 'COLLECT_STATS'
service_type = 'loadbalancer' neutron = 'neutron' lbaas_agent_rpc_topic = 'lbaas_agent' lbaas_generic_config_rpc_topic = 'lbaas_generic_config' lbaas_plugin_rpc_topic = 'n-lbaas-plugin' agent_type_loadbalancer = 'OC Loadbalancer agent' active = 'ACTIVE' down = 'DOWN' created = 'CREATED' pending_create = 'PENDING_CREATE' pending_update = 'PENDING_UPDATE' pending_delete = 'PENDING_DELETE' inactive = 'INACTIVE' error = 'ERROR' status_success = 'SUCCESS' active_pending_statuses = (ACTIVE, PENDING_CREATE, PENDING_UPDATE) ' HTTP request/response ' haproxy_agent_listen_port = 1234 request_url = 'http://%s:%s/%s' http_req_method_post = 'POST' http_req_method_get = 'GET' http_req_method_put = 'PUT' http_req_method_delete = 'DELETE' content_type_header = 'Content-type' json_content_type = 'application/json' lb_method_round_robin = 'ROUND_ROBIN' lb_method_least_connections = 'LEAST_CONNECTIONS' lb_method_source_ip = 'SOURCE_IP' protocol_tcp = 'TCP' protocol_http = 'HTTP' protocol_https = 'HTTPS' health_monitor_ping = 'PING' health_monitor_tcp = 'TCP' health_monitor_http = 'HTTP' health_monitor_https = 'HTTPS' lbaas = 'lbaas' protocol_map = {PROTOCOL_TCP: 'tcp', PROTOCOL_HTTP: 'http', PROTOCOL_HTTPS: 'https'} balance_map = {LB_METHOD_ROUND_ROBIN: 'roundrobin', LB_METHOD_LEAST_CONNECTIONS: 'leastconn', LB_METHOD_SOURCE_IP: 'source'} request_retries = 0 request_timeout = 120 create = 'create' update = 'update' delete = 'delete' ' Event ids ' event_create_pool = 'CREATE_POOL' event_update_pool = 'UPDATE_POOL' event_delete_pool = 'DELETE_POOL' event_create_vip = 'CREATE_VIP' event_update_vip = 'UPDATE_VIP' event_delete_vip = 'DELETE_VIP' event_create_member = 'CREATE_MEMBER' event_update_member = 'UPDATE_MEMBER' event_delete_member = 'DELETE_MEMBER' event_create_pool_health_monitor = 'CREATE_POOL_HEALTH_MONITOR' event_update_pool_health_monitor = 'UPDATE_POOL_HEALTH_MONITOR' event_delete_pool_health_monitor = 'DELETE_POOL_HEALTH_MONITOR' event_agent_updated = 'AGENT_UPDATED' event_collect_stats = 'COLLECT_STATS'
#!/usr/local/bin/python3 message = str(input("Message: ")) secret = "" for character in reversed(message): secret = secret + str(chr(ord(character)+1)) print(secret)
message = str(input('Message: ')) secret = '' for character in reversed(message): secret = secret + str(chr(ord(character) + 1)) print(secret)
class Solution: def majorityElement(self, nums: List[int]) -> int: counter = {} for num in nums: if num not in counter: counter[num] = 1 else: counter[num] += 1 for key, value in counter.items(): if value > len(nums)/2: return key
class Solution: def majority_element(self, nums: List[int]) -> int: counter = {} for num in nums: if num not in counter: counter[num] = 1 else: counter[num] += 1 for (key, value) in counter.items(): if value > len(nums) / 2: return key
oo000 = 0 for ii in range ( 11 ) : oo000 += ii if 51 - 51: IiI1i11I print ( oo000 ) # dd678faae9ac167bc83abf78e5cb2f3f0688d3a3
oo000 = 0 for ii in range(11): oo000 += ii if 51 - 51: IiI1i11I print(oo000)
""" Author: PyDev Description: Doubly Linked List with a Tail consist of a element, where the element is the skeleton and consist of a value next, and previous variable/element. There is a Head pointer to refer to the front of the Linked List. The Tail pointer to refer to the end of Linked List/last elment """ class Element: """ A class that represent single skeleton of the Linked List""" def __init__(self, value): """ initiliaze new elements of the linked list with new value Arguments: - value: any object reference to assign new element to Linked List Instance varabiles: - value: an object value - next: a reference/pointer to next element in the linked list and default value is None - previous: a reference/pointer to previous element in the linked list and default value is None """ self.value = value self.next = None self.previous = None class DoublyLinkedListWithTail: """ A class of Doubly-Linked List where it have attributes and properties, such as: - Doubly Linked List - With tail Methods: - pushFront(new_element) - topFront() - popFront() - pushBack(new_element) - topBack() - popBack() - find() - erase() - isEmpty() - addBefore() - addAfter() """ def __init__(self, head = None): """ initilize DoublyLinkedListWithoutTail object instance Arguments: - head: default to None Instance variables: - head: an object value which refer to head/start of the Linked List - Tail: an object value which refer to the back/end of the Linked List """ self.head = self.tail = head def pushFront(self, new_element): """ add new element to the front Arguments: - new_element: an object that reference to new element to be added """ if self.tail: new_element.next = self.head self.head = new_element new_element.next.previous = self.head else: self.head = self.tail = new_element def topFront(self): """ return front element/item Returns: - the front element/item object """ return self.head def popFront(self): """remove front element/item""" if self.head: next_element = self.head.next if next_element: next_element.previous = None else: self.tail = None previous_head_object = self.head self.head = next_element else: print("Doubly Linked List With Tail is empty!") def pushBack(self, new_element): """ add to back,also known as append Arguments: - new_element: an object that reference to new element to be added """ if self.tail: self.tail.next = new_element new_element.previous = self.tail self.tail = new_element else: self.head = self.tail = new_element new_element.previous = None def topBack(self): """ return back/last element/item Returns: - the back/last element/item object """ if self.tail: return self.tail else: print("Doubly Linked List With Tail is empty!") def popBack(self): """ remove back element/item """ if self.head: if self.head == self.tail: self.head = self.tail = None else: self.tail = self.tail.previous self.tail.next = None else: print("Error! Doubly Linked List With Tail is empty!") def find(self, value): """ find if the value of an object is available in the current Linked List Arguments: - value: an object that represent a value we want to look for Returns: - boolean object """ current = self.head if self.head: while current.value != value and current.next: current = current.next if current.value == value: return True else: return False else: print("Doubly Linked List Without Tail is empty!") def erase(self, value): """ remove an element/item from Linked List Arguments: - value: an object that represent a value we want to look for """ current = self.head while current.value != value and current.next: current = current.next if current.value == value: if self.head.value == value: # We can use self.popFront() or self.head = current.next current.next = None elif not current.next: # We can use self.popBack() or self.tail = current.previous current.previous = None else: next_element = current.next previous_element = current.previous previous_element.next = next_element next_element.previous = previous_element current.next = current.previous = None def isEmpty(self): """ check if the Linked List is empty or not Reutruns: - boolean object """ if self.head: return False else: return True def addBefore(self, new_element, node): """ add new element/item before a position in the Linked List Arguments: - new_element: an object that reference to a new element to be added - node: an object that reference to an integer object that tells the method to where place the new element/item """ new_element.next = node new_element.previous = node.previous node.previous = new_element if new_element.previous: new_element.previous.next = new_element if self.head == node: self.head = new_element def addAfter(self, new_element, node): """ add new element/item after a node/element/item in the Linked List Arguments: - new_element: an object that reference to a new element to be added - node: an object that is part of the Linked List elements """ new_element.next = node.next new_element.previous = node node.next = new_element if new_element.next: new_element.next.previous = new_element if self.tail == node: self.tail = new_element
""" Author: PyDev Description: Doubly Linked List with a Tail consist of a element, where the element is the skeleton and consist of a value next, and previous variable/element. There is a Head pointer to refer to the front of the Linked List. The Tail pointer to refer to the end of Linked List/last elment """ class Element: """ A class that represent single skeleton of the Linked List""" def __init__(self, value): """ initiliaze new elements of the linked list with new value Arguments: - value: any object reference to assign new element to Linked List Instance varabiles: - value: an object value - next: a reference/pointer to next element in the linked list and default value is None - previous: a reference/pointer to previous element in the linked list and default value is None """ self.value = value self.next = None self.previous = None class Doublylinkedlistwithtail: """ A class of Doubly-Linked List where it have attributes and properties, such as: - Doubly Linked List - With tail Methods: - pushFront(new_element) - topFront() - popFront() - pushBack(new_element) - topBack() - popBack() - find() - erase() - isEmpty() - addBefore() - addAfter() """ def __init__(self, head=None): """ initilize DoublyLinkedListWithoutTail object instance Arguments: - head: default to None Instance variables: - head: an object value which refer to head/start of the Linked List - Tail: an object value which refer to the back/end of the Linked List """ self.head = self.tail = head def push_front(self, new_element): """ add new element to the front Arguments: - new_element: an object that reference to new element to be added """ if self.tail: new_element.next = self.head self.head = new_element new_element.next.previous = self.head else: self.head = self.tail = new_element def top_front(self): """ return front element/item Returns: - the front element/item object """ return self.head def pop_front(self): """remove front element/item""" if self.head: next_element = self.head.next if next_element: next_element.previous = None else: self.tail = None previous_head_object = self.head self.head = next_element else: print('Doubly Linked List With Tail is empty!') def push_back(self, new_element): """ add to back,also known as append Arguments: - new_element: an object that reference to new element to be added """ if self.tail: self.tail.next = new_element new_element.previous = self.tail self.tail = new_element else: self.head = self.tail = new_element new_element.previous = None def top_back(self): """ return back/last element/item Returns: - the back/last element/item object """ if self.tail: return self.tail else: print('Doubly Linked List With Tail is empty!') def pop_back(self): """ remove back element/item """ if self.head: if self.head == self.tail: self.head = self.tail = None else: self.tail = self.tail.previous self.tail.next = None else: print('Error! Doubly Linked List With Tail is empty!') def find(self, value): """ find if the value of an object is available in the current Linked List Arguments: - value: an object that represent a value we want to look for Returns: - boolean object """ current = self.head if self.head: while current.value != value and current.next: current = current.next if current.value == value: return True else: return False else: print('Doubly Linked List Without Tail is empty!') def erase(self, value): """ remove an element/item from Linked List Arguments: - value: an object that represent a value we want to look for """ current = self.head while current.value != value and current.next: current = current.next if current.value == value: if self.head.value == value: self.head = current.next current.next = None elif not current.next: self.tail = current.previous current.previous = None else: next_element = current.next previous_element = current.previous previous_element.next = next_element next_element.previous = previous_element current.next = current.previous = None def is_empty(self): """ check if the Linked List is empty or not Reutruns: - boolean object """ if self.head: return False else: return True def add_before(self, new_element, node): """ add new element/item before a position in the Linked List Arguments: - new_element: an object that reference to a new element to be added - node: an object that reference to an integer object that tells the method to where place the new element/item """ new_element.next = node new_element.previous = node.previous node.previous = new_element if new_element.previous: new_element.previous.next = new_element if self.head == node: self.head = new_element def add_after(self, new_element, node): """ add new element/item after a node/element/item in the Linked List Arguments: - new_element: an object that reference to a new element to be added - node: an object that is part of the Linked List elements """ new_element.next = node.next new_element.previous = node node.next = new_element if new_element.next: new_element.next.previous = new_element if self.tail == node: self.tail = new_element
class Commit: def __init__(self): """ A simple feature container for each git commit """ self.features = {} def add(self, key, value): if key in self.features: raise Exception("Do not overwrite features") self.features[key] = value def remove(self, key): if key in self.features: return self.features.pop(key) raise Exception(f"The commit object does not have the feature: {key}") def get(self, key): if key in self.features: return self.features[key] raise Exception(f"The commit object does not have the feature: {key}") def get_all(self): return self.features.copy() def to_list(self): tmp = self.features.copy() tmp.pop("message", None) tmp.pop("files", None) return list(tmp.values())
class Commit: def __init__(self): """ A simple feature container for each git commit """ self.features = {} def add(self, key, value): if key in self.features: raise exception('Do not overwrite features') self.features[key] = value def remove(self, key): if key in self.features: return self.features.pop(key) raise exception(f'The commit object does not have the feature: {key}') def get(self, key): if key in self.features: return self.features[key] raise exception(f'The commit object does not have the feature: {key}') def get_all(self): return self.features.copy() def to_list(self): tmp = self.features.copy() tmp.pop('message', None) tmp.pop('files', None) return list(tmp.values())
APP_PORT = 7991 LOGFILE_PATH = "/var/log/application/db_replication.log" MASTER_MYSQL = { 'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'password': 'password' }
app_port = 7991 logfile_path = '/var/log/application/db_replication.log' master_mysql = {'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'password': 'password'}
""" Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer n and return all possible combinations of its factors. Note: You may assume that n is always positive. Factors should be greater than 1 and less than n. Examples: input: 1 output: [] input: 37 output: [] input: 12 output: [ [2, 6], [2, 2, 3], [3, 4] ] input: 32 output: [ [2, 16], [2, 2, 8], [2, 2, 2, 4], [2, 2, 2, 2, 2], [2, 4, 4], [4, 8] ] """ # Iterative: def get_factors(n): todo, combis = [(n, 2, [])], [] while todo: n, i, combi = todo.pop() while i * i <= n: if n % i == 0: combis.append(combi + [i, n//i]) todo.append((n//i, i, combi+[i])) i += 1 return combis # Recursive: def get_factors_recur(n): def factor(n, i, combi, combis): while i * i <= n: if n % i == 0: combis.append(combi + [i, n//i]), factor(n//i, i, combi+[i], combis) i += 1 return combis return factor(n, 2, [], [])
""" Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer n and return all possible combinations of its factors. Note: You may assume that n is always positive. Factors should be greater than 1 and less than n. Examples: input: 1 output: [] input: 37 output: [] input: 12 output: [ [2, 6], [2, 2, 3], [3, 4] ] input: 32 output: [ [2, 16], [2, 2, 8], [2, 2, 2, 4], [2, 2, 2, 2, 2], [2, 4, 4], [4, 8] ] """ def get_factors(n): (todo, combis) = ([(n, 2, [])], []) while todo: (n, i, combi) = todo.pop() while i * i <= n: if n % i == 0: combis.append(combi + [i, n // i]) todo.append((n // i, i, combi + [i])) i += 1 return combis def get_factors_recur(n): def factor(n, i, combi, combis): while i * i <= n: if n % i == 0: (combis.append(combi + [i, n // i]),) factor(n // i, i, combi + [i], combis) i += 1 return combis return factor(n, 2, [], [])
############################################################################# #Replace with the persons name that you were texting leftName = "Bob" #Replace with your name rightName = "John" #############################################################################
left_name = 'Bob' right_name = 'John'
BASE_DIR="" DATA_DIR="/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/data/" REMOTE_PATH_TO_PYTHON="/mnt/nfs/work1/akshay/akshay/anaconda3/python3" REMOTE_BASE_DIR="/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/"
base_dir = '' data_dir = '/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/data/' remote_path_to_python = '/mnt/nfs/work1/akshay/akshay/anaconda3/python3' remote_base_dir = '/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/'
def prime(num): flag=False for a in range(2,num-1): #basically prime no are divisible by itself and by 1 only so set input value -1 so i takes previous num if num%a==0: flag=True if flag==False: print("prime") else: print("not prime") num=int(input("enter the no")) prime(num)
def prime(num): flag = False for a in range(2, num - 1): if num % a == 0: flag = True if flag == False: print('prime') else: print('not prime') num = int(input('enter the no')) prime(num)
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. All Rights Reserved. # Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### class ADVehicle: def __init__(self): self._chassis_pb = None self._localization_pb = None self.front_edge_to_center = 3.89 self.back_edge_to_center = 1.043 self.left_edge_to_center = 1.055 self.right_edge_to_center = 1.055 self.speed_mps = None self.x = None self.y = None self.heading = None def update_chassis(self, chassis_pb): self._chassis_pb = chassis_pb self.speed_mps = self._chassis_pb.speed_mps def update_localization(self, localization_pb): self._localization_pb = localization_pb self.x = self._localization_pb.pose.position.x self.y = self._localization_pb.pose.position.y self.heading = self._localization_pb.pose.heading def is_ready(self): if self._chassis_pb is None or self._localization_pb is None: return False return True
class Advehicle: def __init__(self): self._chassis_pb = None self._localization_pb = None self.front_edge_to_center = 3.89 self.back_edge_to_center = 1.043 self.left_edge_to_center = 1.055 self.right_edge_to_center = 1.055 self.speed_mps = None self.x = None self.y = None self.heading = None def update_chassis(self, chassis_pb): self._chassis_pb = chassis_pb self.speed_mps = self._chassis_pb.speed_mps def update_localization(self, localization_pb): self._localization_pb = localization_pb self.x = self._localization_pb.pose.position.x self.y = self._localization_pb.pose.position.y self.heading = self._localization_pb.pose.heading def is_ready(self): if self._chassis_pb is None or self._localization_pb is None: return False return True
""" Some constants. """ VERSION = "0.1.0" BAT = "bat" LIGHT_THEME = "GitHub" LEFT_SIDE, RIGHT_SIDE = range(2)
""" Some constants. """ version = '0.1.0' bat = 'bat' light_theme = 'GitHub' (left_side, right_side) = range(2)
class Environment: def __init__(self, bindings=None): self.stack = [bindings or {}] self.index = 0 def set(self, name, val, i=None): """ Assign value to a name. By default, names will be stored in the lowest scope possible. """ i = i if i != None else self.index if name in self.stack[i]: self.stack[i][name] = val elif i > 0: self.set(name, val, i - 1) else: self.stack[i][name] = val def get(self, name, i=None): """ Try to retrieve value for the specified name. If not available in the current scope, search in parent. """ i = i if i != None else self.index if name in self.stack[i]: return self.stack[i][name] elif i > 0: return self.get(name, i - 1) else: raise NameError( "symbol '{}' is not defined" .format(name) ) def push(self, bindings=None): self.index += 1 self.stack.append(bindings or {}) def pop(self): self.index -= 1 self.stack.pop() def show(self, exclude=None, include=None): for s in self.stack: for n, v in s.items(): if (not include or n in include) and not (exclude and n in exclude): print(' {} - {}'.format(n, v))
class Environment: def __init__(self, bindings=None): self.stack = [bindings or {}] self.index = 0 def set(self, name, val, i=None): """ Assign value to a name. By default, names will be stored in the lowest scope possible. """ i = i if i != None else self.index if name in self.stack[i]: self.stack[i][name] = val elif i > 0: self.set(name, val, i - 1) else: self.stack[i][name] = val def get(self, name, i=None): """ Try to retrieve value for the specified name. If not available in the current scope, search in parent. """ i = i if i != None else self.index if name in self.stack[i]: return self.stack[i][name] elif i > 0: return self.get(name, i - 1) else: raise name_error("symbol '{}' is not defined".format(name)) def push(self, bindings=None): self.index += 1 self.stack.append(bindings or {}) def pop(self): self.index -= 1 self.stack.pop() def show(self, exclude=None, include=None): for s in self.stack: for (n, v) in s.items(): if (not include or n in include) and (not (exclude and n in exclude)): print(' {} - {}'.format(n, v))
"""Chapter 5: Question 4. A simple condition to check if a number is power of 2: n & (n-1) == 0 Example: n = 1000 1000 & (1000 - 1)) = 1000 & 0111 = 0000 = 0 """ def is_power_of_two(n): """Checks if n is a power of 2. Args: n: Non-negative integer. """ if n < 0: raise ValueError('Input argument must be >= 0.') return n & (n-1) == 0
"""Chapter 5: Question 4. A simple condition to check if a number is power of 2: n & (n-1) == 0 Example: n = 1000 1000 & (1000 - 1)) = 1000 & 0111 = 0000 = 0 """ def is_power_of_two(n): """Checks if n is a power of 2. Args: n: Non-negative integer. """ if n < 0: raise value_error('Input argument must be >= 0.') return n & n - 1 == 0
HTTP_STATUS_CODES = { "100": "Continue", "101": "Switching Protocols", "102": "Processing", "200": "OK", "201": "Created", "202": "Accepted", "203": "Non-Authoritative Information", "204": "No Content", "205": "Reset Content", "206": "Partial Content", "207": "Multi-Status", "208": "Already Reported", "226": "IM Used", "300": "Multiple Choices", "301": "Moved Permanently", "302": "Found", "303": "See Other", "304": "Not Modified", "305": "Use Proxy", "306": "Switch Proxy", "307": "Temporary Redirect", "308": "Permanent Redirect", "400": "Bad Request", "401": "Unauthorized", "402": "Payment Required", "403": "Forbidden", "404": "Not Found", "405": "Method Not Allowed", "406": "Not Acceptable", "407": "Proxy Authentication Required", "408": "Request Timeout", "409": "Conflict", "410": "Gone", "411": "Length Required", "412": "Precondition Failed", "413": "Payload Too Large", "414": "URI Too Long", "415": "Unsupported Media Type", "416": "Range Not Satisfiable", "417": "Expectation Failed", "418": "I'm a teapot", "421": "Misdirected Request", "422": "Unprocessable Entity", "423": "Locked", "424": "Failed Dependency", "425": "Too Early", "426": "Upgrade Required", "428": "Precontidion Required", "429": "Too Many Requests", "431": "Request Header Fields Too Large", "451": "Unavailable For Legal Reasons", "500": "Internal Server Error", "501": "Not Implemented", "502": "Bad Gateway", "503": "Service Unavailable", "504": "Gateway Timeout", "505": "HTTP Version Not Supported", "506": "Variant Also Negotiates", "507": "Insufficient Storage", "508": "Loop Detected", "510": "Not Extended", "511": "Network Authentication Require", }
http_status_codes = {'100': 'Continue', '101': 'Switching Protocols', '102': 'Processing', '200': 'OK', '201': 'Created', '202': 'Accepted', '203': 'Non-Authoritative Information', '204': 'No Content', '205': 'Reset Content', '206': 'Partial Content', '207': 'Multi-Status', '208': 'Already Reported', '226': 'IM Used', '300': 'Multiple Choices', '301': 'Moved Permanently', '302': 'Found', '303': 'See Other', '304': 'Not Modified', '305': 'Use Proxy', '306': 'Switch Proxy', '307': 'Temporary Redirect', '308': 'Permanent Redirect', '400': 'Bad Request', '401': 'Unauthorized', '402': 'Payment Required', '403': 'Forbidden', '404': 'Not Found', '405': 'Method Not Allowed', '406': 'Not Acceptable', '407': 'Proxy Authentication Required', '408': 'Request Timeout', '409': 'Conflict', '410': 'Gone', '411': 'Length Required', '412': 'Precondition Failed', '413': 'Payload Too Large', '414': 'URI Too Long', '415': 'Unsupported Media Type', '416': 'Range Not Satisfiable', '417': 'Expectation Failed', '418': "I'm a teapot", '421': 'Misdirected Request', '422': 'Unprocessable Entity', '423': 'Locked', '424': 'Failed Dependency', '425': 'Too Early', '426': 'Upgrade Required', '428': 'Precontidion Required', '429': 'Too Many Requests', '431': 'Request Header Fields Too Large', '451': 'Unavailable For Legal Reasons', '500': 'Internal Server Error', '501': 'Not Implemented', '502': 'Bad Gateway', '503': 'Service Unavailable', '504': 'Gateway Timeout', '505': 'HTTP Version Not Supported', '506': 'Variant Also Negotiates', '507': 'Insufficient Storage', '508': 'Loop Detected', '510': 'Not Extended', '511': 'Network Authentication Require'}
# -*- coding: utf-8 -*- """ Created on Mon Mar 16 00:26:52 2020 @author: RogelioTESI """ def es_primo(Numero): resultado = True rep = 0 for divisor in range(2,Numero): if (Numero % divisor)==0: resultado = False break rep = rep+(divisor-1) return resultado,rep x,rep = es_primo(13)
""" Created on Mon Mar 16 00:26:52 2020 @author: RogelioTESI """ def es_primo(Numero): resultado = True rep = 0 for divisor in range(2, Numero): if Numero % divisor == 0: resultado = False break rep = rep + (divisor - 1) return (resultado, rep) (x, rep) = es_primo(13)
# Write your code here N = int(input()) arr = list(map(int, input().split())) def give_soln(n): return ((2**n) - (1 + (n) + (n*(n-1)/2))) my_dict = dict() for i in arr: if i in my_dict: my_dict[i] += 1 else: my_dict[i] = 1 count = 0 for side in my_dict: if my_dict[side] >=3: count += give_soln(my_dict[side]) print(int(count)%(10**9 + 7))
n = int(input()) arr = list(map(int, input().split())) def give_soln(n): return 2 ** n - (1 + n + n * (n - 1) / 2) my_dict = dict() for i in arr: if i in my_dict: my_dict[i] += 1 else: my_dict[i] = 1 count = 0 for side in my_dict: if my_dict[side] >= 3: count += give_soln(my_dict[side]) print(int(count) % (10 ** 9 + 7))
"""This is where you modify constants""" USER = "user" PASSWORD = "pwd" DATABASE_NAME = "mydb" CATEGORIES = ["Fromages", "Desserts", "Viandes", "Chocolats", "Snacks", ] PRODUCT_NUMBER = 1000
"""This is where you modify constants""" user = 'user' password = 'pwd' database_name = 'mydb' categories = ['Fromages', 'Desserts', 'Viandes', 'Chocolats', 'Snacks'] product_number = 1000
model = dict( type='GroupFree3DNet', backbone=dict( type='PointNet2SASSG', in_channels=3, num_points=(2048, 1024, 512, 256), radius=(0.2, 0.4, 0.8, 1.2), num_samples=(64, 32, 16, 16), sa_channels=((64, 64, 128), (128, 128, 256), (128, 128, 256), (128, 128, 256)), fp_channels=((256, 256), (256, 288)), norm_cfg=dict(type='BN2d'), sa_cfg=dict( type='PointSAModule', pool_mod='max', use_xyz=True, normalize_xyz=True)), bbox_head=dict( type='GroupFree3DHead', in_channels=288, num_decoder_layers=6, num_proposal=256, transformerlayers=dict( type='BaseTransformerLayer', attn_cfgs=dict( type='GroupFree3DMHA', embed_dims=288, num_heads=8, attn_drop=0.1, dropout_layer=dict(type='Dropout', drop_prob=0.1)), ffn_cfgs=dict( embed_dims=288, feedforward_channels=2048, ffn_drop=0.1, act_cfg=dict(type='ReLU', inplace=True)), operation_order=('self_attn', 'norm', 'cross_attn', 'norm', 'ffn', 'norm')), pred_layer_cfg=dict( in_channels=288, shared_conv_channels=(288, 288), bias=True), sampling_objectness_loss=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=8.0), objectness_loss=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), center_loss=dict( type='SmoothL1Loss', reduction='sum', loss_weight=10.0), dir_class_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), dir_res_loss=dict( type='SmoothL1Loss', reduction='sum', loss_weight=10.0), size_class_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), size_res_loss=dict( type='SmoothL1Loss', beta=1.0, reduction='sum', loss_weight=10.0), semantic_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0)), # model training and testing settings train_cfg=dict(sample_mod='kps'), test_cfg=dict( sample_mod='kps', nms_thr=0.25, score_thr=0.0, per_class_proposal=True, prediction_stages='last'))
model = dict(type='GroupFree3DNet', backbone=dict(type='PointNet2SASSG', in_channels=3, num_points=(2048, 1024, 512, 256), radius=(0.2, 0.4, 0.8, 1.2), num_samples=(64, 32, 16, 16), sa_channels=((64, 64, 128), (128, 128, 256), (128, 128, 256), (128, 128, 256)), fp_channels=((256, 256), (256, 288)), norm_cfg=dict(type='BN2d'), sa_cfg=dict(type='PointSAModule', pool_mod='max', use_xyz=True, normalize_xyz=True)), bbox_head=dict(type='GroupFree3DHead', in_channels=288, num_decoder_layers=6, num_proposal=256, transformerlayers=dict(type='BaseTransformerLayer', attn_cfgs=dict(type='GroupFree3DMHA', embed_dims=288, num_heads=8, attn_drop=0.1, dropout_layer=dict(type='Dropout', drop_prob=0.1)), ffn_cfgs=dict(embed_dims=288, feedforward_channels=2048, ffn_drop=0.1, act_cfg=dict(type='ReLU', inplace=True)), operation_order=('self_attn', 'norm', 'cross_attn', 'norm', 'ffn', 'norm')), pred_layer_cfg=dict(in_channels=288, shared_conv_channels=(288, 288), bias=True), sampling_objectness_loss=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=8.0), objectness_loss=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), center_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=10.0), dir_class_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), dir_res_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=10.0), size_class_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), size_res_loss=dict(type='SmoothL1Loss', beta=1.0, reduction='sum', loss_weight=10.0), semantic_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0)), train_cfg=dict(sample_mod='kps'), test_cfg=dict(sample_mod='kps', nms_thr=0.25, score_thr=0.0, per_class_proposal=True, prediction_stages='last'))
#!/usr/bin/env python __all__ = ['adaptor', 'get_by_cai','util'] __author__ = "Rob Knight" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["Rob Knight", "Stephanie Wilson", "Michael Eaton"] __license__ = "GPL" __version__ = "1.5.3" __maintainer__ = "Rob Knight" __email__ = "rob@spot.colorado.edu" __status__ = "Production"
__all__ = ['adaptor', 'get_by_cai', 'util'] __author__ = 'Rob Knight' __copyright__ = 'Copyright 2007-2012, The Cogent Project' __credits__ = ['Rob Knight', 'Stephanie Wilson', 'Michael Eaton'] __license__ = 'GPL' __version__ = '1.5.3' __maintainer__ = 'Rob Knight' __email__ = 'rob@spot.colorado.edu' __status__ = 'Production'
# -*- coding: utf-8 -*- class FieldError(Exception): pass class FieldDoesNotExist(Exception): pass class ReadOnlyError(AttributeError): pass
class Fielderror(Exception): pass class Fielddoesnotexist(Exception): pass class Readonlyerror(AttributeError): pass
# Created by MechAviv # Quest ID :: 34931 # Not coded yet sm.setSpeakerID(3001510) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendNext("#face1#Good work! I'm getting the signal again. We need to move quickly. Follow me.") sm.setSpeakerID(3001509) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendSay("#face3#Oh, we didn't let the sandstorm get us down!\r\nNow our trouble's behind us, and we're searchin' around!") # Update Quest Record EX | Quest ID: [34995] | Data: 00=h1;10=h0;01=h0;11=h0;02=h0;12=h0;13=h0;04=h0;23=h0;14=h0;05=h0;24=h0;15=h0;06=h0;16=h0;07=h0;17=h0;09=h0 sm.completeQuest(34931) # Unhandled Stat Changed [EXP] Packet: 00 00 00 00 01 00 00 00 00 00 EB 21 00 00 00 00 00 00 FF 00 00 00 00 sm.giveExp(7360) # Update Quest Record EX | Quest ID: [34931] | Data: exp=1 # Update Quest Record EX | Quest ID: [34995] | Data: 00=h1;10=h0;01=h0;11=h1;02=h0;12=h0;13=h0;04=h0;23=h0;14=h0;05=h0;24=h0;15=h0;06=h0;16=h0;07=h0;17=h0;09=h0 # Unhandled Message [47] Packet: 2F 0A 00 00 00 40 9C 00 00 00 00 00 00 28 00 00 00 00 00 00 80 05 BB 46 E6 17 02 0C 00 75 73 65 72 5F 6C 76 75 70 3D 32 36 B8 58 08 00 00 00 00 00 23 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 6F 62 5F 6B 69 6C 6C 3D 34 39 35 38 58 68 08 00 00 00 00 00 27 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 6F 62 5F 6B 69 6C 6C 3D 34 39 35 38 B0 83 08 00 00 00 00 00 2E 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0B 00 6D 6F 62 5F 6B 69 6C 6C 3D 31 38 70 5E 09 00 00 00 00 00 66 02 00 00 00 00 00 80 05 BB 46 E6 17 02 14 00 63 6F 6D 62 6F 6B 69 6C 6C 5F 69 6E 63 72 65 73 65 3D 32 32 E0 75 09 00 00 00 00 00 6C 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 75 6C 74 69 6B 69 6C 6C 3D 34 32 34 98 81 09 00 00 00 00 00 6F 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 75 6C 74 69 6B 69 6C 6C 3D 34 32 34 50 8D 09 00 00 00 00 00 72 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0A 00 6D 6F 62 5F 6B 69 6C 6C 3D 38 08 99 09 00 00 00 00 00 75 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0A 00 6D 6F 62 5F 6B 69 6C 6C 3D 38 C4 22 11 00 00 00 00 00 63 04 00 00 0C 02 A0 18 36 98 8A D6 D4 01 0D 00 66 69 65 6C 64 5F 65 6E 74 65 72 3D 31 sm.warp(402090005, 0)
sm.setSpeakerID(3001510) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendNext("#face1#Good work! I'm getting the signal again. We need to move quickly. Follow me.") sm.setSpeakerID(3001509) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendSay("#face3#Oh, we didn't let the sandstorm get us down!\r\nNow our trouble's behind us, and we're searchin' around!") sm.completeQuest(34931) sm.giveExp(7360) sm.warp(402090005, 0)
""" Codemonk link: https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/monk-and-tasks/ Given an array, the number of tasks is represented by the number of ones in the binary representation of each integer in the array. Print those integers in an increasing order based on the number of ones in the binary representation. Input - Output: First line contains the number of test cases. The next line contains the length of the array. The output is explained above. Sample input: 1 4 3 4 7 10 Sample Output: 4 3 10 7 """ """ The problem is straightforward. We find the number of ones in the binary representation of each integer in the array and we sort the integer based on this count, following an increasing order. The input length is insignificant. O(N) for the second "for" statement. The while statement in insignificant. Python uses Timsort which has O(NlogN) complexity. Final complexity: O(N + NlogN) => O(NlogN) """ test_cases = int(input()) for i in range(test_cases): days = int(input()) tasks = list(map(int, input().rstrip().split())) tasks_bin = [] for j in range(len(tasks)): count = 0 num = tasks[j] while num: # Count the number of 1's using bit manipulation. # num - 1 changes the LSB and the bits right to it. # Each time we make num & (num - 1) we remove the LSB. num = num & (num - 1) count += 1 tasks_bin.append(count) # Sort based on the first element of each sub-pair. final = [x[1] for x in sorted(zip(tasks_bin, tasks), key=lambda pair: pair[0])] print(*final) # Faster approach, bin returns string # for i in range(int(input())): # n = int(input()) # a = input().split() # print(" ".join(sorted(a, key=lambda x: bin(int(x)).count('1'))))
""" Codemonk link: https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/monk-and-tasks/ Given an array, the number of tasks is represented by the number of ones in the binary representation of each integer in the array. Print those integers in an increasing order based on the number of ones in the binary representation. Input - Output: First line contains the number of test cases. The next line contains the length of the array. The output is explained above. Sample input: 1 4 3 4 7 10 Sample Output: 4 3 10 7 """ '\nThe problem is straightforward. We find the number of ones in the binary representation of each integer in the array and\nwe sort the integer based on this count, following an increasing order.\n\nThe input length is insignificant. O(N) for the second "for" statement. \nThe while statement in insignificant. \nPython uses Timsort which has O(NlogN) complexity. \n\nFinal complexity: O(N + NlogN) => O(NlogN)\n' test_cases = int(input()) for i in range(test_cases): days = int(input()) tasks = list(map(int, input().rstrip().split())) tasks_bin = [] for j in range(len(tasks)): count = 0 num = tasks[j] while num: num = num & num - 1 count += 1 tasks_bin.append(count) final = [x[1] for x in sorted(zip(tasks_bin, tasks), key=lambda pair: pair[0])] print(*final)
__all__ = ["InvalidCredentialsException"] class InvalidCredentialsException(Exception): pass class NoHostsConnectedToException(Exception): pass
__all__ = ['InvalidCredentialsException'] class Invalidcredentialsexception(Exception): pass class Nohostsconnectedtoexception(Exception): pass
# More details on this kata # https://www.codewars.com/kata/51c8e37cee245da6b40000bd def solution(string,markers): if len(string) == 0: return '' t, tt, test, l, j, ret= [], [], [], [], [], '' s = string.split('\n') for _s in s: for m in markers: if _s.find(m) != -1: t.append(_s.find(m)) test.append(t) t = [] for a in test: tt.append(sorted(a)) for i, _s in zip(tt, s): if i == []: l.append(_s) if i != []: l.append(_s[:i[0]]) for s in l: if s != '': if s[-1] == ' ': j.append(s[:-1]) continue else: j.append(s) continue else: j.append(s) for i, s in enumerate(j): if i == len(j) - 1: ret += s continue ret += s + '\n' return ret
def solution(string, markers): if len(string) == 0: return '' (t, tt, test, l, j, ret) = ([], [], [], [], [], '') s = string.split('\n') for _s in s: for m in markers: if _s.find(m) != -1: t.append(_s.find(m)) test.append(t) t = [] for a in test: tt.append(sorted(a)) for (i, _s) in zip(tt, s): if i == []: l.append(_s) if i != []: l.append(_s[:i[0]]) for s in l: if s != '': if s[-1] == ' ': j.append(s[:-1]) continue else: j.append(s) continue else: j.append(s) for (i, s) in enumerate(j): if i == len(j) - 1: ret += s continue ret += s + '\n' return ret
# Copyright (c) 2018, Benjamin Shropshire, # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. """ A basic test that always passes, as long as everythin in `targets` builds. This is usefull, for example, with a genrule. """ def build_test(name = None, targets = [], tags = []): """A test that depends on arbitary targets. Args: name: The target name. targets: Targets to check. tags: tags for the test. """ # Use a genrule to ensure the targets are built native.genrule( name = name + "_gen", srcs = targets, outs = [name + "_gen.out"], tags = tags, visibility = ["//visibility:private"], cmd = "echo > $@", ) native.sh_test( name = name, srcs = ["@bazel_rules//build_test:blank.sh"], data = [name + "_gen.out"], tags = tags, timeout = "short", )
""" A basic test that always passes, as long as everythin in `targets` builds. This is usefull, for example, with a genrule. """ def build_test(name=None, targets=[], tags=[]): """A test that depends on arbitary targets. Args: name: The target name. targets: Targets to check. tags: tags for the test. """ native.genrule(name=name + '_gen', srcs=targets, outs=[name + '_gen.out'], tags=tags, visibility=['//visibility:private'], cmd='echo > $@') native.sh_test(name=name, srcs=['@bazel_rules//build_test:blank.sh'], data=[name + '_gen.out'], tags=tags, timeout='short')
def get_global_config(): result = { 'outcome' : 'success', 'data' : { 'credentials_file' : r'./config/config.ini', } } return result
def get_global_config(): result = {'outcome': 'success', 'data': {'credentials_file': './config/config.ini'}} return result
# Url to manually retrieve authorization code AUTH_URL = "https://auth.tdameritrade.com/auth" # API endpoint for token and authorization code authentication OAUTH_URL = "https://api.tdameritrade.com/v1/oauth2/token" # Quote endpoints GET_QUOTES_URL = "https://api.tdameritrade.com/v1/marketdata/quotes" GET_QUOTE_URL = "https://api.tdameritrade.com/v1/marketdata/" # History endpoint GET_PRICE_HISTORY_URL = "https://api.tdameritrade.com/v1/marketdata/"
auth_url = 'https://auth.tdameritrade.com/auth' oauth_url = 'https://api.tdameritrade.com/v1/oauth2/token' get_quotes_url = 'https://api.tdameritrade.com/v1/marketdata/quotes' get_quote_url = 'https://api.tdameritrade.com/v1/marketdata/' get_price_history_url = 'https://api.tdameritrade.com/v1/marketdata/'
""" Default django-evostream configuration """ EVOSTREAM_URI = 'http://127.0.0.1:7777'
""" Default django-evostream configuration """ evostream_uri = 'http://127.0.0.1:7777'
def start(): print('\nThis is my Rock Paper Scissors Game!\n\n') Player_one = "Kaly" Player_two = "Erik" def choices(Player_one_choice, Player_two_choice): if Player_one_choice == 'rock' and Player_two_choice == 'paper': return('Paper cover Rock! ' + Player_two + ' Wins !') elif Player_one_choice == 'paper' and Player_two_choice == 'rock': return('Paper cover Rock! ' + Player_one + ' Wins !') elif Player_one_choice == 'scissors' and Player_two_choice == 'paper': return('Scissors cuts Paper! ' + Player_one + ' Wins !') elif Player_one_choice == 'paper' and Player_two_choice == 'scissors': return('Scissors cuts Paper! ' + Player_two + ' Wins !') elif Player_one_choice == 'scissors' and Player_two_choice == 'rock': return('Rock smashes Scissors! ' + Player_two + ' Wins !') elif Player_one_choice == 'rock' and Player_two_choice == 'scissors': return('Rock smashes Scissors! ' + Player_one + ' Wins !') elif Player_one_choice == Player_two_choice: return(Player_one+' and '+ Player_two + ' tied!') else: return('Please type Rock, Paper or Scissors!') Player_one_choose = input('Does '+ Player_one + ' choose Rock, Paper or Scissors? ').lower() Player_two_choose = input('Does '+ Player_two + ' choose Rock, Paper or Scissors? ').lower() print(choices(Player_one_choose, Player_two_choose)) def Play_Again(): Again = input("Would you like to play the game again? ").lower() if Again == 'no': quit() if Again == 'yes': start() else: print('Please enter Yes or No. Thank you!') Play_Again() Play_Again() start()
def start(): print('\nThis is my Rock Paper Scissors Game!\n\n') player_one = 'Kaly' player_two = 'Erik' def choices(Player_one_choice, Player_two_choice): if Player_one_choice == 'rock' and Player_two_choice == 'paper': return 'Paper cover Rock! ' + Player_two + ' Wins !' elif Player_one_choice == 'paper' and Player_two_choice == 'rock': return 'Paper cover Rock! ' + Player_one + ' Wins !' elif Player_one_choice == 'scissors' and Player_two_choice == 'paper': return 'Scissors cuts Paper! ' + Player_one + ' Wins !' elif Player_one_choice == 'paper' and Player_two_choice == 'scissors': return 'Scissors cuts Paper! ' + Player_two + ' Wins !' elif Player_one_choice == 'scissors' and Player_two_choice == 'rock': return 'Rock smashes Scissors! ' + Player_two + ' Wins !' elif Player_one_choice == 'rock' and Player_two_choice == 'scissors': return 'Rock smashes Scissors! ' + Player_one + ' Wins !' elif Player_one_choice == Player_two_choice: return Player_one + ' and ' + Player_two + ' tied!' else: return 'Please type Rock, Paper or Scissors!' player_one_choose = input('Does ' + Player_one + ' choose Rock, Paper or Scissors? ').lower() player_two_choose = input('Does ' + Player_two + ' choose Rock, Paper or Scissors? ').lower() print(choices(Player_one_choose, Player_two_choose)) def play__again(): again = input('Would you like to play the game again? ').lower() if Again == 'no': quit() if Again == 'yes': start() else: print('Please enter Yes or No. Thank you!') play__again() play__again() start()
def parameters(): epsilon = 0.0001 # regularization K = 3 # number of desired clusters n_iter = 5 # number of iterations skin_n_iter = 5 skin_epsilon = 0.0001 skin_K = 3 theta = 2.0 # threshold for skin detection return epsilon, K, n_iter, skin_n_iter, skin_epsilon, skin_K, theta
def parameters(): epsilon = 0.0001 k = 3 n_iter = 5 skin_n_iter = 5 skin_epsilon = 0.0001 skin_k = 3 theta = 2.0 return (epsilon, K, n_iter, skin_n_iter, skin_epsilon, skin_K, theta)
"""IntelliJ plugin debug target rule used for debugging IntelliJ plugins. Creates a plugin target debuggable from IntelliJ. Any files in the 'deps' and 'javaagents' attribute are deployed to the plugin sandbox. Any files are stripped of their prefix and installed into <sandbox>/plugins. If you need structure, first put the files into //build_defs:build_defs%repackage_files. intellij_plugin_debug_targets can be nested. repackaged_files( name = "foo_files", srcs = [ ":my_plugin_jar", ":my_additional_plugin_files", ], prefix = "plugins/foo/lib", ) intellij_plugin_debug_target( name = "my_debug_target", deps = [ ":my_jar", ], javaagents = [ ":agent_deploy.jar", ], ) """ load("//build_defs:build_defs.bzl", "output_path", "repackaged_files_data") SUFFIX = ".intellij-plugin-debug-target-deploy-info" def _repackaged_deploy_file(f, repackaging_data): return struct( src = f, deploy_location = output_path(f, repackaging_data), ) def _flat_deploy_file(f): return struct( src = f, deploy_location = f.basename, ) def _intellij_plugin_debug_target_aspect_impl(target, ctx): aspect_intellij_plugin_deploy_info = None files = target.files if ctx.rule.kind == "intellij_plugin_debug_target": aspect_intellij_plugin_deploy_info = target.intellij_plugin_deploy_info elif ctx.rule.kind == "_repackaged_files": data = target[repackaged_files_data] aspect_intellij_plugin_deploy_info = struct( deploy_files = [_repackaged_deploy_file(f, data) for f in data.files.to_list()], java_agent_deploy_files = [], ) # TODO(brendandouglas): Remove when migrating to Bazel 0.5, when DefaultInfo # provider can be populated by '_repackaged_files' directly files = depset(transitive = [files, data.files]) else: aspect_intellij_plugin_deploy_info = struct( deploy_files = [_flat_deploy_file(f) for f in target.files.to_list()], java_agent_deploy_files = [], ) return struct( input_files = files, aspect_intellij_plugin_deploy_info = aspect_intellij_plugin_deploy_info, ) _intellij_plugin_debug_target_aspect = aspect( implementation = _intellij_plugin_debug_target_aspect_impl, ) def _build_deploy_info_file(deploy_file): return struct( execution_path = deploy_file.src.path, deploy_location = deploy_file.deploy_location, ) def _intellij_plugin_debug_target_impl(ctx): files = depset() deploy_files = [] java_agent_deploy_files = [] for target in ctx.attr.deps: files = depset(transitive = [files, target.input_files]) deploy_files.extend(target.aspect_intellij_plugin_deploy_info.deploy_files) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.java_agent_deploy_files) for target in ctx.attr.javaagents: files = depset(transitive = [files, target.input_files]) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.deploy_files) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.java_agent_deploy_files) deploy_info = struct( deploy_files = [_build_deploy_info_file(f) for f in deploy_files], java_agent_deploy_files = [_build_deploy_info_file(f) for f in java_agent_deploy_files], ) output = ctx.actions.declare_file(ctx.label.name + SUFFIX) ctx.actions.write(output, deploy_info.to_proto()) # We've already consumed any dependent intellij_plugin_debug_targets into our own, # do not build or report these files = depset([f for f in files.to_list() if not f.path.endswith(SUFFIX)]) files = depset([output], transitive = [files]) return struct( files = files, intellij_plugin_deploy_info = struct( deploy_files = deploy_files, java_agent_deploy_files = java_agent_deploy_files, ), ) intellij_plugin_debug_target = rule( implementation = _intellij_plugin_debug_target_impl, attrs = { "deps": attr.label_list(aspects = [_intellij_plugin_debug_target_aspect]), "javaagents": attr.label_list(aspects = [_intellij_plugin_debug_target_aspect]), }, )
"""IntelliJ plugin debug target rule used for debugging IntelliJ plugins. Creates a plugin target debuggable from IntelliJ. Any files in the 'deps' and 'javaagents' attribute are deployed to the plugin sandbox. Any files are stripped of their prefix and installed into <sandbox>/plugins. If you need structure, first put the files into //build_defs:build_defs%repackage_files. intellij_plugin_debug_targets can be nested. repackaged_files( name = "foo_files", srcs = [ ":my_plugin_jar", ":my_additional_plugin_files", ], prefix = "plugins/foo/lib", ) intellij_plugin_debug_target( name = "my_debug_target", deps = [ ":my_jar", ], javaagents = [ ":agent_deploy.jar", ], ) """ load('//build_defs:build_defs.bzl', 'output_path', 'repackaged_files_data') suffix = '.intellij-plugin-debug-target-deploy-info' def _repackaged_deploy_file(f, repackaging_data): return struct(src=f, deploy_location=output_path(f, repackaging_data)) def _flat_deploy_file(f): return struct(src=f, deploy_location=f.basename) def _intellij_plugin_debug_target_aspect_impl(target, ctx): aspect_intellij_plugin_deploy_info = None files = target.files if ctx.rule.kind == 'intellij_plugin_debug_target': aspect_intellij_plugin_deploy_info = target.intellij_plugin_deploy_info elif ctx.rule.kind == '_repackaged_files': data = target[repackaged_files_data] aspect_intellij_plugin_deploy_info = struct(deploy_files=[_repackaged_deploy_file(f, data) for f in data.files.to_list()], java_agent_deploy_files=[]) files = depset(transitive=[files, data.files]) else: aspect_intellij_plugin_deploy_info = struct(deploy_files=[_flat_deploy_file(f) for f in target.files.to_list()], java_agent_deploy_files=[]) return struct(input_files=files, aspect_intellij_plugin_deploy_info=aspect_intellij_plugin_deploy_info) _intellij_plugin_debug_target_aspect = aspect(implementation=_intellij_plugin_debug_target_aspect_impl) def _build_deploy_info_file(deploy_file): return struct(execution_path=deploy_file.src.path, deploy_location=deploy_file.deploy_location) def _intellij_plugin_debug_target_impl(ctx): files = depset() deploy_files = [] java_agent_deploy_files = [] for target in ctx.attr.deps: files = depset(transitive=[files, target.input_files]) deploy_files.extend(target.aspect_intellij_plugin_deploy_info.deploy_files) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.java_agent_deploy_files) for target in ctx.attr.javaagents: files = depset(transitive=[files, target.input_files]) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.deploy_files) java_agent_deploy_files.extend(target.aspect_intellij_plugin_deploy_info.java_agent_deploy_files) deploy_info = struct(deploy_files=[_build_deploy_info_file(f) for f in deploy_files], java_agent_deploy_files=[_build_deploy_info_file(f) for f in java_agent_deploy_files]) output = ctx.actions.declare_file(ctx.label.name + SUFFIX) ctx.actions.write(output, deploy_info.to_proto()) files = depset([f for f in files.to_list() if not f.path.endswith(SUFFIX)]) files = depset([output], transitive=[files]) return struct(files=files, intellij_plugin_deploy_info=struct(deploy_files=deploy_files, java_agent_deploy_files=java_agent_deploy_files)) intellij_plugin_debug_target = rule(implementation=_intellij_plugin_debug_target_impl, attrs={'deps': attr.label_list(aspects=[_intellij_plugin_debug_target_aspect]), 'javaagents': attr.label_list(aspects=[_intellij_plugin_debug_target_aspect])})
def perm(text1, text2): return sum(ord(c) for c in text1) == sum(ord(c) for c in text2) # test one = 'abc' two = 'bcaa' print(perm(one, two))
def perm(text1, text2): return sum((ord(c) for c in text1)) == sum((ord(c) for c in text2)) one = 'abc' two = 'bcaa' print(perm(one, two))
class Problem: def __init__(self, n, m): self.n = n self.m = m self.answer = [0 for _ in range(m)] self.used = [False for _ in range(n)] def printAnswer(self): for number in self.answer: print(number,end=' ') print() def makeAnswer(self, index): if index == len(self.answer): self.printAnswer() return for i in range(1, n+1): if index == 0 or (self.used[i-1] == False and self.answer[index-1]<i): self.answer[index] = i self.used[i-1] = True self.makeAnswer(index+1) self.used[i-1] = False self.answer[index] = 0 return def printAnswers(self): self.makeAnswer(0) return n, m = map(int, input().split()) problem = Problem(n, m) problem.printAnswers()
class Problem: def __init__(self, n, m): self.n = n self.m = m self.answer = [0 for _ in range(m)] self.used = [False for _ in range(n)] def print_answer(self): for number in self.answer: print(number, end=' ') print() def make_answer(self, index): if index == len(self.answer): self.printAnswer() return for i in range(1, n + 1): if index == 0 or (self.used[i - 1] == False and self.answer[index - 1] < i): self.answer[index] = i self.used[i - 1] = True self.makeAnswer(index + 1) self.used[i - 1] = False self.answer[index] = 0 return def print_answers(self): self.makeAnswer(0) return (n, m) = map(int, input().split()) problem = problem(n, m) problem.printAnswers()
class Node: def __init__(self, data): self.right = self.left = None self.data = data class Solution: def insert(self, root, data): if root is None: return Node(data) else: if data <= root.data: cur = self.insert(root.left, data) root.left = cur else: cur = self.insert(root.right, data) root.right = cur return root def level_order(self, root): tree_height = self.get_height(root) for level in range(1, tree_height + 1): self.print_nodes_in_level(root, level) def print_nodes_in_level(self, root, level): if root is not None: if level == 1: print(root.data, end=' ') elif level > 1: self.print_nodes_in_level(root.left, level - 1) self.print_nodes_in_level(root.right, level - 1) def get_height(self, root): if root is None: return 0 else: current = root height_left = self.get_height(current.left) height_right = self.get_height(current.right) return 1 + max(height_left, height_right) T = int(input()) myTree = Solution() root = None for i in range(T): data = int(input()) root = myTree.insert(root, data) myTree.level_order(root)
class Node: def __init__(self, data): self.right = self.left = None self.data = data class Solution: def insert(self, root, data): if root is None: return node(data) elif data <= root.data: cur = self.insert(root.left, data) root.left = cur else: cur = self.insert(root.right, data) root.right = cur return root def level_order(self, root): tree_height = self.get_height(root) for level in range(1, tree_height + 1): self.print_nodes_in_level(root, level) def print_nodes_in_level(self, root, level): if root is not None: if level == 1: print(root.data, end=' ') elif level > 1: self.print_nodes_in_level(root.left, level - 1) self.print_nodes_in_level(root.right, level - 1) def get_height(self, root): if root is None: return 0 else: current = root height_left = self.get_height(current.left) height_right = self.get_height(current.right) return 1 + max(height_left, height_right) t = int(input()) my_tree = solution() root = None for i in range(T): data = int(input()) root = myTree.insert(root, data) myTree.level_order(root)
def define_suit(card): if card.endswith("C"): return "clubs" if card.endswith("D"): return "diamonds" if card.endswith("H"): return "hearts" if card.endswith("S"): return "spades"
def define_suit(card): if card.endswith('C'): return 'clubs' if card.endswith('D'): return 'diamonds' if card.endswith('H'): return 'hearts' if card.endswith('S'): return 'spades'
_base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( backbone=dict( type='ResNetEMOD', ar=dict(ratio=1. / 4.), stage_with_ar=(True, True, True, True) ), bbox_head=dict(num_classes=11)) # dataset settings dataset_type = 'CocoDataset' data_root = 'data/underwater/' classes=('Gastropoda', 'Osteroida', 'Cephalopoda', 'Decapoda', 'Aplousobranchia', 'NotPleuronectiformes', 'Perciformes', 'Fish', 'Rajiformes', 'NonLiving', 'Pleuronectiformes') img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img']), ]) ] data = dict( samples_per_gpu=2, workers_per_gpu=2, train=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_training_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=train_pipeline), val=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline), test=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline)) # optimizer optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2),_delete_=True) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.1, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=12)
_base_ = ['../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'] model = dict(backbone=dict(type='ResNetEMOD', ar=dict(ratio=1.0 / 4.0), stage_with_ar=(True, True, True, True)), bbox_head=dict(num_classes=11)) dataset_type = 'CocoDataset' data_root = 'data/underwater/' classes = ('Gastropoda', 'Osteroida', 'Cephalopoda', 'Decapoda', 'Aplousobranchia', 'NotPleuronectiformes', 'Perciformes', 'Fish', 'Rajiformes', 'NonLiving', 'Pleuronectiformes') img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])] test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])] data = dict(samples_per_gpu=2, workers_per_gpu=2, train=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_training_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=train_pipeline), val=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline), test=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline)) optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2), _delete_=True) lr_config = dict(policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.1, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=12)
class ValorantApi(Exception): pass class InvalidOrMissingParameter(ValorantApi): # 400 pass class NotFound(ValorantApi): # 404 pass class AttributeExistsError(ValorantApi): pass
class Valorantapi(Exception): pass class Invalidormissingparameter(ValorantApi): pass class Notfound(ValorantApi): pass class Attributeexistserror(ValorantApi): pass
class MobilePhone: def __init__(self, memory): self.memory = memory class Camera: def take_picture(self): print("Say cheese!") class CameraPhone(MobilePhone, Camera): pass iphone = CameraPhone('16GB') print(iphone.memory) iphone.take_picture()
class Mobilephone: def __init__(self, memory): self.memory = memory class Camera: def take_picture(self): print('Say cheese!') class Cameraphone(MobilePhone, Camera): pass iphone = camera_phone('16GB') print(iphone.memory) iphone.take_picture()
# =============================================================== # =======================AST=HIERARCHY=========================== # =============================================================== ERROR = 0 INTEGER = 1 class Node: def __init__(self): self.static_type = "" class ProgramNode(Node): def __init__(self, class_list): Node.__init__(self) self.class_list = class_list #self.expr = expr class ClassNode(Node): def __init__(self,name,parent,feature_list): Node.__init__(self) self.name = name self.parent = parent self.feature_list = feature_list class FeatureNode(Node): pass class Atribute_Definition(FeatureNode): def __init__(self,att_id,att_type,exp): Node.__init__(self) self.att_id = att_id self.att_type = att_type self.expr = exp class Method_Definition(FeatureNode): def __init__(self,meth_id,param_list, return_type, exp): Node.__init__(self) self.meth_id = meth_id self.param_list = param_list self.return_type = return_type self.exp = exp class ParamNode(Node): def __init__(self,par_id,par_type): Node.__init__(self) self.par_id = par_id self.par_type = par_type class ExpressionNode(Node): pass class DotNode(Node): def __init__(self,expression,method_id,exp,exp_type): Node.__init__(self) self.expression = expression self.method_id = method_id self.exp_type = exp_type self.exp = exp class MethodCallNode(Node): def __init__(self,method_id,exp): Node.__init__(self) self.method_id = method_id self.exp = exp class IfNode(Node): def __init__(self,condition,true_exp,false_exp): Node.__init__(self) self.condition = condition self.true_exp = true_exp self.false_exp = false_exp class WhileNode(Node): def __init__(self,condition,exp): Node.__init__(self) self.condition = condition self.exp = exp class CaseNode(Node): def __init__(self, cases_list, exp): Node.__init__(self) self.exp = exp self.cases_list = cases_list # Case[] class Case(Node): def __init__(self,var_id,exp_type,exp): Node.__init__(self) self.exp = exp self.exp_type = exp_type self.var_id = var_id class NewNode(Node): def __init__(self,n_type): Node.__init__(self) self.type = n_type class UtilNode(Node): pass class BinaryOperatorNode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class UnaryOperator(ExpressionNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class CompareNode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class AtomicNode(ExpressionNode): pass class IsVoidNode(UnaryOperator): pass class PlusNode(BinaryOperatorNode): pass class MinusNode(BinaryOperatorNode): pass class StarNode(BinaryOperatorNode): pass class DivNode(BinaryOperatorNode): pass class NegationNode(UnaryOperator): pass class IntComplement(UnaryOperator): pass class LessThan(CompareNode): pass class LessThanEquals(CompareNode): pass class Equals(CompareNode): pass class LetInNode(AtomicNode): def __init__(self, declaration_list, expr): Node.__init__(self) self.declaration_list = declaration_list self.expr = expr class BlockNode(AtomicNode): def __init__(self, expr_list): Node.__init__(self) self.expr_list = expr_list class ParentesisNode(AtomicNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class AssignNode(AtomicNode): def __init__(self, idx_token, expr): Node.__init__(self) self.idx_token = idx_token self.expr = expr self.variable_info = None class IntegerNode(AtomicNode): def __init__(self, integer_token): Node.__init__(self) self.integer_token = integer_token class StringNode(AtomicNode): def __init__(self, string): Node.__init__(self) self.string = string class BoolNode(AtomicNode): def __init__(self, boolean): Node.__init__(self) self.boolean = boolean class VariableNode(AtomicNode): def __init__(self, idx_token): Node.__init__(self) self.idx_token = idx_token self.variable_info = None class DeclarationNode(UtilNode): def __init__(self, idx_token, id_type, expr=None): Node.__init__(self) self.idx_token = idx_token self.id_type = id_type self.expr = expr self.variable_info = None
error = 0 integer = 1 class Node: def __init__(self): self.static_type = '' class Programnode(Node): def __init__(self, class_list): Node.__init__(self) self.class_list = class_list class Classnode(Node): def __init__(self, name, parent, feature_list): Node.__init__(self) self.name = name self.parent = parent self.feature_list = feature_list class Featurenode(Node): pass class Atribute_Definition(FeatureNode): def __init__(self, att_id, att_type, exp): Node.__init__(self) self.att_id = att_id self.att_type = att_type self.expr = exp class Method_Definition(FeatureNode): def __init__(self, meth_id, param_list, return_type, exp): Node.__init__(self) self.meth_id = meth_id self.param_list = param_list self.return_type = return_type self.exp = exp class Paramnode(Node): def __init__(self, par_id, par_type): Node.__init__(self) self.par_id = par_id self.par_type = par_type class Expressionnode(Node): pass class Dotnode(Node): def __init__(self, expression, method_id, exp, exp_type): Node.__init__(self) self.expression = expression self.method_id = method_id self.exp_type = exp_type self.exp = exp class Methodcallnode(Node): def __init__(self, method_id, exp): Node.__init__(self) self.method_id = method_id self.exp = exp class Ifnode(Node): def __init__(self, condition, true_exp, false_exp): Node.__init__(self) self.condition = condition self.true_exp = true_exp self.false_exp = false_exp class Whilenode(Node): def __init__(self, condition, exp): Node.__init__(self) self.condition = condition self.exp = exp class Casenode(Node): def __init__(self, cases_list, exp): Node.__init__(self) self.exp = exp self.cases_list = cases_list class Case(Node): def __init__(self, var_id, exp_type, exp): Node.__init__(self) self.exp = exp self.exp_type = exp_type self.var_id = var_id class Newnode(Node): def __init__(self, n_type): Node.__init__(self) self.type = n_type class Utilnode(Node): pass class Binaryoperatornode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class Unaryoperator(ExpressionNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class Comparenode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class Atomicnode(ExpressionNode): pass class Isvoidnode(UnaryOperator): pass class Plusnode(BinaryOperatorNode): pass class Minusnode(BinaryOperatorNode): pass class Starnode(BinaryOperatorNode): pass class Divnode(BinaryOperatorNode): pass class Negationnode(UnaryOperator): pass class Intcomplement(UnaryOperator): pass class Lessthan(CompareNode): pass class Lessthanequals(CompareNode): pass class Equals(CompareNode): pass class Letinnode(AtomicNode): def __init__(self, declaration_list, expr): Node.__init__(self) self.declaration_list = declaration_list self.expr = expr class Blocknode(AtomicNode): def __init__(self, expr_list): Node.__init__(self) self.expr_list = expr_list class Parentesisnode(AtomicNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class Assignnode(AtomicNode): def __init__(self, idx_token, expr): Node.__init__(self) self.idx_token = idx_token self.expr = expr self.variable_info = None class Integernode(AtomicNode): def __init__(self, integer_token): Node.__init__(self) self.integer_token = integer_token class Stringnode(AtomicNode): def __init__(self, string): Node.__init__(self) self.string = string class Boolnode(AtomicNode): def __init__(self, boolean): Node.__init__(self) self.boolean = boolean class Variablenode(AtomicNode): def __init__(self, idx_token): Node.__init__(self) self.idx_token = idx_token self.variable_info = None class Declarationnode(UtilNode): def __init__(self, idx_token, id_type, expr=None): Node.__init__(self) self.idx_token = idx_token self.id_type = id_type self.expr = expr self.variable_info = None
# for i in range(17): # print("{0:>2} in hex is {0:>02x}".format(i)) # # # x = 0x20 # y = 0x0a # # # print(x) # print(y) # print(x * y) # # # print(0b101010) # When converting a decimal number to binary, you look for the highest power # of 2 smaller than the number and put a 1 in that column. You then take the # remainder and repeat the process with the next highest power - putting a 1 # if it goes into the remainder and a zero otherwise. Keep repeating until you # have dealt with all powers down to 2 ** 0 (i.e., 1). # # Write a program that requests a number from the keyboard, then prints out # its binary representation. # # Obviously you could use a format string, but that is not allowed for this # challenge. # # The program should cater for numbers up to 65535; i.e. (2 ** 16) - 1 # # Hint: you will need integer division (//), and modulo (%) to get the remainder. # You will also need ** to raise one number to the power of another: # For example, 2 ** 8 raises 2 to the power 8. # # As an optional extra, avoid printing leading zeros. # # Once the program is working, modify it to print Octal rather than binary. powers = [] for power in range(15, -1, -1): powers.append(2 ** power) #binary # powers.append(8 ** power) #octal print(powers) x = int(input("Please enter a number: ")) printing = False for power in powers: # print(x // power, end="") bit = x // power if bit != 0 or power == 1: printing = True if printing: print(bit, end="") x %= power
powers = [] for power in range(15, -1, -1): powers.append(2 ** power) print(powers) x = int(input('Please enter a number: ')) printing = False for power in powers: bit = x // power if bit != 0 or power == 1: printing = True if printing: print(bit, end='') x %= power
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return str(self.val) # Brute Force; Time: O(n^2); Space: O(n) def next_larger_nodes(head): res = [] slow = head while slow: fast = slow.next while fast: if fast.val > slow.val: res.append(fast.val) break fast = fast.next else: res.append(0) slow = slow.next return res # Using Stack; Time: O(n); Space: O(n) def next_larger_nodes2(head): stack = [head.val] res = [0] cur = head.next while cur: count = 0 while stack and cur.val > stack[-1]: if res[-1 - count] == 0: res[-1 - count] = cur.val stack.pop() count += 1 stack.append(cur.val) res.append(0) cur = cur.next return res # Better implementation def next_larger_nodes3(head): stack, res, pos = [], [], 0 while head: res.append(0) while stack and head.val > stack[-1][1]: idx, _ = stack.pop() res[idx] = head.val stack.append((pos, head.val)) head = head.next pos += 1 return res # Test cases: head = ListNode(1) head.next = ListNode(2) head.next.next = ListNode(3) # head.next.next.next = ListNode(3) # head.next.next.next.next = ListNode(5) print(next_larger_nodes3(head))
class Listnode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return str(self.val) def next_larger_nodes(head): res = [] slow = head while slow: fast = slow.next while fast: if fast.val > slow.val: res.append(fast.val) break fast = fast.next else: res.append(0) slow = slow.next return res def next_larger_nodes2(head): stack = [head.val] res = [0] cur = head.next while cur: count = 0 while stack and cur.val > stack[-1]: if res[-1 - count] == 0: res[-1 - count] = cur.val stack.pop() count += 1 stack.append(cur.val) res.append(0) cur = cur.next return res def next_larger_nodes3(head): (stack, res, pos) = ([], [], 0) while head: res.append(0) while stack and head.val > stack[-1][1]: (idx, _) = stack.pop() res[idx] = head.val stack.append((pos, head.val)) head = head.next pos += 1 return res head = list_node(1) head.next = list_node(2) head.next.next = list_node(3) print(next_larger_nodes3(head))
{ "targets": [ { "target_name": "crc", "sources": [ "./src/crc_module.c", "./src/crc.c" ] }, ] }
{'targets': [{'target_name': 'crc', 'sources': ['./src/crc_module.c', './src/crc.c']}]}
class Node: def __init__(self, val, next=None): self.val = val self.next = next input_list = [0, 1, 2, 3, 4] root = None for val in input_list: root = Node(val, root) cur = root while cur: print(cur.val) cur = cur.next print('Stack after pop: ') root = root.next cur = root while cur: print(cur.val) cur = cur.next print('Peeked data', root.val) print('Peeked data', root.val) print('Clearing out') root = None print('Stack is empty' if root is None else 'Stack is not empty')
class Node: def __init__(self, val, next=None): self.val = val self.next = next input_list = [0, 1, 2, 3, 4] root = None for val in input_list: root = node(val, root) cur = root while cur: print(cur.val) cur = cur.next print('Stack after pop: ') root = root.next cur = root while cur: print(cur.val) cur = cur.next print('Peeked data', root.val) print('Peeked data', root.val) print('Clearing out') root = None print('Stack is empty' if root is None else 'Stack is not empty')
class ExportObjStatus: SUCCESS = 'success' ERROR = 'error' IN_PROGRESS = 'in_progress' CHOICES = [ (SUCCESS, 'Success'), (ERROR, 'Error'), (IN_PROGRESS, 'In progress'), ]
class Exportobjstatus: success = 'success' error = 'error' in_progress = 'in_progress' choices = [(SUCCESS, 'Success'), (ERROR, 'Error'), (IN_PROGRESS, 'In progress')]
class Base: """Base class readily accepts defaults""" def __init__(self, **kws): for k, v in kws.items(): if not hasattr(self, k): setattr(self, k, v) class Laziness(Base): """Generally lazy lookup""" def __init__(self, method, **kws): super().__init__(**kws) self._lookup = {} self._method = method def __getitem__(self, key, **kws): value = self._lookup.get(key) if value is None: value = self._method(key, **kws) self._lookup[key] = value return value
class Base: """Base class readily accepts defaults""" def __init__(self, **kws): for (k, v) in kws.items(): if not hasattr(self, k): setattr(self, k, v) class Laziness(Base): """Generally lazy lookup""" def __init__(self, method, **kws): super().__init__(**kws) self._lookup = {} self._method = method def __getitem__(self, key, **kws): value = self._lookup.get(key) if value is None: value = self._method(key, **kws) self._lookup[key] = value return value
def capitalize(string): # We can't use title() here, consider the case: "123name" -> "123Name", which isn't correct. for substring in string.split(): string = string.replace(substring, substring.capitalize()) return string
def capitalize(string): for substring in string.split(): string = string.replace(substring, substring.capitalize()) return string
# https://leetcode.com/problems/find-leaves-of-binary-tree/ class Solution: def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: result = [] while root.left or root.right: result.append(self.popLeaves(root, root, [])) result.append([root.val]) return result def popLeaves(self, root: Optional[TreeNode], parent: Optional[TreeNode], result: List[int]) -> List[int]: if root is None: return None if not (root.left or root.right): if parent.left == root: parent.left = None else: parent.right = None return result.append(root.val) self.popLeaves(root.left, root, result) self.popLeaves(root.right, root, result) return result # Efficient Solution class Solution: def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: def dfs(node): if not node: return -1 height = 1 + max(dfs(node.left), dfs(node.right)) if height == len(result): result.append([]) result[height].append(node.val) return height result = [] dfs(root) return result
class Solution: def find_leaves(self, root: Optional[TreeNode]) -> List[List[int]]: result = [] while root.left or root.right: result.append(self.popLeaves(root, root, [])) result.append([root.val]) return result def pop_leaves(self, root: Optional[TreeNode], parent: Optional[TreeNode], result: List[int]) -> List[int]: if root is None: return None if not (root.left or root.right): if parent.left == root: parent.left = None else: parent.right = None return result.append(root.val) self.popLeaves(root.left, root, result) self.popLeaves(root.right, root, result) return result class Solution: def find_leaves(self, root: Optional[TreeNode]) -> List[List[int]]: def dfs(node): if not node: return -1 height = 1 + max(dfs(node.left), dfs(node.right)) if height == len(result): result.append([]) result[height].append(node.val) return height result = [] dfs(root) return result
class Monster: def __init__(self, name, color): self.name = name self.color = color def attack(self): print('I am attacking...') class Fogthing(Monster): def attack(self): print('I am killing...') def make_sound(self): print('Grrrrrrrrrr\n') fogthing = Fogthing("Fogthing", "Yellow") fogthing.attack() fogthing.make_sound()
class Monster: def __init__(self, name, color): self.name = name self.color = color def attack(self): print('I am attacking...') class Fogthing(Monster): def attack(self): print('I am killing...') def make_sound(self): print('Grrrrrrrrrr\n') fogthing = fogthing('Fogthing', 'Yellow') fogthing.attack() fogthing.make_sound()
# https://codeforces.com/problemset/problem/1367/A t = int(input()) for i in range(t): s = input() ss = [s[0]] for i in range(0, len(s)-1, 2): ss.append((s[i], s[i+1])[1]) print(''.join(ss))
t = int(input()) for i in range(t): s = input() ss = [s[0]] for i in range(0, len(s) - 1, 2): ss.append((s[i], s[i + 1])[1]) print(''.join(ss))
""" Column Explorer =============================================================================== """ # import ipywidgets as widgets # from IPython.display import display # from ipywidgets import GridspecLayout, Layout # from .dashboard import document_to_html # from .utils import load_filtered_documents # class _App: # def __init__(self, directory, top_n=100): # # Data # self.documents = read_filtered_records(directory) # columns = sorted(self.documents.columns) # # Left panel controls # self.command_panel = [ # widgets.HTML("<hr><b>Column:</b>", layout=Layout(margin="0px 0px 0px 5px")), # widgets.Dropdown( # description="", # value=columns[0], # options=columns, # layout=Layout(width="auto"), # style={"description_width": "130px"}, # ), # widgets.HTML("<hr><b>Term:</b>", layout=Layout(margin="0px 0px 0px 5px")), # widgets.Dropdown( # description="", # value=None, # options=[], # layout=Layout(width="auto"), # style={"description_width": "130px"}, # ), # widgets.HTML( # "<hr><b>Found documents:</b>", layout=Layout(margin="0px 0px 0px 5px") # ), # widgets.Select( # options=[], # layout=Layout(height="360pt", width="auto"), # ), # ] # # interactive output function # widgets.interactive_output( # f=self.interactive_output, # controls={ # "column": self.command_panel[1], # "value": self.command_panel[3], # "article_title": self.command_panel[5], # }, # ) # # Grid size (Generic) # self.app_layout = GridspecLayout( # max(9, len(self.command_panel) + 1), 4, height="700px" # ) # # Creates command panel (Generic) # self.app_layout[:, 0] = widgets.VBox( # self.command_panel, # layout=Layout( # margin="10px 8px 5px 10px", # ), # ) # # Output area (Generic) # self.output = widgets.Output() # .add_class("output_color") # self.app_layout[0:, 1:] = widgets.VBox( # [self.output], # layout=Layout(margin="10px 4px 4px 4px", border="1px solid gray"), # ) # # self.execute() # def run(self): # return self.app_layout # def execute(self): # with self.output: # column = self.column # documents = self.documents.copy() # documents[column] = documents[column].str.split("; ") # x = documents.explode(column) # # populate terms # all_terms = x[column].copy() # all_terms = all_terms.dropna() # all_terms = all_terms.drop_duplicates() # all_terms = all_terms.sort_values() # self.command_panel[3].options = all_terms # # # # Populate titles # # # keyword = self.command_panel[3].value # s = x[x[column] == keyword] # s = s[["global_citations", "document_title"]] # s = s.sort_values( # ["global_citations", "document_title"], ascending=[False, True] # ) # s = s[["document_title"]].drop_duplicates() # self.command_panel[5].options = s["document_title"].tolist() # # # # Print info from selected title # # # out = self.documents[ # self.documents["document_title"] == self.command_panel[5].value # ] # out = out.reset_index(drop=True) # out = out.iloc[0] # self.output.clear_output() # with self.output: # display(widgets.HTML(document_to_html(out))) # def interactive_output(self, **kwargs): # for key in kwargs.keys(): # setattr(self, key, kwargs[key]) # self.execute() # def column_explorer(directory, top_n=100): # """ # Column explorer # :param directory: # :param top_n: # :return: # """ # app = _App(directory, top_n) # return app.run()
""" Column Explorer =============================================================================== """
# coding : utf-8 ''' Copyright 2019 Agnese Salutari. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License ''' templatesRoot = "static/templates/" cssFilesRoot = "static/css/" jsFilesRoot = "static/scripts/" jsonFilesRoot = "static/json/" imgFilesRoot = "static/img/" templates = { "index.html": { "name": "index.html", "model": "IndexViewModel", }, "index": { "name": "index.html", "model": "IndexViewModel", }, "/": { "name": "index.html", "model": "IndexViewModel", }, "": { "name": "index.html", "model": "IndexViewModel", }, } actionsForPOST = { # "fooRequest": Models.Example.save, } def callbackTest(self, value): print("I'm the callbackTest!!! " + str(value)) callbacks = { "POST": callbackTest, "GET": callbackTest, }
""" Copyright 2019 Agnese Salutari. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License """ templates_root = 'static/templates/' css_files_root = 'static/css/' js_files_root = 'static/scripts/' json_files_root = 'static/json/' img_files_root = 'static/img/' templates = {'index.html': {'name': 'index.html', 'model': 'IndexViewModel'}, 'index': {'name': 'index.html', 'model': 'IndexViewModel'}, '/': {'name': 'index.html', 'model': 'IndexViewModel'}, '': {'name': 'index.html', 'model': 'IndexViewModel'}} actions_for_post = {} def callback_test(self, value): print("I'm the callbackTest!!! " + str(value)) callbacks = {'POST': callbackTest, 'GET': callbackTest}
ora_start=int(input("Ora=")) minut_start=int(input("Minute=")) durata_ore=int(input("Cate ore dureaza drumul=")) durata_minute=int(input("Cate minute dureaza drumul")) ora_fin = ora_start+durata_ore minute_fin = minut_start+durata_minute if minute_fin>60: minute_fin%=60 ora_fin+=1 print(ora_fin,minute_fin)
ora_start = int(input('Ora=')) minut_start = int(input('Minute=')) durata_ore = int(input('Cate ore dureaza drumul=')) durata_minute = int(input('Cate minute dureaza drumul')) ora_fin = ora_start + durata_ore minute_fin = minut_start + durata_minute if minute_fin > 60: minute_fin %= 60 ora_fin += 1 print(ora_fin, minute_fin)
def digitDifferenceSort(a): def dg(n): s = list(map(int, str(n))) return max(s) - min(s) ans = [(a[i], i) for i in range(len(a))] A = sorted(ans, key = lambda x: (dg(x[0]), -x[1])) return [c[0] for c in A]
def digit_difference_sort(a): def dg(n): s = list(map(int, str(n))) return max(s) - min(s) ans = [(a[i], i) for i in range(len(a))] a = sorted(ans, key=lambda x: (dg(x[0]), -x[1])) return [c[0] for c in A]
# Topology with a single loop # A --- B --- C # | | # D --- E topo = { 'A' : ['B', 'D'], 'B' : ['A', 'C', 'E'], 'C' : ['B'], 'D' : ['A', 'E'], 'E' : ['B', 'D'] }
topo = {'A': ['B', 'D'], 'B': ['A', 'C', 'E'], 'C': ['B'], 'D': ['A', 'E'], 'E': ['B', 'D']}
class Body: """ Represents the status of the body, each part of the body has a name and a value representing its status 1 = perferctly fine, 0 = unavailale """ def __init__(self, parts=None): if parts is not None: self.boyd_parts = parts.copy() else: self.body_parts = {} def status(self): """return the average body status""" total = len(self.body_parts) if total <= 0: return 0 return sum((p for p in self.body_parts.values())) // total
class Body: """ Represents the status of the body, each part of the body has a name and a value representing its status 1 = perferctly fine, 0 = unavailale """ def __init__(self, parts=None): if parts is not None: self.boyd_parts = parts.copy() else: self.body_parts = {} def status(self): """return the average body status""" total = len(self.body_parts) if total <= 0: return 0 return sum((p for p in self.body_parts.values())) // total
# fmt: off cost_sequence = [ 102267214109.0, 102267223999.0, 102269202999.00002, 102566201999.00002, 132365101999.0, 102475101999.00002, 102465101999.00002, 132465101999.0, 162165001999.0, 162565001999.0, 162965001999.0, 163965001999.0, 163955001999.0, 134065001999.0, 134465001999.0, 104575001998.99998, 104565001999.00002, 104565001999.00002, 104644201999.00002, 94744201999.00002, 84745201999.00002, 84745201999.00002, 84745993999.00003, 84646993999.00003, 84646003999.00003, 74647003999.00002, 74647003999.00002, 74647003999.00002, 74647011919.00002, 74647011998.20001, 74646021998.20001, 74646011999.20001 ] annotations = [ (0, 102267214109.0, """ (def rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float))) ((var0 : (Tuple (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float)) (Vec k (Vec n Float))))) (let ((kernels (get$1$3 var0)) (image (get$2$3 var0)) (d$r (get$3$3 var0))) (sumbuild k (lam (ki : Integer) (let (a_6 (index ki d$r)) (sumbuild n (lam (ni : Integer) (let (a_8 (index ni a_6)) (let (a_7 (build kn (lam (var1 : Integer) a_8))) (sumbuild kn (lam (kni : Integer) (let (a_10 (index kni a_7)) (let (a_11 (build l (lam (sum$i : Integer) a_10))) (sumbuild l (lam (li : Integer) (let (noi (sub (add ni (div kn 2)) kni)) (let (outside_image (or (gt 0 noi) (gte noi n))) (add (if outside_image (tuple (constVec k (constVec l (constVec kn 0.0))) (constVec l (constVec n 0.0))) (tuple (constVec k (constVec l (constVec kn 0.0))) (deltaVec l li (deltaVec n noi (mul (index kni (index li (index ki kernels))) (index li a_11)))))) (tuple (deltaVec k ki (deltaVec l li (deltaVec kn kni (mul (if outside_image 0.0 (index noi (index li image))) (index li a_11))))) (constVec l (constVec n 0.0))))))))))))))))))) """), (11, 163955001999.0, """ (def rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float))) (var0 : (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float)) (Vec k (Vec n Float))) (let ((kernels (get$1$3 var0)) (image (get$2$3 var0)) (d$r (get$3$3 var0))) (sumbuild k (lam (ki : Integer) (sumbuild n (lam (ni : Integer) (sumbuild kn (lam (kni : Integer) (sumbuild l (lam (li : Integer) (let (noi (sub (add ni (div kn 2)) kni)) (let (outside_image (or (gt 0 (sub (add ni (div kn 2)) kni)) (gte (sub (add ni (div kn 2)) kni) n))) (add (if (or (gt 0 (sub (add ni (div kn 2)) kni)) (gte (sub (add ni (div kn 2)) kni) n)) (tuple (constVec k (constVec l (constVec kn 0.0))) (constVec l (constVec n 0.0))) (tuple (constVec k (constVec l (constVec kn 0.0))) (deltaVec l li (deltaVec n noi (mul (index kni (index li (index ki kernels))) (index li (build l (lam (sum$i : Integer) (index ni (index ki d$r)))))))))) (tuple (deltaVec k ki (deltaVec l li (deltaVec kn kni (mul (if outside_image 0.0 (index noi (index li image))) (index li (build l (lam (var0 : Integer) (index ni (index ki d$r))))))))) (constVec l (constVec n 0.0)))))))))))))))) """), (31, 74646011999.20001, """ (def rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float))) (var0 : (Vec k (Vec l (Vec kn Float))) (Vec l (Vec n Float)) (Vec k (Vec n Float))) (let ((kernels (get$1$3 var0)) (image (get$2$3 var0)) (d$r (get$3$3 var0))) (add (sumbuild k (lam (var6 : Integer) (sumbuild n (lam (var5 : Integer) (sumbuild kn (lam (var7 : Integer) (sumbuild l (lam (var8 : Integer) (if (or (gt 0 (sub (add var5 (div kn 2)) var7)) (gte (sub (add var5 (div kn 2)) var7) n)) (tuple (constVec k (constVec l (constVec kn 0.0))) (constVec l (constVec n 0.0))) (tuple (constVec k (constVec l (constVec kn 0.0))) (deltaVec l var8 (deltaVec n (sub (add var5 (div kn 2)) var7) (mul (index var7 (index var8 (index var6 kernels))) (let (sum$i var8) (index var5 (index var6 d$r)))))))))))))))) (tuple (build k (lam (var4 : Integer) (sumbuild n (lam (var3 : Integer) (build l (lam (var1 : Integer) (build kn (lam (var2 : Integer) (mul (if (or (gt 0 (sub (add var3 (div kn 2)) var2)) (gte (sub (add var3 (div kn 2)) var2) n)) 0.0 (index (sub (add var3 (div kn 2)) var2) (index var1 image))) (let (var0 var1) (index var3 (index var4 d$r)))))))))))) (constVec l (constVec n 0.0))))) """) ]
cost_sequence = [102267214109.0, 102267223999.0, 102269202999.00002, 102566201999.00002, 132365101999.0, 102475101999.00002, 102465101999.00002, 132465101999.0, 162165001999.0, 162565001999.0, 162965001999.0, 163965001999.0, 163955001999.0, 134065001999.0, 134465001999.0, 104575001998.99998, 104565001999.00002, 104565001999.00002, 104644201999.00002, 94744201999.00002, 84745201999.00002, 84745201999.00002, 84745993999.00003, 84646993999.00003, 84646003999.00003, 74647003999.00002, 74647003999.00002, 74647003999.00002, 74647011919.00002, 74647011998.20001, 74646021998.20001, 74646011999.20001] annotations = [(0, 102267214109.0, '\n(def\n rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float)))\n ((var0 : (Tuple (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float))\n (Vec k (Vec n Float)))))\n (let\n ((kernels (get$1$3 var0))\n (image (get$2$3 var0))\n (d$r (get$3$3 var0)))\n (sumbuild k (lam (ki : Integer)\n (let (a_6 (index ki d$r))\n (sumbuild n (lam (ni : Integer)\n (let (a_8 (index ni a_6))\n (let (a_7 (build kn (lam (var1 : Integer) a_8)))\n (sumbuild kn (lam (kni : Integer)\n (let (a_10 (index kni a_7))\n (let (a_11 (build l (lam (sum$i : Integer) a_10)))\n (sumbuild l (lam (li : Integer)\n (let (noi (sub (add ni (div kn 2)) kni))\n (let (outside_image (or (gt 0 noi) (gte noi n)))\n (add (if outside_image\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (constVec l (constVec n 0.0)))\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (deltaVec l li\n (deltaVec n noi\n (mul (index kni (index li (index ki kernels)))\n (index li a_11))))))\n (tuple (deltaVec k ki\n (deltaVec l li\n (deltaVec kn kni\n (mul (if outside_image\n 0.0\n (index noi (index li image)))\n (index li a_11)))))\n (constVec l (constVec n 0.0)))))))))))))))))))\n'), (11, 163955001999.0, '\n(def\n rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float)))\n (var0 : (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float))\n (Vec k (Vec n Float)))\n (let\n ((kernels (get$1$3 var0))\n (image (get$2$3 var0))\n (d$r (get$3$3 var0)))\n (sumbuild k (lam (ki : Integer)\n (sumbuild n (lam (ni : Integer)\n (sumbuild kn (lam (kni : Integer)\n (sumbuild l (lam (li : Integer)\n (let (noi (sub (add ni (div kn 2)) kni))\n (let (outside_image (or (gt 0 (sub (add ni (div kn 2)) kni))\n (gte (sub (add ni (div kn 2)) kni) n)))\n (add (if (or (gt 0 (sub (add ni (div kn 2)) kni))\n (gte (sub (add ni (div kn 2)) kni) n))\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (constVec l (constVec n 0.0)))\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (deltaVec l li\n (deltaVec n noi\n (mul (index kni (index li (index ki kernels)))\n (index li (build l (lam (sum$i : Integer)\n (index ni (index ki d$r))))))))))\n (tuple (deltaVec k ki\n (deltaVec l li\n (deltaVec kn kni\n (mul (if outside_image\n 0.0\n (index noi (index li image)))\n (index li (build l (lam (var0 : Integer)\n (index ni (index ki d$r)))))))))\n (constVec l (constVec n 0.0))))))))))))))))\n'), (31, 74646011999.20001, '\n(def\n rev$conv1d (Tuple (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float)))\n (var0 : (Vec k (Vec l (Vec kn Float)))\n (Vec l (Vec n Float))\n (Vec k (Vec n Float)))\n (let\n ((kernels (get$1$3 var0))\n (image (get$2$3 var0))\n (d$r (get$3$3 var0)))\n (add\n (sumbuild k (lam (var6 : Integer)\n (sumbuild n (lam (var5 : Integer)\n (sumbuild kn (lam (var7 : Integer)\n (sumbuild l (lam (var8 : Integer)\n (if (or (gt 0 (sub (add var5 (div kn 2)) var7))\n (gte (sub (add var5 (div kn 2)) var7) n))\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (constVec l (constVec n 0.0)))\n (tuple (constVec k (constVec l (constVec kn 0.0)))\n (deltaVec l var8\n (deltaVec n (sub (add var5 (div kn 2)) var7)\n (mul (index var7 (index var8 (index var6 kernels)))\n (let (sum$i var8)\n (index var5 (index var6 d$r))))))))))))))))\n (tuple (build k (lam (var4 : Integer)\n (sumbuild n (lam (var3 : Integer)\n (build l (lam (var1 : Integer)\n (build kn (lam (var2 : Integer)\n (mul (if (or (gt 0 (sub (add var3 (div kn 2)) var2))\n (gte (sub (add var3 (div kn 2)) var2) n))\n 0.0\n (index (sub (add var3 (div kn 2)) var2)\n (index var1 image)))\n (let (var0 var1)\n (index var3 (index var4 d$r))))))))))))\n (constVec l (constVec n 0.0)))))\n')]
# # PySNMP MIB module IB-SMA-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IB-SMA-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:39:05 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") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection") IbDataPortAndInvalid, IbUnicastLid, IbMulticastLid, infinibandMIB, IbDataPort, IbGuid, IbSmPortList = mibBuilder.importSymbols("IB-TC-MIB", "IbDataPortAndInvalid", "IbUnicastLid", "IbMulticastLid", "infinibandMIB", "IbDataPort", "IbGuid", "IbSmPortList") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, Bits, Gauge32, MibIdentifier, NotificationType, IpAddress, Integer32, ObjectIdentity, ModuleIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "Bits", "Gauge32", "MibIdentifier", "NotificationType", "IpAddress", "Integer32", "ObjectIdentity", "ModuleIdentity", "Unsigned32") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ibSmaMIB = ModuleIdentity((1, 3, 6, 1, 3, 117, 3)) ibSmaMIB.setRevisions(('2005-09-01 12:00',)) if mibBuilder.loadTexts: ibSmaMIB.setLastUpdated('200509011200Z') if mibBuilder.loadTexts: ibSmaMIB.setOrganization('IETF IP Over IB (IPOIB) Working Group') ibSmaObjects = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1)) ibSmaNotifications = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 2)) ibSmaConformance = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3)) ibSmaNodeInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 1)) ibSmaNodeString = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeString.setStatus('current') ibSmaNodeBaseVersion = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeBaseVersion.setStatus('current') ibSmaNodeClassVersion = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeClassVersion.setStatus('current') ibSmaNodeType = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("channelAdapter", 1), ("switch", 2), ("router", 3), ("reserved", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeType.setStatus('current') ibSmaNodeNumPorts = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeNumPorts.setStatus('current') ibSmaSystemImageGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 6), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSystemImageGuid.setStatus('current') ibSmaNodeGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 7), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeGuid.setStatus('current') ibSmaNodePortGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 8), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodePortGuid.setStatus('current') ibSmaNodePartitionTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodePartitionTableNum.setStatus('current') ibSmaNodeDeviceId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeDeviceId.setStatus('current') ibSmaNodeRevision = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeRevision.setStatus('current') ibSmaNodeLocalPortNumOrZero = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeLocalPortNumOrZero.setStatus('current') ibSmaNodeVendorId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 13), OctetString().subtype(subtypeSpec=ValueSizeConstraint(3, 3)).setFixedLength(3)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeVendorId.setStatus('current') ibSmaNodeLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeLid.setStatus('current') ibSmaNodePortNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 15), IbDataPort()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodePortNum.setStatus('current') ibSmaNodeMethod = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeMethod.setStatus('current') ibSmaNodeAttributeId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeAttributeId.setStatus('current') ibSmaNodeAttributeModifier = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeAttributeModifier.setStatus('current') ibSmaNodeKey = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeKey.setStatus('current') ibSmaNodeLid2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 20), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeLid2.setStatus('current') ibSmaNodeServiceLevel = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeServiceLevel.setStatus('current') ibSmaNodeQueuePair1 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 22), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16777215))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeQueuePair1.setStatus('current') ibSmaNodeQueuePair2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 23), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16777215))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeQueuePair2.setStatus('current') ibSmaNodeGid1 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeGid1.setStatus('current') ibSmaNodeGid2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeGid2.setStatus('current') ibSmaNodeCapMask = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 26), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeCapMask.setStatus('current') ibSmaNodeSwitchLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 27), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeSwitchLid.setStatus('current') ibSmaNodeDataValid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 28), Bits().clone(namedValues=NamedValues(("lidaddr1", 0), ("lidaddr2", 1), ("pkey", 2), ("sl", 3), ("qp1", 4), ("qp2", 5), ("gidaddr1", 6), ("gidaddr2", 7)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeDataValid.setStatus('current') ibSmaSwitchInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 2)) ibSmaSwLinearFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLinearFdbTableNum.setStatus('current') ibSmaSwRandomFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwRandomFdbTableNum.setStatus('current') ibSmaSwMulticastFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16383))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwMulticastFdbTableNum.setStatus('current') ibSmaSwLinearFdbTop = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLinearFdbTop.setStatus('current') ibSmaSwDefaultPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefaultPort.setStatus('current') ibSmaSwDefMcastPriPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefMcastPriPort.setStatus('current') ibSmaSwDefMcastNotPriPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefMcastNotPriPort.setStatus('current') ibSmaSwLifeTimeValue = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLifeTimeValue.setStatus('current') ibSmaSwPortStateChange = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwPortStateChange.setStatus('current') ibSmaSwLidsPerPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLidsPerPort.setStatus('current') ibSmaSwPartitionEnforceNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 11), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwPartitionEnforceNum.setStatus('current') ibSmaSwInboundEnforceCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 12), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwInboundEnforceCap.setStatus('current') ibSmaSwOutboundEnforceCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 13), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwOutboundEnforceCap.setStatus('current') ibSmaSwFilterRawPktInputCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 14), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwFilterRawPktInputCap.setStatus('current') ibSmaSwFilterRawPktOutputCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwFilterRawPktOutputCap.setStatus('current') ibSmaSwEnhancedPort0 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 16), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwEnhancedPort0.setStatus('current') ibSmaGuidInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 3)) ibSmaGuidInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 3, 1), ) if mibBuilder.loadTexts: ibSmaGuidInfoTable.setStatus('current') ibSmaGuidInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaGuidPortIndex"), (0, "IB-SMA-MIB", "ibSmaGuidIndex")) if mibBuilder.loadTexts: ibSmaGuidInfoEntry.setStatus('current') ibSmaGuidPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaGuidPortIndex.setStatus('current') ibSmaGuidIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))) if mibBuilder.loadTexts: ibSmaGuidIndex.setStatus('current') ibSmaGuidVal = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 3), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaGuidVal.setStatus('current') ibSmaMgmtPortInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 4)) ibSmaPortMKey = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKey.setStatus('current') ibSmaPortGidPrefix = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortGidPrefix.setStatus('current') ibSmaPortLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLid.setStatus('current') ibSmaPortMasterSmLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMasterSmLid.setStatus('current') ibSmaPortIsSubnetManager = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSubnetManager.setStatus('current') ibSmaPortIsNoticeSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsNoticeSupported.setStatus('current') ibSmaPortIsTrapSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 7), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsTrapSupported.setStatus('current') ibSmaPortIsAutoMigrateSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 8), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsAutoMigrateSupported.setStatus('current') ibSmaPortIsSlMappingSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSlMappingSupported.setStatus('current') ibSmaPortIsMKeyNvram = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsMKeyNvram.setStatus('current') ibSmaPortIsPKeyNvram = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 11), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsPKeyNvram.setStatus('current') ibSmaPortIsLedInfoSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 12), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsLedInfoSupported.setStatus('current') ibSmaPortIsSmDisabled = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 13), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSmDisabled.setStatus('current') ibSmaPortIsSysImgGuidSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 14), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSysImgGuidSupported.setStatus('current') ibSmaPortIsPKeyExtPortTrapSup = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsPKeyExtPortTrapSup.setStatus('current') ibSmaPortIsCommManageSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 16), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsCommManageSupported.setStatus('current') ibSmaPortIsSnmpTunnelSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 17), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSnmpTunnelSupported.setStatus('current') ibSmaPortIsReinitSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 18), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsReinitSupported.setStatus('current') ibSmaPortIsDevManageSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 19), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsDevManageSupported.setStatus('current') ibSmaPortIsVendorClassSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 20), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsVendorClassSupported.setStatus('current') ibSmaPortIsDrNoticeSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 21), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsDrNoticeSupported.setStatus('current') ibSmaPortIsCapMaskNoticSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 22), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsCapMaskNoticSupported.setStatus('current') ibSmaPortIsBootMgmtSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 23), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsBootMgmtSupported.setStatus('current') ibSmaPortMKeyLeasePeriod = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyLeasePeriod.setStatus('current') ibSmaPortMKeyProtectBits = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("noMKeyProtection", 1), ("succeedWithReturnKey", 2), ("succeedWithReturnZeroes", 3), ("failOnNoMatch", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyProtectBits.setStatus('current') ibSmaPortMasterSmSl = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMasterSmSl.setStatus('current') ibSmaPortInitTypeLoad = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 27), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeLoad.setStatus('current') ibSmaPortInitTypeContent = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 28), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeContent.setStatus('current') ibSmaPortInitTypePresence = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 29), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypePresence.setStatus('current') ibSmaPortInitTypeResuscitate = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 30), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeResuscitate.setStatus('current') ibSmaPortInitNoLoadReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 31), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitNoLoadReply.setStatus('current') ibSmaPortInitPreserveContReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 32), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitPreserveContReply.setStatus('current') ibSmaPortInitPreservePresReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 33), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitPreservePresReply.setStatus('current') ibSmaPortMKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyViolations.setStatus('current') ibSmaPortPKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPKeyViolations.setStatus('current') ibSmaPortQKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortQKeyViolations.setStatus('current') ibSmaPortNumGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 37), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortNumGuid.setStatus('current') ibSmaPortSubnetTimeout = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 38), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortSubnetTimeout.setStatus('current') ibSmaPortResponseTimeValue = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 39), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortResponseTimeValue.setStatus('current') ibSmaDataPortInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 5)) ibSmaPortInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 5, 1), ) if mibBuilder.loadTexts: ibSmaPortInfoTable.setStatus('current') ibSmaPortInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaPortIndex")) if mibBuilder.loadTexts: ibSmaPortInfoEntry.setStatus('current') ibSmaPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaPortIndex.setStatus('current') ibSmaPortLinkWidthEnabled = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("oneX", 1), ("fourX", 2), ("oneXOr4X", 3), ("twelveX", 4), ("oneXOr12X", 5), ("fourXOr12X", 6), ("oneX4XOr12X", 7), ("linkWidthSupported", 8), ("other", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthEnabled.setStatus('current') ibSmaPortLinkWidthSupported = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("oneX", 1), ("oneXOr4X", 2), ("oneX4XOr12X", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthSupported.setStatus('current') ibSmaPortLinkWidthActive = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("oneX", 1), ("fourX", 2), ("twelveX", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthActive.setStatus('current') ibSmaPortLinkSpeedSupported = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("other", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedSupported.setStatus('current') ibSmaPortLinkState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("down", 1), ("init", 2), ("armed", 3), ("active", 4), ("other", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkState.setStatus('current') ibSmaPortPhysState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("sleep", 1), ("polling", 2), ("disabled", 3), ("portConfigTraining", 4), ("linkUp", 5), ("linkErrorRecovery", 6), ("other", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPhysState.setStatus('current') ibSmaPortLinkDownDefaultState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("sleep", 1), ("polling", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkDownDefaultState.setStatus('current') ibSmaPortLidMaskCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLidMaskCount.setStatus('current') ibSmaPortLinkSpeedActive = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("other", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedActive.setStatus('current') ibSmaPortLinkSpeedEnabled = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("linkSpeedSupported", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedEnabled.setStatus('current') ibSmaPortNeighborMtu = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("mtu256", 1), ("mtu512", 2), ("mtu1024", 3), ("mtu2048", 4), ("mtu4096", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortNeighborMtu.setStatus('current') ibSmaPortVirtLaneSupport = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("vl0", 1), ("vl0ToVl1", 2), ("vl0ToVl3", 3), ("vl0ToVl7", 4), ("vl0ToVl14", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVirtLaneSupport.setStatus('current') ibSmaPortVlHighPriorityLimit = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlHighPriorityLimit.setStatus('current') ibSmaPortVlArbHighCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 15), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlArbHighCapacity.setStatus('current') ibSmaPortVlArbLowCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlArbLowCapacity.setStatus('current') ibSmaPortMtuCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("mtu256", 1), ("mtu512", 2), ("mtu1024", 3), ("mtu2048", 4), ("mtu4096", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMtuCapacity.setStatus('current') ibSmaPortVlStallCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlStallCount.setStatus('current') ibSmaPortHeadOfQueueLife = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 19), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortHeadOfQueueLife.setStatus('current') ibSmaPortOperationalVls = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("vl0", 1), ("vl0ToVl1", 2), ("vl0ToVl3", 3), ("vl0ToVl7", 4), ("vl0ToVl14", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortOperationalVls.setStatus('current') ibSmaPortPartEnforceInbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 21), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPartEnforceInbound.setStatus('current') ibSmaPortPartEnforceOutbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 22), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPartEnforceOutbound.setStatus('current') ibSmaPortFilterRawPktInbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 23), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortFilterRawPktInbound.setStatus('current') ibSmaPortFilterRawPktOutbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 24), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortFilterRawPktOutbound.setStatus('current') ibSmaPortLocalPhysErrorThreshold = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 25), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLocalPhysErrorThreshold.setStatus('current') ibSmaPortOverrunErrorThreshold = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortOverrunErrorThreshold.setStatus('current') ibSmaPKeyInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 6)) ibSmaPKeyTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 6, 1), ) if mibBuilder.loadTexts: ibSmaPKeyTable.setStatus('current') ibSmaPKeyEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaPKeyIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaPKeyIndex")) if mibBuilder.loadTexts: ibSmaPKeyEntry.setStatus('current') ibSmaPKeyIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaPKeyIBAPortIndex.setStatus('current') ibSmaPKeyIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65504))) if mibBuilder.loadTexts: ibSmaPKeyIndex.setStatus('current') ibSmaPKeyMembership = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("limited", 2), ("full", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPKeyMembership.setStatus('current') ibSmaPKeyBase = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65527))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPKeyBase.setStatus('current') ibSmaSlToVlMapInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 7)) ibSmaSL2VLMapTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 7, 1), ) if mibBuilder.loadTexts: ibSmaSL2VLMapTable.setStatus('current') ibSmaSL2VLMapEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaIBAOutPortIndex"), (0, "IB-SMA-MIB", "ibSmaIBAInPortIndex"), (0, "IB-SMA-MIB", "ibSmaServiceLevelIndex")) if mibBuilder.loadTexts: ibSmaSL2VLMapEntry.setStatus('current') ibSmaIBAOutPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaIBAOutPortIndex.setStatus('current') ibSmaIBAInPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 2), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaIBAInPortIndex.setStatus('current') ibSmaServiceLevelIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))) if mibBuilder.loadTexts: ibSmaServiceLevelIndex.setStatus('current') ibSmaVirtualLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaVirtualLane.setStatus('current') ibSmaVLArbitInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 8)) ibSmaHiPriVlArbTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 8, 1), ) if mibBuilder.loadTexts: ibSmaHiPriVlArbTable.setStatus('current') ibSmaHiPriVlArbEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaHiPriIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaHiPriNIndex")) if mibBuilder.loadTexts: ibSmaHiPriVlArbEntry.setStatus('current') ibSmaHiPriIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaHiPriIBAPortIndex.setStatus('current') ibSmaHiPriNIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: ibSmaHiPriNIndex.setStatus('current') ibSmaHiPriVirtLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaHiPriVirtLane.setStatus('current') ibSmaHiPriWeight = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaHiPriWeight.setStatus('current') ibSmaLowPriVlArbTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 8, 2), ) if mibBuilder.loadTexts: ibSmaLowPriVlArbTable.setStatus('current') ibSmaLowPriVlArbEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLowPriIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaLowPriNIndex")) if mibBuilder.loadTexts: ibSmaLowPriVlArbEntry.setStatus('current') ibSmaLowPriIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaLowPriIBAPortIndex.setStatus('current') ibSmaLowPriNIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: ibSmaLowPriNIndex.setStatus('current') ibSmaLowPriVirtLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLowPriVirtLane.setStatus('current') ibSmaLowPriWeight = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLowPriWeight.setStatus('current') ibSmaLFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 9)) ibSmaLinForTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 9, 1), ) if mibBuilder.loadTexts: ibSmaLinForTable.setStatus('current') ibSmaLinForEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLinDestDLIDIndex")) if mibBuilder.loadTexts: ibSmaLinForEntry.setStatus('current') ibSmaLinDestDLIDIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 1), IbUnicastLid()) if mibBuilder.loadTexts: ibSmaLinDestDLIDIndex.setStatus('current') ibSmaLinForwEgressPort = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 2), IbDataPortAndInvalid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLinForwEgressPort.setStatus('current') ibSmaRFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 10)) ibSmaRandomForwardingTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 10, 1), ) if mibBuilder.loadTexts: ibSmaRandomForwardingTable.setStatus('current') ibSmaRandomForwardingEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaRandomForwardingPortIndex")) if mibBuilder.loadTexts: ibSmaRandomForwardingEntry.setStatus('current') ibSmaRandomForwardingPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaRandomForwardingPortIndex.setStatus('current') ibSmaRandomDestLID = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 49152))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomDestLID.setStatus('current') ibSmaRandomForwEgressPort = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 3), IbDataPort()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomForwEgressPort.setStatus('current') ibSmaRandomLMC = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomLMC.setStatus('current') ibSmaRandomIsValid = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomIsValid.setStatus('current') ibSmaMFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 11)) ibSmaMulForTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 11, 1), ) if mibBuilder.loadTexts: ibSmaMulForTable.setStatus('current') ibSmaMulForEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaMulDestDLIDIndex")) if mibBuilder.loadTexts: ibSmaMulForEntry.setStatus('current') ibSmaMulDestDLIDIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 1), IbMulticastLid()) if mibBuilder.loadTexts: ibSmaMulDestDLIDIndex.setStatus('current') ibSmaMulForwMask = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 2), IbSmPortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaMulForwMask.setStatus('current') ibSmaSMInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 12)) ibSmaSubMgrInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 12, 1)) ibSmaSmInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1), ) if mibBuilder.loadTexts: ibSmaSmInfoTable.setStatus('current') ibSmaSmInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaSmInfoPortIndex")) if mibBuilder.loadTexts: ibSmaSmInfoEntry.setStatus('current') ibSmaSmInfoPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaSmInfoPortIndex.setStatus('current') ibSmaSmGuid = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 2), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmGuid.setStatus('current') ibSmaSmSmKey = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmSmKey.setStatus('current') ibSmaSmSmpCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmSmpCount.setStatus('current') ibSmaSmPriority = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmPriority.setStatus('current') ibSmaSmState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("notActive", 1), ("discovering", 2), ("standby", 3), ("master", 4), ("unknown", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmState.setStatus('current') ibSmaVendDiagInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 13)) ibSmaVendDiagInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 13, 1), ) if mibBuilder.loadTexts: ibSmaVendDiagInfoTable.setStatus('current') ibSmaVendDiagInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaVendDiagPortIndex")) if mibBuilder.loadTexts: ibSmaVendDiagInfoEntry.setStatus('current') ibSmaVendDiagPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaVendDiagPortIndex.setStatus('current') ibSmaPortGenericDiagCode = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("portReady", 1), ("performingSelfTest", 2), ("initializing", 3), ("softError", 4), ("hardError", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortGenericDiagCode.setStatus('current') ibSmaPortVendorDiagCode = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2047))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagCode.setStatus('current') ibSmaPortVendorDiagIndexFwd = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagIndexFwd.setStatus('current') ibSmaPortVendorDiagData = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(124, 124)).setFixedLength(124)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagData.setStatus('current') ibSmaLedInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 14)) ibSmaLedInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 14, 1), ) if mibBuilder.loadTexts: ibSmaLedInfoTable.setStatus('current') ibSmaLedInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLedIndex")) if mibBuilder.loadTexts: ibSmaLedInfoEntry.setStatus('current') ibSmaLedIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaLedIndex.setStatus('current') ibSmaLedState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("on", 2), ("off", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLedState.setStatus('current') ibSmaNotificationPrefix = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 2, 0)) ibSmaPortLinkStateChange = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid")) if mibBuilder.loadTexts: ibSmaPortLinkStateChange.setStatus('current') ibSmaLinkIntegrityThresReached = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 2)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaLinkIntegrityThresReached.setStatus('current') ibSmaExcessBuffOverrunThres = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 3)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaExcessBuffOverrunThres.setStatus('current') ibSmaFlowCntrlUpdateTimerExpire = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 4)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaFlowCntrlUpdateTimerExpire.setStatus('current') ibSmaCapabilityMaskModified = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 5)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeCapMask")) if mibBuilder.loadTexts: ibSmaCapabilityMaskModified.setStatus('current') ibSmaSysImageGuidModified = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 6)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaSystemImageGuid")) if mibBuilder.loadTexts: ibSmaSysImageGuidModified.setStatus('current') ibSmaBadManagementKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 7)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeMethod"), ("IB-SMA-MIB", "ibSmaNodeAttributeId"), ("IB-SMA-MIB", "ibSmaNodeAttributeModifier")) if mibBuilder.loadTexts: ibSmaBadManagementKey.setStatus('current') ibSmaBadPartitionKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 8)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel")) if mibBuilder.loadTexts: ibSmaBadPartitionKey.setStatus('current') ibSmaBadQueueKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 9)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel")) if mibBuilder.loadTexts: ibSmaBadQueueKey.setStatus('current') ibSmaBadPKeyAtSwitchPort = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 10)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel"), ("IB-SMA-MIB", "ibSmaNodeSwitchLid"), ("IB-SMA-MIB", "ibSmaNodeDataValid")) if mibBuilder.loadTexts: ibSmaBadPKeyAtSwitchPort.setStatus('current') ibSmaCompliances = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3, 1)) ibSmaGroups = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3, 2)) ibSmaBasicNodeCompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaBasicNodeCompliance = ibSmaBasicNodeCompliance.setStatus('current') ibSmaFullSwitchCompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 2)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup"), ("IB-SMA-MIB", "ibSmaSwitchGroup"), ("IB-SMA-MIB", "ibSmaGuidGroup"), ("IB-SMA-MIB", "ibSmaMgmtPortGroup"), ("IB-SMA-MIB", "ibSmaDataPortGroup"), ("IB-SMA-MIB", "ibSmaPKeyGroup"), ("IB-SMA-MIB", "ibSmaSlToVlMapGroup"), ("IB-SMA-MIB", "ibSmaVLArbitGroup"), ("IB-SMA-MIB", "ibSmaLFTGroup"), ("IB-SMA-MIB", "ibSmaRFTGroup"), ("IB-SMA-MIB", "ibSmaMFTGroup"), ("IB-SMA-MIB", "ibSmaSMGroup"), ("IB-SMA-MIB", "ibSmaVendDiagGroup"), ("IB-SMA-MIB", "ibSmaLedGroup"), ("IB-SMA-MIB", "ibSmaNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaFullSwitchCompliance = ibSmaFullSwitchCompliance.setStatus('current') ibSmaFullRouterCACompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 3)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup"), ("IB-SMA-MIB", "ibSmaGuidGroup"), ("IB-SMA-MIB", "ibSmaMgmtPortGroup"), ("IB-SMA-MIB", "ibSmaDataPortGroup"), ("IB-SMA-MIB", "ibSmaPKeyGroup"), ("IB-SMA-MIB", "ibSmaSlToVlMapGroup"), ("IB-SMA-MIB", "ibSmaVLArbitGroup"), ("IB-SMA-MIB", "ibSmaSMGroup"), ("IB-SMA-MIB", "ibSmaVendDiagGroup"), ("IB-SMA-MIB", "ibSmaLedGroup"), ("IB-SMA-MIB", "ibSmaNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaFullRouterCACompliance = ibSmaFullRouterCACompliance.setStatus('current') ibSmaNodeGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeString"), ("IB-SMA-MIB", "ibSmaNodeBaseVersion"), ("IB-SMA-MIB", "ibSmaNodeClassVersion"), ("IB-SMA-MIB", "ibSmaNodeType"), ("IB-SMA-MIB", "ibSmaNodeNumPorts"), ("IB-SMA-MIB", "ibSmaSystemImageGuid"), ("IB-SMA-MIB", "ibSmaNodeGuid"), ("IB-SMA-MIB", "ibSmaNodePortGuid"), ("IB-SMA-MIB", "ibSmaNodePartitionTableNum"), ("IB-SMA-MIB", "ibSmaNodeDeviceId"), ("IB-SMA-MIB", "ibSmaNodeRevision"), ("IB-SMA-MIB", "ibSmaNodeLocalPortNumOrZero"), ("IB-SMA-MIB", "ibSmaNodeVendorId"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum"), ("IB-SMA-MIB", "ibSmaNodeMethod"), ("IB-SMA-MIB", "ibSmaNodeAttributeId"), ("IB-SMA-MIB", "ibSmaNodeAttributeModifier"), ("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeCapMask"), ("IB-SMA-MIB", "ibSmaNodeSwitchLid"), ("IB-SMA-MIB", "ibSmaNodeDataValid")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaNodeGroup = ibSmaNodeGroup.setStatus('current') ibSmaSwitchGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 2)).setObjects(("IB-SMA-MIB", "ibSmaSwLinearFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwRandomFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwMulticastFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwLinearFdbTop"), ("IB-SMA-MIB", "ibSmaSwDefaultPort"), ("IB-SMA-MIB", "ibSmaSwDefMcastPriPort"), ("IB-SMA-MIB", "ibSmaSwDefMcastNotPriPort"), ("IB-SMA-MIB", "ibSmaSwLifeTimeValue"), ("IB-SMA-MIB", "ibSmaSwPortStateChange"), ("IB-SMA-MIB", "ibSmaSwLidsPerPort"), ("IB-SMA-MIB", "ibSmaSwPartitionEnforceNum"), ("IB-SMA-MIB", "ibSmaSwInboundEnforceCap"), ("IB-SMA-MIB", "ibSmaSwOutboundEnforceCap"), ("IB-SMA-MIB", "ibSmaSwFilterRawPktInputCap"), ("IB-SMA-MIB", "ibSmaSwFilterRawPktOutputCap"), ("IB-SMA-MIB", "ibSmaSwEnhancedPort0")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSwitchGroup = ibSmaSwitchGroup.setStatus('current') ibSmaGuidGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 3)).setObjects(("IB-SMA-MIB", "ibSmaGuidVal")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaGuidGroup = ibSmaGuidGroup.setStatus('current') ibSmaMgmtPortGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 4)).setObjects(("IB-SMA-MIB", "ibSmaPortMKey"), ("IB-SMA-MIB", "ibSmaPortGidPrefix"), ("IB-SMA-MIB", "ibSmaPortLid"), ("IB-SMA-MIB", "ibSmaPortMasterSmLid"), ("IB-SMA-MIB", "ibSmaPortIsSubnetManager"), ("IB-SMA-MIB", "ibSmaPortIsNoticeSupported"), ("IB-SMA-MIB", "ibSmaPortIsTrapSupported"), ("IB-SMA-MIB", "ibSmaPortIsAutoMigrateSupported"), ("IB-SMA-MIB", "ibSmaPortIsSlMappingSupported"), ("IB-SMA-MIB", "ibSmaPortIsMKeyNvram"), ("IB-SMA-MIB", "ibSmaPortIsPKeyNvram"), ("IB-SMA-MIB", "ibSmaPortIsLedInfoSupported"), ("IB-SMA-MIB", "ibSmaPortIsSmDisabled"), ("IB-SMA-MIB", "ibSmaPortIsSysImgGuidSupported"), ("IB-SMA-MIB", "ibSmaPortIsPKeyExtPortTrapSup"), ("IB-SMA-MIB", "ibSmaPortIsCommManageSupported"), ("IB-SMA-MIB", "ibSmaPortIsSnmpTunnelSupported"), ("IB-SMA-MIB", "ibSmaPortIsReinitSupported"), ("IB-SMA-MIB", "ibSmaPortIsDevManageSupported"), ("IB-SMA-MIB", "ibSmaPortIsVendorClassSupported"), ("IB-SMA-MIB", "ibSmaPortIsDrNoticeSupported"), ("IB-SMA-MIB", "ibSmaPortIsCapMaskNoticSupported"), ("IB-SMA-MIB", "ibSmaPortIsBootMgmtSupported"), ("IB-SMA-MIB", "ibSmaPortMKeyLeasePeriod"), ("IB-SMA-MIB", "ibSmaPortMKeyProtectBits"), ("IB-SMA-MIB", "ibSmaPortMasterSmSl"), ("IB-SMA-MIB", "ibSmaPortInitTypeLoad"), ("IB-SMA-MIB", "ibSmaPortInitTypeContent"), ("IB-SMA-MIB", "ibSmaPortInitTypePresence"), ("IB-SMA-MIB", "ibSmaPortInitTypeResuscitate"), ("IB-SMA-MIB", "ibSmaPortInitNoLoadReply"), ("IB-SMA-MIB", "ibSmaPortInitPreserveContReply"), ("IB-SMA-MIB", "ibSmaPortInitPreservePresReply"), ("IB-SMA-MIB", "ibSmaPortMKeyViolations"), ("IB-SMA-MIB", "ibSmaPortPKeyViolations"), ("IB-SMA-MIB", "ibSmaPortQKeyViolations"), ("IB-SMA-MIB", "ibSmaPortNumGuid"), ("IB-SMA-MIB", "ibSmaPortSubnetTimeout"), ("IB-SMA-MIB", "ibSmaPortResponseTimeValue")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaMgmtPortGroup = ibSmaMgmtPortGroup.setStatus('current') ibSmaDataPortGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 5)).setObjects(("IB-SMA-MIB", "ibSmaPortLinkWidthEnabled"), ("IB-SMA-MIB", "ibSmaPortLinkWidthSupported"), ("IB-SMA-MIB", "ibSmaPortLinkWidthActive"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedSupported"), ("IB-SMA-MIB", "ibSmaPortLinkState"), ("IB-SMA-MIB", "ibSmaPortPhysState"), ("IB-SMA-MIB", "ibSmaPortLinkDownDefaultState"), ("IB-SMA-MIB", "ibSmaPortLidMaskCount"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedActive"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedEnabled"), ("IB-SMA-MIB", "ibSmaPortNeighborMtu"), ("IB-SMA-MIB", "ibSmaPortVirtLaneSupport"), ("IB-SMA-MIB", "ibSmaPortVlHighPriorityLimit"), ("IB-SMA-MIB", "ibSmaPortVlArbHighCapacity"), ("IB-SMA-MIB", "ibSmaPortVlArbLowCapacity"), ("IB-SMA-MIB", "ibSmaPortMtuCapacity"), ("IB-SMA-MIB", "ibSmaPortVlStallCount"), ("IB-SMA-MIB", "ibSmaPortHeadOfQueueLife"), ("IB-SMA-MIB", "ibSmaPortOperationalVls"), ("IB-SMA-MIB", "ibSmaPortPartEnforceInbound"), ("IB-SMA-MIB", "ibSmaPortPartEnforceOutbound"), ("IB-SMA-MIB", "ibSmaPortFilterRawPktInbound"), ("IB-SMA-MIB", "ibSmaPortFilterRawPktOutbound"), ("IB-SMA-MIB", "ibSmaPortLocalPhysErrorThreshold"), ("IB-SMA-MIB", "ibSmaPortOverrunErrorThreshold")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaDataPortGroup = ibSmaDataPortGroup.setStatus('current') ibSmaPKeyGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 6)).setObjects(("IB-SMA-MIB", "ibSmaPKeyMembership"), ("IB-SMA-MIB", "ibSmaPKeyBase")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaPKeyGroup = ibSmaPKeyGroup.setStatus('current') ibSmaSlToVlMapGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 7)).setObjects(("IB-SMA-MIB", "ibSmaVirtualLane")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSlToVlMapGroup = ibSmaSlToVlMapGroup.setStatus('current') ibSmaVLArbitGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 8)).setObjects(("IB-SMA-MIB", "ibSmaHiPriVirtLane"), ("IB-SMA-MIB", "ibSmaHiPriWeight"), ("IB-SMA-MIB", "ibSmaLowPriVirtLane"), ("IB-SMA-MIB", "ibSmaLowPriWeight")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaVLArbitGroup = ibSmaVLArbitGroup.setStatus('current') ibSmaLFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 9)).setObjects(("IB-SMA-MIB", "ibSmaLinForwEgressPort")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaLFTGroup = ibSmaLFTGroup.setStatus('current') ibSmaRFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 10)).setObjects(("IB-SMA-MIB", "ibSmaRandomDestLID"), ("IB-SMA-MIB", "ibSmaRandomForwEgressPort"), ("IB-SMA-MIB", "ibSmaRandomLMC"), ("IB-SMA-MIB", "ibSmaRandomIsValid")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaRFTGroup = ibSmaRFTGroup.setStatus('current') ibSmaMFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 11)).setObjects(("IB-SMA-MIB", "ibSmaMulForwMask")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaMFTGroup = ibSmaMFTGroup.setStatus('current') ibSmaSMGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 12)).setObjects(("IB-SMA-MIB", "ibSmaSmGuid"), ("IB-SMA-MIB", "ibSmaSmSmKey"), ("IB-SMA-MIB", "ibSmaSmSmpCount"), ("IB-SMA-MIB", "ibSmaSmPriority"), ("IB-SMA-MIB", "ibSmaSmState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSMGroup = ibSmaSMGroup.setStatus('current') ibSmaVendDiagGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 13)).setObjects(("IB-SMA-MIB", "ibSmaPortGenericDiagCode"), ("IB-SMA-MIB", "ibSmaPortVendorDiagCode"), ("IB-SMA-MIB", "ibSmaPortVendorDiagIndexFwd"), ("IB-SMA-MIB", "ibSmaPortVendorDiagData")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaVendDiagGroup = ibSmaVendDiagGroup.setStatus('current') ibSmaLedGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 14)).setObjects(("IB-SMA-MIB", "ibSmaLedState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaLedGroup = ibSmaLedGroup.setStatus('current') ibSmaNotificationsGroup = NotificationGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 15)).setObjects(("IB-SMA-MIB", "ibSmaPortLinkStateChange"), ("IB-SMA-MIB", "ibSmaLinkIntegrityThresReached"), ("IB-SMA-MIB", "ibSmaExcessBuffOverrunThres"), ("IB-SMA-MIB", "ibSmaFlowCntrlUpdateTimerExpire"), ("IB-SMA-MIB", "ibSmaCapabilityMaskModified"), ("IB-SMA-MIB", "ibSmaSysImageGuidModified"), ("IB-SMA-MIB", "ibSmaBadManagementKey"), ("IB-SMA-MIB", "ibSmaBadPartitionKey"), ("IB-SMA-MIB", "ibSmaBadQueueKey"), ("IB-SMA-MIB", "ibSmaBadPKeyAtSwitchPort")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaNotificationsGroup = ibSmaNotificationsGroup.setStatus('current') mibBuilder.exportSymbols("IB-SMA-MIB", ibSmaNodeBaseVersion=ibSmaNodeBaseVersion, ibSmaRandomForwardingTable=ibSmaRandomForwardingTable, ibSmaNotificationPrefix=ibSmaNotificationPrefix, ibSmaNodeRevision=ibSmaNodeRevision, ibSmaSmInfoEntry=ibSmaSmInfoEntry, ibSmaVendDiagInfoEntry=ibSmaVendDiagInfoEntry, ibSmaMgmtPortGroup=ibSmaMgmtPortGroup, ibSmaNodeType=ibSmaNodeType, ibSmaNodeGid1=ibSmaNodeGid1, ibSmaPKeyIBAPortIndex=ibSmaPKeyIBAPortIndex, ibSmaMIB=ibSmaMIB, ibSmaBadManagementKey=ibSmaBadManagementKey, ibSmaFullSwitchCompliance=ibSmaFullSwitchCompliance, ibSmaPKeyIndex=ibSmaPKeyIndex, ibSmaPortInitTypeContent=ibSmaPortInitTypeContent, ibSmaLinDestDLIDIndex=ibSmaLinDestDLIDIndex, ibSmaPortIndex=ibSmaPortIndex, ibSmaPKeyTable=ibSmaPKeyTable, ibSmaVendDiagInfoTable=ibSmaVendDiagInfoTable, ibSmaHiPriVirtLane=ibSmaHiPriVirtLane, ibSmaVLArbitGroup=ibSmaVLArbitGroup, ibSmaNodeNumPorts=ibSmaNodeNumPorts, ibSmaPortInitPreserveContReply=ibSmaPortInitPreserveContReply, ibSmaSubMgrInfo=ibSmaSubMgrInfo, ibSmaLFTInfo=ibSmaLFTInfo, ibSmaSwPartitionEnforceNum=ibSmaSwPartitionEnforceNum, ibSmaRandomForwardingPortIndex=ibSmaRandomForwardingPortIndex, ibSmaSMInfo=ibSmaSMInfo, ibSmaPortOperationalVls=ibSmaPortOperationalVls, ibSmaPortInitNoLoadReply=ibSmaPortInitNoLoadReply, ibSmaBadQueueKey=ibSmaBadQueueKey, ibSmaRFTInfo=ibSmaRFTInfo, ibSmaPortNumGuid=ibSmaPortNumGuid, ibSmaHiPriVlArbEntry=ibSmaHiPriVlArbEntry, ibSmaPortMKeyProtectBits=ibSmaPortMKeyProtectBits, ibSmaLowPriWeight=ibSmaLowPriWeight, ibSmaServiceLevelIndex=ibSmaServiceLevelIndex, ibSmaPortGenericDiagCode=ibSmaPortGenericDiagCode, ibSmaGroups=ibSmaGroups, ibSmaNodeAttributeId=ibSmaNodeAttributeId, ibSmaNodeQueuePair2=ibSmaNodeQueuePair2, ibSmaPortLinkSpeedActive=ibSmaPortLinkSpeedActive, ibSmaVendDiagGroup=ibSmaVendDiagGroup, ibSmaSwLinearFdbTop=ibSmaSwLinearFdbTop, ibSmaPortMasterSmSl=ibSmaPortMasterSmSl, ibSmaLinForwEgressPort=ibSmaLinForwEgressPort, ibSmaPortLinkDownDefaultState=ibSmaPortLinkDownDefaultState, ibSmaLedIndex=ibSmaLedIndex, ibSmaSwitchGroup=ibSmaSwitchGroup, ibSmaPortPhysState=ibSmaPortPhysState, ibSmaPortLinkState=ibSmaPortLinkState, ibSmaSwFilterRawPktInputCap=ibSmaSwFilterRawPktInputCap, ibSmaPortVlArbHighCapacity=ibSmaPortVlArbHighCapacity, ibSmaGuidIndex=ibSmaGuidIndex, ibSmaPortVlStallCount=ibSmaPortVlStallCount, ibSmaPortMKeyViolations=ibSmaPortMKeyViolations, ibSmaPortInfoEntry=ibSmaPortInfoEntry, ibSmaVendDiagInfo=ibSmaVendDiagInfo, ibSmaLedState=ibSmaLedState, ibSmaNodeDataValid=ibSmaNodeDataValid, ibSmaRandomIsValid=ibSmaRandomIsValid, ibSmaNodeLid=ibSmaNodeLid, ibSmaGuidGroup=ibSmaGuidGroup, ibSmaPortMtuCapacity=ibSmaPortMtuCapacity, ibSmaSysImageGuidModified=ibSmaSysImageGuidModified, ibSmaIBAOutPortIndex=ibSmaIBAOutPortIndex, ibSmaLowPriIBAPortIndex=ibSmaLowPriIBAPortIndex, ibSmaPortInitTypePresence=ibSmaPortInitTypePresence, ibSmaNodePartitionTableNum=ibSmaNodePartitionTableNum, ibSmaCompliances=ibSmaCompliances, ibSmaPortIsLedInfoSupported=ibSmaPortIsLedInfoSupported, ibSmaPortIsReinitSupported=ibSmaPortIsReinitSupported, ibSmaGuidInfoEntry=ibSmaGuidInfoEntry, PYSNMP_MODULE_ID=ibSmaMIB, ibSmaNodeKey=ibSmaNodeKey, ibSmaPortIsSysImgGuidSupported=ibSmaPortIsSysImgGuidSupported, ibSmaPortResponseTimeValue=ibSmaPortResponseTimeValue, ibSmaHiPriWeight=ibSmaHiPriWeight, ibSmaNodePortGuid=ibSmaNodePortGuid, ibSmaFullRouterCACompliance=ibSmaFullRouterCACompliance, ibSmaNodeGuid=ibSmaNodeGuid, ibSmaPortQKeyViolations=ibSmaPortQKeyViolations, ibSmaHiPriIBAPortIndex=ibSmaHiPriIBAPortIndex, ibSmaLowPriVlArbEntry=ibSmaLowPriVlArbEntry, ibSmaNotificationsGroup=ibSmaNotificationsGroup, ibSmaSmInfoTable=ibSmaSmInfoTable, ibSmaSwLifeTimeValue=ibSmaSwLifeTimeValue, ibSmaMulForwMask=ibSmaMulForwMask, ibSmaPKeyBase=ibSmaPKeyBase, ibSmaPortLocalPhysErrorThreshold=ibSmaPortLocalPhysErrorThreshold, ibSmaPortNeighborMtu=ibSmaPortNeighborMtu, ibSmaRandomForwardingEntry=ibSmaRandomForwardingEntry, ibSmaNodeInfo=ibSmaNodeInfo, ibSmaPortInitTypeResuscitate=ibSmaPortInitTypeResuscitate, ibSmaRandomForwEgressPort=ibSmaRandomForwEgressPort, ibSmaPortIsSlMappingSupported=ibSmaPortIsSlMappingSupported, ibSmaMulForEntry=ibSmaMulForEntry, ibSmaSlToVlMapGroup=ibSmaSlToVlMapGroup, ibSmaSwDefMcastPriPort=ibSmaSwDefMcastPriPort, ibSmaPortMasterSmLid=ibSmaPortMasterSmLid, ibSmaHiPriVlArbTable=ibSmaHiPriVlArbTable, ibSmaSwInboundEnforceCap=ibSmaSwInboundEnforceCap, ibSmaPortVlHighPriorityLimit=ibSmaPortVlHighPriorityLimit, ibSmaPortIsSubnetManager=ibSmaPortIsSubnetManager, ibSmaPortIsDrNoticeSupported=ibSmaPortIsDrNoticeSupported, ibSmaPortFilterRawPktInbound=ibSmaPortFilterRawPktInbound, ibSmaPortMKeyLeasePeriod=ibSmaPortMKeyLeasePeriod, ibSmaSystemImageGuid=ibSmaSystemImageGuid, ibSmaPortGidPrefix=ibSmaPortGidPrefix, ibSmaPortLid=ibSmaPortLid, ibSmaPortLidMaskCount=ibSmaPortLidMaskCount, ibSmaSmSmKey=ibSmaSmSmKey, ibSmaSMGroup=ibSmaSMGroup, ibSmaPortMKey=ibSmaPortMKey, ibSmaLedInfoTable=ibSmaLedInfoTable, ibSmaPortVendorDiagCode=ibSmaPortVendorDiagCode, ibSmaIBAInPortIndex=ibSmaIBAInPortIndex, ibSmaVendDiagPortIndex=ibSmaVendDiagPortIndex, ibSmaPortVendorDiagData=ibSmaPortVendorDiagData, ibSmaSwDefaultPort=ibSmaSwDefaultPort, ibSmaFlowCntrlUpdateTimerExpire=ibSmaFlowCntrlUpdateTimerExpire, ibSmaPortLinkSpeedEnabled=ibSmaPortLinkSpeedEnabled, ibSmaNodeVendorId=ibSmaNodeVendorId, ibSmaSwPortStateChange=ibSmaSwPortStateChange, ibSmaLowPriVlArbTable=ibSmaLowPriVlArbTable, ibSmaPortIsSmDisabled=ibSmaPortIsSmDisabled, ibSmaPortIsBootMgmtSupported=ibSmaPortIsBootMgmtSupported, ibSmaPKeyMembership=ibSmaPKeyMembership, ibSmaRandomDestLID=ibSmaRandomDestLID, ibSmaSmSmpCount=ibSmaSmSmpCount, ibSmaPortVendorDiagIndexFwd=ibSmaPortVendorDiagIndexFwd, ibSmaLinForEntry=ibSmaLinForEntry, ibSmaSwFilterRawPktOutputCap=ibSmaSwFilterRawPktOutputCap, ibSmaSmInfoPortIndex=ibSmaSmInfoPortIndex, ibSmaPortIsPKeyExtPortTrapSup=ibSmaPortIsPKeyExtPortTrapSup, ibSmaLFTGroup=ibSmaLFTGroup, ibSmaPortFilterRawPktOutbound=ibSmaPortFilterRawPktOutbound, ibSmaPortIsVendorClassSupported=ibSmaPortIsVendorClassSupported, ibSmaPortIsDevManageSupported=ibSmaPortIsDevManageSupported, ibSmaPortLinkWidthEnabled=ibSmaPortLinkWidthEnabled, ibSmaPortLinkWidthSupported=ibSmaPortLinkWidthSupported, ibSmaLinkIntegrityThresReached=ibSmaLinkIntegrityThresReached, ibSmaNodeClassVersion=ibSmaNodeClassVersion, ibSmaDataPortInfo=ibSmaDataPortInfo, ibSmaNodeLocalPortNumOrZero=ibSmaNodeLocalPortNumOrZero, ibSmaPortInitTypeLoad=ibSmaPortInitTypeLoad, ibSmaPKeyInfo=ibSmaPKeyInfo, ibSmaGuidVal=ibSmaGuidVal, ibSmaLinForTable=ibSmaLinForTable, ibSmaMgmtPortInfo=ibSmaMgmtPortInfo, ibSmaSwMulticastFdbTableNum=ibSmaSwMulticastFdbTableNum, ibSmaNodeDeviceId=ibSmaNodeDeviceId, ibSmaMFTGroup=ibSmaMFTGroup, ibSmaSwEnhancedPort0=ibSmaSwEnhancedPort0, ibSmaHiPriNIndex=ibSmaHiPriNIndex, ibSmaSwLidsPerPort=ibSmaSwLidsPerPort, ibSmaLedGroup=ibSmaLedGroup, ibSmaNodeGroup=ibSmaNodeGroup, ibSmaPortSubnetTimeout=ibSmaPortSubnetTimeout, ibSmaSL2VLMapEntry=ibSmaSL2VLMapEntry, ibSmaSlToVlMapInfo=ibSmaSlToVlMapInfo, ibSmaPortInitPreservePresReply=ibSmaPortInitPreservePresReply, ibSmaBasicNodeCompliance=ibSmaBasicNodeCompliance, ibSmaMulDestDLIDIndex=ibSmaMulDestDLIDIndex, ibSmaMFTInfo=ibSmaMFTInfo, ibSmaBadPartitionKey=ibSmaBadPartitionKey, ibSmaCapabilityMaskModified=ibSmaCapabilityMaskModified, ibSmaNodeString=ibSmaNodeString, ibSmaSmGuid=ibSmaSmGuid, ibSmaPortLinkStateChange=ibSmaPortLinkStateChange, ibSmaLowPriNIndex=ibSmaLowPriNIndex, ibSmaPortPKeyViolations=ibSmaPortPKeyViolations, ibSmaSmPriority=ibSmaSmPriority, ibSmaVirtualLane=ibSmaVirtualLane, ibSmaConformance=ibSmaConformance, ibSmaNodeGid2=ibSmaNodeGid2, ibSmaLedInfoEntry=ibSmaLedInfoEntry, ibSmaPortIsSnmpTunnelSupported=ibSmaPortIsSnmpTunnelSupported, ibSmaGuidInfo=ibSmaGuidInfo, ibSmaPKeyEntry=ibSmaPKeyEntry, ibSmaSwRandomFdbTableNum=ibSmaSwRandomFdbTableNum, ibSmaLowPriVirtLane=ibSmaLowPriVirtLane, ibSmaPortHeadOfQueueLife=ibSmaPortHeadOfQueueLife, ibSmaPortLinkWidthActive=ibSmaPortLinkWidthActive, ibSmaRFTGroup=ibSmaRFTGroup, ibSmaSwitchInfo=ibSmaSwitchInfo, ibSmaNodeAttributeModifier=ibSmaNodeAttributeModifier, ibSmaSL2VLMapTable=ibSmaSL2VLMapTable, ibSmaPortLinkSpeedSupported=ibSmaPortLinkSpeedSupported, ibSmaObjects=ibSmaObjects, ibSmaDataPortGroup=ibSmaDataPortGroup, ibSmaPortIsCommManageSupported=ibSmaPortIsCommManageSupported, ibSmaVLArbitInfo=ibSmaVLArbitInfo, ibSmaNodeLid2=ibSmaNodeLid2, ibSmaPortIsPKeyNvram=ibSmaPortIsPKeyNvram, ibSmaPortOverrunErrorThreshold=ibSmaPortOverrunErrorThreshold, ibSmaBadPKeyAtSwitchPort=ibSmaBadPKeyAtSwitchPort, ibSmaNotifications=ibSmaNotifications, ibSmaPortIsCapMaskNoticSupported=ibSmaPortIsCapMaskNoticSupported, ibSmaSwDefMcastNotPriPort=ibSmaSwDefMcastNotPriPort, ibSmaGuidInfoTable=ibSmaGuidInfoTable, ibSmaSwOutboundEnforceCap=ibSmaSwOutboundEnforceCap, ibSmaNodeQueuePair1=ibSmaNodeQueuePair1, ibSmaSwLinearFdbTableNum=ibSmaSwLinearFdbTableNum, ibSmaPortPartEnforceOutbound=ibSmaPortPartEnforceOutbound, ibSmaPortIsMKeyNvram=ibSmaPortIsMKeyNvram, ibSmaPortIsNoticeSupported=ibSmaPortIsNoticeSupported, ibSmaMulForTable=ibSmaMulForTable, ibSmaGuidPortIndex=ibSmaGuidPortIndex, ibSmaNodeServiceLevel=ibSmaNodeServiceLevel, ibSmaPortVlArbLowCapacity=ibSmaPortVlArbLowCapacity, ibSmaPortInfoTable=ibSmaPortInfoTable, ibSmaPKeyGroup=ibSmaPKeyGroup, ibSmaPortIsAutoMigrateSupported=ibSmaPortIsAutoMigrateSupported, ibSmaRandomLMC=ibSmaRandomLMC, ibSmaNodePortNum=ibSmaNodePortNum, ibSmaNodeSwitchLid=ibSmaNodeSwitchLid, ibSmaExcessBuffOverrunThres=ibSmaExcessBuffOverrunThres, ibSmaNodeCapMask=ibSmaNodeCapMask, ibSmaLedInfo=ibSmaLedInfo, ibSmaPortVirtLaneSupport=ibSmaPortVirtLaneSupport, ibSmaPortPartEnforceInbound=ibSmaPortPartEnforceInbound, ibSmaSmState=ibSmaSmState, ibSmaNodeMethod=ibSmaNodeMethod, ibSmaPortIsTrapSupported=ibSmaPortIsTrapSupported)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (ib_data_port_and_invalid, ib_unicast_lid, ib_multicast_lid, infiniband_mib, ib_data_port, ib_guid, ib_sm_port_list) = mibBuilder.importSymbols('IB-TC-MIB', 'IbDataPortAndInvalid', 'IbUnicastLid', 'IbMulticastLid', 'infinibandMIB', 'IbDataPort', 'IbGuid', 'IbSmPortList') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, iso, bits, gauge32, mib_identifier, notification_type, ip_address, integer32, object_identity, module_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'iso', 'Bits', 'Gauge32', 'MibIdentifier', 'NotificationType', 'IpAddress', 'Integer32', 'ObjectIdentity', 'ModuleIdentity', 'Unsigned32') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') ib_sma_mib = module_identity((1, 3, 6, 1, 3, 117, 3)) ibSmaMIB.setRevisions(('2005-09-01 12:00',)) if mibBuilder.loadTexts: ibSmaMIB.setLastUpdated('200509011200Z') if mibBuilder.loadTexts: ibSmaMIB.setOrganization('IETF IP Over IB (IPOIB) Working Group') ib_sma_objects = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1)) ib_sma_notifications = mib_identifier((1, 3, 6, 1, 3, 117, 3, 2)) ib_sma_conformance = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3)) ib_sma_node_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 1)) ib_sma_node_string = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeString.setStatus('current') ib_sma_node_base_version = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeBaseVersion.setStatus('current') ib_sma_node_class_version = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeClassVersion.setStatus('current') ib_sma_node_type = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('channelAdapter', 1), ('switch', 2), ('router', 3), ('reserved', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeType.setStatus('current') ib_sma_node_num_ports = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeNumPorts.setStatus('current') ib_sma_system_image_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 6), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSystemImageGuid.setStatus('current') ib_sma_node_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 7), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeGuid.setStatus('current') ib_sma_node_port_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 8), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodePortGuid.setStatus('current') ib_sma_node_partition_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodePartitionTableNum.setStatus('current') ib_sma_node_device_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeDeviceId.setStatus('current') ib_sma_node_revision = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeRevision.setStatus('current') ib_sma_node_local_port_num_or_zero = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 12), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeLocalPortNumOrZero.setStatus('current') ib_sma_node_vendor_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 13), octet_string().subtype(subtypeSpec=value_size_constraint(3, 3)).setFixedLength(3)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeVendorId.setStatus('current') ib_sma_node_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeLid.setStatus('current') ib_sma_node_port_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 15), ib_data_port()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodePortNum.setStatus('current') ib_sma_node_method = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 16), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeMethod.setStatus('current') ib_sma_node_attribute_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 17), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeAttributeId.setStatus('current') ib_sma_node_attribute_modifier = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeAttributeModifier.setStatus('current') ib_sma_node_key = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeKey.setStatus('current') ib_sma_node_lid2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 20), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeLid2.setStatus('current') ib_sma_node_service_level = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeServiceLevel.setStatus('current') ib_sma_node_queue_pair1 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 22), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16777215))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeQueuePair1.setStatus('current') ib_sma_node_queue_pair2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 23), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16777215))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeQueuePair2.setStatus('current') ib_sma_node_gid1 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 24), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeGid1.setStatus('current') ib_sma_node_gid2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 25), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeGid2.setStatus('current') ib_sma_node_cap_mask = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 26), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeCapMask.setStatus('current') ib_sma_node_switch_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 27), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeSwitchLid.setStatus('current') ib_sma_node_data_valid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 28), bits().clone(namedValues=named_values(('lidaddr1', 0), ('lidaddr2', 1), ('pkey', 2), ('sl', 3), ('qp1', 4), ('qp2', 5), ('gidaddr1', 6), ('gidaddr2', 7)))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeDataValid.setStatus('current') ib_sma_switch_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 2)) ib_sma_sw_linear_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLinearFdbTableNum.setStatus('current') ib_sma_sw_random_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwRandomFdbTableNum.setStatus('current') ib_sma_sw_multicast_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16383))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwMulticastFdbTableNum.setStatus('current') ib_sma_sw_linear_fdb_top = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLinearFdbTop.setStatus('current') ib_sma_sw_default_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefaultPort.setStatus('current') ib_sma_sw_def_mcast_pri_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefMcastPriPort.setStatus('current') ib_sma_sw_def_mcast_not_pri_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefMcastNotPriPort.setStatus('current') ib_sma_sw_life_time_value = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLifeTimeValue.setStatus('current') ib_sma_sw_port_state_change = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwPortStateChange.setStatus('current') ib_sma_sw_lids_per_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLidsPerPort.setStatus('current') ib_sma_sw_partition_enforce_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 11), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwPartitionEnforceNum.setStatus('current') ib_sma_sw_inbound_enforce_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 12), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwInboundEnforceCap.setStatus('current') ib_sma_sw_outbound_enforce_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 13), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwOutboundEnforceCap.setStatus('current') ib_sma_sw_filter_raw_pkt_input_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 14), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwFilterRawPktInputCap.setStatus('current') ib_sma_sw_filter_raw_pkt_output_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwFilterRawPktOutputCap.setStatus('current') ib_sma_sw_enhanced_port0 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 16), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwEnhancedPort0.setStatus('current') ib_sma_guid_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 3)) ib_sma_guid_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 3, 1)) if mibBuilder.loadTexts: ibSmaGuidInfoTable.setStatus('current') ib_sma_guid_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaGuidPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaGuidIndex')) if mibBuilder.loadTexts: ibSmaGuidInfoEntry.setStatus('current') ib_sma_guid_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaGuidPortIndex.setStatus('current') ib_sma_guid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))) if mibBuilder.loadTexts: ibSmaGuidIndex.setStatus('current') ib_sma_guid_val = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 3), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaGuidVal.setStatus('current') ib_sma_mgmt_port_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 4)) ib_sma_port_m_key = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 1), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKey.setStatus('current') ib_sma_port_gid_prefix = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 2), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortGidPrefix.setStatus('current') ib_sma_port_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLid.setStatus('current') ib_sma_port_master_sm_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMasterSmLid.setStatus('current') ib_sma_port_is_subnet_manager = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSubnetManager.setStatus('current') ib_sma_port_is_notice_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 6), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsNoticeSupported.setStatus('current') ib_sma_port_is_trap_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 7), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsTrapSupported.setStatus('current') ib_sma_port_is_auto_migrate_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 8), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsAutoMigrateSupported.setStatus('current') ib_sma_port_is_sl_mapping_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSlMappingSupported.setStatus('current') ib_sma_port_is_m_key_nvram = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 10), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsMKeyNvram.setStatus('current') ib_sma_port_is_p_key_nvram = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 11), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsPKeyNvram.setStatus('current') ib_sma_port_is_led_info_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 12), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsLedInfoSupported.setStatus('current') ib_sma_port_is_sm_disabled = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 13), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSmDisabled.setStatus('current') ib_sma_port_is_sys_img_guid_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 14), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSysImgGuidSupported.setStatus('current') ib_sma_port_is_p_key_ext_port_trap_sup = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsPKeyExtPortTrapSup.setStatus('current') ib_sma_port_is_comm_manage_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 16), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsCommManageSupported.setStatus('current') ib_sma_port_is_snmp_tunnel_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 17), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSnmpTunnelSupported.setStatus('current') ib_sma_port_is_reinit_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 18), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsReinitSupported.setStatus('current') ib_sma_port_is_dev_manage_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 19), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsDevManageSupported.setStatus('current') ib_sma_port_is_vendor_class_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 20), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsVendorClassSupported.setStatus('current') ib_sma_port_is_dr_notice_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 21), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsDrNoticeSupported.setStatus('current') ib_sma_port_is_cap_mask_notic_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 22), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsCapMaskNoticSupported.setStatus('current') ib_sma_port_is_boot_mgmt_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 23), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsBootMgmtSupported.setStatus('current') ib_sma_port_m_key_lease_period = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyLeasePeriod.setStatus('current') ib_sma_port_m_key_protect_bits = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('noMKeyProtection', 1), ('succeedWithReturnKey', 2), ('succeedWithReturnZeroes', 3), ('failOnNoMatch', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyProtectBits.setStatus('current') ib_sma_port_master_sm_sl = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMasterSmSl.setStatus('current') ib_sma_port_init_type_load = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 27), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeLoad.setStatus('current') ib_sma_port_init_type_content = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 28), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeContent.setStatus('current') ib_sma_port_init_type_presence = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 29), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypePresence.setStatus('current') ib_sma_port_init_type_resuscitate = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 30), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeResuscitate.setStatus('current') ib_sma_port_init_no_load_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 31), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitNoLoadReply.setStatus('current') ib_sma_port_init_preserve_cont_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 32), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitPreserveContReply.setStatus('current') ib_sma_port_init_preserve_pres_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 33), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitPreservePresReply.setStatus('current') ib_sma_port_m_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyViolations.setStatus('current') ib_sma_port_p_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPKeyViolations.setStatus('current') ib_sma_port_q_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 36), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortQKeyViolations.setStatus('current') ib_sma_port_num_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 37), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortNumGuid.setStatus('current') ib_sma_port_subnet_timeout = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 38), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortSubnetTimeout.setStatus('current') ib_sma_port_response_time_value = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 39), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortResponseTimeValue.setStatus('current') ib_sma_data_port_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 5)) ib_sma_port_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 5, 1)) if mibBuilder.loadTexts: ibSmaPortInfoTable.setStatus('current') ib_sma_port_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaPortIndex')) if mibBuilder.loadTexts: ibSmaPortInfoEntry.setStatus('current') ib_sma_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaPortIndex.setStatus('current') ib_sma_port_link_width_enabled = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('oneX', 1), ('fourX', 2), ('oneXOr4X', 3), ('twelveX', 4), ('oneXOr12X', 5), ('fourXOr12X', 6), ('oneX4XOr12X', 7), ('linkWidthSupported', 8), ('other', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthEnabled.setStatus('current') ib_sma_port_link_width_supported = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('oneX', 1), ('oneXOr4X', 2), ('oneX4XOr12X', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthSupported.setStatus('current') ib_sma_port_link_width_active = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('oneX', 1), ('fourX', 2), ('twelveX', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthActive.setStatus('current') ib_sma_port_link_speed_supported = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('other', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedSupported.setStatus('current') ib_sma_port_link_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('down', 1), ('init', 2), ('armed', 3), ('active', 4), ('other', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkState.setStatus('current') ib_sma_port_phys_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('sleep', 1), ('polling', 2), ('disabled', 3), ('portConfigTraining', 4), ('linkUp', 5), ('linkErrorRecovery', 6), ('other', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPhysState.setStatus('current') ib_sma_port_link_down_default_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('sleep', 1), ('polling', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkDownDefaultState.setStatus('current') ib_sma_port_lid_mask_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLidMaskCount.setStatus('current') ib_sma_port_link_speed_active = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('other', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedActive.setStatus('current') ib_sma_port_link_speed_enabled = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('linkSpeedSupported', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedEnabled.setStatus('current') ib_sma_port_neighbor_mtu = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('mtu256', 1), ('mtu512', 2), ('mtu1024', 3), ('mtu2048', 4), ('mtu4096', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortNeighborMtu.setStatus('current') ib_sma_port_virt_lane_support = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('vl0', 1), ('vl0ToVl1', 2), ('vl0ToVl3', 3), ('vl0ToVl7', 4), ('vl0ToVl14', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVirtLaneSupport.setStatus('current') ib_sma_port_vl_high_priority_limit = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlHighPriorityLimit.setStatus('current') ib_sma_port_vl_arb_high_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 15), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlArbHighCapacity.setStatus('current') ib_sma_port_vl_arb_low_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 16), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlArbLowCapacity.setStatus('current') ib_sma_port_mtu_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('mtu256', 1), ('mtu512', 2), ('mtu1024', 3), ('mtu2048', 4), ('mtu4096', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMtuCapacity.setStatus('current') ib_sma_port_vl_stall_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlStallCount.setStatus('current') ib_sma_port_head_of_queue_life = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 19), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortHeadOfQueueLife.setStatus('current') ib_sma_port_operational_vls = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('vl0', 1), ('vl0ToVl1', 2), ('vl0ToVl3', 3), ('vl0ToVl7', 4), ('vl0ToVl14', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortOperationalVls.setStatus('current') ib_sma_port_part_enforce_inbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 21), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPartEnforceInbound.setStatus('current') ib_sma_port_part_enforce_outbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 22), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPartEnforceOutbound.setStatus('current') ib_sma_port_filter_raw_pkt_inbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 23), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortFilterRawPktInbound.setStatus('current') ib_sma_port_filter_raw_pkt_outbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 24), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortFilterRawPktOutbound.setStatus('current') ib_sma_port_local_phys_error_threshold = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 25), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLocalPhysErrorThreshold.setStatus('current') ib_sma_port_overrun_error_threshold = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortOverrunErrorThreshold.setStatus('current') ib_sma_p_key_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 6)) ib_sma_p_key_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 6, 1)) if mibBuilder.loadTexts: ibSmaPKeyTable.setStatus('current') ib_sma_p_key_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaPKeyIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaPKeyIndex')) if mibBuilder.loadTexts: ibSmaPKeyEntry.setStatus('current') ib_sma_p_key_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaPKeyIBAPortIndex.setStatus('current') ib_sma_p_key_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65504))) if mibBuilder.loadTexts: ibSmaPKeyIndex.setStatus('current') ib_sma_p_key_membership = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('limited', 2), ('full', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPKeyMembership.setStatus('current') ib_sma_p_key_base = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65527))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPKeyBase.setStatus('current') ib_sma_sl_to_vl_map_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 7)) ib_sma_sl2_vl_map_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 7, 1)) if mibBuilder.loadTexts: ibSmaSL2VLMapTable.setStatus('current') ib_sma_sl2_vl_map_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaIBAOutPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaIBAInPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaServiceLevelIndex')) if mibBuilder.loadTexts: ibSmaSL2VLMapEntry.setStatus('current') ib_sma_iba_out_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaIBAOutPortIndex.setStatus('current') ib_sma_iba_in_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 2), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaIBAInPortIndex.setStatus('current') ib_sma_service_level_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))) if mibBuilder.loadTexts: ibSmaServiceLevelIndex.setStatus('current') ib_sma_virtual_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaVirtualLane.setStatus('current') ib_sma_vl_arbit_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 8)) ib_sma_hi_pri_vl_arb_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 8, 1)) if mibBuilder.loadTexts: ibSmaHiPriVlArbTable.setStatus('current') ib_sma_hi_pri_vl_arb_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaHiPriIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaHiPriNIndex')) if mibBuilder.loadTexts: ibSmaHiPriVlArbEntry.setStatus('current') ib_sma_hi_pri_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaHiPriIBAPortIndex.setStatus('current') ib_sma_hi_pri_n_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))) if mibBuilder.loadTexts: ibSmaHiPriNIndex.setStatus('current') ib_sma_hi_pri_virt_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaHiPriVirtLane.setStatus('current') ib_sma_hi_pri_weight = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaHiPriWeight.setStatus('current') ib_sma_low_pri_vl_arb_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 8, 2)) if mibBuilder.loadTexts: ibSmaLowPriVlArbTable.setStatus('current') ib_sma_low_pri_vl_arb_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLowPriIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaLowPriNIndex')) if mibBuilder.loadTexts: ibSmaLowPriVlArbEntry.setStatus('current') ib_sma_low_pri_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaLowPriIBAPortIndex.setStatus('current') ib_sma_low_pri_n_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))) if mibBuilder.loadTexts: ibSmaLowPriNIndex.setStatus('current') ib_sma_low_pri_virt_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLowPriVirtLane.setStatus('current') ib_sma_low_pri_weight = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLowPriWeight.setStatus('current') ib_sma_lft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 9)) ib_sma_lin_for_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 9, 1)) if mibBuilder.loadTexts: ibSmaLinForTable.setStatus('current') ib_sma_lin_for_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLinDestDLIDIndex')) if mibBuilder.loadTexts: ibSmaLinForEntry.setStatus('current') ib_sma_lin_dest_dlid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 1), ib_unicast_lid()) if mibBuilder.loadTexts: ibSmaLinDestDLIDIndex.setStatus('current') ib_sma_lin_forw_egress_port = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 2), ib_data_port_and_invalid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLinForwEgressPort.setStatus('current') ib_sma_rft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 10)) ib_sma_random_forwarding_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 10, 1)) if mibBuilder.loadTexts: ibSmaRandomForwardingTable.setStatus('current') ib_sma_random_forwarding_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaRandomForwardingPortIndex')) if mibBuilder.loadTexts: ibSmaRandomForwardingEntry.setStatus('current') ib_sma_random_forwarding_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaRandomForwardingPortIndex.setStatus('current') ib_sma_random_dest_lid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 49152))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomDestLID.setStatus('current') ib_sma_random_forw_egress_port = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 3), ib_data_port()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomForwEgressPort.setStatus('current') ib_sma_random_lmc = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomLMC.setStatus('current') ib_sma_random_is_valid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomIsValid.setStatus('current') ib_sma_mft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 11)) ib_sma_mul_for_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 11, 1)) if mibBuilder.loadTexts: ibSmaMulForTable.setStatus('current') ib_sma_mul_for_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaMulDestDLIDIndex')) if mibBuilder.loadTexts: ibSmaMulForEntry.setStatus('current') ib_sma_mul_dest_dlid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 1), ib_multicast_lid()) if mibBuilder.loadTexts: ibSmaMulDestDLIDIndex.setStatus('current') ib_sma_mul_forw_mask = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 2), ib_sm_port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaMulForwMask.setStatus('current') ib_sma_sm_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 12)) ib_sma_sub_mgr_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 12, 1)) ib_sma_sm_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1)) if mibBuilder.loadTexts: ibSmaSmInfoTable.setStatus('current') ib_sma_sm_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaSmInfoPortIndex')) if mibBuilder.loadTexts: ibSmaSmInfoEntry.setStatus('current') ib_sma_sm_info_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaSmInfoPortIndex.setStatus('current') ib_sma_sm_guid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 2), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmGuid.setStatus('current') ib_sma_sm_sm_key = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmSmKey.setStatus('current') ib_sma_sm_smp_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmSmpCount.setStatus('current') ib_sma_sm_priority = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmPriority.setStatus('current') ib_sma_sm_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('notActive', 1), ('discovering', 2), ('standby', 3), ('master', 4), ('unknown', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmState.setStatus('current') ib_sma_vend_diag_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 13)) ib_sma_vend_diag_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 13, 1)) if mibBuilder.loadTexts: ibSmaVendDiagInfoTable.setStatus('current') ib_sma_vend_diag_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaVendDiagPortIndex')) if mibBuilder.loadTexts: ibSmaVendDiagInfoEntry.setStatus('current') ib_sma_vend_diag_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaVendDiagPortIndex.setStatus('current') ib_sma_port_generic_diag_code = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('portReady', 1), ('performingSelfTest', 2), ('initializing', 3), ('softError', 4), ('hardError', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortGenericDiagCode.setStatus('current') ib_sma_port_vendor_diag_code = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2047))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagCode.setStatus('current') ib_sma_port_vendor_diag_index_fwd = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagIndexFwd.setStatus('current') ib_sma_port_vendor_diag_data = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(124, 124)).setFixedLength(124)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagData.setStatus('current') ib_sma_led_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 14)) ib_sma_led_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 14, 1)) if mibBuilder.loadTexts: ibSmaLedInfoTable.setStatus('current') ib_sma_led_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLedIndex')) if mibBuilder.loadTexts: ibSmaLedInfoEntry.setStatus('current') ib_sma_led_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaLedIndex.setStatus('current') ib_sma_led_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('on', 2), ('off', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLedState.setStatus('current') ib_sma_notification_prefix = mib_identifier((1, 3, 6, 1, 3, 117, 3, 2, 0)) ib_sma_port_link_state_change = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid')) if mibBuilder.loadTexts: ibSmaPortLinkStateChange.setStatus('current') ib_sma_link_integrity_thres_reached = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 2)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaLinkIntegrityThresReached.setStatus('current') ib_sma_excess_buff_overrun_thres = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 3)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaExcessBuffOverrunThres.setStatus('current') ib_sma_flow_cntrl_update_timer_expire = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 4)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaFlowCntrlUpdateTimerExpire.setStatus('current') ib_sma_capability_mask_modified = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 5)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeCapMask')) if mibBuilder.loadTexts: ibSmaCapabilityMaskModified.setStatus('current') ib_sma_sys_image_guid_modified = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 6)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaSystemImageGuid')) if mibBuilder.loadTexts: ibSmaSysImageGuidModified.setStatus('current') ib_sma_bad_management_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 7)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeMethod'), ('IB-SMA-MIB', 'ibSmaNodeAttributeId'), ('IB-SMA-MIB', 'ibSmaNodeAttributeModifier')) if mibBuilder.loadTexts: ibSmaBadManagementKey.setStatus('current') ib_sma_bad_partition_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 8)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel')) if mibBuilder.loadTexts: ibSmaBadPartitionKey.setStatus('current') ib_sma_bad_queue_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 9)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel')) if mibBuilder.loadTexts: ibSmaBadQueueKey.setStatus('current') ib_sma_bad_p_key_at_switch_port = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 10)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel'), ('IB-SMA-MIB', 'ibSmaNodeSwitchLid'), ('IB-SMA-MIB', 'ibSmaNodeDataValid')) if mibBuilder.loadTexts: ibSmaBadPKeyAtSwitchPort.setStatus('current') ib_sma_compliances = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3, 1)) ib_sma_groups = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3, 2)) ib_sma_basic_node_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_basic_node_compliance = ibSmaBasicNodeCompliance.setStatus('current') ib_sma_full_switch_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 2)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup'), ('IB-SMA-MIB', 'ibSmaSwitchGroup'), ('IB-SMA-MIB', 'ibSmaGuidGroup'), ('IB-SMA-MIB', 'ibSmaMgmtPortGroup'), ('IB-SMA-MIB', 'ibSmaDataPortGroup'), ('IB-SMA-MIB', 'ibSmaPKeyGroup'), ('IB-SMA-MIB', 'ibSmaSlToVlMapGroup'), ('IB-SMA-MIB', 'ibSmaVLArbitGroup'), ('IB-SMA-MIB', 'ibSmaLFTGroup'), ('IB-SMA-MIB', 'ibSmaRFTGroup'), ('IB-SMA-MIB', 'ibSmaMFTGroup'), ('IB-SMA-MIB', 'ibSmaSMGroup'), ('IB-SMA-MIB', 'ibSmaVendDiagGroup'), ('IB-SMA-MIB', 'ibSmaLedGroup'), ('IB-SMA-MIB', 'ibSmaNotificationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_full_switch_compliance = ibSmaFullSwitchCompliance.setStatus('current') ib_sma_full_router_ca_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 3)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup'), ('IB-SMA-MIB', 'ibSmaGuidGroup'), ('IB-SMA-MIB', 'ibSmaMgmtPortGroup'), ('IB-SMA-MIB', 'ibSmaDataPortGroup'), ('IB-SMA-MIB', 'ibSmaPKeyGroup'), ('IB-SMA-MIB', 'ibSmaSlToVlMapGroup'), ('IB-SMA-MIB', 'ibSmaVLArbitGroup'), ('IB-SMA-MIB', 'ibSmaSMGroup'), ('IB-SMA-MIB', 'ibSmaVendDiagGroup'), ('IB-SMA-MIB', 'ibSmaLedGroup'), ('IB-SMA-MIB', 'ibSmaNotificationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_full_router_ca_compliance = ibSmaFullRouterCACompliance.setStatus('current') ib_sma_node_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeString'), ('IB-SMA-MIB', 'ibSmaNodeBaseVersion'), ('IB-SMA-MIB', 'ibSmaNodeClassVersion'), ('IB-SMA-MIB', 'ibSmaNodeType'), ('IB-SMA-MIB', 'ibSmaNodeNumPorts'), ('IB-SMA-MIB', 'ibSmaSystemImageGuid'), ('IB-SMA-MIB', 'ibSmaNodeGuid'), ('IB-SMA-MIB', 'ibSmaNodePortGuid'), ('IB-SMA-MIB', 'ibSmaNodePartitionTableNum'), ('IB-SMA-MIB', 'ibSmaNodeDeviceId'), ('IB-SMA-MIB', 'ibSmaNodeRevision'), ('IB-SMA-MIB', 'ibSmaNodeLocalPortNumOrZero'), ('IB-SMA-MIB', 'ibSmaNodeVendorId'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum'), ('IB-SMA-MIB', 'ibSmaNodeMethod'), ('IB-SMA-MIB', 'ibSmaNodeAttributeId'), ('IB-SMA-MIB', 'ibSmaNodeAttributeModifier'), ('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeCapMask'), ('IB-SMA-MIB', 'ibSmaNodeSwitchLid'), ('IB-SMA-MIB', 'ibSmaNodeDataValid')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_node_group = ibSmaNodeGroup.setStatus('current') ib_sma_switch_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 2)).setObjects(('IB-SMA-MIB', 'ibSmaSwLinearFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwRandomFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwMulticastFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwLinearFdbTop'), ('IB-SMA-MIB', 'ibSmaSwDefaultPort'), ('IB-SMA-MIB', 'ibSmaSwDefMcastPriPort'), ('IB-SMA-MIB', 'ibSmaSwDefMcastNotPriPort'), ('IB-SMA-MIB', 'ibSmaSwLifeTimeValue'), ('IB-SMA-MIB', 'ibSmaSwPortStateChange'), ('IB-SMA-MIB', 'ibSmaSwLidsPerPort'), ('IB-SMA-MIB', 'ibSmaSwPartitionEnforceNum'), ('IB-SMA-MIB', 'ibSmaSwInboundEnforceCap'), ('IB-SMA-MIB', 'ibSmaSwOutboundEnforceCap'), ('IB-SMA-MIB', 'ibSmaSwFilterRawPktInputCap'), ('IB-SMA-MIB', 'ibSmaSwFilterRawPktOutputCap'), ('IB-SMA-MIB', 'ibSmaSwEnhancedPort0')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_switch_group = ibSmaSwitchGroup.setStatus('current') ib_sma_guid_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 3)).setObjects(('IB-SMA-MIB', 'ibSmaGuidVal')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_guid_group = ibSmaGuidGroup.setStatus('current') ib_sma_mgmt_port_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 4)).setObjects(('IB-SMA-MIB', 'ibSmaPortMKey'), ('IB-SMA-MIB', 'ibSmaPortGidPrefix'), ('IB-SMA-MIB', 'ibSmaPortLid'), ('IB-SMA-MIB', 'ibSmaPortMasterSmLid'), ('IB-SMA-MIB', 'ibSmaPortIsSubnetManager'), ('IB-SMA-MIB', 'ibSmaPortIsNoticeSupported'), ('IB-SMA-MIB', 'ibSmaPortIsTrapSupported'), ('IB-SMA-MIB', 'ibSmaPortIsAutoMigrateSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSlMappingSupported'), ('IB-SMA-MIB', 'ibSmaPortIsMKeyNvram'), ('IB-SMA-MIB', 'ibSmaPortIsPKeyNvram'), ('IB-SMA-MIB', 'ibSmaPortIsLedInfoSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSmDisabled'), ('IB-SMA-MIB', 'ibSmaPortIsSysImgGuidSupported'), ('IB-SMA-MIB', 'ibSmaPortIsPKeyExtPortTrapSup'), ('IB-SMA-MIB', 'ibSmaPortIsCommManageSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSnmpTunnelSupported'), ('IB-SMA-MIB', 'ibSmaPortIsReinitSupported'), ('IB-SMA-MIB', 'ibSmaPortIsDevManageSupported'), ('IB-SMA-MIB', 'ibSmaPortIsVendorClassSupported'), ('IB-SMA-MIB', 'ibSmaPortIsDrNoticeSupported'), ('IB-SMA-MIB', 'ibSmaPortIsCapMaskNoticSupported'), ('IB-SMA-MIB', 'ibSmaPortIsBootMgmtSupported'), ('IB-SMA-MIB', 'ibSmaPortMKeyLeasePeriod'), ('IB-SMA-MIB', 'ibSmaPortMKeyProtectBits'), ('IB-SMA-MIB', 'ibSmaPortMasterSmSl'), ('IB-SMA-MIB', 'ibSmaPortInitTypeLoad'), ('IB-SMA-MIB', 'ibSmaPortInitTypeContent'), ('IB-SMA-MIB', 'ibSmaPortInitTypePresence'), ('IB-SMA-MIB', 'ibSmaPortInitTypeResuscitate'), ('IB-SMA-MIB', 'ibSmaPortInitNoLoadReply'), ('IB-SMA-MIB', 'ibSmaPortInitPreserveContReply'), ('IB-SMA-MIB', 'ibSmaPortInitPreservePresReply'), ('IB-SMA-MIB', 'ibSmaPortMKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortPKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortQKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortNumGuid'), ('IB-SMA-MIB', 'ibSmaPortSubnetTimeout'), ('IB-SMA-MIB', 'ibSmaPortResponseTimeValue')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_mgmt_port_group = ibSmaMgmtPortGroup.setStatus('current') ib_sma_data_port_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 5)).setObjects(('IB-SMA-MIB', 'ibSmaPortLinkWidthEnabled'), ('IB-SMA-MIB', 'ibSmaPortLinkWidthSupported'), ('IB-SMA-MIB', 'ibSmaPortLinkWidthActive'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedSupported'), ('IB-SMA-MIB', 'ibSmaPortLinkState'), ('IB-SMA-MIB', 'ibSmaPortPhysState'), ('IB-SMA-MIB', 'ibSmaPortLinkDownDefaultState'), ('IB-SMA-MIB', 'ibSmaPortLidMaskCount'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedActive'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedEnabled'), ('IB-SMA-MIB', 'ibSmaPortNeighborMtu'), ('IB-SMA-MIB', 'ibSmaPortVirtLaneSupport'), ('IB-SMA-MIB', 'ibSmaPortVlHighPriorityLimit'), ('IB-SMA-MIB', 'ibSmaPortVlArbHighCapacity'), ('IB-SMA-MIB', 'ibSmaPortVlArbLowCapacity'), ('IB-SMA-MIB', 'ibSmaPortMtuCapacity'), ('IB-SMA-MIB', 'ibSmaPortVlStallCount'), ('IB-SMA-MIB', 'ibSmaPortHeadOfQueueLife'), ('IB-SMA-MIB', 'ibSmaPortOperationalVls'), ('IB-SMA-MIB', 'ibSmaPortPartEnforceInbound'), ('IB-SMA-MIB', 'ibSmaPortPartEnforceOutbound'), ('IB-SMA-MIB', 'ibSmaPortFilterRawPktInbound'), ('IB-SMA-MIB', 'ibSmaPortFilterRawPktOutbound'), ('IB-SMA-MIB', 'ibSmaPortLocalPhysErrorThreshold'), ('IB-SMA-MIB', 'ibSmaPortOverrunErrorThreshold')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_data_port_group = ibSmaDataPortGroup.setStatus('current') ib_sma_p_key_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 6)).setObjects(('IB-SMA-MIB', 'ibSmaPKeyMembership'), ('IB-SMA-MIB', 'ibSmaPKeyBase')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_p_key_group = ibSmaPKeyGroup.setStatus('current') ib_sma_sl_to_vl_map_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 7)).setObjects(('IB-SMA-MIB', 'ibSmaVirtualLane')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_sl_to_vl_map_group = ibSmaSlToVlMapGroup.setStatus('current') ib_sma_vl_arbit_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 8)).setObjects(('IB-SMA-MIB', 'ibSmaHiPriVirtLane'), ('IB-SMA-MIB', 'ibSmaHiPriWeight'), ('IB-SMA-MIB', 'ibSmaLowPriVirtLane'), ('IB-SMA-MIB', 'ibSmaLowPriWeight')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_vl_arbit_group = ibSmaVLArbitGroup.setStatus('current') ib_sma_lft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 9)).setObjects(('IB-SMA-MIB', 'ibSmaLinForwEgressPort')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_lft_group = ibSmaLFTGroup.setStatus('current') ib_sma_rft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 10)).setObjects(('IB-SMA-MIB', 'ibSmaRandomDestLID'), ('IB-SMA-MIB', 'ibSmaRandomForwEgressPort'), ('IB-SMA-MIB', 'ibSmaRandomLMC'), ('IB-SMA-MIB', 'ibSmaRandomIsValid')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_rft_group = ibSmaRFTGroup.setStatus('current') ib_sma_mft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 11)).setObjects(('IB-SMA-MIB', 'ibSmaMulForwMask')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_mft_group = ibSmaMFTGroup.setStatus('current') ib_sma_sm_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 12)).setObjects(('IB-SMA-MIB', 'ibSmaSmGuid'), ('IB-SMA-MIB', 'ibSmaSmSmKey'), ('IB-SMA-MIB', 'ibSmaSmSmpCount'), ('IB-SMA-MIB', 'ibSmaSmPriority'), ('IB-SMA-MIB', 'ibSmaSmState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_sm_group = ibSmaSMGroup.setStatus('current') ib_sma_vend_diag_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 13)).setObjects(('IB-SMA-MIB', 'ibSmaPortGenericDiagCode'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagCode'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagIndexFwd'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagData')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_vend_diag_group = ibSmaVendDiagGroup.setStatus('current') ib_sma_led_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 14)).setObjects(('IB-SMA-MIB', 'ibSmaLedState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_led_group = ibSmaLedGroup.setStatus('current') ib_sma_notifications_group = notification_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 15)).setObjects(('IB-SMA-MIB', 'ibSmaPortLinkStateChange'), ('IB-SMA-MIB', 'ibSmaLinkIntegrityThresReached'), ('IB-SMA-MIB', 'ibSmaExcessBuffOverrunThres'), ('IB-SMA-MIB', 'ibSmaFlowCntrlUpdateTimerExpire'), ('IB-SMA-MIB', 'ibSmaCapabilityMaskModified'), ('IB-SMA-MIB', 'ibSmaSysImageGuidModified'), ('IB-SMA-MIB', 'ibSmaBadManagementKey'), ('IB-SMA-MIB', 'ibSmaBadPartitionKey'), ('IB-SMA-MIB', 'ibSmaBadQueueKey'), ('IB-SMA-MIB', 'ibSmaBadPKeyAtSwitchPort')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_notifications_group = ibSmaNotificationsGroup.setStatus('current') mibBuilder.exportSymbols('IB-SMA-MIB', ibSmaNodeBaseVersion=ibSmaNodeBaseVersion, ibSmaRandomForwardingTable=ibSmaRandomForwardingTable, ibSmaNotificationPrefix=ibSmaNotificationPrefix, ibSmaNodeRevision=ibSmaNodeRevision, ibSmaSmInfoEntry=ibSmaSmInfoEntry, ibSmaVendDiagInfoEntry=ibSmaVendDiagInfoEntry, ibSmaMgmtPortGroup=ibSmaMgmtPortGroup, ibSmaNodeType=ibSmaNodeType, ibSmaNodeGid1=ibSmaNodeGid1, ibSmaPKeyIBAPortIndex=ibSmaPKeyIBAPortIndex, ibSmaMIB=ibSmaMIB, ibSmaBadManagementKey=ibSmaBadManagementKey, ibSmaFullSwitchCompliance=ibSmaFullSwitchCompliance, ibSmaPKeyIndex=ibSmaPKeyIndex, ibSmaPortInitTypeContent=ibSmaPortInitTypeContent, ibSmaLinDestDLIDIndex=ibSmaLinDestDLIDIndex, ibSmaPortIndex=ibSmaPortIndex, ibSmaPKeyTable=ibSmaPKeyTable, ibSmaVendDiagInfoTable=ibSmaVendDiagInfoTable, ibSmaHiPriVirtLane=ibSmaHiPriVirtLane, ibSmaVLArbitGroup=ibSmaVLArbitGroup, ibSmaNodeNumPorts=ibSmaNodeNumPorts, ibSmaPortInitPreserveContReply=ibSmaPortInitPreserveContReply, ibSmaSubMgrInfo=ibSmaSubMgrInfo, ibSmaLFTInfo=ibSmaLFTInfo, ibSmaSwPartitionEnforceNum=ibSmaSwPartitionEnforceNum, ibSmaRandomForwardingPortIndex=ibSmaRandomForwardingPortIndex, ibSmaSMInfo=ibSmaSMInfo, ibSmaPortOperationalVls=ibSmaPortOperationalVls, ibSmaPortInitNoLoadReply=ibSmaPortInitNoLoadReply, ibSmaBadQueueKey=ibSmaBadQueueKey, ibSmaRFTInfo=ibSmaRFTInfo, ibSmaPortNumGuid=ibSmaPortNumGuid, ibSmaHiPriVlArbEntry=ibSmaHiPriVlArbEntry, ibSmaPortMKeyProtectBits=ibSmaPortMKeyProtectBits, ibSmaLowPriWeight=ibSmaLowPriWeight, ibSmaServiceLevelIndex=ibSmaServiceLevelIndex, ibSmaPortGenericDiagCode=ibSmaPortGenericDiagCode, ibSmaGroups=ibSmaGroups, ibSmaNodeAttributeId=ibSmaNodeAttributeId, ibSmaNodeQueuePair2=ibSmaNodeQueuePair2, ibSmaPortLinkSpeedActive=ibSmaPortLinkSpeedActive, ibSmaVendDiagGroup=ibSmaVendDiagGroup, ibSmaSwLinearFdbTop=ibSmaSwLinearFdbTop, ibSmaPortMasterSmSl=ibSmaPortMasterSmSl, ibSmaLinForwEgressPort=ibSmaLinForwEgressPort, ibSmaPortLinkDownDefaultState=ibSmaPortLinkDownDefaultState, ibSmaLedIndex=ibSmaLedIndex, ibSmaSwitchGroup=ibSmaSwitchGroup, ibSmaPortPhysState=ibSmaPortPhysState, ibSmaPortLinkState=ibSmaPortLinkState, ibSmaSwFilterRawPktInputCap=ibSmaSwFilterRawPktInputCap, ibSmaPortVlArbHighCapacity=ibSmaPortVlArbHighCapacity, ibSmaGuidIndex=ibSmaGuidIndex, ibSmaPortVlStallCount=ibSmaPortVlStallCount, ibSmaPortMKeyViolations=ibSmaPortMKeyViolations, ibSmaPortInfoEntry=ibSmaPortInfoEntry, ibSmaVendDiagInfo=ibSmaVendDiagInfo, ibSmaLedState=ibSmaLedState, ibSmaNodeDataValid=ibSmaNodeDataValid, ibSmaRandomIsValid=ibSmaRandomIsValid, ibSmaNodeLid=ibSmaNodeLid, ibSmaGuidGroup=ibSmaGuidGroup, ibSmaPortMtuCapacity=ibSmaPortMtuCapacity, ibSmaSysImageGuidModified=ibSmaSysImageGuidModified, ibSmaIBAOutPortIndex=ibSmaIBAOutPortIndex, ibSmaLowPriIBAPortIndex=ibSmaLowPriIBAPortIndex, ibSmaPortInitTypePresence=ibSmaPortInitTypePresence, ibSmaNodePartitionTableNum=ibSmaNodePartitionTableNum, ibSmaCompliances=ibSmaCompliances, ibSmaPortIsLedInfoSupported=ibSmaPortIsLedInfoSupported, ibSmaPortIsReinitSupported=ibSmaPortIsReinitSupported, ibSmaGuidInfoEntry=ibSmaGuidInfoEntry, PYSNMP_MODULE_ID=ibSmaMIB, ibSmaNodeKey=ibSmaNodeKey, ibSmaPortIsSysImgGuidSupported=ibSmaPortIsSysImgGuidSupported, ibSmaPortResponseTimeValue=ibSmaPortResponseTimeValue, ibSmaHiPriWeight=ibSmaHiPriWeight, ibSmaNodePortGuid=ibSmaNodePortGuid, ibSmaFullRouterCACompliance=ibSmaFullRouterCACompliance, ibSmaNodeGuid=ibSmaNodeGuid, ibSmaPortQKeyViolations=ibSmaPortQKeyViolations, ibSmaHiPriIBAPortIndex=ibSmaHiPriIBAPortIndex, ibSmaLowPriVlArbEntry=ibSmaLowPriVlArbEntry, ibSmaNotificationsGroup=ibSmaNotificationsGroup, ibSmaSmInfoTable=ibSmaSmInfoTable, ibSmaSwLifeTimeValue=ibSmaSwLifeTimeValue, ibSmaMulForwMask=ibSmaMulForwMask, ibSmaPKeyBase=ibSmaPKeyBase, ibSmaPortLocalPhysErrorThreshold=ibSmaPortLocalPhysErrorThreshold, ibSmaPortNeighborMtu=ibSmaPortNeighborMtu, ibSmaRandomForwardingEntry=ibSmaRandomForwardingEntry, ibSmaNodeInfo=ibSmaNodeInfo, ibSmaPortInitTypeResuscitate=ibSmaPortInitTypeResuscitate, ibSmaRandomForwEgressPort=ibSmaRandomForwEgressPort, ibSmaPortIsSlMappingSupported=ibSmaPortIsSlMappingSupported, ibSmaMulForEntry=ibSmaMulForEntry, ibSmaSlToVlMapGroup=ibSmaSlToVlMapGroup, ibSmaSwDefMcastPriPort=ibSmaSwDefMcastPriPort, ibSmaPortMasterSmLid=ibSmaPortMasterSmLid, ibSmaHiPriVlArbTable=ibSmaHiPriVlArbTable, ibSmaSwInboundEnforceCap=ibSmaSwInboundEnforceCap, ibSmaPortVlHighPriorityLimit=ibSmaPortVlHighPriorityLimit, ibSmaPortIsSubnetManager=ibSmaPortIsSubnetManager, ibSmaPortIsDrNoticeSupported=ibSmaPortIsDrNoticeSupported, ibSmaPortFilterRawPktInbound=ibSmaPortFilterRawPktInbound, ibSmaPortMKeyLeasePeriod=ibSmaPortMKeyLeasePeriod, ibSmaSystemImageGuid=ibSmaSystemImageGuid, ibSmaPortGidPrefix=ibSmaPortGidPrefix, ibSmaPortLid=ibSmaPortLid, ibSmaPortLidMaskCount=ibSmaPortLidMaskCount, ibSmaSmSmKey=ibSmaSmSmKey, ibSmaSMGroup=ibSmaSMGroup, ibSmaPortMKey=ibSmaPortMKey, ibSmaLedInfoTable=ibSmaLedInfoTable, ibSmaPortVendorDiagCode=ibSmaPortVendorDiagCode, ibSmaIBAInPortIndex=ibSmaIBAInPortIndex, ibSmaVendDiagPortIndex=ibSmaVendDiagPortIndex, ibSmaPortVendorDiagData=ibSmaPortVendorDiagData, ibSmaSwDefaultPort=ibSmaSwDefaultPort, ibSmaFlowCntrlUpdateTimerExpire=ibSmaFlowCntrlUpdateTimerExpire, ibSmaPortLinkSpeedEnabled=ibSmaPortLinkSpeedEnabled, ibSmaNodeVendorId=ibSmaNodeVendorId, ibSmaSwPortStateChange=ibSmaSwPortStateChange, ibSmaLowPriVlArbTable=ibSmaLowPriVlArbTable, ibSmaPortIsSmDisabled=ibSmaPortIsSmDisabled, ibSmaPortIsBootMgmtSupported=ibSmaPortIsBootMgmtSupported, ibSmaPKeyMembership=ibSmaPKeyMembership, ibSmaRandomDestLID=ibSmaRandomDestLID, ibSmaSmSmpCount=ibSmaSmSmpCount, ibSmaPortVendorDiagIndexFwd=ibSmaPortVendorDiagIndexFwd, ibSmaLinForEntry=ibSmaLinForEntry, ibSmaSwFilterRawPktOutputCap=ibSmaSwFilterRawPktOutputCap, ibSmaSmInfoPortIndex=ibSmaSmInfoPortIndex, ibSmaPortIsPKeyExtPortTrapSup=ibSmaPortIsPKeyExtPortTrapSup, ibSmaLFTGroup=ibSmaLFTGroup, ibSmaPortFilterRawPktOutbound=ibSmaPortFilterRawPktOutbound, ibSmaPortIsVendorClassSupported=ibSmaPortIsVendorClassSupported, ibSmaPortIsDevManageSupported=ibSmaPortIsDevManageSupported, ibSmaPortLinkWidthEnabled=ibSmaPortLinkWidthEnabled, ibSmaPortLinkWidthSupported=ibSmaPortLinkWidthSupported, ibSmaLinkIntegrityThresReached=ibSmaLinkIntegrityThresReached, ibSmaNodeClassVersion=ibSmaNodeClassVersion, ibSmaDataPortInfo=ibSmaDataPortInfo, ibSmaNodeLocalPortNumOrZero=ibSmaNodeLocalPortNumOrZero, ibSmaPortInitTypeLoad=ibSmaPortInitTypeLoad, ibSmaPKeyInfo=ibSmaPKeyInfo, ibSmaGuidVal=ibSmaGuidVal, ibSmaLinForTable=ibSmaLinForTable, ibSmaMgmtPortInfo=ibSmaMgmtPortInfo, ibSmaSwMulticastFdbTableNum=ibSmaSwMulticastFdbTableNum, ibSmaNodeDeviceId=ibSmaNodeDeviceId, ibSmaMFTGroup=ibSmaMFTGroup, ibSmaSwEnhancedPort0=ibSmaSwEnhancedPort0, ibSmaHiPriNIndex=ibSmaHiPriNIndex, ibSmaSwLidsPerPort=ibSmaSwLidsPerPort, ibSmaLedGroup=ibSmaLedGroup, ibSmaNodeGroup=ibSmaNodeGroup, ibSmaPortSubnetTimeout=ibSmaPortSubnetTimeout, ibSmaSL2VLMapEntry=ibSmaSL2VLMapEntry, ibSmaSlToVlMapInfo=ibSmaSlToVlMapInfo, ibSmaPortInitPreservePresReply=ibSmaPortInitPreservePresReply, ibSmaBasicNodeCompliance=ibSmaBasicNodeCompliance, ibSmaMulDestDLIDIndex=ibSmaMulDestDLIDIndex, ibSmaMFTInfo=ibSmaMFTInfo, ibSmaBadPartitionKey=ibSmaBadPartitionKey, ibSmaCapabilityMaskModified=ibSmaCapabilityMaskModified, ibSmaNodeString=ibSmaNodeString, ibSmaSmGuid=ibSmaSmGuid, ibSmaPortLinkStateChange=ibSmaPortLinkStateChange, ibSmaLowPriNIndex=ibSmaLowPriNIndex, ibSmaPortPKeyViolations=ibSmaPortPKeyViolations, ibSmaSmPriority=ibSmaSmPriority, ibSmaVirtualLane=ibSmaVirtualLane, ibSmaConformance=ibSmaConformance, ibSmaNodeGid2=ibSmaNodeGid2, ibSmaLedInfoEntry=ibSmaLedInfoEntry, ibSmaPortIsSnmpTunnelSupported=ibSmaPortIsSnmpTunnelSupported, ibSmaGuidInfo=ibSmaGuidInfo, ibSmaPKeyEntry=ibSmaPKeyEntry, ibSmaSwRandomFdbTableNum=ibSmaSwRandomFdbTableNum, ibSmaLowPriVirtLane=ibSmaLowPriVirtLane, ibSmaPortHeadOfQueueLife=ibSmaPortHeadOfQueueLife, ibSmaPortLinkWidthActive=ibSmaPortLinkWidthActive, ibSmaRFTGroup=ibSmaRFTGroup, ibSmaSwitchInfo=ibSmaSwitchInfo, ibSmaNodeAttributeModifier=ibSmaNodeAttributeModifier, ibSmaSL2VLMapTable=ibSmaSL2VLMapTable, ibSmaPortLinkSpeedSupported=ibSmaPortLinkSpeedSupported, ibSmaObjects=ibSmaObjects, ibSmaDataPortGroup=ibSmaDataPortGroup, ibSmaPortIsCommManageSupported=ibSmaPortIsCommManageSupported, ibSmaVLArbitInfo=ibSmaVLArbitInfo, ibSmaNodeLid2=ibSmaNodeLid2, ibSmaPortIsPKeyNvram=ibSmaPortIsPKeyNvram, ibSmaPortOverrunErrorThreshold=ibSmaPortOverrunErrorThreshold, ibSmaBadPKeyAtSwitchPort=ibSmaBadPKeyAtSwitchPort, ibSmaNotifications=ibSmaNotifications, ibSmaPortIsCapMaskNoticSupported=ibSmaPortIsCapMaskNoticSupported, ibSmaSwDefMcastNotPriPort=ibSmaSwDefMcastNotPriPort, ibSmaGuidInfoTable=ibSmaGuidInfoTable, ibSmaSwOutboundEnforceCap=ibSmaSwOutboundEnforceCap, ibSmaNodeQueuePair1=ibSmaNodeQueuePair1, ibSmaSwLinearFdbTableNum=ibSmaSwLinearFdbTableNum, ibSmaPortPartEnforceOutbound=ibSmaPortPartEnforceOutbound, ibSmaPortIsMKeyNvram=ibSmaPortIsMKeyNvram, ibSmaPortIsNoticeSupported=ibSmaPortIsNoticeSupported, ibSmaMulForTable=ibSmaMulForTable, ibSmaGuidPortIndex=ibSmaGuidPortIndex, ibSmaNodeServiceLevel=ibSmaNodeServiceLevel, ibSmaPortVlArbLowCapacity=ibSmaPortVlArbLowCapacity, ibSmaPortInfoTable=ibSmaPortInfoTable, ibSmaPKeyGroup=ibSmaPKeyGroup, ibSmaPortIsAutoMigrateSupported=ibSmaPortIsAutoMigrateSupported, ibSmaRandomLMC=ibSmaRandomLMC, ibSmaNodePortNum=ibSmaNodePortNum, ibSmaNodeSwitchLid=ibSmaNodeSwitchLid, ibSmaExcessBuffOverrunThres=ibSmaExcessBuffOverrunThres, ibSmaNodeCapMask=ibSmaNodeCapMask, ibSmaLedInfo=ibSmaLedInfo, ibSmaPortVirtLaneSupport=ibSmaPortVirtLaneSupport, ibSmaPortPartEnforceInbound=ibSmaPortPartEnforceInbound, ibSmaSmState=ibSmaSmState, ibSmaNodeMethod=ibSmaNodeMethod, ibSmaPortIsTrapSupported=ibSmaPortIsTrapSupported)
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name : ecc Description : Author : x3nny date : 2021/10/7 ------------------------------------------------- Change Activity: 2021/10/7: Init ------------------------------------------------- """ __author__ = 'x3nny'
""" ------------------------------------------------- File Name : ecc Description : Author : x3nny date : 2021/10/7 ------------------------------------------------- Change Activity: 2021/10/7: Init ------------------------------------------------- """ __author__ = 'x3nny'
def phone_number(num): string = [(str(x)) for x in num] string = ''.join(string) return f'({string[:3]}) {string[3:6]}-{string[6:]}' print(phone_number([1,2,3,4,5,6,7,8,9,0]))
def phone_number(num): string = [str(x) for x in num] string = ''.join(string) return f'({string[:3]}) {string[3:6]}-{string[6:]}' print(phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))
""" Sermin exceptions """ class RunError(Exception): """ Sermin error during a blueprint run """ pass class ShellError(RunError): """ Sermin shell command failed """ pass
""" Sermin exceptions """ class Runerror(Exception): """ Sermin error during a blueprint run """ pass class Shellerror(RunError): """ Sermin shell command failed """ pass
freeze_as_mpy('$(MPY_DIR)/tools', 'upip.py') freeze_as_mpy('$(MPY_DIR)/tools', 'upip_utarfile.py', opt=3) freeze('$(MPY_DIR)/lib/lv_bindings/driver/linux', 'evdev.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'lv_colors.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'async_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'display_driver_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'imagetools.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'fs_driver.py')
freeze_as_mpy('$(MPY_DIR)/tools', 'upip.py') freeze_as_mpy('$(MPY_DIR)/tools', 'upip_utarfile.py', opt=3) freeze('$(MPY_DIR)/lib/lv_bindings/driver/linux', 'evdev.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'lv_colors.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'async_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'display_driver_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'imagetools.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'fs_driver.py')
NAME='fastrouter' CFLAGS = [] LDFLAGS = [] LIBS = [] REQUIRES = ['corerouter'] GCC_LIST = ['fastrouter']
name = 'fastrouter' cflags = [] ldflags = [] libs = [] requires = ['corerouter'] gcc_list = ['fastrouter']
# implicit conversion num_int=123 num_float=1.23 result=num_int+num_float print('datatype of num_int is',type(num_int)) print('datatype of num_float is',type(num_float)) print('datatype of result is',type(result)) # it automatically converts int to float to avoid data loss
num_int = 123 num_float = 1.23 result = num_int + num_float print('datatype of num_int is', type(num_int)) print('datatype of num_float is', type(num_float)) print('datatype of result is', type(result))