summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2021-07-13 18:21:43 +0200
committerJannik Schönartz2021-07-13 18:21:43 +0200
commitdf18d2c8f23d71e48a6a23d140c8e9f0090948c1 (patch)
tree5940a64b79535413e4c29e3cf7408f06f8867292
parent[bas-hw-collect] Change edid from list to object with the connectionports as ... (diff)
downloadsystemd-init-df18d2c8f23d71e48a6a23d140c8e9f0090948c1.tar.gz
systemd-init-df18d2c8f23d71e48a6a23d140c8e9f0090948c1.tar.xz
systemd-init-df18d2c8f23d71e48a6a23d140c8e9f0090948c1.zip
[bas-hw-collect] Use idoit username instead of first-/lastname for contacts
-rwxr-xr-xmodules.d/bas-hw-collect/scripts/collect_hw_info_json.py11
1 files 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='<location>: Room-/Rackname where the client is located')
parser.add_argument('-s', '--slot', action='store', help='<slot> The slot number (int) where the client is located in the rack')
parser.add_argument('-b', '--bay', action='store', help='<bay> The bay number (int) where the client is located in the slot (segment)')
- parser.add_argument('-c', '--contact', action='append', help='[multiple] <firstname> <lastname> of the person responsible for this machine', nargs=2)
+ parser.add_argument('-c', '--contact', action='append', help='[multiple] <idoit_username> of the person responsible for this machine', nargs=1)
parser.add_argument('-n', '--name', action='store', help='<name>: 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()