diff --git a/instances/models.py b/instances/models.py index fa18483..b376491 100644 --- a/instances/models.py +++ b/instances/models.py @@ -3,7 +3,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ from libvirt import VIR_DOMAIN_XML_SECURE -from vrtManager.create import wvmCreate from webvirtcloud.settings import QEMU_CONSOLE_LISTENER_ADDRESSES from computes.models import Compute @@ -228,7 +227,7 @@ class MigrateInstance(models.Model): class CreateInstance(models.Model): compute = models.ForeignKey(Compute, related_name='host', on_delete=models.DO_NOTHING) name = models.CharField(max_length=64, error_messages={'required': _('No Virtual Machine name has been entered')}) - firmware = models.CharField(max_length=50) + firmware = models.CharField(max_length=64) vcpu = models.IntegerField(error_messages={'required': _('No VCPU has been entered')}) vcpu_mode = models.CharField(max_length=20, blank=True) disk = models.IntegerField(blank=True) @@ -238,15 +237,15 @@ class CreateInstance(models.Model): storage = models.CharField(max_length=256, blank=True) template = models.CharField(max_length=256, blank=True) images = models.CharField(max_length=256, blank=True) - cache_mode = models.CharField(max_length=12, error_messages={'required': _('Please select HDD cache mode')}) + cache_mode = models.CharField(max_length=16, error_messages={'required': _('Please select HDD cache mode')}) hdd_size = models.IntegerField(blank=True) meta_prealloc = models.BooleanField(default=False, blank=True) virtio = models.BooleanField(default=True) qemu_ga = models.BooleanField(default=False) mac = models.CharField(max_length=17, blank=True) console_pass = models.CharField(max_length=64, blank=True) - graphics = models.CharField(max_length=12, error_messages={'required': _('Please select a graphics type')}) - video = models.CharField(max_length=12, error_messages={'required': _('Please select a video driver')}) + graphics = models.CharField(max_length=16, error_messages={'required': _('Please select a graphics type')}) + video = models.CharField(max_length=16, error_messages={'required': _('Please select a video driver')}) listener_addr = models.CharField(max_length=20, choices=QEMU_CONSOLE_LISTENER_ADDRESSES) class Meta: