New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OIA-2: Add service detectors api and sample detector #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I think we may use reflection for setting the detector parameters in the ServiceDetector
instances - does this still work in this context?
Can we also add support for executing detectors? This would also us to test a detector as part of of health:check
in the sample project.
api/src/main/java/org/opennms/integration/api/v1/detectors/ServiceDetector.java
Show resolved
Hide resolved
api/src/main/java/org/opennms/integration/api/v1/detectors/ServiceDetector.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/opennms/integration/api/v1/detectors/DetectResults.java
Show resolved
Hide resolved
sample/src/main/java/org/opennms/integration/api/sample/SampleDetector.java
Show resolved
Hide resolved
sample/src/main/java/org/opennms/integration/api/sample/SampleDetector.java
Show resolved
Hide resolved
api/src/main/java/org/opennms/integration/api/v1/monitors/MonitoredService.java
Outdated
Show resolved
Hide resolved
sample/src/main/java/org/opennms/integration/api/sample/MyHealthCheck.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/opennms/integration/api/v1/detectors/DetectorRunner.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/opennms/integration/api/v1/detectors/DetectorRunner.java
Outdated
Show resolved
Hide resolved
c1916f5
to
bca3985
Compare
* | ||
* @return a new @{@link ServiceDetector}. | ||
*/ | ||
T createDetector(Map<String, String> properties); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since now it is factory's responsibility to set bean properties, exposing it in Integration-API as well. Implementations can decide how to set those properties.
@j-white Thanks for the review. I think I addressed all issues. Please take another look. |
Removed spring dependency and upgraded |
Changes to service detecor API from provision:
removed setters, removed getIpMatch() as I see this is only used in LoopDetector so it may not be generic.
removed getServiceAttributes() as this is used only in WsManDetector.
service detector is always async in nature.
https://issues.opennms.org/browse/OIA-2