aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
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/api
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/api')
-rw-r--r--src/api/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/api/models.py b/src/api/models.py
index f8b8f89..4ce8c3e 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -25,6 +25,8 @@ from resource_inventory.models import (
Interface,
RemoteInfo
)
+from resource_inventory.idf_templater import IDFTemplater
+from resource_inventory.pdf_templater import PDFTemplater
class JobStatus(object):
@@ -86,8 +88,15 @@ class LabManager(object):
remote_info.save()
host.remote_management = remote_info
host.save()
+ booking = Booking.objects.get(resource=host.bundle)
+ self.update_xdf(booking)
return {"status": "success"}
+ def update_xdf(self, booking):
+ booking.pdf = PDFTemplater.makePDF(booking.resource)
+ booking.idf = IDFTemplater().makeIDF(booking)
+ booking.save()
+
def get_profile(self):
prof = {}
prof['name'] = self.lab.name