Modified status key in "show access-sessions"
Description
Modified the key in the show access-sessions parser to display the status that is shown in the command output, rather than something from a predetermined dictionary which does not indicate the status of the client.
Motivation and Context
This change was made since we had to start using show access-session instead of show authentication sessions and noticed that the status displayed was "authenticator" (role of the switch) rather than the authentication status of the client, which gave us incorrect outputs when we used parsers to check for authentication status. The show authentication sessions parser did not have this issue.
For example:
Output: Gi1/0/1 f4cf.beff.9cb1 dot1x DATA Auth 000000000000000BB6FC9EAF
Old: "status": "authenticator"
New: "status": "Auth"
Impact (If any)
Removed information about the role of the switch. This information was not present in the show authentication sessions parser, in which both commands show the same output.
Screenshots:
python3 folder_parsing_job.py -o iosxe -c ShowAccessSession
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting testcase SuperFileBasedTesting |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting section setup |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: The result of section setup is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: The result of testcase SuperFileBasedTesting is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting testcase iosxe |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting section setup |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: The result of section setup is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting section ShowAccessSession |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: : Starting STEP 1: iosxe -> ShowAccessSession :
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: : Starting STEP 1.1: Test Golden -> iosxe -> ShowAccessSession :
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: : Starting STEP 1.1.1: Gold -> iosxe -> ShowAccessSession -> golden_outp :
2023-05-16T15:51:57: %AETEST-INFO: : ut :
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: The result of STEP 1.1.1: Gold -> iosxe -> ShowAccessSession -> golden_output is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: The result of STEP 1.1: Test Golden -> iosxe -> ShowAccessSession is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: : Starting STEP 1.2: Test Empty -> iosxe -> ShowAccessSession :
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: : Starting STEP 1.2.1: Empty -> iosxe -> ShowAccessSession -> empty_outp :
2023-05-16T15:51:57: %AETEST-INFO: : ut :
2023-05-16T15:51:57: %AETEST-INFO: +..............................................................................+
2023-05-16T15:51:57: %AETEST-INFO: The result of STEP 1.2.1: Empty -> iosxe -> ShowAccessSession -> empty_output is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: The result of STEP 1.2: Test Empty -> iosxe -> ShowAccessSession is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: The result of STEP 1: iosxe -> ShowAccessSession is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: +..........................................................+
2023-05-16T15:51:57: %AETEST-INFO: : STEPS Report :
2023-05-16T15:51:57: %AETEST-INFO: +..........................................................+
2023-05-16T15:51:57: %AETEST-INFO: STEP 1 - iosxe -> ShowAccessSession Passed
2023-05-16T15:51:57: %AETEST-INFO: STEP 1.1 - Test Golden -> iosxe -> ShowAccessSessionPassed
2023-05-16T15:51:57: %AETEST-INFO: STEP 1.1.1 - Gold -> iosxe -> ShowAccessSession -> golden_outputPassed
2023-05-16T15:51:57: %AETEST-INFO: STEP 1.2 - Test Empty -> iosxe -> ShowAccessSessionPassed
2023-05-16T15:51:57: %AETEST-INFO: STEP 1.2.1 - Empty -> iosxe -> ShowAccessSession -> empty_outputPassed
2023-05-16T15:51:57: %AETEST-INFO: ............................................................
2023-05-16T15:51:57: %AETEST-INFO: The result of section ShowAccessSession is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: | Starting section cleanup |
2023-05-16T15:51:57: %AETEST-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %AETEST-INFO: The result of section cleanup is => PASSED
2023-05-16T15:51:57: %AETEST-INFO: The result of testcase iosxe is => PASSED
2023-05-16T15:51:57: %GENIE-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %GENIE-INFO: | Unittest results |
2023-05-16T15:51:57: %GENIE-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %GENIE-INFO: SECTIONS/TESTCASES RESULT
2023-05-16T15:51:57: %GENIE-INFO: --------------------------------------------------------------------------------
2023-05-16T15:51:57: %GENIE-INFO: .
2023-05-16T15:51:57: %GENIE-INFO: |-- SuperFileBasedTesting PASSED
2023-05-16T15:51:57: %GENIE-INFO: | `-- setup PASSED
2023-05-16T15:51:57: %GENIE-INFO: `-- iosxe PASSED
2023-05-16T15:51:57: %GENIE-INFO: |-- setup PASSED
2023-05-16T15:51:57: %GENIE-INFO: |-- ShowAccessSession PASSED
2023-05-16T15:51:57: %GENIE-INFO: | |-- Step 1: iosxe -> ShowAccessSession PASSED
2023-05-16T15:51:57: %GENIE-INFO: | |-- Step 1.1: Test Golden -> iosxe -> ShowAccessSession PASSED
2023-05-16T15:51:57: %GENIE-INFO: | |-- Step 1.1.1: Gold -> iosxe -> ShowAccessSession -> golde... PASSED
2023-05-16T15:51:57: %GENIE-INFO: | |-- Step 1.2: Test Empty -> iosxe -> ShowAccessSession PASSED
2023-05-16T15:51:57: %GENIE-INFO: | `-- Step 1.2.1: Empty -> iosxe -> ShowAccessSession -> empt... PASSED
2023-05-16T15:51:57: %GENIE-INFO: `-- cleanup PASSED
2023-05-16T15:51:57: %GENIE-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %GENIE-INFO: | Summary |
2023-05-16T15:51:57: %GENIE-INFO: +------------------------------------------------------------------------------+
2023-05-16T15:51:57: %GENIE-INFO: Number of ABORTED 0
2023-05-16T15:51:57: %GENIE-INFO: Number of BLOCKED 0
2023-05-16T15:51:57: %GENIE-INFO: Number of ERRORED 0
2023-05-16T15:51:57: %GENIE-INFO: Number of FAILED 0
2023-05-16T15:51:57: %GENIE-INFO: Number of PASSED 2
2023-05-16T15:51:57: %GENIE-INFO: Number of PASSX 0
2023-05-16T15:51:57: %GENIE-INFO: Number of SKIPPED 0
2023-05-16T15:51:57: %GENIE-INFO: Total Number 2
2023-05-16T15:51:57: %GENIE-INFO: Success Rate 100.0%
2023-05-16T15:51:57: %GENIE-INFO: --------------------------------------------------------------------------------
2023-05-16T15:51:57: %GENIE-INFO: Total Passing Unittests 2
2023-05-16T15:51:57: %GENIE-INFO: Total Failed Unittests 0
2023-05-16T15:51:57: %GENIE-INFO: Total Errored Unittests 0
2023-05-16T15:51:57: %GENIE-INFO: Total Unittests 2
2023-05-16T15:51:57: %GENIE-INFO: --------------------------------------------------------------------------------
Checklist:
- [x] I have updated the changelog.
- [ ] I have updated the documentation (If applicable).
- [x] I have added tests to cover my changes (If applicable).
- [x] All new and existing tests passed.
- [x] All new code passed compilation.