Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junos show_chassis_hardware simplify regex #1722

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
Value CHASSIS_SERIAL_NUMBER (\w+)
Value CHASSIS_DESCRIPTION (.*)
Value MID_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value MID_PART (\w+-\w+|\w+)
Value MID_PART (\S+)
Value MID_SERIAL_NUMBER (\w+)
Value MID_DESCRIPTION (.*)
Value FPM_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value FPM_PART (\w+-\w+|\w+)
Value FPM_PART (\S+)
Value FPM_SERIAL_NUMBER (\w+)
Value FPM_DESCRIPTION (.*)
Value PS_NUMBER (\d+|)
Value PS_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value PS_PART (\w+-\w+|\w+)
Value PS_PART (\S+)
Value PS_SERIAL_NUMBER (\w+)
Value PS_DESCRIPTION (.*)
Value RE_NUMBER (\d+|)
Value RE_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value RE_PART (\w+-\w+|\w+)
Value RE_PART (\S+)
Value RE_SERIAL_NUMBER (\w+)
Value RE_DESCRIPTION (.*)
Value TFEB_NUMBER (\d+|)
Value TFEB_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value TFEB_PART (\w+-\w+|\w+)
Value TFEB_PART (\S+)
Value TFEB_SERIAL_NUMBER (\w+)
Value TFEB_DESCRIPTION (.*)
Value QXM_NUMBER (\d+|)
Value QXM_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value QXM_PART (\w+-\w+|\w+)
Value QXM_PART (\S+)
Value QXM_SERIAL_NUMBER (\w+)
Value QXM_DESCRIPTION (.*)
Value AFEB_NUMBER (\d+|)
Value AFEB_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value AFEB_PART (\w+-\w+|\w+)
Value AFEB_PART (\S+)
Value AFEB_SERIAL_NUMBER (\w+)
Value AFEB_DESCRIPTION (.*)
Value CB_NUMBER (\d+|)
Value CB_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value CB_PART (\w+-\w+|\w+)
Value CB_PART (\S+)
Value CB_SERIAL_NUMBER (\w+)
Value CB_DESCRIPTION (.*)
Value Filldown FPC_NUMBER (\d+|)
Value Filldown FPC_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value Filldown FPC_PART (\w+-\w+|\w+)
Value Filldown FPC_PART (\S+)
Value Filldown FPC_SERIAL_NUMBER (\w+)
Value Filldown FPC_DESCRIPTION (.*)
Value Filldown CPU_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value Filldown CPU_PART (\w+-\w+|\w+)
Value Filldown CPU_PART (\S+)
Value Filldown CPU_SERIAL_NUMBER (\w+)
Value Filldown CPU_DESCRIPTION (.*)
Value Filldown MIC_NUMBER (\d+|)
Value Filldown MIC_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value Filldown MIC_PART (\w+-\w+|\w+)
Value Filldown MIC_PART (\S+)
Value Filldown MIC_SERIAL_NUMBER (\w+)
Value Filldown MIC_DESCRIPTION (.*)
Value Filldown PIC_NUMBER (\d+|)
Value Filldown PIC_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value Filldown PIC_PART (\w+-\w+|\w+)
Value Filldown PIC_PART (\S+)
Value Filldown PIC_SERIAL_NUMBER (\w+)
Value Filldown PIC_DESCRIPTION (.*)
Value XCVR_NUMBER (\d+|)
Value XCVR_VERSION ([RrEeVv]+\s+\d+|]|[RrEeVv]+|)
Value XCVR_PART (\w+-\w+|\w+)
Value XCVR_SERIAL_NUMBER (\w+)
Value XCVR_PART (\S+)
Value XCVR_SERIAL_NUMBER (\S+)
Value XCVR_DESCRIPTION (.*)
Value FAN_NUMBER (\d+|)
Value FAN_VERSION ([RrEeVv]+\s+\d+|)
Expand All @@ -83,7 +83,7 @@ Start
^\s*CPU\s+${CPU_VERSION}\s+${CPU_PART}\s+${CPU_SERIAL_NUMBER}\s+${CPU_DESCRIPTION}$$
^\s*MIC\s+${MIC_NUMBER}\s+${MIC_VERSION}\s+${MIC_PART}\s+${MIC_SERIAL_NUMBER}\s+${MIC_DESCRIPTION}$$
^\s*PIC\s+${PIC_NUMBER}\s+${PIC_VERSION}\s+${PIC_PART}\s+${PIC_SERIAL_NUMBER}\s+${PIC_DESCRIPTION}$$
^\s*Xcvr\s+${XCVR_NUMBER}\s+${XCVR_VERSION}\s+${XCVR_PART}\s+${XCVR_SERIAL_NUMBER}\s+${XCVR_DESCRIPTION} -> Record
^\s*Xcvr\s+${XCVR_NUMBER}\s+(?:${XCVR_VERSION}\s+)?${XCVR_PART}\s+${XCVR_SERIAL_NUMBER}\s+${XCVR_DESCRIPTION} -> Record
^\s*(PEM|Power\s+Supply) -> Continue.Clearall
^\s*(PEM|Power\s+Supply)\s+${PS_NUMBER}\s+${PS_VERSION}\s+${PS_PART}\s+${PS_SERIAL_NUMBER}\s+${PS_DESCRIPTION}$$ -> Record
^\s*(Fan|Fan\sTray) -> Continue.Clearall
Expand Down
Loading
Loading