Phasing out Product model
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
1aead50170
commit
c6bacab35a
12 changed files with 227 additions and 26 deletions
49
uncloud_vm/migrations/0006_auto_20200928_1858.py
Normal file
49
uncloud_vm/migrations/0006_auto_20200928_1858.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 18:58
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_vm', '0005_auto_20200928_1844'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='vmdiskproduct',
|
||||
name='extra_data',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmdiskproduct',
|
||||
name='owner',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmdiskproduct',
|
||||
name='status',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmproduct',
|
||||
name='extra_data',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmproduct',
|
||||
name='owner',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmproduct',
|
||||
name='status',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmsnapshotproduct',
|
||||
name='extra_data',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmsnapshotproduct',
|
||||
name='owner',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='vmsnapshotproduct',
|
||||
name='status',
|
||||
),
|
||||
]
|
||||
|
|
@ -49,7 +49,7 @@ class VMHost(UncloudModel):
|
|||
|
||||
|
||||
|
||||
class VMProduct(Product):
|
||||
class VMProduct(models.Model):
|
||||
vmhost = models.ForeignKey(
|
||||
VMHost, on_delete=models.CASCADE, editable=False, blank=True, null=True
|
||||
)
|
||||
|
|
@ -133,7 +133,7 @@ class VMDiskType(models.TextChoices):
|
|||
LOCAL_HDD = 'local/hdd'
|
||||
|
||||
|
||||
class VMDiskProduct(Product):
|
||||
class VMDiskProduct(models.Model):
|
||||
"""
|
||||
The VMDiskProduct is attached to a VM.
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ class VMNetworkCard(models.Model):
|
|||
null=True)
|
||||
|
||||
|
||||
class VMSnapshotProduct(Product):
|
||||
class VMSnapshotProduct(models.Model):
|
||||
gb_ssd = models.FloatField(editable=False)
|
||||
gb_hdd = models.FloatField(editable=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue