Wire disk images to VM creation/ordering

This commit is contained in:
fnux 2020-03-09 14:18:07 +01:00
commit d3b7470294
5 changed files with 85 additions and 22 deletions

View file

@ -0,0 +1,19 @@
# Generated by Django 3.0.3 on 2020-03-09 12:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('uncloud_vm', '0003_remove_vmhost_vms'),
]
operations = [
migrations.AddField(
model_name='vmproduct',
name='primary_disk',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMDiskProduct'),
),
]

View file

@ -0,0 +1,25 @@
# Generated by Django 3.0.3 on 2020-03-09 12:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('uncloud_pay', '0001_initial'),
('uncloud_vm', '0004_vmproduct_primary_disk'),
]
operations = [
migrations.AddField(
model_name='vmdiskproduct',
name='order',
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order'),
),
migrations.AddField(
model_name='vmdiskproduct',
name='status',
field=models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('ACTIVE', 'Active'), ('DELETED', 'Deleted')], default='PENDING', max_length=32),
),
]