Commit 439d615
Fix asic identification (sonic-net#15297)
* sonic-mgmt: improve asic identification
Device ASIC identification is achieved by
whole line matches from the output of lspci,
which is excessive and subject to fail due to
unforeseeable changes in such output.
This change reduces the string matching to
specific unique differentiators in the output
from lspci, while also future-proofing against
similar changes in the lspci that could
foreseeably occur.
* sonic-mgmt: add th4/th5 asic identification
Add token matches for identifying the TH4 and TH5
ASICs from the output of lspci.
* sonic-mgmt: fix pre-commit issue
Fix pre-commit error introduced within the prior
two commits.1 parent b4601ad commit 439d615
1 file changed
Lines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
1759 | 1760 | | |
1760 | 1761 | | |
1761 | 1762 | | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
1762 | 1779 | | |
1763 | | - | |
| 1780 | + | |
1764 | 1781 | | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
1774 | | - | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
| 1782 | + | |
| 1783 | + | |
1779 | 1784 | | |
1780 | 1785 | | |
1781 | 1786 | | |
1782 | 1787 | | |
1783 | 1788 | | |
| 1789 | + | |
| 1790 | + | |
1784 | 1791 | | |
1785 | 1792 | | |
1786 | 1793 | | |
| |||
0 commit comments