aboutsummaryrefslogtreecommitdiffstats
path: root/src/account/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/account/models.py')
-rw-r--r--src/account/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/account/models.py b/src/account/models.py
index 4aab306..03b31df 100644
--- a/src/account/models.py
+++ b/src/account/models.py
@@ -16,6 +16,7 @@ import random
from collections import Counter
+
class LabStatus(object):
"""
A Poor man's enum for the status of a lab.
@@ -204,6 +205,8 @@ class Lab(models.Model):
# This token must apear in API requests from this lab
api_token = models.CharField(max_length=50)
description = models.CharField(max_length=240)
+ lab_info_link = models.URLField(null=True)
+ project = models.CharField(default='LaaS', max_length=100)
@staticmethod
def make_api_token():
@@ -216,7 +219,7 @@ class Lab(models.Model):
def get_available_resources(self):
# Cannot import model normally due to ciruclar import
- Server = apps.get_model('resource_inventory', 'Server') # TODO: Find way to import ResourceQuery
+ Server = apps.get_model('resource_inventory', 'Server') # TODO: Find way to import ResourceQuery
resources = [str(resource.profile) for resource in Server.objects.filter(lab=self, booked=False)]
return dict(Counter(resources))