nav
nav copied to clipboard
Create event when new device is discovered
Fixes #2391
Creates alerts when discovering new devices. The alert type depends on what type of device it is, e.g. chassis, module etc.
Also fixes a small bug in EventFactory.
Codecov Report
Merging #2414 (a87d748) into master (fe217e2) will increase coverage by
0.01%
. The diff coverage is34.00%
.
@@ Coverage Diff @@
## master #2414 +/- ##
==========================================
+ Coverage 53.31% 53.32% +0.01%
==========================================
Files 554 554
Lines 40315 40363 +48
==========================================
+ Hits 21494 21524 +30
- Misses 18821 18839 +18
Impacted Files | Coverage Δ | |
---|---|---|
python/nav/ipdevpoll/shadows/__init__.py | 41.87% <29.03%> (-0.78%) |
:arrow_down: |
python/nav/ipdevpoll/shadows/entity.py | 27.48% <30.76%> (+0.27%) |
:arrow_up: |
python/nav/models/manage.py | 71.14% <66.66%> (-0.03%) |
:arrow_down: |
python/nav/ipdevpoll/pool.py | 89.92% <0.00%> (+5.03%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Test results
12 files 12 suites 12m 46s :stopwatch: 3 111 tests 3 015 :heavy_check_mark: 96 :zzz: 0 :x: 8 808 runs 8 520 :heavy_check_mark: 288 :zzz: 0 :x:
Results for commit a87d7482.
:recycle: This comment has been updated with latest results.
I'm inclined to say that this looks pretty good now, based on the code alone (some history cleanup/squashing is probably in order) ! :-)
I have not tested it in practice, though...
I'll do some testing and cleanups before i merge it
I'm inclined to say that this looks pretty good now, based on the code alone (some history cleanup/squashing is probably in order) ! :-) I have not tested it in practice, though...
I'll do some testing and cleanups before i merge it
Please wait until I have made and merged the PR that will provide the functions get_extended_description
and get_related_objects
Please wait until I have made and merged the PR that will provide the functions
get_extended_description
andget_related_objects
Indeed, @stveit, I forgot that your alert templates need to include a more human-readable description of devices, instead of the current {{ device }}
, which would only print a serial number.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Codecov complains a bit, but honestly not sure how to add tests to this, so ill put it back as ready 4 review
Codecov complains a bit, but honestly not sure how to add tests to this, so ill put it back as ready 4 review
I think we need a testing workshop at some point, and after that, try to come up with some good ways of testing the untested parts of ipdevpoll.