-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lldp: Handling attributes that are defined multiple times (#9657)
* lldp: Ignoring values for keys already defined This fixes crashes when the lldpctl output has lines for unknown tlvs that redefine a key in the middle of the nested dict data structure. * lldp: handling attributes that are defined multiple times - Fix crash caused by certain lldpctl output where an attribute is defined as branch and leaf - Adds multivalues parameter to control behavior when lldpctl outputs an attribute multiple times * lldp: using isinstance instead of type * Link to Github PR Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * lldp: only push value to subkey in multivalues mode To provide backwards compatibility values that are defined as a attribute and also as a path element are only pushed to the 'value' subkey when using the new multivalues mode. --------- Co-authored-by: Felix Fontein <felix@fontein.de>
- Loading branch information
1 parent
217a188
commit 2b6f4ba
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelogs/fragments/9657-lldp-handling-attributes-defined-multiple-times.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bugfixes: | ||
- lldp - fix crash caused by certain lldpctl output where an attribute is defined as branch and leaf (https://github.com/ansible-collections/community.general/pull/9657). | ||
minor_changes: | ||
- lldp - adds ``multivalues`` parameter to control behavior when lldpctl outputs an attribute multiple times (https://github.com/ansible-collections/community.general/pull/9657). |
This file contains 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