diff options
Diffstat (limited to 'src/resource_inventory/pdf_templater.py')
-rw-r--r-- | src/resource_inventory/pdf_templater.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/resource_inventory/pdf_templater.py b/src/resource_inventory/pdf_templater.py index 6844b09..367ba43 100644 --- a/src/resource_inventory/pdf_templater.py +++ b/src/resource_inventory/pdf_templater.py @@ -101,7 +101,7 @@ class PDFTemplater: returns a dictionary """ host_info = {} - host_info['name'] = host.template.resource.name + host_info['name'] = host.name host_info['node'] = cls.get_pdf_host_node(host) host_info['disks'] = [] for disk in host.profile.storageprofile.all(): @@ -153,13 +153,8 @@ class PDFTemplater: iface_info = {} iface_info['features'] = "none" iface_info['mac_address'] = interface.mac_address - iface_info['name'] = interface.name - speed = "unknown" - try: - profile = InterfaceProfile.objects.get(host=interface.host.profile, name=interface.name) - speed = str(int(profile.speed / 1000)) + "gb" - except Exception: - pass + iface_info['name'] = interface.profile.name + speed = str(int(interface.profile.speed / 1000)) + "gb" iface_info['speed'] = speed return iface_info |