Skip to content
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

Add configuration parameters for RSUHealthMonitorPlugin #613

Merged
merged 5 commits into from
May 31, 2024

Conversation

dan-du-car
Copy link
Contributor

@dan-du-car dan-du-car commented May 30, 2024

PR Details

Description

Add configuration parameter to set SNMP security level.

Related Issue

usdot-fhwa-stol/cda-telematics#213

JIRA

https://usdot-carma.atlassian.net/browse/VH-1316

Motivation and Context

Telematic tool integration test

How Has This Been Tested?

Unit test

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    V2XHUB Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dan-du-car dan-du-car marked this pull request as draft May 30, 2024 00:33
@dan-du-car dan-du-car marked this pull request as ready for review May 30, 2024 15:50
@@ -19,7 +19,7 @@
},
{
"key":"RSUConfigurationList",
"default":"{ \"RSUS\": [ { \"RSUIp\": \"192.168.XX.XX\", \"SNMPPort\": \"161\", \"AuthPassPhrase\": \"dummy\", \"User\": \"authOnlyUser\", \"RSUMIBVersion\": \"RSU4.1\" },{ \"RSUIp\": \"192.168.00.XX\", \"SNMPPort\": \"162\", \"AuthPassPhrase\": \"tester\", \"User\": \"authPrivUser\", \"RSUMIBVersion\": \"RSU4.1\" }] }",
"default":"{ \"RSUS\": [ { \"RSUIp\": \"192.168.XX.XX\", \"SecurityLevel\":\"authPriv\", \"SNMPPort\": \"161\", \"AuthPassPhrase\": \"dummy\", \"User\": \"authOnlyUser\", \"RSUMIBVersion\": \"RSU4.1\" ,\"RSUIdentifier\":\"NA\"},{ \"RSUIp\": \"192.168.00.XX\", \"SecurityLevel\":\"authPriv\", \"SNMPPort\": \"162\", \"AuthPassPhrase\": \"tester\", \"User\": \"authPrivUser\", \"RSUMIBVersion\": \"RSU4.1\" ,\"RSUIdentifier\":\"NA\"}] }",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is RSU Name or ID not the identifier? I think the RSU spec has snmp endpoints for both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSUs specs does have RSU Name and ID. However, they usually have the same values across RSUs. We could use the RSUs specs, and that requires to update each individual RSUs setup either via SNMP request or some other ways. For the telematic tool purpose, I assume this is the least effort to meet the telematic requirement.

@@ -27,6 +27,7 @@ namespace RSUHealthMonitor
for (auto rsuConfig : _rsuConfigListPtr->getConfigs())
{
auto rsuStatusJson = _rsuWorker->getRSUStatus(rsuConfig.mibVersion, rsuConfig.rsuIp, rsuConfig.snmpPort, rsuConfig.user, rsuConfig.authPassPhrase, rsuConfig.securityLevel, SEC_TO_MICRO);
rsuStatusJson[RSUIdentifierKey] = rsuConfig.RSUIdentifier;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we pulling this from the configuration, are we not setting this on the RSU?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to directly sent as part of the RSU status payload.

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue I have with the current setup is that is seems we are creating our own RSU Identifier instead of using the existing RSU name and/or ID fields both of which can be set and retrieved from the RSU via SNMP.

@paulbourelly999 Removed

Copy link

sonarcloud bot commented May 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Line Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every thing looks good to me know. Could you just link the Jira Issue https://usdot-carma.atlassian.net/browse/VH-1316 and also update the PR description to no longer include anything about an identifier

@paulbourelly999 paulbourelly999 merged commit be92009 into develop May 31, 2024
2 of 3 checks passed
@paulbourelly999 paulbourelly999 deleted the fix_rsu_config branch May 31, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants