Skip to content

Conversation

@GigleGig
Copy link

@GigleGig GigleGig commented Dec 3, 2025

Related Issue

Fixes #902

Description

Fix AttributeError when Junos devices return interface type fields as lists instead of strings. Added a new normalization function to unwrap list values during data processing.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

New Behavior

Junos interface data is now parsed correctly when the device returns type fields as lists. The new normalization function automatically unwraps single-element lists to their string values.

Contrast to Current Behavior

Previously, the parser threw an AttributeError when processing Junos devices that return interface type fields as lists instead of strings, which occurs with certain Junos firmware versions.

Discussion: Benefits and Drawbacks

  • Benefits: Junos devices with inconsistent JSON data structures can now be properly monitored by SuzieQ
  • Drawbacks: None
  • Backwards-compatible: Yes

Changes to the Documentation

None required.

Proposed Release Note Entry

Fix AttributeError when Junos devices return interface type fields as lists (#902)

Comments

Changes include:

  • shared/utils: Adding a new normalization function to unwrap list values

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

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.

[Bug]: _clean_junos_data throws AttributeError: 'list' object has no attribute 'lower'

1 participant