Skip to content

Commit 0655b11

Browse files
committed
adds support for check-refish source 2.0.0 #478
1 parent af963b6 commit 0655b11

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

module/sources/check_redfish/import_inventory.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CheckRedfish(SourceBase):
3030
"""
3131

3232
# minimum check_redfish inventory version
33-
minimum_check_redfish_version = "1.2.0"
33+
minimum_check_redfish_version = "2.0.0"
3434

3535
dependent_netbox_objects = [
3636
NBTag,
@@ -239,8 +239,8 @@ def update_device(self):
239239
if name is not None and self.settings.overwrite_host_name is True:
240240
device_data["name"] = name
241241
if "dell" in str(manufacturer).lower():
242-
chassi = grab(self.inventory_file_content, "inventory.chassi.0")
243-
if chassi and "sku" in chassi:
242+
chassis = grab(self.inventory_file_content, "inventory.chassis.0")
243+
if chassis and "sku" in chassis:
244244

245245
# add ServiceTag
246246
self.add_update_custom_field({
@@ -253,9 +253,9 @@ def update_device(self):
253253
"description": "Dell Service Tag"
254254
})
255255

256-
device_data["custom_fields"]["service_tag"] = chassi.get("sku")
256+
device_data["custom_fields"]["service_tag"] = chassis.get("sku")
257257
else:
258-
log.warning(f"No chassi or sku data found for "
258+
log.warning(f"No chassis or sku data found for "
259259
f"'{self.device_object.get_display_name()}' in inventory file.")
260260

261261
self.device_object.update(data=device_data, source=self)

0 commit comments

Comments
 (0)