From df18d2c8f23d71e48a6a23d140c8e9f0090948c1 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Tue, 13 Jul 2021 18:21:43 +0200 Subject: [bas-hw-collect] Use idoit username instead of first-/lastname for contacts --- modules.d/bas-hw-collect/scripts/collect_hw_info_json.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules.d/bas-hw-collect/scripts/collect_hw_info_json.py b/modules.d/bas-hw-collect/scripts/collect_hw_info_json.py index 8e2913fd..742c94d5 100755 --- a/modules.d/bas-hw-collect/scripts/collect_hw_info_json.py +++ b/modules.d/bas-hw-collect/scripts/collect_hw_info_json.py @@ -223,10 +223,7 @@ def prepare_contacts(contact_list): if contact_list == None: return contacts for contact in contact_list: - contacts.append({ - 'firstname': contact[0], - 'lastname': contact[1], - }) + contacts.append(contact[0]) return contacts def send_post(url, payload): @@ -251,7 +248,7 @@ def main(): parser.add_argument('-l', '--location', action='store', help=': Room-/Rackname where the client is located') parser.add_argument('-s', '--slot', action='store', help=' The slot number (int) where the client is located in the rack') parser.add_argument('-b', '--bay', action='store', help=' The bay number (int) where the client is located in the slot (segment)') - parser.add_argument('-c', '--contact', action='append', help='[multiple] of the person responsible for this machine', nargs=2) + parser.add_argument('-c', '--contact', action='append', help='[multiple] of the person responsible for this machine', nargs=1) parser.add_argument('-n', '--name', action='store', help=': Name of the client') parser.add_argument('-S', '--SERVER', action='store_true', help='Defines the type of the client to be a server') args = parser.parse_args() @@ -263,8 +260,10 @@ def main(): _collecthw = {} _collecthw['version'] = 2.0 _collecthw['dmidecode'] = get_dmidecode() - #_collecthw['smartctl'] = get_smartctl() + + # Includes smartctl, lsblk, readlink and sfdisk _collecthw['drives'] = get_disk_info() + _collecthw['lspci'] = get_lspci() _collecthw['ip'] = get_ip() _collecthw['edid'] = get_edid() -- cgit v1.2.3-55-g7522