From 3c5973f09ea993d00b2f7b30ec7225cc53bd6298 Mon Sep 17 00:00:00 2001 From: "Zach Biles @bile0026" Date: Tue, 14 Jan 2025 13:46:12 -0600 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20cyberpower?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ' --- .../integrations/librenms/constants.py | 379 ++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 nautobot_ssot/integrations/librenms/constants.py diff --git a/nautobot_ssot/integrations/librenms/constants.py b/nautobot_ssot/integrations/librenms/constants.py new file mode 100644 index 00000000..534ef621 --- /dev/null +++ b/nautobot_ssot/integrations/librenms/constants.py @@ -0,0 +1,379 @@ +"""Constants for LibreNMS SSoT.""" + +from django.conf import settings + +# Import config vars from nautobot_config.py +PLUGIN_CFG = settings.PLUGINS_CONFIG["nautobot_ssot"] + +librenms_status_map = { + 0: "Offline", + 1: "Active", + True: "Active", + False: "Offline", +} + +os_manufacturer_map = { + # Other types + "ping": "Generic", + "hpe-ilo": "HP", + "proxmox": "Proxmox", + # Types from LibreNMS/OS php files + "aen": "Accedian OS", + "airos": "Ubiquiti", + "airosaf": "Ubiquiti", + "airosaf60": "Ubiquiti", + "airosafltu": "Ubiquiti", + "airport": "Apple", + "aix": "IBM", + "alcoma_almp": "Alcoma", + "alfo80hd": "Siae Microelettronica", + "allied": "Allied Telesis", + "allworxvoip": "Allworx", + "aos": "Alcatel-Lucent", + "apc": "APC", + "apexlynx": "Apex", + "apexplus": "Apex", + "aprisa": "4RF", + "apsoluteos": "Radware", + "arbos": "Aruba Networks", + "areca": "Areca", + "arrisc4": "Arris", + "arriscm": "Arris", + "arrisdsr4410md": "Arris", + "arubainstant": "Aruba Networks", + "arubaos": "Aruba Networks", + "arubaoscx": "Aruba Networks", + "asa": "Cisco", + "asuswrtmerlin": "Asus", + "asyncos": "Cisco", + "aviatwtm": "Aviat Networks", + "avocent": "Avocent", + "awplus": "Allied Telesis", + "axos": "Calix", + "baicellsod04": "Baicells", + "barracudangfirewall": "Barracuda", + "bats": "BAT", + "beagleboard": "BeagleBoard", + "boss": "Beijer Electronics", + "brother": "Brother", + "ceraos": "Ceragon", + "cienarls": "Ciena", + "cienasds": "Ciena", + "ciscosb": "Cisco", + "ciscowlc": "Cisco", + "cnpilote": "Cambium Networks", + "comware": "HPE", + "coriant": "Coriant", + "cumulus": "Cumulus Networks", + "cyberpower": "CyberPower", + "danthermos": "Dantherm", + "ddwrt": "DD-WRT", + "deliberant": "Deliberant", + "delllaser": "Dell", + "dhcpatriot": "DHCPatriot", + "dlink": "D-Link", + "dlinkap": "D-Link", + "dnos": "Dell EMC", + "edgecos": "Edgecore", + "edgeos": "Ubiquiti", + "edgeosolt": "Ubiquiti", + "edgeswitch": "Ubiquiti", + "ekinops": "Ekinops", + "eltexmes23xx": "Eltex", + "eltexmes24xx": "Eltex", + "engenius": "EnGenius", + "enterasys": "Enterasys", + "epmp": "Cambium Networks", + "ericsson6600": "Ericsson", + "ericssonml": "Ericsson", + "ericssontn": "Ericsson", + "eurostor": "Eurostor", + "ewc": "Extreme Networks", + "exa": "Exa Networks", + "extendair": "ExtendAir", + "extremeware": "Extreme Networks", + "f5": "F5 Networks", + "fabos": "Brocade", + "fortiadc": "Fortinet", + "fortiap": "Fortinet", + "fortiextender": "Fortinet", + "fortigate": "Fortinet", + "fortios": "Fortinet", + "fortiwlc": "Fortinet", + "fscentec": "FS", + "fsgbn": "FS", + "fsswitch": "FS", + "ftos": "Dell EMC", + "gaia": "Check Point", + "generic": "Generic", + "gepulsar": "Ge", + "harmonyenhanced": "Harmony", + "helios": "Helios", + "himoinstags": "Himoinsa", + "hiveoswireless": "HiveOS", + "horizoncompact": "Dragonwave", + "horizoncompactplus": "Dragonwave", + "horizonduo": "Dragonwave", + "hpmsm": "HP", + "hpvc": "HP", + "icros": "Advantech", + "ifotec": "Ifotec", + "infineragroove": "Infinera", + "infinity": "Infinity", + "ios": "Cisco", + "iosxe": "Cisco", + "iosxr": "Cisco", + "ipolis": "Samsung", + "ird": "IRD", + "ironware": "Brocade", + "jetdirect": "HP", + "junos": "Juniper", + "junose": "Juniper", + "lcos": "Lancom", + "lcoslx": "Lancom", + "lcossx": "Lancom", + "linux": "Linux", + "mimosa": "Mimosa Networks", + "mni": "MNI", + "moxaetherdevice": "Moxa", + "mrvod": "MRV", + "netscaler": "Citrix", + "netsure": "NetSure", + "nios": "Infoblox", + "nitro": "Citrix", + "nsbsd": "BSD", + "ocnos": "OcNOS", + "okilan": "Oki", + "openbsd": "BSD", + "openwrt": "OpenWrt", + "packetlight": "PacketLight", + "panos": "Palo Alto", + "pbn": "PBN", + "pbncp": "PBN", + "pepwave": "Peplink", + "pfsense": "PfSense", + "pmp": "Cambium Networks", + "poweralert": "APC", + "powerconnect": "Dell EMC", + "procurve": "HPE", + "protelevisiont1": "ProTelevision", + "ptp250": "Cambium Networks", + "ptp500": "Cambium Networks", + "ptp600": "Cambium Networks", + "ptp650": "Cambium Networks", + "ptp670": "Cambium Networks", + "ptp800": "Cambium Networks", + "pulse": "PulseSecure", + "qnap": "QNAP", + "quanta": "Quanta", + "quantastor": "QuantaStor", + "radlan": "Radlan", + "radwin": "Radwin", + "ray": "Racom", + "ray3": "Racom", + "riverbed": "Riverbed", + "routeros": "Mikrotik", + "ruckuswireless": "Ruckus", + "ruckuswirelesshotzone": "Ruckus", + "ruckuswirelesssz": "Ruckus", + "ruckuswirelessunleashed": "Ruckus", + "rutos2xx": "Teltonika", + "rutosrutx": "Teltonika", + "saf": "Saf Tehnika", + "safcfm": "Saf Tehnika", + "safintegrab": "Saf Tehnika", + "safintegrae": "Saf Tehnika", + "safintegraw": "Saf Tehnika", + "safintegrax": "Saf Tehnika", + "scalance": "Siemens", + "schleifenbauer": "Schleifenbauer", + "screenos": "Juniper", + "secureplatform": "Check Point", + "serveriron": "Brocade", + "sgos": "Symantec", + "siklu": "Siklu", + "siteboss": "SiteBoss", + "siteboss550": "SiteBoss", + "smos": "Microchip", + "smartax": "Huawei", + "smartaxmdu": "Huawei", + "socomecups": "Socomec", + "sonicwall": "SonicWall", + "speedtouch": "Thomson", + "stellar": "Stellar", + "supermicrobmc": "Supermicro", + "svos": "Supermicro", + "symbol": "Symbol", + "tachyon": "Tachyon Networks", + "taitinfra93": "Tait", + "teldat": "Teldat", + "terra": "Terra", + "threecom": "3Com", + "timos": "Nokia", + "topvision": "TopVision", + "ucos": "UC-OS", + "unifi": "Ubiquiti", + "valere": "Valere", + "viptela": "Cisco", + "vmwareesxi": "VMware", + "vrp": "Huawei", + "windows": "Microsoft", + "xerox": "Xerox", + "xirrusaos": "Xirrus", + "xos": "Extreme Networks", + "zebra": "Zebra", + "zxdsl": "ZTE", + "zynos": "Zyxel", + "zywall": "Zyxel", + "zyxelnwa": "Zyxel", + "zyxelwlc": "Zyxel", +} + +manufacturer_os_map = { + # Other Types + "Proxmox": ["proxmox"], + "Generic": ["generic", "ping"], + # Types imported from LibreNMS/OS php files + "4RF": ["aprisa"], + "3Com": ["threecom"], + "Accedian OS": ["aen"], + "Advantech": ["icros"], + "Alcatel-Lucent": ["aos"], + "Alcoma": ["alcoma_almp"], + "Allied Telesis": ["allied", "awplus"], + "Allworx": ["allworxvoip"], + "APC": ["apc", "poweralert"], + "Apple": ["airport"], + "Aruba Networks": ["arbos", "arubainstant", "arubaos", "arubaoscx"], + "Areca": ["areca"], + "Arris": ["arrisc4", "arriscm", "arrisdsr4410md"], + "BAT": ["bats"], + "Baicells": ["baicellsod04"], + "Barracuda": ["barracudangfirewall"], + "BeagleBoard": ["beagleboard"], + "Beijer Electronics": ["boss"], + "Brother": ["brother"], + "Brocade": ["fabos", "ironware", "serveriron"], + "BSD": ["nsbsd", "openbsd"], + "Cambium Networks": [ + "epmp", + "pmp", + "ptp250", + "ptp500", + "ptp600", + "ptp650", + "ptp670", + "ptp800", + ], + "Calix": ["axos"], + "Ceragon": ["ceraos"], + "Check Point": ["gaia", "secureplatform"], + "Ciena": ["cienarls", "cienasds"], + "Citrix": ["netscaler", "nitro"], + "Cisco": [ + "asa", + "asyncos", + "ciscosb", + "ciscowlc", + "fortigate", + "ios", + "iosxe", + "iosxr", + "viptela", + ], + "Cyberpower": ["cyberpower"], + "D-Link": ["dlink", "dlinkap"], + "Dantherm": ["danthermos"], + "DD-WRT": ["ddwrt"], + "Dell": ["delllaser"], + "Dell EMC": ["dnos", "powerconnect", "ftos"], + "Dragonwave": ["horizoncompact", "horizoncompactplus", "horizonduo"], + "Eltex": ["eltexmes23xx", "eltexmes24xx"], + "EnGenius": ["engenius"], + "Enterasys": ["enterasys"], + "Ericsson": ["ericsson6600", "ericssonml", "ericssontn"], + "Ekinops": ["ekinops"], + "Eurostor": ["eurostor"], + "Extreme Networks": ["extremeware", "ewc", "xos"], + "Exa Networks": ["exa"], + "FS": ["fscentec", "fsgbn", "fsswitch"], + "F5 Networks": ["f5"], + "Fortinet": [ + "fortiadc", + "fortiap", + "fortiextender", + "fortigate", + "fortios", + "fortiwlc", + ], + "Ge": ["gepulsar"], + "Harmony": ["harmonyenhanced"], + "Helios": ["helios"], + "Himoinsa": ["himoinstags"], + "HPE": ["comware", "procurve"], + "Huawei": ["smartax", "smartaxmdu", "vrp"], + "IBM": ["aix"], + "Infinera": ["infineragroove"], + "Infinity": ["infinity"], + "Juniper": ["junos", "junose", "screenos"], + "Lancom": ["lcos", "lcoslx", "lcossx"], + "Linux": ["linux"], + "Mikrotik": ["routeros"], + "Mimosa Networks": ["mimosa"], + "Microsoft": ["windows"], + "MRV": ["mrvod"], + "NetSure": ["netsure"], + "Nokia": ["timos"], + "OpenWrt": ["openwrt"], + "PacketLight": ["packetlight"], + "Palo Alto": ["panos"], + "Peplink": ["pepwave"], + "PfSense": ["pfsense"], + "PulseSecure": ["pulse"], + "QNAP": ["qnap"], + "Quanta": ["quanta"], + "QuantaStor": ["quantastor"], + "Racom": ["ray", "ray3"], + "Radlan": ["radlan"], + "Radwin": ["radwin"], + "Ruckus": [ + "ruckuswireless", + "ruckuswirelesshotzone", + "ruckuswirelesssz", + "ruckuswirelessunleashed", + ], + "Saf Tehnika": [ + "saf", + "safcfm", + "safintegrab", + "safintegrae", + "safintegraw", + "safintegrax", + ], + "Samsung": ["ipolis"], + "Schleifenbauer": ["schleifenbauer"], + "Siemens": ["scalance"], + "SiteBoss": ["siteboss", "siteboss550"], + "Supermicro": ["supermicrobmc", "svos"], + "Symbol": ["symbol"], + "Tachyon Networks": ["tachyon"], + "Teltonika": ["rutos2xx", "rutosrutx"], + "Terra": ["terra"], + "Thomson": ["speedtouch"], + "Ubiquiti": [ + "airos", + "airosaf", + "airosaf60", + "airosafltu", + "edgeos", + "edgeosolt", + "edgeswitch", + "unifi", + ], + "VMware": ["vmwareesxi"], + "Xirrus": ["xirrusaos"], + "Xerox": ["xerox"], + "Zebra": ["zebra"], + "ZTE": ["zxdsl"], + "Zyxel": ["zynos", "zywall", "zyxelnwa", "zyxelwlc"], +} From 9575a2068218a3ed0b8ecda234a436f78f590499 Mon Sep 17 00:00:00 2001 From: "Zach Biles @bile0026" Date: Tue, 14 Jan 2025 14:44:12 -0600 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20opnsense?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nautobot_ssot/integrations/librenms/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nautobot_ssot/integrations/librenms/constants.py b/nautobot_ssot/integrations/librenms/constants.py index 534ef621..34d9d540 100644 --- a/nautobot_ssot/integrations/librenms/constants.py +++ b/nautobot_ssot/integrations/librenms/constants.py @@ -17,6 +17,7 @@ "ping": "Generic", "hpe-ilo": "HP", "proxmox": "Proxmox", + "opnsense": "OPNsense", # Types from LibreNMS/OS php files "aen": "Accedian OS", "airos": "Ubiquiti", @@ -233,6 +234,7 @@ # Other Types "Proxmox": ["proxmox"], "Generic": ["generic", "ping"], + "OPNsense": ["opnsense"], # Types imported from LibreNMS/OS php files "4RF": ["aprisa"], "3Com": ["threecom"], From 35d22536f8c5821b57a9b9ff7ae6d10f3954169a Mon Sep 17 00:00:00 2001 From: "Zach Biles @bile0026" Date: Tue, 14 Jan 2025 15:00:38 -0600 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20opnsense?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nautobot_ssot/integrations/librenms/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nautobot_ssot/integrations/librenms/constants.py b/nautobot_ssot/integrations/librenms/constants.py index 34d9d540..f440457e 100644 --- a/nautobot_ssot/integrations/librenms/constants.py +++ b/nautobot_ssot/integrations/librenms/constants.py @@ -17,7 +17,7 @@ "ping": "Generic", "hpe-ilo": "HP", "proxmox": "Proxmox", - "opnsense": "OPNsense", + "opnsense": "Opnsense", # Types from LibreNMS/OS php files "aen": "Accedian OS", "airos": "Ubiquiti", @@ -234,7 +234,7 @@ # Other Types "Proxmox": ["proxmox"], "Generic": ["generic", "ping"], - "OPNsense": ["opnsense"], + "Opnsense": ["opnsense"], # Types imported from LibreNMS/OS php files "4RF": ["aprisa"], "3Com": ["threecom"], From 9435c107d6fba9dc8d36c024b9995f8c491113e7 Mon Sep 17 00:00:00 2001 From: "Zach Biles @bile0026" Date: Tue, 14 Jan 2025 15:19:22 -0600 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=F0=9F=91=B7=20add=20change=20frag?= =?UTF-8?q?ment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changes/656.fixed | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/656.fixed diff --git a/changes/656.fixed b/changes/656.fixed new file mode 100644 index 00000000..4c0c858f --- /dev/null +++ b/changes/656.fixed @@ -0,0 +1 @@ +Fixed missing manufacturers for OPNsense and CyberPower. \ No newline at end of file