summaryrefslogtreecommitdiffstats
path: root/dashboard/src/resource_inventory
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard/src/resource_inventory')
-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