From bdba3bffe20b74fd888fda1969bf1e81dea958dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 1 Aug 2020 14:02:54 +0200 Subject: [PATCH] [opennebula] turn VM into a product --- opennebula/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opennebula/models.py b/opennebula/models.py index 826b615..2730474 100644 --- a/opennebula/models.py +++ b/opennebula/models.py @@ -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