mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
change firmware, graphic, video fields max lenght
This commit is contained in:
parent
6eb06280c5
commit
5425519408
1 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from libvirt import VIR_DOMAIN_XML_SECURE
|
from libvirt import VIR_DOMAIN_XML_SECURE
|
||||||
from vrtManager.create import wvmCreate
|
|
||||||
from webvirtcloud.settings import QEMU_CONSOLE_LISTENER_ADDRESSES
|
from webvirtcloud.settings import QEMU_CONSOLE_LISTENER_ADDRESSES
|
||||||
|
|
||||||
from computes.models import Compute
|
from computes.models import Compute
|
||||||
|
@ -228,7 +227,7 @@ class MigrateInstance(models.Model):
|
||||||
class CreateInstance(models.Model):
|
class CreateInstance(models.Model):
|
||||||
compute = models.ForeignKey(Compute, related_name='host', on_delete=models.DO_NOTHING)
|
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')})
|
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 = models.IntegerField(error_messages={'required': _('No VCPU has been entered')})
|
||||||
vcpu_mode = models.CharField(max_length=20, blank=True)
|
vcpu_mode = models.CharField(max_length=20, blank=True)
|
||||||
disk = models.IntegerField(blank=True)
|
disk = models.IntegerField(blank=True)
|
||||||
|
@ -238,15 +237,15 @@ class CreateInstance(models.Model):
|
||||||
storage = models.CharField(max_length=256, blank=True)
|
storage = models.CharField(max_length=256, blank=True)
|
||||||
template = models.CharField(max_length=256, blank=True)
|
template = models.CharField(max_length=256, blank=True)
|
||||||
images = 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)
|
hdd_size = models.IntegerField(blank=True)
|
||||||
meta_prealloc = models.BooleanField(default=False, blank=True)
|
meta_prealloc = models.BooleanField(default=False, blank=True)
|
||||||
virtio = models.BooleanField(default=True)
|
virtio = models.BooleanField(default=True)
|
||||||
qemu_ga = models.BooleanField(default=False)
|
qemu_ga = models.BooleanField(default=False)
|
||||||
mac = models.CharField(max_length=17, blank=True)
|
mac = models.CharField(max_length=17, blank=True)
|
||||||
console_pass = models.CharField(max_length=64, 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')})
|
graphics = models.CharField(max_length=16, error_messages={'required': _('Please select a graphics type')})
|
||||||
video = models.CharField(max_length=12, error_messages={'required': _('Please select a video driver')})
|
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)
|
listener_addr = models.CharField(max_length=20, choices=QEMU_CONSOLE_LISTENER_ADDRESSES)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
Loading…
Reference in a new issue