Rollbacks changes

This commit is contained in:
Pierre Lannoy 2024-02-05 16:57:24 +01:00
commit 962cdab9e8
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31

View file

@ -1,20 +1,9 @@
from netbox_agent.config import netbox_instance as nb from netbox_agent.config import netbox_instance as nb
from slugify import slugify
from shutil import which from shutil import which
import subprocess import subprocess
import socket import socket
import re import re
import unicodedata
def slugify(string):
return re.sub(r'[-\s]+', '-',
str(
re.sub(r'[^\w\s-]', '',
unicodedata.normalize('NFKD', string)
.encode('ascii', 'ignore'))
.strip()
.lower()))
def is_tool(name): def is_tool(name):
'''Check whether `name` is on PATH and marked as executable.''' '''Check whether `name` is on PATH and marked as executable.'''
@ -64,7 +53,6 @@ def get_device_platform(device_platform):
) )
return device_platform return device_platform
def get_vendor(name): def get_vendor(name):
vendors = { vendors = {
'PERC': 'Dell', 'PERC': 'Dell',
@ -123,3 +111,5 @@ def get_mount_points():
mp = mount_info[2] mp = mount_info[2]
mount_points.setdefault(device, []).append(mp) mount_points.setdefault(device, []).append(mp)
return mount_points return mount_points