Skip to content

Commit

Permalink
Rename dpu_name to module_name to address the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolam committed Sep 25, 2024
1 parent 960f63f commit 44b6e53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions sonic_platform_base/module_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,26 +262,26 @@ def get_state_info(self):
"""
raise NotImplementedError

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

def pci_detach_dpu(self, dpu_name):
def pci_detach_dpu(self, module_name):
"""
Detaches the DPU PCI device specified by "dpu_name" on a SmartSwitch.
Detaches the DPU PCI device specified by "module_name" on a SmartSwitch.
Returns: True once the PCI is successfully detached.
"""
raise NotImplementedError

def pci_reattach_dpu(self, dpu_name):
def pci_reattach_dpu(self, module_name):
"""
Rescans and reconnects the DPU PCI device specified by "dpu_name" on a SmartSwitch.
Rescans and reconnects the DPU PCI device specified by "module_name" on a SmartSwitch.
Returns: True once the PCI is successfully reconnected.
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/module_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def test_module_base(self):
[module.get_dpu_id],
[module.get_reboot_cause],
[module.get_state_info],
[module.get_dpu_bus_info, "dpu_name"],
[module.pci_detach_dpu, "dpu_name"],
[module.pci_reattach_dpu, "dpu_name"],
[module.get_bus_info, "module_name"],
[module.pci_detach_dpu, "module_name"],
[module.pci_reattach_dpu, "module_name"],
]

for method in not_implemented_methods:
Expand Down

0 comments on commit 44b6e53

Please sign in to comment.