forked from uncloud/uncloud
[opennebula] turn VM into a product
This commit is contained in:
parent
3745a0e2b1
commit
bdba3bffe2
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue