summaryrefslogtreecommitdiffstats
path: root/dashboard/src/resource_inventory/models.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-03-20 16:18:59 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-20 16:18:59 +0000
commita85015aaff008213fe5c766bd90b35e641e5b2d4 (patch)
tree0d965164c9acc6bff238f5840c92ada8033eba5b /dashboard/src/resource_inventory/models.py
parent08c71605bf39d7a44e82ff5c7c8740b321108259 (diff)
parent3e07f1c67f6e5ff82ff11c63f9aac618a33a2749 (diff)
Merge "Fixes Booking List"
Diffstat (limited to 'dashboard/src/resource_inventory/models.py')
-rw-r--r--dashboard/src/resource_inventory/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/dashboard/src/resource_inventory/models.py b/dashboard/src/resource_inventory/models.py
index 4e3974e..bdc1f5d 100644
--- a/dashboard/src/resource_inventory/models.py
+++ b/dashboard/src/resource_inventory/models.py
@@ -184,6 +184,9 @@ class ResourceBundle(models.Model):
return "Resource bundle " + str(self.id) + " with no template"
return "instance of " + str(self.template)
+ def get_host(self, role="Jumphost"):
+ return Host.objects.filter(bundle=self, config__opnfvRole__name=role).first()
+
# Networking