You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When capturing ARP tables for comparison using calculate_diff_on_dicts, the script fails with WrongDataTypeException: Unknown value format for key ttl. This seems to occur because the ttl values in the ARP table entries are integers, and the current implementation only handles strings and dictionaries.
The behavior is inconsistent, but I believe this may only occur when a single ARP entry is returned from the device. I may misunderstand the behavior is that multiple ARP entries are stored as a dict object, thereby not having this issue occur
Expected behavior
The comparison function should handle integer values without throwing an exception, allowing the script to correctly compare ARP table entries including integer ttl values.
Current behavior
The script raises WrongDataTypeException when it encounters an integer ttl value in the ARP table data structure, leading to a failure in the comparison process.
Possible solution
A conditional check for integer types could be added to the comparison logic to handle ttl values correctly. This would involve extending the current if-else structure to include a case for handling integers, similar to how strings and dictionaries are currently processed.
Capture ARP table entries from a Palo Alto Networks device that includes ttl values as integers.
Use the calculate_diff_on_dicts function to compare two ARP tables.
Observe that the script fails with WrongDataTypeException when it encounters the ttl value.
Screenshots
Context
This issue is preventing the successful comparison of ARP tables as part of an upgrade assurance process, potentially impacting the ability to verify device configurations before and after upgrades.
Your Environment
Version used: panos-upgrade-assurance==0.3.2, pan-os-python==1.11.0
Describe the bug
When capturing ARP tables for comparison using
calculate_diff_on_dicts
, the script fails withWrongDataTypeException: Unknown value format for key ttl.
This seems to occur because thettl
values in the ARP table entries are integers, and the current implementation only handles strings and dictionaries.The behavior is inconsistent, but I believe this may only occur when a single ARP entry is returned from the device. I may misunderstand the behavior is that multiple ARP entries are stored as a dict object, thereby not having this issue occur
Expected behavior
The comparison function should handle integer values without throwing an exception, allowing the script to correctly compare ARP table entries including integer
ttl
values.Current behavior
The script raises
WrongDataTypeException
when it encounters an integerttl
value in the ARP table data structure, leading to a failure in the comparison process.Possible solution
A conditional check for integer types could be added to the comparison logic to handle
ttl
values correctly. This would involve extending the current if-else structure to include a case for handling integers, similar to how strings and dictionaries are currently processed.Change the existing:
to:
Steps to reproduce
ttl
values as integers.calculate_diff_on_dicts
function to compare two ARP tables.WrongDataTypeException
when it encounters thettl
value.Screenshots
Context
This issue is preventing the successful comparison of ARP tables as part of an upgrade assurance process, potentially impacting the ability to verify device configurations before and after upgrades.
Your Environment
The text was updated successfully, but these errors were encountered: