diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2020-03-16 10:10:30 -0400 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2020-03-17 08:48:26 -0400 |
commit | e90f13e0413594d95e50256b1206ffd64217f2da (patch) | |
tree | 40895a885bb18fd44aeb342041f4be0a068fe69a /src/resource_inventory/pdf_templater.py | |
parent | b360e0e417f787e0266268596d630b87e88283d1 (diff) |
Quick Deploy Fixes.
Change-Id: I46d410af62e4962d235346ba56472aaacb9d3ff2
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
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 |