KC-1453: Fix Gateway Name not displayed in pam rotation info output - #2365
Merged
Merged
Conversation
sshrushanth-ks
marked this pull request as ready for review
September 11, 2026 11:37
sshrushanth-ks
requested review from
adeshmukh-ks,
amangalampalli-ks,
pvagare-ks and
sali-ks
September 11, 2026 11:39
| except Exception: | ||
| all_gateways = [] | ||
|
|
||
| matched = next((g for g in all_gateways |
Contributor
There was a problem hiding this comment.
is it possible that none and none would equate here and give false positive
Contributor
Author
There was a problem hiding this comment.
Yes, added a check to prevent the false positive
sali-ks
reviewed
Sep 16, 2026
sali-ks
reviewed
Sep 16, 2026
… before gateway lookup
sali-ks
approved these changes
Sep 18, 2026
sshrushanth-ks
added a commit
that referenced
this pull request
Sep 18, 2026
…2365) * Fix Gateway Name not displayed in pam rotation info output * Add UID type normalization and graceful error handling to gateway name resolution * Improve gateway name resolution: add UID validation and specific exception logging * Prevent None == None false positive by explicitly checking target_uid before gateway lookup
craiglurey
pushed a commit
that referenced
this pull request
Sep 18, 2026
…2365) (#2379) * Fix Gateway Name not displayed in pam rotation info output * Add UID type normalization and graceful error handling to gateway name resolution * Improve gateway name resolution: add UID validation and specific exception logging * Prevent None == None false positive by explicitly checking target_uid before gateway lookup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
pam rotation infocommand was showing a dash (-) for Gateway Name even when a valid gateway was associated with the PAM rotation configuration. The API response frompam/get_rotation_inforeturns a populatedcontrollerUidbut an emptycontrollerName. We now resolve the gateway name by looking it up in the gateway list using thecontrollerUidwhencontrollerNameis empty.Changes
discoveryrotation.py:PAMRouterGetRotationInfo.execute(), add fallback logic to resolve gateway name from the gateway list whencontrollerNameis empty butcontrollerUidexists; querygateway_helper.get_all_gateways()and match bycontrollerUidto retrieve thecontrollerNameunit-tests/pam/test_pam_rotation.py:test_gateway_name_resolved_from_uid_when_empty()to verify that whencontrollerNameis empty, it's correctly resolved from the gateway list and displayed in JSON output