[202012] [Arista] Add Arista eeprom platform API method to update database #8914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
Sujin noticed that Arista eeprom platform API cannot update the redis database. Although Arista and Guohan believe that database update logic should be part of the daemon, it is easy enough to implement the fix for Arista for now.
How I did it
Made Arista eeprom platform API inherit from TlvInfoDecoder, then write Arista's own visit_eeprom method.
How to verify it
I can go into redis-cli and print the key and values for the syseeprom:
127.0.0.1:6379> select 6
OK
127.0.0.1:6379[6]> hgetall EEPROM_INFO|Checksum
"Valid"
"1"
127.0.0.1:6379[6]> hgetall EEPROM_INFO|0xe
"Name"
"SerialNumber"
"Len"
"11"
"Value"
"SSJ17432422"
127.0.0.1:6379[6]> hgetall EEPROM_INFO|0x3
"Name"
"SKU"
"Len"
"14"
"Value"
"DCS-7260CX3-64"
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)