forked from uncloud/uncloud
Remove vms field from vmhost
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
2a73f0e767
commit
139aca6a61
3 changed files with 23 additions and 5 deletions
|
|
@ -41,11 +41,9 @@ class VMHost(models.Model):
|
|||
max_length=32, choices=STATUS_CHOICES, default=STATUS_DEFAULT
|
||||
)
|
||||
|
||||
# List of VMs running on this host
|
||||
vms = models.TextField(default='')
|
||||
|
||||
def get_vms(self):
|
||||
return self.vms.split(',')
|
||||
@property
|
||||
def vms(self):
|
||||
return VMProduct.objects.filter(vmhost=self)
|
||||
|
||||
|
||||
class VMProduct(Product):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue