aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit9693b9e4185f5dfc658655aef0156f36453133ee (patch)
treebaabbd8820ea2e62b3d667cbe238f64d31fcbe82 /src/resource_inventory/pdf_templater.py
parentd8e9f0e33648426a95ae50bf27fa089036f6a1fd (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 'src/resource_inventory/pdf_templater.py')
-rw-r--r--src/resource_inventory/pdf_templater.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/resource_inventory/pdf_templater.py b/src/resource_inventory/pdf_templater.py
index 9f7e7f1..2db2129 100644
--- a/src/resource_inventory/pdf_templater.py
+++ b/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