[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.db import models
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.postgres.fields import JSONField
|
from django.contrib.postgres.fields import JSONField
|
||||||
|
from uncloud_pay.models import Product
|
||||||
|
|
||||||
# ungleich specific
|
# ungleich specific
|
||||||
storage_class_mapping = {
|
storage_class_mapping = {
|
||||||
|
@ -10,9 +11,8 @@ storage_class_mapping = {
|
||||||
'hdd': 'hdd'
|
'hdd': 'hdd'
|
||||||
}
|
}
|
||||||
|
|
||||||
class VM(models.Model):
|
class VM(Product):
|
||||||
vmid = models.IntegerField(primary_key=True)
|
vmid = models.IntegerField(primary_key=True)
|
||||||
owner = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
|
|
||||||
data = JSONField()
|
data = JSONField()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue