-
Notifications
You must be signed in to change notification settings - Fork 613
NMS-19270: Rest API for SNMP Config, Lookup and Add/Remove Definitions #8216
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
base: features/snmp-config-db-migration
Are you sure you want to change the base?
NMS-19270: Rest API for SNMP Config, Lookup and Add/Remove Definitions #8216
Conversation
587cb76 to
c3a58c8
Compare
| } | ||
|
|
||
| // If a non-default location was specified, check if it is a valid monitoring location | ||
| final List<OnmsMonitoringLocation> locationList = monitoringLocationDao.findAll(); |
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.
I think we can use monitoringLocationDao.get here.
| private String convertToValidLocation(String location) { | ||
| final boolean isDefaultLocation = Strings.isNullOrEmpty(location) || location.equalsIgnoreCase(MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID); | ||
|
|
||
| if (isDefaultLocation) { |
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.
| if (isDefaultLocation) { | |
| if (MonitoringLocationUtils.isDefaultLocationName(location)) { |
| } catch (Exception ignored) { | ||
| } |
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.
| } catch (Exception ignored) { | |
| } | |
| } catch (Exception ignored) { | |
| LOG.debug("Invalid IP address: {}", ipAddress, e); | |
| } |
Rest API for SNMP Config where the config is in the DB (via CM).
Covered in this PR:
(Note, all these also include monitoring location.)
Added integration tests. The one for
addDefinitionwas failing locally, I will fix it subsequently (the actual Rest API is working). Wanted to get this PR merged so I can continue with the UI.Add/remove profiles will be done separately.
External References