Skip to content

Commit

Permalink
Add negative case for pci_detach()
Browse files Browse the repository at this point in the history
Also, remove module_name from pci_detach() and get_bus_info()
  • Loading branch information
vvolam committed Nov 4, 2024
1 parent daeed65 commit 1f59217
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions sonic_platform_base/module_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,28 +262,22 @@ def get_state_info(self):
"""
raise NotImplementedError

def get_bus_info(self, module_name):
def get_bus_info(self):
"""
Retrieves the bus information for the specified by "module_name" on a SmartSwitch.
Retrieves the bus information. Returns None for non-smartswitch chassis.
Returns:
Returns the PCI bus information in BDF format like "[DDDD:]BB:SS:F"
"""
raise NotImplementedError

def pci_detach(self, module_name):
def pci_detach(self):
"""
Detaches the DPU PCI device specified by "module_name" on a SmartSwitch.
Returns False for non-smartswitch chassis.
Returns: True once the PCI is successfully detached.
"""
raise NotImplementedError

def pci_reattach(self, module_name):
"""
Rescans and reconnects the DPU PCI device specified by "module_name" on a SmartSwitch.
Returns: True once the PCI is successfully reconnected.
Returns False if PCI detachment fails or specified 'module_name' is not found.
"""
raise NotImplementedError

Expand Down

0 comments on commit 1f59217

Please sign in to comment.