Skip to content

KC-1453: Fix Gateway Name not displayed in pam rotation info output - #2379

Merged
craiglurey merged 1 commit into
releasefrom
KC-1453
Sep 18, 2026
Merged

craiglurey merged 1 commit into
releasefrom
KC-1453

Conversation

@sshrushanth-ks

Copy link
Copy Markdown
Contributor

Summary

The pam rotation info command was showing a dash (-) for Gateway Name even when a valid gateway was associated with the PAM rotation configuration. The API response from pam/get_rotation_info returns a populated controllerUid but an empty controllerName. We now resolve the gateway name by looking it up in the gateway list using the controllerUid when controllerName is empty.

Changes

  • discoveryrotation.py:
    • In PAMRouterGetRotationInfo.execute(), add fallback logic to resolve gateway name from the gateway list when controllerName is empty but controllerUid exists; query gateway_helper.get_all_gateways() and match by controllerUid to retrieve the controllerName
  • unit-tests/pam/test_pam_rotation.py:
    • Add test_gateway_name_resolved_from_uid_when_empty() to verify that when controllerName is empty, it's correctly resolved from the gateway list and displayed in JSON output

…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
@sshrushanth-ks sshrushanth-ks self-assigned this Sep 18, 2026
@sshrushanth-ks
sshrushanth-ks marked this pull request as ready for review September 18, 2026 11:58
@craiglurey
craiglurey merged commit c214042 into release Sep 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants