@@ -602,6 +602,7 @@ def check_if_link_is_active_for_torB(physical_port):
602
602
return False
603
603
604
604
605
+ @hook_y_cable_simulator
605
606
def enable_prbs_mode (physical_port , target , mode_value , lane_map ):
606
607
"""
607
608
This API specifically configures and enables the PRBS mode/type depending upon the mode_value the user provides.
@@ -674,6 +675,7 @@ def enable_prbs_mode(physical_port, target, mode_value, lane_map):
674
675
return result
675
676
676
677
678
+ @hook_y_cable_simulator
677
679
def disable_prbs_mode (physical_port , target ):
678
680
"""
679
681
This API specifically disables the PRBS mode on the physcial port.
@@ -724,6 +726,7 @@ def disable_prbs_mode(physical_port, target):
724
726
return result
725
727
726
728
729
+ @hook_y_cable_simulator
727
730
def enable_loopback_mode (physical_port , target , lane_map ):
728
731
"""
729
732
This API specifically configures and enables the Loopback mode on the port user provides.
@@ -781,6 +784,7 @@ def enable_loopback_mode(physical_port, target, lane_map):
781
784
return result
782
785
783
786
787
+ @hook_y_cable_simulator
784
788
def disable_loopback_mode (physical_port , target ):
785
789
"""
786
790
This API specifically disables the Loopback mode on the port user provides.
@@ -834,6 +838,7 @@ def disable_loopback_mode(physical_port, target):
834
838
return result
835
839
836
840
841
+ @hook_y_cable_simulator
837
842
def get_ber_info (physical_port , target ):
838
843
"""
839
844
This API specifically returns the BER (Bit error rate) value for a specfic port.
@@ -912,6 +917,7 @@ def get_ber_info(physical_port, target):
912
917
return ber_result
913
918
914
919
920
+ @hook_y_cable_simulator
915
921
def get_eye_info (physical_port , target ):
916
922
"""
917
923
This API specifically returns the EYE height value for a specfic port.
@@ -989,6 +995,7 @@ def get_eye_info(physical_port, target):
989
995
return eye_result
990
996
991
997
998
+ @hook_y_cable_simulator
992
999
def get_part_number (physical_port ):
993
1000
"""
994
1001
This API specifically returns the part number of the Y cable for a specfic port.
@@ -1015,6 +1022,7 @@ def get_part_number(physical_port):
1015
1022
return part_number
1016
1023
1017
1024
1025
+ @hook_y_cable_simulator
1018
1026
def get_vendor (physical_port ):
1019
1027
"""
1020
1028
This API specifically returns the vendor name of the Y cable for a specfic port.
@@ -1041,6 +1049,7 @@ def get_vendor(physical_port):
1041
1049
return vendor_name
1042
1050
1043
1051
1052
+ @hook_y_cable_simulator
1044
1053
def get_switch_count (physical_port , count_type ):
1045
1054
"""
1046
1055
This API specifically returns the switch count to change the Active TOR which has
@@ -1089,6 +1098,7 @@ def get_switch_count(physical_port, count_type):
1089
1098
return count
1090
1099
1091
1100
1101
+ @hook_y_cable_simulator
1092
1102
def get_target_cursor_values (physical_port , lane , target ):
1093
1103
"""
1094
1104
This API specifically returns the cursor equalization parameters for a target(NIC, TOR1, TOR2).
@@ -1145,6 +1155,7 @@ def get_target_cursor_values(physical_port, lane, target):
1145
1155
return result
1146
1156
1147
1157
1158
+ @hook_y_cable_simulator
1148
1159
def check_if_nic_lanes_active (physical_port ):
1149
1160
"""
1150
1161
This API specifically returns the byte value which denotes which nic lanes
@@ -1175,6 +1186,7 @@ def check_if_nic_lanes_active(physical_port):
1175
1186
return result
1176
1187
1177
1188
1189
+ @hook_y_cable_simulator
1178
1190
def get_firmware_version (physical_port , target ):
1179
1191
1180
1192
data = bytearray (FIRMWARE_INFO_PAYLOAD_SIZE )
@@ -1226,6 +1238,7 @@ def get_firmware_version(physical_port, target):
1226
1238
return result
1227
1239
1228
1240
1241
+ @hook_y_cable_simulator
1229
1242
def get_internal_voltage_temp (physical_port ):
1230
1243
1231
1244
curr_offset = OFFSET_INTERNAL_TEMPERATURE
@@ -1250,6 +1263,7 @@ def get_internal_voltage_temp(physical_port):
1250
1263
return temp , voltage
1251
1264
1252
1265
1266
+ @hook_y_cable_simulator
1253
1267
def get_nic_voltage_temp (physical_port ):
1254
1268
1255
1269
curr_offset = OFFSET_NIC_TEMPERATURE
@@ -1274,6 +1288,7 @@ def get_nic_voltage_temp(physical_port):
1274
1288
return temp , voltage
1275
1289
1276
1290
1291
+ @hook_y_cable_simulator
1277
1292
def get_local_temperature (physical_port ):
1278
1293
1279
1294
curr_offset = OFFSET_INTERNAL_TEMPERATURE
@@ -1289,6 +1304,7 @@ def get_local_temperature(physical_port):
1289
1304
return temp
1290
1305
1291
1306
1307
+ @hook_y_cable_simulator
1292
1308
def get_local_voltage (physical_port ):
1293
1309
1294
1310
if platform_chassis is not None :
@@ -1308,6 +1324,7 @@ def get_local_voltage(physical_port):
1308
1324
return voltage
1309
1325
1310
1326
1327
+ @hook_y_cable_simulator
1311
1328
def get_nic_temperature (physical_port ):
1312
1329
1313
1330
curr_offset = OFFSET_NIC_TEMPERATURE
@@ -1323,6 +1340,7 @@ def get_nic_temperature(physical_port):
1323
1340
return temp
1324
1341
1325
1342
1343
+ @hook_y_cable_simulator
1326
1344
def get_nic_voltage (physical_port ):
1327
1345
1328
1346
curr_offset = OFFSET_NIC_VOLTAGE
@@ -1342,6 +1360,7 @@ def get_nic_voltage(physical_port):
1342
1360
return voltage
1343
1361
1344
1362
1363
+ @hook_y_cable_simulator
1345
1364
def download_firmware (physical_port , fwfile ):
1346
1365
""" This routine should download and store the firmware on all the
1347
1366
components of the Y cable of the port specified.
@@ -1371,6 +1390,7 @@ def download_firmware(physical_port, fwfile):
1371
1390
return FIRMWARE_DOWNLOAD_SUCCESS
1372
1391
1373
1392
1393
+ @hook_y_cable_simulator
1374
1394
def activate_firmware (physical_port ):
1375
1395
""" This routine should activate the downloaded firmware on all the
1376
1396
components of the Y cable of the port specified.
@@ -1392,6 +1412,7 @@ def activate_firmware(physical_port):
1392
1412
return FIRMWARE_ACTIVATE_SUCCESS
1393
1413
1394
1414
1415
+ @hook_y_cable_simulator
1395
1416
def rollback_firmware (physical_port ):
1396
1417
""" This routine should rollback the firmware to the previous version
1397
1418
which was being used by the cable. This API is intended to be called when the
@@ -1410,6 +1431,7 @@ def rollback_firmware(physical_port):
1410
1431
return FIRMWARE_ROLLBACK_SUCCESS
1411
1432
1412
1433
1434
+ @hook_y_cable_simulator
1413
1435
def set_switching_mode (physical_port , mode ):
1414
1436
"""
1415
1437
This API specifically enables the auto switching or manual switching feature on the muxcable,
@@ -1456,6 +1478,8 @@ def set_switching_mode(physical_port, mode):
1456
1478
1457
1479
return result
1458
1480
1481
+
1482
+ @hook_y_cable_simulator
1459
1483
def get_switching_mode (physical_port ):
1460
1484
"""
1461
1485
This API specifically returns which type of switching mode the cable is set to auto/manual
0 commit comments