diff options
Diffstat (limited to 'src/resource_inventory/models.py')
-rw-r--r-- | src/resource_inventory/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index 0b7b24c..d3f47d4 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -190,6 +190,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() + class GenericInterface(models.Model): id = models.AutoField(primary_key=True) |