Remove debugging logs, fix Mix.env call
This commit is contained in:
parent
c93144cc37
commit
09f2907ede
4 changed files with 6 additions and 17 deletions
|
|
@ -51,7 +51,7 @@ defmodule Mix.Tasks.CopyMibs do
|
|||
|
||||
defp get_default_target_dir do
|
||||
# In development, use priv/mibs; in production use /app/mibs
|
||||
if Mix.env() == :dev do
|
||||
if Application.get_env(:towerops, :env) == :dev do
|
||||
Path.join([File.cwd!(), "priv", "mibs"])
|
||||
else
|
||||
Application.get_env(:towerops, :mib_dir, "/app/mibs")
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ defmodule Towerops.Snmp.Client do
|
|||
|
||||
defp phoenix_snmp_disabled do
|
||||
# Only disable in non-test environments (allow tests to run normally)
|
||||
if Mix.env() == :test do
|
||||
if Application.get_env(:towerops, :env) == :test do
|
||||
false
|
||||
else
|
||||
Application.get_env(:towerops, :disable_phoenix_snmp, true)
|
||||
|
|
@ -402,12 +402,7 @@ defmodule Towerops.Snmp.Client do
|
|||
|
||||
Logger.info("""
|
||||
[Phoenix SNMP Disabled] Would have executed SNMP operation:
|
||||
Operation: #{operation}
|
||||
Target: #{ip}
|
||||
Version: #{version}
|
||||
OID/Param: #{inspect(oid_or_param)}
|
||||
|
||||
This operation should be performed by an agent instead.
|
||||
Operation: #{operation}, Target: #{ip}, Version: #{version}, OID/Param: #{inspect(oid_or_param)}
|
||||
""")
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -398,15 +398,6 @@ defmodule ToweropsWeb.AgentChannel do
|
|||
defp build_v2c_snmp_device(device, snmp_config) do
|
||||
community = snmp_config.community || ""
|
||||
|
||||
Logger.info("""
|
||||
[Agent Channel] Building v2c SNMP device
|
||||
Device: #{device.name} (#{device.id})
|
||||
IP: #{device.ip_address}
|
||||
Version: #{device.snmp_version}
|
||||
Community from config: #{inspect(snmp_config.community)}
|
||||
Community to send: #{inspect(community)}
|
||||
""")
|
||||
|
||||
%SnmpDevice{
|
||||
ip: device.ip_address,
|
||||
version: device.snmp_version,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ Devices Tested & Working
|
|||
* Ubiquiti AC, LTU, AirFiber
|
||||
* Cambium ePMP
|
||||
|
||||
2026-02-04
|
||||
* Feature: SNMP v3 support
|
||||
|
||||
2026-02-03
|
||||
* More tests
|
||||
* Bug fix: user registration
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue