mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Migrate addhost.php to lnms device:add (#13870)
* Migrate addhost.php to lnms device:add Have snmp-scan.py call lnms device:add (make exit codes line up so this works) Fix issue with ping only devices trying to detect os via snmp Reorder options in device:add help and improve formatting Update docs to remove references to addhost.php Fix a bit of code that was in functional code * fixes * fix snmp version message
This commit is contained in:
@@ -128,8 +128,8 @@ def scan_host(scan_ip):
|
||||
|
||||
arguments = [
|
||||
"/usr/bin/env",
|
||||
"php",
|
||||
"addhost.php",
|
||||
"lnms",
|
||||
"device:add",
|
||||
"-g",
|
||||
POLLER_GROUP,
|
||||
hostname or scan_ip,
|
||||
@@ -261,7 +261,7 @@ Example: """
|
||||
networks = []
|
||||
for net in netargs if netargs else CONFIG.get("nets", []):
|
||||
try:
|
||||
networks.append(ip_network(u"%s" % net, True))
|
||||
networks.append(ip_network("%s" % net, True))
|
||||
debug("Network parsed: {}".format(net), 2)
|
||||
except ValueError as e:
|
||||
parser.error("Invalid network format {}".format(e))
|
||||
|
Reference in New Issue
Block a user