Lehel44 commented on a change in pull request #5088:
URL: https://github.com/apache/nifi/pull/5088#discussion_r721682193



##########
File path: 
nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/factory/core/SNMPManagerFactory.java
##########
@@ -14,27 +14,29 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.snmp.factory;
+package org.apache.nifi.snmp.factory.core;
 
+import org.apache.nifi.processor.exception.ProcessException;
 import org.apache.nifi.snmp.configuration.SNMPConfiguration;
 import org.snmp4j.Snmp;
-import org.snmp4j.Target;
-import org.snmp4j.mp.SnmpConstants;
+import org.snmp4j.smi.UdpAddress;
+import org.snmp4j.transport.DefaultUdpTransportMapping;
 
-public class V2cSNMPFactory extends AbstractSNMPFactory implements SNMPFactory 
{
+import java.io.IOException;
 
-    @Override
-    public boolean supports(final int version) {
-        return SnmpConstants.version2c == version;
-    }
+public class SNMPManagerFactory {
 
-    @Override
-    public Snmp createSnmpManagerInstance(final SNMPConfiguration 
configuration) {
-        return createSnmpClient();
-    }
+    private static final String LOCALHOST = "127.0.0.1";
 
-    @Override
-    public Target createTargetInstance(final SNMPConfiguration configuration) {
-        return createCommunityTarget(configuration);
+    public Snmp createSnmpManagerInstance(final SNMPConfiguration 
configuration) {

Review comment:
       Yes, I checked the implementation and it does not default to localhost. 
It defaults to 0.0.0.0 which causes some tests to fail on Windows. I think it's 
better to stay with the current implementation here and set the ip address to 
localhost.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to