Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[device/accton] Add ssd_util plugin to AS4630-54PE, AS7326-56X, AS771…
Browse files Browse the repository at this point in the history
…6-32X, AS7816-64X

Signed-off-by: Roger Ho <roger530_ho@edge-core.com>
roger530-ho committed Aug 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 43aa42f commit c73f7f3
Showing 4 changed files with 96 additions and 0 deletions.
24 changes: 24 additions & 0 deletions device/accton/x86_64-accton_as4630_54pe-r0/plugins/ssd_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ssd_util.py
#
# Platform-specific SSD interface for SONiC
##

try:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as MainSsdUtil
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

NOT_AVAILABLE = "N/A"

class SsdUtil(MainSsdUtil):
"""Platform-specific SsdUtil class"""

def __init__(self, diskdev):
super(SsdUtil, self).__init__(diskdev)

# If it has no vendor tool to read SSD information,
# ssd_util.py will use generic SSD information
# for vendor SSD information.
if self.vendor_ssd_info == NOT_AVAILABLE:
self.vendor_ssd_info = self.ssd_info

24 changes: 24 additions & 0 deletions device/accton/x86_64-accton_as7326_56x-r0/plugins/ssd_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ssd_util.py
#
# Platform-specific SSD interface for SONiC
##

try:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as MainSsdUtil
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

NOT_AVAILABLE = "N/A"

class SsdUtil(MainSsdUtil):
"""Platform-specific SsdUtil class"""

def __init__(self, diskdev):
super(SsdUtil, self).__init__(diskdev)

# If it has no vendor tool to read SSD information,
# ssd_util.py will use generic SSD information
# for vendor SSD information.
if self.vendor_ssd_info == NOT_AVAILABLE:
self.vendor_ssd_info = self.ssd_info

24 changes: 24 additions & 0 deletions device/accton/x86_64-accton_as7716_32x-r0/plugins/ssd_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ssd_util.py
#
# Platform-specific SSD interface for SONiC
##

try:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as MainSsdUtil
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

NOT_AVAILABLE = "N/A"

class SsdUtil(MainSsdUtil):
"""Platform-specific SsdUtil class"""

def __init__(self, diskdev):
super(SsdUtil, self).__init__(diskdev)

# If it has no vendor tool to read SSD information,
# ssd_util.py will use generic SSD information
# for vendor SSD information.
if self.vendor_ssd_info == NOT_AVAILABLE:
self.vendor_ssd_info = self.ssd_info

24 changes: 24 additions & 0 deletions device/accton/x86_64-accton_as7816_64x-r0/plugins/ssd_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ssd_util.py
#
# Platform-specific SSD interface for SONiC
##

try:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as MainSsdUtil
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

NOT_AVAILABLE = "N/A"

class SsdUtil(MainSsdUtil):
"""Platform-specific SsdUtil class"""

def __init__(self, diskdev):
super(SsdUtil, self).__init__(diskdev)

# If it has no vendor tool to read SSD information,
# ssd_util.py will use generic SSD information
# for vendor SSD information.
if self.vendor_ssd_info == NOT_AVAILABLE:
self.vendor_ssd_info = self.ssd_info

0 comments on commit c73f7f3

Please sign in to comment.