Commit 1c898e2e by Karsa Zoltán István

def to 0

parent 9e4ea7d9
...@@ -53,7 +53,7 @@ class InstanceTemplateSerializer(serializers.ModelSerializer): ...@@ -53,7 +53,7 @@ class InstanceTemplateSerializer(serializers.ModelSerializer):
model = InstanceTemplate model = InstanceTemplate
fields = [ 'id', 'name', 'description', 'parent', 'owner', 'access_method', 'boot_menu', fields = [ 'id', 'name', 'description', 'parent', 'owner', 'access_method', 'boot_menu',
'lease', 'raw_data', 'cloud_init', 'ci_network_config', 'ci_meta_data', 'ci_user_data', 'system', 'lease', 'raw_data', 'cloud_init', 'ci_network_config', 'ci_meta_data', 'ci_user_data', 'system',
'has_agent', 'num_cores', 'ram_size', 'max_ram_size', 'arch', 'priority', 'disks'] 'has_agent', 'num_cores', 'ram_size', 'max_ram_size', 'arch', 'priority', 'disks', 'num_cores_max']
class LeaseSerializer(serializers.ModelSerializer): class LeaseSerializer(serializers.ModelSerializer):
......
# Generated by Django 3.2.3 on 2022-12-28 14:16
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vm', '0015_auto_20221227_1939'),
]
operations = [
migrations.AlterField(
model_name='instance',
name='num_cores_max',
field=models.IntegerField(default=0, help_text='Number of max virtual CPU cores available to the virtual machine.', validators=[django.core.validators.MinValueValidator(0)], verbose_name='number of cores'),
),
migrations.AlterField(
model_name='instancetemplate',
name='num_cores_max',
field=models.IntegerField(default=0, help_text='Number of max virtual CPU cores available to the virtual machine.', validators=[django.core.validators.MinValueValidator(0)], verbose_name='number of cores'),
),
migrations.AlterField(
model_name='namedbaseresourceconfig',
name='num_cores_max',
field=models.IntegerField(default=0, help_text='Number of max virtual CPU cores available to the virtual machine.', validators=[django.core.validators.MinValueValidator(0)], verbose_name='number of cores'),
),
]
...@@ -52,7 +52,7 @@ class BaseResourceConfigModel(Model): ...@@ -52,7 +52,7 @@ class BaseResourceConfigModel(Model):
num_cores_max = IntegerField(verbose_name=_('number of cores'), num_cores_max = IntegerField(verbose_name=_('number of cores'),
help_text=_('Number of max virtual CPU cores ' help_text=_('Number of max virtual CPU cores '
'available to the virtual machine.'), 'available to the virtual machine.'),
validators=[MinValueValidator(0)], default=2) validators=[MinValueValidator(0)], default=0)
ram_size = IntegerField(verbose_name=_('RAM size'), ram_size = IntegerField(verbose_name=_('RAM size'),
help_text=_('Mebibytes of memory.'), help_text=_('Mebibytes of memory.'),
validators=[MinValueValidator(0)]) validators=[MinValueValidator(0)])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment