Skip to content

Commit

Permalink
Initial work for NetBox integration
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed Jun 21, 2024
1 parent 8d326f2 commit 611c7a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions scripts/callbacks/system/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ local blog_utils = require("blog_utils")
local vs_utils = require "vs_utils"
local drop_host_pool_utils = require "drop_host_pool_utils"

if ntop.isPro() and isNetBoxEnabled() then
local netbox_api = require("netbox_manager")
end
-- ##################################################################

traceError(TRACE_NORMAL, TRACE_CONSOLE, "Processing startup.lua: please hold on...")
Expand Down Expand Up @@ -250,7 +247,10 @@ vs_utils.restore_host_to_scan()
ntop.reloadAlertExclusions()

if ntop.isPro() and isNetBoxEnabled() then
netbox_api.initialization_device_roles()
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local netbox_manager = require("netbox_manager")

netbox_manager.initialization_device_roles()
end

traceError(TRACE_NORMAL, TRACE_CONSOLE, "Completed startup.lua")
8 changes: 4 additions & 4 deletions scripts/locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6540,10 +6540,10 @@ local lang = {
["alerts_settings"] = "Alerts Settings",
["all"] = "All",
["auth_methods_order"] = "The authentication methods check order is the same as the listing order above, e.g. if both LDAP and local auth are enabled, LDAP will be checked first and, if authentication fails, local auth will be checked next.",
["netbox_activation_url_title"] = "Netbox Activation URL",
["netbox_personal_access_token_title"] = "Netbox Personal Access Token",
["netbox_activation_url_description"] = "Netbox Activation URL",
["netbox_personal_access_token_description"] = "Netbox Personal Access",
["netbox_activation_url_title"] = "NetBox URL",
["netbox_personal_access_token_title"] = "NetBox Personal Access Token",
["netbox_activation_url_description"] = "NetBox Activation URL",
["netbox_personal_access_token_description"] = "NetBox Personal Access",
["authentication"] = "Authentication",
["authentication_duration"] = "Authentication Duration",
["authentication_duration_descr"] = "Amount of time before the session of an authenticated user is terminated and re-authentication is necessary. Changes will affect newly-created sessions only.",
Expand Down

0 comments on commit 611c7a7

Please sign in to comment.