From e90f13e0413594d95e50256b1206ffd64217f2da Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Mon, 16 Mar 2020 10:10:30 -0400 Subject: Quick Deploy Fixes. Change-Id: I46d410af62e4962d235346ba56472aaacb9d3ff2 Signed-off-by: Parker Berberian --- src/resource_inventory/pdf_templater.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/resource_inventory/pdf_templater.py') 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 -- cgit 1.2.3-korg