From 50df7050d688ca28c40f97edafa758cf5a711c56 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 23 Feb 2020 17:46:30 +0100 Subject: [PATCH] vmhost: add status field --- uncloud/uncloud_vm/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uncloud/uncloud_vm/models.py b/uncloud/uncloud_vm/models.py index bba01c5..faf61b0 100644 --- a/uncloud/uncloud_vm/models.py +++ b/uncloud/uncloud_vm/models.py @@ -17,6 +17,16 @@ class VMHost(models.Model): usable_ram_in_gb = models.FloatField() + status = models.CharField(max_length=32, + choices = ( + ('pending', 'Pending'), + ('active', 'Active'), + ('unusable', 'Unusable'), + ), + default='pending' + ) + + class VM(models.Model): uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) owner = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)