Skip to content

Commit 3b63f6f

Browse files
authored
[kvm]: add eeprom.py for kvm image (#3637)
1 parent 9d7199a commit 3b63f6f

File tree

1 file changed

+42
-0
lines changed
  • device/virtual/x86_64-kvm_x86_64-r0/plugins

1 file changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env python
2+
3+
#############################################################################
4+
# SONiC Virtual switch platform
5+
#
6+
#############################################################################
7+
8+
class board():
9+
10+
def __init__(self, name, path, cpld_root, ro):
11+
return
12+
13+
def check_status(self):
14+
return "ok"
15+
16+
def is_checksum_valid(self, e):
17+
return (True, 0)
18+
19+
def read_eeprom(self):
20+
return \
21+
"""
22+
TLV Name Code Len Value
23+
-------------------- ---- --- -----
24+
Product Name 0x21 5 SONiC
25+
Part Number 0x22 6 000000
26+
Serial Number 0x23 20 0000000000000000000
27+
Base MAC Address 0x24 6 00:00:00:00:00:01
28+
Manufacture Date 0x25 19 10/19/2019 00:00:03
29+
Device Version 0x26 1 1
30+
Label Revision 0x27 3 A01
31+
Platform Name 0x28 20 x86_64-kvm_x86_64-r0
32+
ONIE Version 0x29 19 master-201811170418
33+
MAC Addresses 0x2A 2 16
34+
Vendor Name 0x2D 5 SONiC
35+
"""
36+
37+
def decode_eeprom(self, e):
38+
print e
39+
40+
def serial_number_str(self, e):
41+
"""Return service tag instead of serial number"""
42+
return "000000"

0 commit comments

Comments
 (0)