Skip to content

Commit

Permalink
Fixing bug related to Huawei SmartAX template description
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 committed Jan 21, 2025
1 parent 5455e9f commit cc318d9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Value Required FSP (\w+\/\s\w+\/\w+)
Value Required,Key FSP (\w+\/\s\w+\/\w+)
Value Key ONT_ID (\d+)
Value SERIAL_NUMBER ([A-Z0-9]{16})
Value CONTROL_FLAG (active|deactive|configuring)
Expand All @@ -11,11 +11,17 @@ Start
^\s+-
^\s+F\/S\/P\s+ONT\s+SN\s+Control\s+Run\s+Config\s+Match\s+Protect
^\s+ID\s+flag\s+state\s+state\s+state\s+side -> SNs
^.\s*$$ -> Error
^. -> Error

SNs
^\s+-
^\s*${FSP}\s*${ONT_ID}\s*${SERIAL_NUMBER}\s*${CONTROL_FLAG}\s*(-|${RUN_STATE})\s*(-|${CONFIG_STATE})\s*(-|${MATCH_STATE})\s*${PROTECT_SIDE}\s* -> Record
^\s*-
^\s*F\/S\/P\s+(ONT|ONT-ID)\s+Description
^\s*F\/S\/P\s+(ONT|ONT-ID)\s+Description -> Descriptions
^\s*$$
^.-> Error

Descriptions
^\s+-
^\s+\w+\/\s\w+\/\w+\s+\d+\s+.+?\s*$$
^\s+In\s+port\s+\w+\/\s*\w+\/\w+\s*,\s+the\s+total(\s*number)?\s+of\s+ONTs\s+(is|are):\s+\w+(\,\s*online:\s*\w+)?(\,\s*offline:\s*\w+)? -> Start
^. -> Error
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
Value Required FSP (\w+\/\s\w+\/\w+)
Value Key,Required FSP (\w+\/\s\w+\/\w+)
Value Key ONT_ID (\d+)
Value DESCRIPTION (.+?)


Start
^\s+F\/S\/P\s+(ONT|ONT-ID)\s+Description -> Descriptions
^\s+-
^\s+F\/S\/P\s+ONT\s+SN\s+Control\s+Run\s+Config\s+Match\s+Protect
^\s+ID\s+flag\s+state\s+state\s+state\s+side -> SNs
^. -> Error

SNs
^\s+-
^\s*\w+\/\s\w+\/\w+\s*\d+\s*([A-Z0-9]{16})\s*(active|deactive|configuring)\s*(-|online|offline)\s*(-|normal|mismatch|failing|online|initial)\s*(-|initial|mismatch|match)\s*(no|yes)\s*
^\s*F\/S\/P\s+(ONT|ONT-ID)\s+Description -> Descriptions
^\s*$$
^.-> Error

Descriptions
^\s+ID
^\s+-
^\s+${FSP}\s+${ONT_ID}\s+${DESCRIPTION}\s*$$ -> Record
^\s+In\s+port\s+\w+\/\s*\w+\/\w+\s*,\s+the\s+total(\s*number)?\s+of\s+ONTs\s+(is|are):\s+\w+(\,\s*online:\s*\w+)?(\,\s*offline:\s*\w+)? -> EOF
^. -> Error
^\s+${FSP}\s+${ONT_ID}\s+${DESCRIPTION}\s*$$
^\s+In\s+port\s+\w+\/\s*\w+\/\w+\s*,\s+the\s+total(\s*number)?\s+of\s+ONTs\s+(is|are):\s+\w+(\,\s*online:\s*\w+)?(\,\s*offline:\s*\w+)? -> Start
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
parsed_sample:
- config_state: "normal"
control_flag: "active"
description: "The boiling consignment budgets."
description: ""
fsp: "0/ 1/0"
match_state: "match"
ont_id: "0"
Expand All @@ -11,7 +11,7 @@ parsed_sample:
serial_number: "46VBSM4LFW7QLGAV"
- config_state: "normal"
control_flag: "active"
description: "The boiling consignment budgets."
description: "ONT_NO_DESCRIPTION"
fsp: "0/ 1/2"
match_state: "match"
ont_id: "0"
Expand Down

0 comments on commit cc318d9

Please sign in to comment.