summaryrefslogtreecommitdiffstats
path: root/dashboard/src/resource_inventory/pdf_templater.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-04-12 12:24:34 -0400
committerParker Berberian <pberberian@iol.unh.edu>2019-04-17 10:18:45 -0400
commit1aad8a8ad965b9a20224b2ae094ce776c992a601 (patch)
treefee8cdf3583f7abb6f717671ba1e87170c8faf2c /dashboard/src/resource_inventory/pdf_templater.py
parentb2c5b21679ff2411b44ea90faef5ccae90cafac0 (diff)
Fixes the idf and pdf templates so that we can deploy opnfv
Change-Id: I0091629f8f0af423210b2e81210d65239e9662b4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/resource_inventory/pdf_templater.py')
-rw-r--r--dashboard/src/resource_inventory/pdf_templater.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/dashboard/src/resource_inventory/pdf_templater.py b/dashboard/src/resource_inventory/pdf_templater.py
index 9f7e7f1..2db2129 100644
--- a/dashboard/src/resource_inventory/pdf_templater.py
+++ b/dashboard/src/resource_inventory/pdf_templater.py
@@ -69,10 +69,6 @@ class PDFTemplater:
"""
jumphost = Host.objects.get(bundle=resource, config__opnfvRole__name__iexact="jumphost")
jumphost_info = cls.get_pdf_host(jumphost)
- remote_params = jumphost_info['remote_management'] # jumphost has extra block not in normal hosts
- remote_params.pop("address")
- remote_params.pop("mac_address")
- jumphost_info['remote_params'] = remote_params
jumphost_info['os'] = jumphost.config.image.os.name
return jumphost_info
@@ -105,7 +101,7 @@ class PDFTemplater:
for interface in host.interfaces.all():
host_info['interfaces'].append(cls.get_pdf_host_iface(interface))
- host_info['remote_management'] = cls.get_pdf_host_remote_management(host)
+ host_info['remote'] = cls.get_pdf_host_remote_management(host)
return host_info
@@ -163,11 +159,12 @@ class PDFTemplater:
"""
gives the remote params of the host
"""
+ man = host.remote_management
mgmt = {}
- mgmt['address'] = "I dunno"
- mgmt['mac_address'] = "I dunno"
- mgmt['pass'] = "I dunno"
- mgmt['type'] = "I dunno"
- mgmt['user'] = "I dunno"
- mgmt['versions'] = ["I dunno"]
+ mgmt['address'] = man.address
+ mgmt['mac_address'] = man.mac_address
+ mgmt['pass'] = man.password
+ mgmt['type'] = man.management_type
+ mgmt['user'] = man.user
+ mgmt['versions'] = [man.versions]
return mgmt