Fix fast-reboot-dump.py ipaddress error#1148
Fix fast-reboot-dump.py ipaddress error#1148kuanyu99 wants to merge 2 commits intosonic-net:masterfrom
Conversation
|
Retest this please |
1 similar comment
|
Retest this please |
|
@kuanyu99 Thanks for efforts. the issue could be fixed in Python 2 bu decoding the string as unicode: In Python 3 this above is not required. |
|
@tahmed-dev Thank you very much! This information help me a lot. But there are still have other problems. |
|
is there anything missing in the unit test? |
No problem. I didn't consider the python3 case. I also think your solution is better. |
|
Due to #1164 has been merged, close this PR. |
- What I did
Fix weird behavior when using ipaddress to parse the ipv4 and ipv6 address.
- How I did it
Instead of using ipaddress.ip_interface(IP_ADDR), I change to use ipaddress.IPv4Address to check if the ip address is ipv4.
The same method is also used inside sonic-utilities/config/nat.py
- How to verify it
When there are some mac learned by SONIC, execute the fast-reboot. It should not return error.
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)