Skip to content

Commit

Permalink
Fix 'show platform eeprom' on virtual switch (#794)
Browse files Browse the repository at this point in the history
add kvm to platforms which do not support syseeprom db and check for the 'read_syseeprom_db' method availibilty to avoid same issue on other platforms
  • Loading branch information
borys-karpliak authored Feb 4, 2020
1 parent 34b5819 commit 1fc2c3d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/decode-syseeprom
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def main():

platform_path = '/'.join([PLATFORM_ROOT, platform])

# Currently, don't support eeprom db on Arista platform
if 'arista' in platform_path:
support_eeprom_db = False
#
# Currently we only support board eeprom decode.
#
Expand All @@ -55,6 +52,12 @@ def main():
class_ = getattr(m, 'board')
t = class_('board', '','','')

# Currently, don't support eeprom db on Arista platform
platforms_without_eeprom_db = ['arista', 'kvm']
if any(platform in platform_path for platform in platforms_without_eeprom_db)\
or t.getattr('read_eeprom_db', None) == None:
support_eeprom_db = False

#
# execute the command
#
Expand Down

0 comments on commit 1fc2c3d

Please sign in to comment.