[opennebula] turn VM into a product

This commit is contained in:
Nico Schottelius 2020-08-01 14:02:54 +02:00
parent 3745a0e2b1
commit bdba3bffe2

View file

@ -2,6 +2,7 @@ import uuid
from django.db import models
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import JSONField
from uncloud_pay.models import Product
# ungleich specific
storage_class_mapping = {
@ -10,9 +11,8 @@ storage_class_mapping = {
'hdd': 'hdd'
}
class VM(models.Model):
class VM(Product):
vmid = models.IntegerField(primary_key=True)
owner = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
data = JSONField()
@property