@@ -50,6 +50,8 @@ class ModuleBase(device_base.DeviceBase):
50
50
MODULE_REBOOT_CPU_COMPLEX = "CPU"
51
51
# Module reboot type to reboot FPGA complex
52
52
MODULE_REBOOT_FPGA_COMPLEX = "FPGA"
53
+ # Module reboot type to reboot DPU
54
+ MODULE_REBOOT_DPU = "DPU"
53
55
54
56
def __init__ (self ):
55
57
# List of ComponentBase-derived objects representing all components
@@ -166,7 +168,9 @@ def reboot(self, reboot_type):
166
168
Args:
167
169
reboot_type: A string, the type of reboot requested from one of the
168
170
predefined reboot types: MODULE_REBOOT_DEFAULT, MODULE_REBOOT_CPU_COMPLEX,
169
- or MODULE_REBOOT_FPGA_COMPLEX
171
+ MODULE_REBOOT_FPGA_COMPLEX or MODULE_REBOOT_DPU
172
+
173
+ MODULE_REBOOT_DPU is only applicable for smartswitch chassis.
170
174
171
175
Returns:
172
176
bool: True if the request has been issued successfully, False if not
@@ -258,6 +262,31 @@ def get_state_info(self):
258
262
"""
259
263
raise NotImplementedError
260
264
265
+ def get_bus_info (self , module_name ):
266
+ """
267
+ Retrieves the bus information for the specified by "module_name" on a SmartSwitch.
268
+
269
+ Returns:
270
+ Returns the PCI bus information in BDF format like "[DDDD:]BB:SS:F"
271
+ """
272
+ raise NotImplementedError
273
+
274
+ def pci_detach (self , module_name ):
275
+ """
276
+ Detaches the DPU PCI device specified by "module_name" on a SmartSwitch.
277
+
278
+ Returns: True once the PCI is successfully detached.
279
+ """
280
+ raise NotImplementedError
281
+
282
+ def pci_reattach (self , module_name ):
283
+ """
284
+ Rescans and reconnects the DPU PCI device specified by "module_name" on a SmartSwitch.
285
+
286
+ Returns: True once the PCI is successfully reconnected.
287
+ """
288
+ raise NotImplementedError
289
+
261
290
##############################################
262
291
# Component methods
263
292
##############################################
0 commit comments