aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/pdf_templater.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-04-17 14:32:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-04-17 14:32:03 +0000
commitfec940b7b8d15099b8f914ce35552c59db9eb77b (patch)
treed65e8f7d67957719c84400e9cbbc0007ce215e20 /src/resource_inventory/pdf_templater.py
parent01ef094c8248d9dfd2807142ea8e78da71413c8b (diff)
parent9693b9e4185f5dfc658655aef0156f36453133ee (diff)
Merge "Fixes the idf and pdf templates so that we can deploy opnfv"
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