-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #867 from agandl046/iosxr-show-platform
Adds support for IN-RESET and SW_INACTIVE state to iosxr ShowPlatform
- Loading branch information
Showing
6 changed files
with
186 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
changelog/undistributed/changelog_show_platform_iosxr_20240710132134.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-------------------------------------------------------------------------------- | ||
Fix | ||
-------------------------------------------------------------------------------- | ||
* IOSXR | ||
* Modified ShowPlatform: | ||
* Updated regex pattern p1 to allow for both IN-RESET and SW_INACTIVE as valid states. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/genie/libs/parser/iosxr/tests/ShowPlatform/cli/equal/golden_output8_expected.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
expected_output = { | ||
"slot": { | ||
"rp": { | ||
"0/RSP0": { | ||
"name": "A9K-RSP440-SE", | ||
"full_slot": "0/RSP0/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "PWR,NSHUT,MON", | ||
"redundancy_state": "Active", | ||
}, | ||
"0/RSP1": { | ||
"name": "A9K-RSP440-SE", | ||
"full_slot": "0/RSP1/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "PWR,NSHUT,MON", | ||
"redundancy_state": "Standby", | ||
}, | ||
}, | ||
"lc": { | ||
"0/0": { | ||
"name": "A9K-24x10GE-TR", | ||
"full_slot": "0/0/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "PWR,NSHUT,MON", | ||
}, | ||
"0/1": { | ||
"name": "A9K-2T20GE-L", | ||
"full_slot": "0/1/CPU0", | ||
"state": "IN-RESET", | ||
"config_state": "PWR,NSHUT,MON", | ||
}, | ||
"0/2": { | ||
"name": "A9K-24x10GE-TR", | ||
"full_slot": "0/2/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "PWR,NSHUT,MON", | ||
}, | ||
"0/3": { | ||
"name": "A9K-2x100GE-TR", | ||
"full_slot": "0/3/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "PWR,NSHUT,MON", | ||
}, | ||
}, | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/genie/libs/parser/iosxr/tests/ShowPlatform/cli/equal/golden_output8_output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Tue Jul 2 15:22:55.819 EST | ||
Node Type State Config State | ||
----------------------------------------------------------------------------- | ||
0/RSP0/CPU0 A9K-RSP440-SE(Active) IOS XR RUN PWR,NSHUT,MON | ||
0/RSP1/CPU0 A9K-RSP440-SE(Standby) IOS XR RUN PWR,NSHUT,MON | ||
0/0/CPU0 A9K-24x10GE-TR IOS XR RUN PWR,NSHUT,MON | ||
0/1/CPU0 A9K-2T20GE-L IN-RESET PWR,NSHUT,MON | ||
0/2/CPU0 A9K-24x10GE-TR IOS XR RUN PWR,NSHUT,MON | ||
0/3/CPU0 A9K-2x100GE-TR IOS XR RUN PWR,NSHUT,MON |
102 changes: 102 additions & 0 deletions
102
src/genie/libs/parser/iosxr/tests/ShowPlatform/cli/equal/golden_output9_expected.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
expected_output = { | ||
"slot": { | ||
"rp": { | ||
"0/RSP0": { | ||
"name": "A9K-RSP5-SE", | ||
"full_slot": "0/RSP0/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "NSHUT", | ||
"redundancy_state": "Active", | ||
}, | ||
"0/RSP1": { | ||
"name": "A9K-RSP5-SE", | ||
"full_slot": "0/RSP1/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "NSHUT", | ||
"redundancy_state": "Standby", | ||
}, | ||
}, | ||
"oc": { | ||
"0/FT0": { | ||
"name": "ASR-9910-FAN", | ||
"full_slot": "0/FT0", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FT1": { | ||
"name": "ASR-9910-FAN", | ||
"full_slot": "0/FT1", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FC0": { | ||
"name": "A99-SFC3-S", | ||
"full_slot": "0/FC0", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FC1": { | ||
"name": "A99-SFC3-S", | ||
"full_slot": "0/FC1", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FC2": { | ||
"name": "A99-SFC3-S", | ||
"full_slot": "0/FC2", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FC3": { | ||
"name": "A99-SFC3-S", | ||
"full_slot": "0/FC3", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/FC4": { | ||
"name": "A99-SFC3-S", | ||
"full_slot": "0/FC4", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/PT0": { | ||
"name": "A9K-DC-PEM-V3", | ||
"full_slot": "0/PT0", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/PT1": { | ||
"name": "A9K-DC-PEM-V3", | ||
"full_slot": "0/PT1", | ||
"state": "OPERATIONAL", | ||
"config_state": "NSHUT", | ||
}, | ||
}, | ||
"lc": { | ||
"0/1": { | ||
"name": "A9K-MOD400-TR", | ||
"full_slot": "0/1/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/3": { | ||
"name": "A99-32X100GE-CM", | ||
"full_slot": "0/3", | ||
"state": "SW_INACTIVE", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/5": { | ||
"name": "A9K-MOD400-TR", | ||
"full_slot": "0/5/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "NSHUT", | ||
}, | ||
"0/6": { | ||
"name": "A99-32X100GE-TR", | ||
"full_slot": "0/6/CPU0", | ||
"state": "IOS XR RUN", | ||
"config_state": "NSHUT", | ||
}, | ||
}, | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/genie/libs/parser/iosxr/tests/ShowPlatform/cli/equal/golden_output9_output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Thu Jun 27 13:14:00.563 UTC | ||
Node Type State Config state | ||
-------------------------------------------------------------------------------- | ||
0/RSP0/CPU0 A9K-RSP5-SE(Active) IOS XR RUN NSHUT | ||
0/RSP1/CPU0 A9K-RSP5-SE(Standby) IOS XR RUN NSHUT | ||
0/FT0 ASR-9910-FAN OPERATIONAL NSHUT | ||
0/FT1 ASR-9910-FAN OPERATIONAL NSHUT | ||
0/1/CPU0 A9K-MOD400-TR IOS XR RUN NSHUT | ||
0/1/0 A9K-MPA-20X10GE OK | ||
0/1/1 A9K-MPA-20X10GE OK | ||
0/3 A99-32X100GE-CM SW_INACTIVE NSHUT | ||
0/5/CPU0 A9K-MOD400-TR IOS XR RUN NSHUT | ||
0/5/0 A9K-MPA-20X10GE OK | ||
0/5/1 A9K-MPA-20X10GE OK | ||
0/6/CPU0 A99-32X100GE-TR IOS XR RUN NSHUT | ||
0/FC0 A99-SFC3-S OPERATIONAL NSHUT | ||
0/FC1 A99-SFC3-S OPERATIONAL NSHUT | ||
0/FC2 A99-SFC3-S OPERATIONAL NSHUT | ||
0/FC3 A99-SFC3-S OPERATIONAL NSHUT | ||
0/FC4 A99-SFC3-S OPERATIONAL NSHUT | ||
0/PT0 A9K-DC-PEM-V3 OPERATIONAL NSHUT | ||
0/PT1 A9K-DC-PEM-V3 OPERATIONAL NSHUT |