Uninett / zino

Zino 2.0 - Network state monitor for research networks
Apache License 2.0
3 stars 5 forks source link

Add one function to parse all weird IP formats #183

Closed stveit closed 6 months ago

stveit commented 6 months ago

Fixes #177

github-actions[bot] commented 6 months ago

Test results

    3 files      3 suites   32s :stopwatch: 289 tests 289 :heavy_check_mark: 0 :zzz: 0 :x: 867 runs  865 :heavy_check_mark: 2 :zzz: 0 :x:

Results for commit 1e8ab273.

:recycle: This comment has been updated with latest results.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.84%. Comparing base (ca724c8) to head (1e8ab27).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #183 +/- ## ========================================== + Coverage 98.82% 98.84% +0.02% ========================================== Files 40 41 +1 Lines 5431 5428 -3 ========================================== - Hits 5367 5365 -2 + Misses 64 63 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

johannaengland commented 6 months ago

And if you don't change the IP address handling in the BFD/BGP monitor tasks in this PR, then please make a new issue so that this is not forgotten :smile:

stveit commented 6 months ago

Made BFD and BGP task use parse_ip. Removed using the AddrType value in BDF to decide ipv4/ipv6 since this will be detected automatically anyways. This does mean it will accept Ipv4 adresses even if the AddrType is set to Ipv6 in the case there is some error in the MIB values, but that basically just makes the code more robust.

Does anyone have a strong opinion on using AddrType to decide ipv4/ipv6 vs letting it be automatically detected?

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud