Skip to content

fix: Fix WLAN Policies JSON Parsing Bug#51

Merged
umatare5 merged 3 commits intomainfrom
umatare5/v0.4.2
Sep 28, 2025
Merged

fix: Fix WLAN Policies JSON Parsing Bug#51
umatare5 merged 3 commits intomainfrom
umatare5/v0.4.2

Conversation

@umatare5
Copy link
Copy Markdown
Owner

Summary

This PR fixes a bug in WLAN policies data parsing that was causing all WLAN policy metrics (session timeout, central switching settings) to return zero values. The issue was caused by incorrect JSON structure mapping in the SDK that didn't match the actual Cisco C9800 RESTCONF API response format.

Key Changes

  • Fix WLAN policies JSON structure mapping in service/wlan/cfg.go
    • Correct CiscoIOSXEWirelessWlanCfgWlanPolicies struct to match actual WNC API response
    • Remove incorrect wlan-cfg-data container wrapping
    • Map directly to wlan-policies root element as returned by IOS-XE 17.12.6a

Fix CiscoIOSXEWirelessWlanCfgWlanPolicies struct to match actual WNC
API response structure. Remove incorrect wlan-cfg-data container
wrapping and map directly to wlan-policies root element.

This resolves WLAN policy metrics parsing failure where session
timeout and switching policy data were returning zero values.

Verified against live WNC IOS-XE 17.12.6a environment.

Signed-off-by: umatare5 <umatare5@gmail.com>
AI-assisted-by: GitHub Copilot Coding Agent
Signed-off-by: umatare5 <umatare5@gmail.com>
Release patch version 0.4.2 with WLAN policies JSON structure fix.

This addresses the critical issue where WLAN policy metrics were
returning zero values due to incorrect API response parsing.

Signed-off-by: umatare5 <umatare5@gmail.com>
AI-assisted-by: GitHub Copilot Coding Agent
@umatare5 umatare5 marked this pull request as ready for review September 28, 2025 11:51
@umatare5 umatare5 merged commit 5e4ddc8 into main Sep 28, 2025
5 checks passed
@umatare5 umatare5 deleted the umatare5/v0.4.2 branch September 28, 2025 11:51
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.

1 participant