1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00

refactor: the API's serializers and the new VM form no longer need models

Networks, Interfaces, Storages, Storage, Volume, MigrateInstance and
CreateInstance were unmanaged models with no table, there only so that
ModelSerializers and the new VM ModelForm could take their fields. They
made content types and migrations, and their DO_NOTHING foreign keys
added reverse accessors that meant nothing (Compute.host,
Compute.target_host, Instance.source_host).

The serializers are plain Serializers and NewVMForm a Form, field for
field as the models gave them (types, lengths, required, defaults, the
minimum of 1 for vCPUs, memory and disk size; the form's labels are
still derived from the field names). Compared field by field before and
after, the API schema changes only where the models were wrong:
- no int64 bounds on the listing fields;
- the interface fields lose the titles that named the wrong column
  (type was "Status", state "Device", mac "Forward");
- a pool's volumes is a list of objects (it was described as an
  integer) and a volume's allocation an integer (it was untyped).
One migration per app deletes the models; none touches a table.
This commit is contained in:
catborise 2026-11-06 11:06:40 +03:00
parent f3bdeddb0b
commit f1f52aac42
17 changed files with 434 additions and 736 deletions

View file

@ -1,4 +1,6 @@
from instances.models import CreateInstance, Flavor, Instance, MigrateInstance
from computes.models import Compute
from django.conf import settings
from instances.models import Flavor, Instance
from instances.utils import nic_macs
from rest_framework import serializers
@ -76,14 +78,28 @@ class DestroySerializer(DestroyOptionsSerializer):
submission_key = serializers.CharField(write_only=True)
class CreateInstanceSerializer(serializers.ModelSerializer):
class CreateInstanceSerializer(serializers.Serializer):
"""The API's VM create: the new VM form's fields, as a job."""
name = serializers.CharField(max_length=64)
# BIOS, UEFI or UEFI Secure Boot, as the host offers; left out: the machine's default
firmware = serializers.CharField(required=False)
video = serializers.CharField(initial="vga")
tpm = serializers.BooleanField(required=False)
vcpu = serializers.IntegerField(min_value=1)
vcpu_mode = serializers.CharField(max_length=64)
memory = serializers.IntegerField(min_value=1)
networks = serializers.CharField(max_length=256)
mac = serializers.CharField(allow_blank=True, max_length=255, required=False)
nwfilter = serializers.CharField(allow_blank=True, max_length=256, required=False)
storage = serializers.CharField(initial="default")
hdd_size = serializers.IntegerField(min_value=1, required=False)
cache_mode = serializers.CharField(initial="none")
meta_prealloc = serializers.BooleanField(required=False)
virtio = serializers.BooleanField(initial=True)
qemu_ga = serializers.BooleanField(initial=True)
cloud_init = serializers.BooleanField(required=False)
video = serializers.CharField(initial="vga")
listener_addr = serializers.ChoiceField(choices=settings.QEMU_CONSOLE_LISTENER_ADDRESSES)
submission_key = serializers.CharField(write_only=True)
def validate(self, attrs):
@ -93,32 +109,10 @@ class CreateInstanceSerializer(serializers.ModelSerializer):
raise serializers.ValidationError({"mac": str(err)})
return attrs
class Meta:
model = CreateInstance
fields = [
"name",
"firmware",
"tpm",
"vcpu",
"vcpu_mode",
"memory",
"networks",
"mac",
"nwfilter",
"storage",
"hdd_size",
"cache_mode",
"meta_prealloc",
"virtio",
"qemu_ga",
"cloud_init",
"video",
"listener_addr",
"submission_key",
]
class MigrateSerializer(serializers.ModelSerializer):
class MigrateSerializer(serializers.Serializer):
instance = serializers.PrimaryKeyRelatedField(queryset=Instance.objects.all())
target_compute = serializers.PrimaryKeyRelatedField(queryset=Compute.objects.all())
live = serializers.BooleanField(default=True)
offline = serializers.BooleanField(default=False)
# left out, also from a form-encoded request: auto converge on
@ -129,18 +123,3 @@ class MigrateSerializer(serializers.ModelSerializer):
disk_pools = serializers.DictField(child=serializers.CharField(allow_blank=True), default=dict)
delete_source = serializers.BooleanField(default=False)
submission_key = serializers.CharField(write_only=True)
class Meta:
model = MigrateInstance
fields = [
"instance",
"target_compute",
"live",
"offline",
"autoconverge",
"compress",
"unsafe",
"disk_pools",
"delete_source",
"submission_key",
]

View file

@ -4,7 +4,7 @@ from django import forms
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from .models import CreateInstance, Flavor
from .models import Flavor
from .utils import nic_macs
@ -100,30 +100,36 @@ class ConsoleForm(forms.Form):
return data
class NewVMForm(forms.ModelForm):
# name = forms.CharField(error_messages={'required': _('No Virtual Machine name has been entered')}, max_length=64)
# firmware = forms.CharField(max_length=50, required=False)
# vcpu = forms.IntegerField(error_messages={'required': _('No VCPU has been entered')})
# disk = forms.IntegerField(required=False)
# memory = forms.IntegerField(error_messages={'required': _('No RAM size has been entered')})
# networks = forms.CharField(error_messages={'required': _('No Network pool has been choosen')})
# nwfilter = forms.CharField(required=False)
# storage = forms.CharField(max_length=20, required=False)
# template = forms.CharField(required=False)
# images = forms.CharField(required=False)
# cache_mode = forms.CharField(error_messages={'required': _('Please select HDD cache mode')})
# hdd_size = forms.IntegerField(required=False)
# meta_prealloc = forms.BooleanField(required=False)
# virtio = forms.BooleanField(required=False)
# qemu_ga = forms.BooleanField(required=False)
# mac = forms.CharField(required=False)
# graphics = forms.CharField(error_messages={'required': _('Please select a graphics type')})
# video = forms.CharField(error_messages={'required': _('Please select a video driver')})
# listener_addr = forms.ChoiceField(required=True, widget=forms.RadioSelect, choices=QEMU_CONSOLE_LISTENER_ADDRESSES)
class Meta:
model = CreateInstance
fields = "__all__"
exclude = ["compute"]
class NewVMForm(forms.Form):
"""The new VM form (create_instance_w2.html); the API takes CreateInstanceSerializer."""
name = forms.CharField(max_length=64)
firmware = forms.CharField(max_length=64)
# an emulated TPM 2.0, as Windows 11 needs
tpm = forms.BooleanField(required=False)
vcpu = forms.IntegerField(min_value=1)
# a mode of libvirt's (host-model, host-passthrough, maximum) or a CPU model's name
vcpu_mode = forms.CharField(max_length=64)
disk = forms.IntegerField(required=False)
memory = forms.IntegerField(min_value=1)
networks = forms.CharField(max_length=256)
nwfilter = forms.CharField(max_length=256, required=False)
net_model = forms.CharField(max_length=256, required=False)
storage = forms.CharField(max_length=256, required=False)
template = forms.CharField(max_length=256, required=False)
images = forms.CharField(max_length=256, required=False)
cache_mode = forms.CharField(max_length=16)
hdd_size = forms.IntegerField(min_value=1, required=False)
meta_prealloc = forms.BooleanField(required=False)
virtio = forms.BooleanField(required=False, initial=True)
qemu_ga = forms.BooleanField(required=False)
mac = forms.CharField(max_length=255, required=False) # one per NIC, comma separated
add_cdrom = forms.CharField(max_length=16)
# a NoCloud seed on a CD-ROM: the hostname and the creating user's SSH keys
cloud_init = forms.BooleanField(required=False)
add_input = forms.CharField(max_length=16)
video = forms.CharField(max_length=16)
listener_addr = forms.ChoiceField(choices=settings.QEMU_CONSOLE_LISTENER_ADDRESSES)
def clean_name(self):
name = self.cleaned_data["name"]

View file

@ -0,0 +1,19 @@
# Generated by Django 5.2.18 on 2026-11-06 08:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('instances', '0014_instancetombstone_host'),
]
operations = [
migrations.DeleteModel(
name='CreateInstance',
),
migrations.DeleteModel(
name='MigrateInstance',
),
]

View file

@ -1,6 +1,4 @@
from computes.models import Compute
from django.conf import settings
from django.core.validators import MinValueValidator
from django.db import models
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
@ -403,76 +401,6 @@ class Instance(models.Model):
return self.proxy.get_image_formats()
class MigrateInstance(models.Model):
instance = models.ForeignKey(
Instance, related_name="source_host", on_delete=models.DO_NOTHING
)
target_compute = models.ForeignKey(
Compute, related_name="target_host", on_delete=models.DO_NOTHING
)
live = models.BooleanField(_("Live"))
offline = models.BooleanField(_("Offline"))
autoconverge = models.BooleanField(_("Auto Converge"), default=True)
compress = models.BooleanField(_("Compress"), default=False)
unsafe = models.BooleanField(_("Unsafe"), default=False)
class Meta:
managed = False
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=64)
# an emulated TPM 2.0, as Windows 11 needs
tpm = models.BooleanField(default=False)
vcpu = models.IntegerField(
error_messages={"required": _("No VCPU has been entered")}, validators=[MinValueValidator(1)]
)
# a mode of libvirt's (host-model, host-passthrough, maximum) or a CPU model's name
vcpu_mode = models.CharField(max_length=64)
disk = models.IntegerField(blank=True)
memory = models.IntegerField(
error_messages={"required": _("No RAM size has been entered")}, validators=[MinValueValidator(1)]
)
networks = models.CharField(
max_length=256,
error_messages={"required": _("No Network pool has been choosen")},
)
nwfilter = models.CharField(max_length=256, blank=True)
net_model = models.CharField(max_length=256, blank=True)
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=16, error_messages={"required": _("Please select HDD cache mode")}
)
hdd_size = models.IntegerField(blank=True, validators=[MinValueValidator(1)])
meta_prealloc = models.BooleanField(default=False, blank=True)
virtio = models.BooleanField(default=True)
qemu_ga = models.BooleanField(default=False)
mac = models.CharField(max_length=255, blank=True) # one per NIC, comma separated
add_cdrom = models.CharField(max_length=16)
# a NoCloud seed on a CD-ROM: the hostname and the creating user's SSH keys
cloud_init = models.BooleanField(default=False)
add_input = models.CharField(max_length=16)
video = models.CharField(
max_length=16, error_messages={"required": _("Please select a video driver")}
)
listener_addr = models.CharField(
max_length=20, choices=settings.QEMU_CONSOLE_LISTENER_ADDRESSES
)
class Meta:
managed = False
class InstanceTombstone(models.Model):
"""Ownership of a VM that disappeared from its compute.

View file

@ -1,11 +1,10 @@
from rest_framework import serializers
from interfaces.models import Interfaces
class InterfacesSerializer(serializers.ModelSerializer):
class Meta:
model = Interfaces
fields = ['name', 'type', 'state', 'mac']
class InterfacesSerializer(serializers.Serializer):
"""A host interface as the API lists it."""
name = serializers.CharField(max_length=20)
type = serializers.CharField(max_length=12)
state = serializers.CharField(max_length=100)
mac = serializers.CharField(max_length=24)

View file

@ -0,0 +1,16 @@
# Generated by Django 5.2.18 on 2026-11-06 08:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('interfaces', '0001_initial'),
]
operations = [
migrations.DeleteModel(
name='Interfaces',
),
]

View file

@ -1,17 +0,0 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
# Create your models here.
class Interfaces(models.Model):
name = models.CharField(
_("name"),
max_length=20,
error_messages={"required": _("No interface name has been entered")},
)
type = models.CharField(_("status"), max_length=12)
state = models.CharField(_("device"), max_length=100)
mac = models.CharField(_("forward"), max_length=24)
class Meta:
managed = False

Binary file not shown.

View file

@ -149,8 +149,7 @@ msgid "Can change password"
msgstr "Parola değiştirebilir"
#: accounts/models.py:92 appsettings/models.py:9 computes/models.py:15
#: instances/models.py:34 interfaces/models.py:8 networks/models.py:8
#: storages/models.py:8 storages/models.py:25
#: instances/models.py:32
msgid "name"
msgstr "ad"
@ -356,7 +355,7 @@ msgstr "Kullanıcı adını girin"
#: accounts/templates/accounts/otp_login.html:37
#: accounts/templates/login.html:36 admin/templates/admin/user_form.html:31
#: console/templates/console-vnc.html:82 instances/forms.py:28
#: console/templates/console-vnc.html:82 instances/forms.py:27
#: instances/templates/instances/access_tab.html:53
msgid "Password"
msgstr "Parola"
@ -711,7 +710,7 @@ msgstr ""
"NEW_USER_DEFAULT_INSTANCES: %(name)s tam olarak tek bir sanal makine değil"
#: admin/forms.py:186 computes/templates/computes/list.html:58
#: computes/templates/overview.html:58 instances/forms.py:15
#: computes/templates/overview.html:58 instances/forms.py:14
#: instances/templates/allinstances_index_grouped.html:16
#: instances/templates/allinstances_index_nongrouped.html:14
#: instances/templates/create_instance_w2.html:63
@ -732,7 +731,7 @@ msgstr "vCPU"
msgid "Memory"
msgstr "Bellek"
#: admin/forms.py:188 instances/models.py:237
#: admin/forms.py:188 instances/models.py:235
#: instances/templates/create_instance_w2.html:118
#: instances/templates/instances/settings_tab.html:25
#: instances/templates/instances/stats_tab.html:51
@ -915,7 +914,7 @@ msgid "IP"
msgstr "IP"
#: admin/templates/admin/logs.html:56 admin/views.py:286 instances/states.py:19
#: instances/views.py:414 instances/views.py:416 logs/views.py:17
#: instances/views.py:419 instances/views.py:421 logs/views.py:17
msgid "Unknown"
msgstr "Bilinmeyen"
@ -2631,64 +2630,64 @@ msgstr ""
"'%(type)s' konsol tipi desteklenmiyor. Lütfen sanal makinenin grafik tipini "
"VNC olarak değiştirin."
#: instances/forms.py:14 instances/templates/create_instance_w2.html:69
#: instances/forms.py:13 instances/templates/create_instance_w2.html:69
#: instances/templates/instances/settings_tab.html:857
msgid "Memory (MiB)"
msgstr "Bellek (MiB)"
#: instances/forms.py:16
#: instances/forms.py:15
msgid "Disk (GiB)"
msgstr "Disk (GiB)"
#: instances/forms.py:25
#: instances/forms.py:24
msgid "Console type"
msgstr "Konsol tipi"
#: instances/forms.py:30
#: instances/forms.py:29
msgid "Keep the password"
msgstr "Parolayı koru"
#: instances/forms.py:31
#: instances/forms.py:30
msgid "Generate a new one"
msgstr "Yenisini oluştur"
#: instances/forms.py:32
#: instances/forms.py:31
msgid "Set a new one"
msgstr "Yenisini belirle"
#: instances/forms.py:33
#: instances/forms.py:32
msgid "No password"
msgstr "Parola yok"
#: instances/forms.py:38
#: instances/forms.py:37
msgid "New password"
msgstr "Yeni parola"
#: instances/forms.py:58
#: instances/forms.py:57
msgid "Serial (xterm; the guest needs a getty on ttyS0)"
msgstr "Seri (xterm; konuk sistemde ttyS0 üzerinde getty gerekir)"
#: instances/forms.py:65
#: instances/forms.py:64
msgid "Auto"
msgstr "Otomatik"
#: instances/forms.py:74
#: instances/forms.py:73
msgid "Listen on"
msgstr "Dinlenen"
#: instances/forms.py:81
#: instances/forms.py:80
msgid "Keymap"
msgstr "Klavye eşlemi"
#: instances/forms.py:90
#: instances/forms.py:89
msgid "Enter the new password."
msgstr "Yeni parolayı girin."
#: instances/forms.py:93
#: instances/forms.py:92
msgid "A VNC password takes at most 8 bytes."
msgstr "VNC parolası en fazla 8 bayt olabilir."
#: instances/forms.py:99
#: instances/forms.py:98
msgid ""
"The console listens beyond localhost; only an administrator can remove its "
"password."
@ -2696,7 +2695,7 @@ msgstr ""
"Konsol localhost dışında da dinliyor; parolasını yalnızca bir yönetici "
"kaldırabilir."
#: instances/forms.py:135
#: instances/forms.py:140
msgid "The name of the virtual machine must not contain any special characters"
msgstr "Sanal makine adı özel karakterler içeremez"
@ -2932,7 +2931,7 @@ msgstr ""
msgid "Create VM"
msgstr "Sanal makine oluştur"
#: instances/jobs.py:773 instances/jobs.py:818 instances/views.py:2458
#: instances/jobs.py:773 instances/jobs.py:818 instances/views.py:2463
msgid "A virtual machine with this name already exists"
msgstr "Bu isimde bir sanal makine mevcut"
@ -3105,92 +3104,48 @@ msgstr "Sanal makine siliniyor"
msgid "The VM was not deleted; it may have been shut off"
msgstr "Sanal makine silinmedi; kapatılmış olabilir"
#: instances/models.py:18
#: instances/models.py:16
msgid "label"
msgstr "etiket"
#: instances/models.py:19
#: instances/models.py:17
msgid "memory"
msgstr "bellek"
#: instances/models.py:20
#: instances/models.py:18
msgid "vcpu"
msgstr "vcpu"
#: instances/models.py:21
#: instances/models.py:19
msgid "disk"
msgstr "disk"
#: instances/models.py:35
#: instances/models.py:33
msgid "uuid"
msgstr "uuid"
#: instances/models.py:36
#: instances/models.py:34
msgid "is template"
msgstr "şablon mu"
#: instances/models.py:37
#: instances/models.py:35
msgid "created"
msgstr "oluşturuldu"
#: instances/models.py:38
#: instances/models.py:36
msgid "drbd"
msgstr "drbd"
#: instances/models.py:239 instances/templates/create_instance_w2.html:312
#: instances/models.py:237 instances/templates/create_instance_w2.html:312
#: instances/templates/instances/settings_tab.html:159
msgid "CD-ROM"
msgstr "CD-ROM"
#: instances/models.py:241
#: instances/models.py:239
msgid "NIC"
msgstr "NIC"
#: instances/models.py:414
msgid "Live"
msgstr "Canlı"
#: instances/models.py:415
msgid "Offline"
msgstr "Çevrimdışı"
#: instances/models.py:416
msgid "Auto Converge"
msgstr "Otomatik yavaşlat"
#: instances/models.py:417
msgid "Compress"
msgstr "Sıkıştır"
#: instances/models.py:418
msgid "Unsafe"
msgstr "Güvenli olmayan"
#: instances/models.py:430
msgid "No Virtual Machine name has been entered"
msgstr "Sanal makine adı girilmedi"
#: instances/models.py:436
msgid "No VCPU has been entered"
msgstr "VCPU belirtilmedi"
#: instances/models.py:442
msgid "No RAM size has been entered"
msgstr "RAM boyutu belirtilmedi"
#: instances/models.py:446
msgid "No Network pool has been choosen"
msgstr "Ağ havuzu seçilmedi"
#: instances/models.py:454
msgid "Please select HDD cache mode"
msgstr "Lütfen HDD ön bellek modunu seçin"
#: instances/models.py:466
msgid "Please select a video driver"
msgstr "Lütfen bir video sürücüsü seçin"
#: instances/models.py:503
#: instances/models.py:431
msgid "Can access console without password"
msgstr "Parolasız konsol erişimi yapabilir"
@ -3332,7 +3287,7 @@ msgid "Disk source"
msgstr "Disk kaynağı"
#: instances/templates/add_instance_volume.html:21
#: instances/templates/create_instance_w2.html:134 instances/views.py:2477
#: instances/templates/create_instance_w2.html:134 instances/views.py:2482
msgid "New disk"
msgstr "Yeni disk"
@ -3704,7 +3659,7 @@ msgstr "Özel CPU modelleri"
msgid "Size (GiB)"
msgstr "Boyut (GiB)"
#: instances/templates/create_instance_w2.html:161 instances/views.py:2478
#: instances/templates/create_instance_w2.html:161 instances/views.py:2483
msgid "Existing volumes"
msgstr "Mevcut birimler"
@ -3740,7 +3695,7 @@ msgstr "Aygıt"
msgid "Remove"
msgstr "Kaldır"
#: instances/templates/create_instance_w2.html:194 instances/views.py:2479
#: instances/templates/create_instance_w2.html:194 instances/views.py:2484
msgid "Clone from template"
msgstr "Şablondan klonla"
@ -5903,43 +5858,43 @@ msgstr "Geçersiz MAC adresi"
msgid "More MAC addresses than networks"
msgstr "Ağlardan daha fazla MAC adresi"
#: instances/views.py:168
#: instances/views.py:173
msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address."
msgstr "Bir IP adresi, 192.0.2.0/24 gibi bir ağ ya da bir MAC adresi girin."
#: instances/views.py:174 instances/views.py:208
#: instances/views.py:179 instances/views.py:213
msgid "Too many searches are still running; try again shortly."
msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin."
#: instances/views.py:256
#: instances/views.py:261
#, python-format
msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s"
msgstr "'%(name)s' sanal makinesinin sunucusu %(host)s erişilemiyor: %(error)s"
#: instances/views.py:262
#: instances/views.py:267
#, python-format
msgid "The host of '%(name)s' cannot be reached right now."
msgstr "'%(name)s' sanal makinesinin sunucusuna şu anda erişilemiyor."
#: instances/views.py:263
#: instances/views.py:268
msgid " Jobs on it can be followed under Jobs in the menu."
msgstr " Üzerindeki işler menüdeki İşler bölümünden izlenebilir."
#: instances/views.py:271
#: instances/views.py:276
#, python-format
msgid "'%(name)s' is no longer on its host."
msgstr "'%(name)s' artık sunucusunda yok."
#: instances/views.py:369
#: instances/views.py:374
msgid "There is no other host to migrate to."
msgstr "Taşınacak başka bir sunucu yok."
#: instances/views.py:371
#: instances/views.py:376
msgid "A VM migrates when it is running, paused or shut off."
msgstr ""
"Sanal makine çalışırken, duraklatılmışken ya da kapalıyken taşınabilir."
#: instances/views.py:373
#: instances/views.py:378
msgid ""
"A VM with snapshots cannot be migrated: its snapshots stay on this host. "
"Delete them first."
@ -5947,7 +5902,7 @@ msgstr ""
"Anlık görüntüsü olan bir sanal makine taşınamaz: anlık görüntüleri bu "
"sunucuda kalır. Önce onları silin."
#: instances/views.py:375
#: instances/views.py:380
msgid ""
"A VM with host devices cannot be migrated: the destination may not have them."
" Remove them first."
@ -5955,11 +5910,11 @@ msgstr ""
"Sunucu aygıtları olan bir sanal makine taşınamaz: hedefte bu aygıtlar "
"olmayabilir. Önce onları kaldırın."
#: instances/views.py:639
#: instances/views.py:644
msgid "The VM was moved meanwhile; try again."
msgstr "Sanal makine bu arada taşındı; yeniden deneyin."
#: instances/views.py:755
#: instances/views.py:760
msgid ""
"The running VM has no free PCI slot for another disk on this bus: choose the "
"scsi bus if the VM has a SCSI controller, or shut the VM down and add the "
@ -5972,7 +5927,7 @@ msgstr ""
"yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni bir "
"birim havuzunda kalır, mevcut birim olarak eklenebilir."
#: instances/views.py:759
#: instances/views.py:764
msgid ""
"The running VM has no free PCI slot for the SCSI controller the disk needs: "
"shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives"
@ -5984,175 +5939,175 @@ msgstr ""
"PCIe yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni "
"bir birim havuzunda kalır, mevcut birim olarak eklenebilir."
#: instances/views.py:777
#: instances/views.py:782
#, python-format
msgid "Invalid disk options: %(options)s"
msgstr "Geçersiz disk seçenekleri: %(options)s"
#: instances/views.py:787 instances/views.py:802
#: instances/views.py:792 instances/views.py:807
msgid "Templates cannot be started."
msgstr "Şablon makineler başlatılamaz."
#: instances/views.py:994
#: instances/views.py:999
#, python-format
msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)"
msgstr ""
"Önce %(compute)s sunucusunun gstfsd anahtarını ayarlayın (Sunucular, sunucuyu"
" düzenle)"
#: instances/views.py:1001 instances/views.py:1019 instances/views.py:1028
#: instances/views.py:1006 instances/views.py:1024 instances/views.py:1033
#, python-format
msgid "gstfsd error: %(err)s"
msgstr "gstfsd hatası: %(err)s"
#: instances/views.py:1029
#: instances/views.py:1034
msgid "the reply is not signed with the key"
msgstr "yanıt anahtarla imzalanmamış"
#: instances/views.py:1037
#: instances/views.py:1042
msgid "Shut the VM down, or start its QEMU guest agent, and try again"
msgstr ""
"Sanal makineyi kapatın ya da QEMU konuk ajanını başlatın ve yeniden deneyin"
#: instances/views.py:1050
#: instances/views.py:1055
msgid "The change may still be made when the agent answers again."
msgstr "Ajan yeniden yanıt verdiğinde değişiklik yine de yapılabilir."
#: instances/views.py:1078
#: instances/views.py:1083
msgid "Reset root password"
msgstr "Root parolasını sıfırla"
#: instances/views.py:1082
#: instances/views.py:1087
msgid "Enter a password"
msgstr "Bir parola girin"
#: instances/views.py:1096
#: instances/views.py:1101
msgid "Select an SSH public key"
msgstr "Bir SSH açık anahtarı seçin"
#: instances/views.py:1118
#: instances/views.py:1123
#, python-format
msgid "Installed new SSH public key %(keyname)s"
msgstr "Yeni %(keyname)s SSH açık anahtarı yüklendi"
#: instances/views.py:1138
#: instances/views.py:1143
msgid "Enter a whole number of vCPUs"
msgstr "vCPU sayısı için bir tam sayı girin"
#: instances/views.py:1142
#: instances/views.py:1147
msgid "Shut off the VM to change its vCPUs"
msgstr "vCPU'larını değiştirmek için sanal makineyi kapatın"
#: instances/views.py:1145
#: instances/views.py:1150
msgid "The current vCPUs cannot be more than the maximum"
msgstr "Geçerli vCPU sayısı en fazla değerden büyük olamaz"
#: instances/views.py:1152
#: instances/views.py:1157
#, python-format
msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'."
msgstr "%(quota)s: '%(instance_name)s' CPU'su yeniden boyutlandırılamıyor."
#: instances/views.py:1160
#: instances/views.py:1165
#, python-format
msgid "vCPUs set to %(cur)s (maximum %(max)s)"
msgstr "vCPU sayısı %(cur)s olarak ayarlandı (en fazla %(max)s)"
#: instances/views.py:1179
#: instances/views.py:1184
msgid "Enter a whole number for memory"
msgstr "Bellek için bir tam sayı girin"
#: instances/views.py:1182
#: instances/views.py:1187
msgid "The current memory cannot be more than the maximum"
msgstr "Geçerli bellek en fazla değerden büyük olamaz"
#: instances/views.py:1186
#: instances/views.py:1191
#, python-format
msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'."
msgstr "%(quota)s: '%(instance_name)s' belleği yeniden boyutlandırılamıyor."
#: instances/views.py:1192
#: instances/views.py:1197
#, python-format
msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)"
msgstr "Bellek %(cur)s MiB olarak ayarlandı (en fazla %(max)s MiB)"
#: instances/views.py:1212
#: instances/views.py:1217
msgid "Enter disk sizes as whole GiB"
msgstr "Disk boyutlarını tam GiB olarak girin"
#: instances/views.py:1216
#: instances/views.py:1221
#, python-format
msgid "%(dev)s is %(size)s: a disk cannot shrink"
msgstr "%(dev)s boyutu %(size)s: disk küçültülemez"
#: instances/views.py:1224
#: instances/views.py:1229
msgid "No disks were selected or valid for resizing."
msgstr "Boyutlandırma için seçilmiş ya da geçerli disk yok."
#: instances/views.py:1233
#: instances/views.py:1238
#, python-format
msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'."
msgstr "%(quota)s: '%(instance_name)s' diskleri yeniden boyutlandırılamıyor."
#: instances/views.py:1245
#: instances/views.py:1250
#, python-format
msgid "The storage pool of %(dev)s cannot resize its volumes"
msgstr "%(dev)s diskinin depolama havuzu birimlerini boyutlandıramaz"
#: instances/views.py:1247
#: instances/views.py:1252
#, python-format
msgid "Disk is resized: %(dev)s"
msgstr "Disk boyutu değiştirildi: %(dev)s"
#: instances/views.py:1341
#: instances/views.py:1346
msgid "The VM's machine has no PCIe slots to add"
msgstr "Sanal makinenin makine tipinde eklenecek PCIe yuvası yok"
#: instances/views.py:1346
#: instances/views.py:1351
#, python-format
msgid "%(count)s PCIe slots added"
msgstr "%(count)s PCIe yuvası eklendi"
#: instances/views.py:1348
#: instances/views.py:1353
#, python-format
msgid "%(count)s PCIe slots added: the VM gets them at its next start"
msgstr ""
"%(count)s PCIe yuvası eklendi: sanal makine bunları sonraki başlatmasında "
"alır"
#: instances/views.py:1394
#: instances/views.py:1399
#, python-format
msgid "%(volume)s is already a disk of this VM"
msgstr "%(volume)s zaten bu sanal makinenin bir diski"
#: instances/views.py:1484
#: instances/views.py:1489
msgid "Volume changes are applied. But it will be activated after shutdown"
msgstr ""
"Birim değişiklikleri uygulandı. Ama yeniden başlatıldıktan sonra uygulanacak"
#: instances/views.py:1489
#: instances/views.py:1494
msgid "Volume is changed successfully."
msgstr "Birim başarıyla değiştirildi."
#: instances/views.py:1507
#: instances/views.py:1512
#, python-format
msgid "Disk %(dev)s is not a storage volume of this instance"
msgstr "%(dev)s diski bu sanal makinenin bir depolama birimi değil"
#: instances/views.py:1514
#: instances/views.py:1519
#, python-format
msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down"
msgstr ""
"%(dev)s diskinin bekleyen bir değişikliği var; sanal makine kapatıldığında "
"silin"
#: instances/views.py:1529
#: instances/views.py:1534
#, python-format
msgid "Volume %(vol)s is used by another VM; detach it instead"
msgstr ""
"%(vol)s birimi başka bir sanal makine tarafından kullanılıyor; onun yerine "
"ayırın"
#: instances/views.py:1541
#: instances/views.py:1546
#, python-format
msgid ""
"The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete "
@ -6161,62 +6116,62 @@ msgstr ""
"Konuk sistem %(dev)s diskini henüz bırakmadı; %(vol)s birimi korundu. Sanal "
"makine kapatıldığında depolama havuzundan silin."
#: instances/views.py:1552
#: instances/views.py:1557
#, python-format
msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s"
msgstr "%(dev)s diski ayrıldı, ancak birimi korundu: %(err)s"
#: instances/views.py:1578
#: instances/views.py:1583
#, python-format
msgid "This VM cannot take a CD-ROM on the %(bus)s bus now"
msgstr "Bu sanal makineye şu anda %(bus)s veri yolunda CD-ROM eklenemez"
#: instances/views.py:1581
#: instances/views.py:1586
msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive"
msgstr "USB CD-ROM bir ISO imajı ister: libvirt boş USB sürücü desteklemiyor"
#: instances/views.py:1586
#: instances/views.py:1591
#, python-format
msgid "%(image)s is already in a CD-ROM of this VM"
msgstr "%(image)s bu sanal makinenin bir CD-ROM'unda zaten takılı"
#: instances/views.py:1667
#: instances/views.py:1672
#, python-format
msgid "Pool %(pool)s was not read again: %(err)s"
msgstr "%(pool)s havuzu yeniden okunamadı: %(err)s"
#: instances/views.py:1688
#: instances/views.py:1693
#, python-format
msgid "Snapshot was not deleted: %(err)s"
msgstr "Anlık görüntü silinmedi: %(err)s"
#: instances/views.py:1803
#: instances/views.py:1808
msgid "Add at least one device to the boot order."
msgstr "Ön yükleme sırasına en az bir aygıt ekleyin."
#: instances/views.py:1817
#: instances/views.py:1822
msgid "Boot order changed. It applies at the next start."
msgstr "Ön yükleme sırası değiştirildi. Sonraki başlatmada uygulanır."
#: instances/views.py:1819
#: instances/views.py:1824
msgid "Boot order changed successfully."
msgstr "Ön yükleme sırası başarıyla değiştirildi."
#: instances/views.py:1839
#: instances/views.py:1844
msgid "The XML is empty"
msgstr "XML boş"
#: instances/views.py:1843 instances/views.py:2468
#: instances/views.py:1848 instances/views.py:2473
#, python-format
msgid "The XML is not well-formed: %(error)s"
msgstr "XML düzgün biçimlendirilmemiş: %(error)s"
#: instances/views.py:1845
#: instances/views.py:1850
#, python-format
msgid "The XML must keep the VM's UUID %(uuid)s."
msgstr "XML, sanal makinenin %(uuid)s UUID'sini korumalıdır."
#: instances/views.py:1849
#: instances/views.py:1854
msgid ""
"The definition has changed since the editor was opened. Reload the page to "
"edit the current one."
@ -6224,40 +6179,40 @@ msgstr ""
"Düzenleyici açıldığından beri tanım değişti. Geçerli tanımı düzenlemek için "
"sayfayı yeniden yükleyin."
#: instances/views.py:1861
#: instances/views.py:1866
msgid "The XML definition was saved."
msgstr "XML tanımı kaydedildi."
#: instances/views.py:1863
#: instances/views.py:1868
msgid "The XML definition was saved; the VM uses it from its next start."
msgstr ""
"XML tanımı kaydedildi; sanal makine onu sonraki başlatmasından itibaren "
"kullanır."
#: instances/views.py:1944
#: instances/views.py:1949
msgid "Select one network interface to change"
msgstr "Değiştirilecek bir ağ arabirimi seçin"
#: instances/views.py:1982
#: instances/views.py:1987
msgid "Network Device Config is changed. Please shutdown instance to activate."
msgstr ""
"Ağ aygıtı yapılandırması değiştirildi. Aktifleştirmek için lütfen sanal "
"makineyi kapatın."
#: instances/views.py:1984
#: instances/views.py:1989
msgid "Network device changed"
msgstr "Ağ aygıtı değiştirildi"
#: instances/views.py:1996
#: instances/views.py:2001
msgid "No network selected"
msgstr "Ağ seçilmedi"
#: instances/views.py:2001
#: instances/views.py:2006
#, python-format
msgid "The VM already has a network device with MAC %(mac)s"
msgstr "Sanal makinede %(mac)s MAC adresli bir ağ aygıtı zaten var"
#: instances/views.py:2020
#: instances/views.py:2025
msgid ""
"The running VM has no free PCI slot for another network device: shut it down "
"and add the device then; Add PCIe slots on the Disks tab gives it free ones "
@ -6267,21 +6222,21 @@ msgstr ""
"aygıtı sonra ekleyin; Diskler sekmesindeki PCIe yuvaları ekle, sonraki "
"başlatmadan itibaren ona boş yuvalar verir."
#: instances/views.py:2061 instances/views.py:2067
#: instances/views.py:2066 instances/views.py:2072
msgid "The VM has it"
msgstr "Sanal makinede var"
#: instances/views.py:2098
#: instances/views.py:2103
#, python-format
msgid "The host has no USB device %(device)s"
msgstr "Sunucuda %(device)s USB aygıtı yok"
#: instances/views.py:2119
#: instances/views.py:2124
#, python-format
msgid "The host has no PCI device %(device)s"
msgstr "Sunucuda %(device)s PCI aygıtı yok"
#: instances/views.py:2137
#: instances/views.py:2142
#, python-format
msgid ""
"Removal of PCI device %(address)s requested: the guest has not let it go yet;"
@ -6291,20 +6246,20 @@ msgstr ""
"bırakmadı; bırakana ya da sanal makine durana kadar çalışan sanal makinede "
"kalır."
#: instances/views.py:2182 instances/views.py:2212
#: instances/views.py:2187 instances/views.py:2217
msgid "Select a network interface and a QoS direction"
msgstr "Bir ağ arabirimi ve bir QoS yönü seçin"
#: instances/views.py:2185 vrtManager/network.py:454
#: instances/views.py:2190 vrtManager/network.py:454
msgid "QoS rates must be whole numbers"
msgstr "QoS hızları tam sayı olmalıdır"
#: instances/views.py:2192 networks/views.py:229
#: instances/views.py:2197 networks/views.py:229
#, python-format
msgid "%(qos_dir)s QoS is set"
msgstr "%(qos_dir)s QoS ayarlandı"
#: instances/views.py:2197
#: instances/views.py:2202
#, python-format
msgid ""
"%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on."
@ -6312,12 +6267,12 @@ msgstr ""
"%(qos_dir)s QoS ayarlandı. Çalışan bir sanal makine, kapatılıp açıldıktan "
"sonra bunu alır."
#: instances/views.py:2219 networks/views.py:255
#: instances/views.py:2224 networks/views.py:255
#, python-format
msgid "%(qos_dir)s QoS is deleted"
msgstr "%(qos_dir)s QoS silindi"
#: instances/views.py:2224
#: instances/views.py:2229
#, python-format
msgid ""
"%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is "
@ -6326,21 +6281,21 @@ msgstr ""
"%(qos_dir)s QoS silindi. Çalışan bir sanal makine, kapatılıp açılana kadar "
"eski sınırı korur."
#: instances/views.py:2252
#: instances/views.py:2257
msgid "Only one owner is allowed and the one already added"
msgstr "Sadece bir sahibe izin verilmiştir ve bir sahip zaten eklenmiş"
#: instances/views.py:2254
#: instances/views.py:2259
#, python-format
msgid "%(user)s is already an owner"
msgstr "%(user)s zaten bir sahip"
#: instances/views.py:2299
#: instances/views.py:2304
#, python-format
msgid "Console settings were not saved: %(errors)s"
msgstr "Konsol ayarları kaydedilmedi: %(errors)s"
#: instances/views.py:2321
#: instances/views.py:2326
msgid ""
"Error setting console password. You should check that your instance have an "
"graphic device."
@ -6348,57 +6303,57 @@ msgstr ""
"Konsol parolası ayarlanırken hata oluştu. Sanal makinenin bir grafik aygıtına"
" sahip olduğundan emin olunuz."
#: instances/views.py:2368
#: instances/views.py:2373
msgid "Shut the VM down to change whether it is a template."
msgstr "Şablon olup olmadığını değiştirmek için sanal makineyi kapatın."
#: instances/views.py:2374
#: instances/views.py:2379
#, python-format
msgid "%(quota)s: '%(instance_name)s' stays a template."
msgstr "%(quota)s: '%(instance_name)s' şablon olarak kalıyor."
#: instances/views.py:2456
#: instances/views.py:2461
msgid "The XML has no name"
msgstr "XML'de ad yok"
#: instances/views.py:2470 webvirtcloud/middleware.py:126
#: instances/views.py:2475 webvirtcloud/middleware.py:126
#, python-format
msgid "libvirt Error - %(exception)s"
msgstr "libvirt Hatası - %(exception)s"
#: instances/views.py:2477
#: instances/views.py:2482
msgid "An empty disk of the size you set"
msgstr "Belirlediğiniz boyutta boş bir disk"
#: instances/views.py:2478
#: instances/views.py:2483
msgid "Volumes already in a pool"
msgstr "Bir havuzda zaten bulunan birimler"
#: instances/views.py:2479
#: instances/views.py:2484
msgid "A copy of a template volume"
msgstr "Bir şablon biriminin kopyası"
#: instances/views.py:2568
#: instances/views.py:2573
msgid "You haven't defined any storage pools"
msgstr "Hiç bir depolama havuzu tanımlamadınız"
#: instances/views.py:2570
#: instances/views.py:2575
msgid "You haven't defined any network pools"
msgstr "Hiç bir ağ havuzu tanımlamadınız"
#: instances/views.py:2633
#: instances/views.py:2638
msgid "Flavor Created"
msgstr "Flavor Oluşturuldu"
#: instances/views.py:2641
#: instances/views.py:2646
msgid "Create Flavor"
msgstr "Kullanıcı Oluştur"
#: instances/views.py:2653
#: instances/views.py:2658
msgid "Flavor Deleted"
msgstr "Flavor Silindi"
#: instances/views.py:2659
#: instances/views.py:2664
msgid "Only the size template goes; VMs made from it keep their size."
msgstr ""
"Yalnızca boyut şablonu silinir; ondan oluşturulan sanal makineler boyutlarını"
@ -6471,23 +6426,6 @@ msgstr ""
"Ethernet arabirimi, bu sunucunun hiçbir köprü, bond ya da VLAN içinde olmayan"
" bir aygıtını yapılandırır"
#: interfaces/models.py:10
msgid "No interface name has been entered"
msgstr "Arabirim adı girilmedi"
#: interfaces/models.py:12 networks/models.py:12 storages/models.py:12
#: storages/models.py:46
msgid "status"
msgstr "durum"
#: interfaces/models.py:13 networks/models.py:13
msgid "device"
msgstr "aygıt"
#: interfaces/models.py:14 networks/models.py:14
msgid "forward"
msgstr "yönlendirme"
#: interfaces/templates/create_iface_block.html:7
#: interfaces/templates/create_iface_block.html:17
msgid "New interface"
@ -6814,7 +6752,7 @@ msgstr "IPv4 ağ öneki /30 veya daha kısa olmalıdır"
msgid "For libvirt, the IPv6 network prefix must be /64"
msgstr "Libvirt için IPv6 ağ prefixi /64 olmak zorundadır"
#: networks/forms.py:36 storages/forms.py:27 storages/models.py:10
#: networks/forms.py:36 storages/forms.py:27
msgid "No pool name has been entered"
msgstr "Havuz adı girilmedi"
@ -6852,10 +6790,6 @@ msgstr "Bu alan gerekli."
msgid "Network %(net)s has %(subnet)s"
msgstr "%(net)s ağı %(subnet)s alt ağını kullanıyor"
#: networks/models.py:10
msgid "No network name has been entered"
msgstr "Ağ adı girilmedi"
#: networks/templates/add_network_qos.html:7
#, python-format
msgid "Bandwidth limit of eth%(nic)s"
@ -8056,42 +7990,6 @@ msgstr "Kopya oluşturulmadı"
msgid "Upload ISO image"
msgstr "ISO imajı yükle"
#: storages/models.py:13 storages/models.py:48
msgid "type"
msgstr "tip"
#: storages/models.py:14 storages/models.py:32 storages/models.py:44
msgid "size"
msgstr "boyut"
#: storages/models.py:15
msgid "volumes"
msgstr "birimler"
#: storages/models.py:27
msgid "format"
msgstr "biçem"
#: storages/models.py:31
msgid "allocation"
msgstr "ayrılan"
#: storages/models.py:43
msgid "state"
msgstr "durum"
#: storages/models.py:45
msgid "free"
msgstr "boş"
#: storages/models.py:47
msgid "path"
msgstr "yol"
#: storages/models.py:49
msgid "autostart"
msgstr "otomatik başlat"
#: storages/templates/create_stg_block.html:7
msgid "New pool"
msgstr "Yeni havuz"
@ -9938,10 +9836,10 @@ msgid "Secret %(uuid)s is used by %(named)s; remove it from them first"
msgstr ""
"%(uuid)s parolası %(named)s tarafından kullanılıyor; önce onlardan kaldırın"
#: webvirtcloud/settings.py:334
#: webvirtcloud/settings.py:319
msgid "Localhost"
msgstr "Yerel sunucu"
#: webvirtcloud/settings.py:335
#: webvirtcloud/settings.py:320
msgid "All interfaces"
msgstr "Tüm arabirimler"

Binary file not shown.

View file

@ -146,8 +146,7 @@ msgid "Can change password"
msgstr "可修改密码"
#: accounts/models.py:92 appsettings/models.py:9 computes/models.py:15
#: instances/models.py:34 interfaces/models.py:8 networks/models.py:8
#: storages/models.py:8 storages/models.py:25
#: instances/models.py:32
msgid "name"
msgstr "名称"
@ -353,7 +352,7 @@ msgstr "输入用户名"
#: accounts/templates/accounts/otp_login.html:37
#: accounts/templates/login.html:36 admin/templates/admin/user_form.html:31
#: console/templates/console-vnc.html:82 instances/forms.py:28
#: console/templates/console-vnc.html:82 instances/forms.py:27
#: instances/templates/instances/access_tab.html:53
msgid "Password"
msgstr "密码"
@ -693,7 +692,7 @@ msgid "NEW_USER_DEFAULT_INSTANCES: %(name)s is not exactly one VM"
msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 不是唯一的一台虚拟机"
#: admin/forms.py:186 computes/templates/computes/list.html:58
#: computes/templates/overview.html:58 instances/forms.py:15
#: computes/templates/overview.html:58 instances/forms.py:14
#: instances/templates/allinstances_index_grouped.html:16
#: instances/templates/allinstances_index_nongrouped.html:14
#: instances/templates/create_instance_w2.html:63
@ -714,7 +713,7 @@ msgstr "vCPU"
msgid "Memory"
msgstr "内存"
#: admin/forms.py:188 instances/models.py:237
#: admin/forms.py:188 instances/models.py:235
#: instances/templates/create_instance_w2.html:118
#: instances/templates/instances/settings_tab.html:25
#: instances/templates/instances/stats_tab.html:51
@ -895,7 +894,7 @@ msgid "IP"
msgstr "IP"
#: admin/templates/admin/logs.html:56 admin/views.py:286 instances/states.py:19
#: instances/views.py:414 instances/views.py:416 logs/views.py:17
#: instances/views.py:419 instances/views.py:421 logs/views.py:17
msgid "Unknown"
msgstr "未知"
@ -2538,70 +2537,70 @@ msgid ""
"VNC."
msgstr "不支持控制台类型 '%(type)s'。请将虚拟机图形切换为 VNC。"
#: instances/forms.py:14 instances/templates/create_instance_w2.html:69
#: instances/forms.py:13 instances/templates/create_instance_w2.html:69
#: instances/templates/instances/settings_tab.html:857
msgid "Memory (MiB)"
msgstr "内存(MiB)"
#: instances/forms.py:16
#: instances/forms.py:15
msgid "Disk (GiB)"
msgstr "磁盘(GiB)"
#: instances/forms.py:25
#: instances/forms.py:24
msgid "Console type"
msgstr "控制台类型"
#: instances/forms.py:30
#: instances/forms.py:29
msgid "Keep the password"
msgstr "保留密码"
#: instances/forms.py:31
#: instances/forms.py:30
msgid "Generate a new one"
msgstr "生成新密码"
#: instances/forms.py:32
#: instances/forms.py:31
msgid "Set a new one"
msgstr "设置新密码"
#: instances/forms.py:33
#: instances/forms.py:32
msgid "No password"
msgstr "无密码"
#: instances/forms.py:38
#: instances/forms.py:37
msgid "New password"
msgstr "新密码"
#: instances/forms.py:58
#: instances/forms.py:57
msgid "Serial (xterm; the guest needs a getty on ttyS0)"
msgstr "串行(xterm;客户机需要在 ttyS0 上运行 getty)"
#: instances/forms.py:65
#: instances/forms.py:64
msgid "Auto"
msgstr "自动"
#: instances/forms.py:74
#: instances/forms.py:73
msgid "Listen on"
msgstr "监听地址"
#: instances/forms.py:81
#: instances/forms.py:80
msgid "Keymap"
msgstr "键盘映射"
#: instances/forms.py:90
#: instances/forms.py:89
msgid "Enter the new password."
msgstr "请输入新密码。"
#: instances/forms.py:93
#: instances/forms.py:92
msgid "A VNC password takes at most 8 bytes."
msgstr "VNC 密码最多 8 个字节。"
#: instances/forms.py:99
#: instances/forms.py:98
msgid ""
"The console listens beyond localhost; only an administrator can remove its "
"password."
msgstr "控制台监听的不只是 localhost;只有管理员可以移除其密码。"
#: instances/forms.py:135
#: instances/forms.py:140
msgid "The name of the virtual machine must not contain any special characters"
msgstr "虚拟机名称不能包含任何特殊字符"
@ -2815,7 +2814,7 @@ msgstr "磁盘已复制,但无法定义克隆:%(error)s;请检查这些卷
msgid "Create VM"
msgstr "创建虚拟机"
#: instances/jobs.py:773 instances/jobs.py:818 instances/views.py:2458
#: instances/jobs.py:773 instances/jobs.py:818 instances/views.py:2463
msgid "A virtual machine with this name already exists"
msgstr "同名虚拟机已存在"
@ -2980,92 +2979,48 @@ msgstr "正在删除虚拟机"
msgid "The VM was not deleted; it may have been shut off"
msgstr "虚拟机未被删除;它可能已被关闭"
#: instances/models.py:18
#: instances/models.py:16
msgid "label"
msgstr "标签"
#: instances/models.py:19
#: instances/models.py:17
msgid "memory"
msgstr "内存"
#: instances/models.py:20
#: instances/models.py:18
msgid "vcpu"
msgstr "vCPU"
#: instances/models.py:21
#: instances/models.py:19
msgid "disk"
msgstr "磁盘"
#: instances/models.py:35
#: instances/models.py:33
msgid "uuid"
msgstr "UUID"
#: instances/models.py:36
#: instances/models.py:34
msgid "is template"
msgstr "是否为模板"
#: instances/models.py:37
#: instances/models.py:35
msgid "created"
msgstr "创建时间"
#: instances/models.py:38
#: instances/models.py:36
msgid "drbd"
msgstr "drbd"
#: instances/models.py:239 instances/templates/create_instance_w2.html:312
#: instances/models.py:237 instances/templates/create_instance_w2.html:312
#: instances/templates/instances/settings_tab.html:159
msgid "CD-ROM"
msgstr "CD-ROM"
#: instances/models.py:241
#: instances/models.py:239
msgid "NIC"
msgstr "网卡"
#: instances/models.py:414
msgid "Live"
msgstr "在线"
#: instances/models.py:415
msgid "Offline"
msgstr "离线"
#: instances/models.py:416
msgid "Auto Converge"
msgstr "自动收敛"
#: instances/models.py:417
msgid "Compress"
msgstr "压缩"
#: instances/models.py:418
msgid "Unsafe"
msgstr "不安全"
#: instances/models.py:430
msgid "No Virtual Machine name has been entered"
msgstr "未输入虚拟机名称"
#: instances/models.py:436
msgid "No VCPU has been entered"
msgstr "未输入 vCPU"
#: instances/models.py:442
msgid "No RAM size has been entered"
msgstr "未输入内存大小"
#: instances/models.py:446
msgid "No Network pool has been choosen"
msgstr "未选择网络池"
#: instances/models.py:454
msgid "Please select HDD cache mode"
msgstr "请选择硬盘缓存模式"
#: instances/models.py:466
msgid "Please select a video driver"
msgstr "请选择显卡驱动"
#: instances/models.py:503
#: instances/models.py:431
msgid "Can access console without password"
msgstr "可无密码访问控制台"
@ -3203,7 +3158,7 @@ msgid "Disk source"
msgstr "磁盘来源"
#: instances/templates/add_instance_volume.html:21
#: instances/templates/create_instance_w2.html:134 instances/views.py:2477
#: instances/templates/create_instance_w2.html:134 instances/views.py:2482
msgid "New disk"
msgstr "新磁盘"
@ -3567,7 +3522,7 @@ msgstr "自定义 CPU 型号"
msgid "Size (GiB)"
msgstr "大小(GiB)"
#: instances/templates/create_instance_w2.html:161 instances/views.py:2478
#: instances/templates/create_instance_w2.html:161 instances/views.py:2483
msgid "Existing volumes"
msgstr "已有卷"
@ -3603,7 +3558,7 @@ msgstr "设备"
msgid "Remove"
msgstr "移除"
#: instances/templates/create_instance_w2.html:194 instances/views.py:2479
#: instances/templates/create_instance_w2.html:194 instances/views.py:2484
msgid "Clone from template"
msgstr "从模板克隆"
@ -5609,58 +5564,58 @@ msgstr "无效的 MAC 地址"
msgid "More MAC addresses than networks"
msgstr "MAC 地址数量多于网络数量"
#: instances/views.py:168
#: instances/views.py:173
msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address."
msgstr "请输入 IP 地址、网络(如 192.0.2.0/24)或 MAC 地址。"
#: instances/views.py:174 instances/views.py:208
#: instances/views.py:179 instances/views.py:213
msgid "Too many searches are still running; try again shortly."
msgstr "仍在运行的搜索过多;请稍后再试。"
#: instances/views.py:256
#: instances/views.py:261
#, python-format
msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s"
msgstr "无法连接“%(name)s”所在的主机 %(host)s:%(error)s"
#: instances/views.py:262
#: instances/views.py:267
#, python-format
msgid "The host of '%(name)s' cannot be reached right now."
msgstr "目前无法连接“%(name)s”所在的主机。"
#: instances/views.py:263
#: instances/views.py:268
msgid " Jobs on it can be followed under Jobs in the menu."
msgstr " 其上的任务可在菜单的“任务”中跟踪。"
#: instances/views.py:271
#: instances/views.py:276
#, python-format
msgid "'%(name)s' is no longer on its host."
msgstr "“%(name)s”已不在其主机上。"
#: instances/views.py:369
#: instances/views.py:374
msgid "There is no other host to migrate to."
msgstr "没有其他可迁移到的主机。"
#: instances/views.py:371
#: instances/views.py:376
msgid "A VM migrates when it is running, paused or shut off."
msgstr "虚拟机在运行、暂停或关机状态下均可迁移。"
#: instances/views.py:373
#: instances/views.py:378
msgid ""
"A VM with snapshots cannot be migrated: its snapshots stay on this host. "
"Delete them first."
msgstr "有快照的虚拟机无法迁移:其快照保留在本主机上。请先删除快照。"
#: instances/views.py:375
#: instances/views.py:380
msgid ""
"A VM with host devices cannot be migrated: the destination may not have them."
" Remove them first."
msgstr "有主机设备的虚拟机无法迁移:目标主机可能没有这些设备。请先移除它们。"
#: instances/views.py:639
#: instances/views.py:644
msgid "The VM was moved meanwhile; try again."
msgstr "该虚拟机在此期间已被移动;请重试。"
#: instances/views.py:755
#: instances/views.py:760
msgid ""
"The running VM has no free PCI slot for another disk on this bus: choose the "
"scsi bus if the VM has a SCSI controller, or shut the VM down and add the "
@ -5670,7 +5625,7 @@ msgstr ""
"运行中的虚拟机在此总线上没有可用 PCI 插槽来添加磁盘:如果虚拟机有 SCSI 控制器,请选择 scsi "
"总线;或关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。"
#: instances/views.py:759
#: instances/views.py:764
msgid ""
"The running VM has no free PCI slot for the SCSI controller the disk needs: "
"shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives"
@ -5680,262 +5635,262 @@ msgstr ""
"运行中的虚拟机没有可用 PCI 插槽来添加磁盘所需的 SCSI 控制器:请关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe "
"插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。"
#: instances/views.py:777
#: instances/views.py:782
#, python-format
msgid "Invalid disk options: %(options)s"
msgstr "无效的磁盘选项:%(options)s"
#: instances/views.py:787 instances/views.py:802
#: instances/views.py:792 instances/views.py:807
msgid "Templates cannot be started."
msgstr "模板无法启动。"
#: instances/views.py:994
#: instances/views.py:999
#, python-format
msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)"
msgstr "请先设置 %(compute)s 的 gstfsd 密钥(计算节点,编辑该主机)"
#: instances/views.py:1001 instances/views.py:1019 instances/views.py:1028
#: instances/views.py:1006 instances/views.py:1024 instances/views.py:1033
#, python-format
msgid "gstfsd error: %(err)s"
msgstr "gstfsd 错误:%(err)s"
#: instances/views.py:1029
#: instances/views.py:1034
msgid "the reply is not signed with the key"
msgstr "回复未使用该密钥签名"
#: instances/views.py:1037
#: instances/views.py:1042
msgid "Shut the VM down, or start its QEMU guest agent, and try again"
msgstr "请关闭虚拟机,或启动其 QEMU 客户机代理,然后重试"
#: instances/views.py:1050
#: instances/views.py:1055
msgid "The change may still be made when the agent answers again."
msgstr "当代理再次响应时,此更改仍可能生效。"
#: instances/views.py:1078
#: instances/views.py:1083
msgid "Reset root password"
msgstr "重置 root 密码"
#: instances/views.py:1082
#: instances/views.py:1087
msgid "Enter a password"
msgstr "请输入密码"
#: instances/views.py:1096
#: instances/views.py:1101
msgid "Select an SSH public key"
msgstr "请选择 SSH 公钥"
#: instances/views.py:1118
#: instances/views.py:1123
#, python-format
msgid "Installed new SSH public key %(keyname)s"
msgstr "已安装新的 SSH 公钥 %(keyname)s"
#: instances/views.py:1138
#: instances/views.py:1143
msgid "Enter a whole number of vCPUs"
msgstr "请输入整数个 vCPU"
#: instances/views.py:1142
#: instances/views.py:1147
msgid "Shut off the VM to change its vCPUs"
msgstr "请关闭虚拟机以更改其 vCPU"
#: instances/views.py:1145
#: instances/views.py:1150
msgid "The current vCPUs cannot be more than the maximum"
msgstr "当前 vCPU 数不能超过最大值"
#: instances/views.py:1152
#: instances/views.py:1157
#, python-format
msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'."
msgstr "%(quota)s:无法调整“%(instance_name)s”的 CPU。"
#: instances/views.py:1160
#: instances/views.py:1165
#, python-format
msgid "vCPUs set to %(cur)s (maximum %(max)s)"
msgstr "vCPU 已设为 %(cur)s(最大 %(max)s)"
#: instances/views.py:1179
#: instances/views.py:1184
msgid "Enter a whole number for memory"
msgstr "请输入整数内存值"
#: instances/views.py:1182
#: instances/views.py:1187
msgid "The current memory cannot be more than the maximum"
msgstr "当前内存不能超过最大值"
#: instances/views.py:1186
#: instances/views.py:1191
#, python-format
msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'."
msgstr "%(quota)s:无法调整“%(instance_name)s”的内存。"
#: instances/views.py:1192
#: instances/views.py:1197
#, python-format
msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)"
msgstr "内存已设为 %(cur)s MiB(最大 %(max)s MiB)"
#: instances/views.py:1212
#: instances/views.py:1217
msgid "Enter disk sizes as whole GiB"
msgstr "请以整数 GiB 输入磁盘大小"
#: instances/views.py:1216
#: instances/views.py:1221
#, python-format
msgid "%(dev)s is %(size)s: a disk cannot shrink"
msgstr "%(dev)s 为 %(size)s:磁盘不能缩小"
#: instances/views.py:1224
#: instances/views.py:1229
msgid "No disks were selected or valid for resizing."
msgstr "未选择磁盘或没有可调整大小的有效磁盘。"
#: instances/views.py:1233
#: instances/views.py:1238
#, python-format
msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'."
msgstr "%(quota)s:无法调整“%(instance_name)s”的磁盘。"
#: instances/views.py:1245
#: instances/views.py:1250
#, python-format
msgid "The storage pool of %(dev)s cannot resize its volumes"
msgstr "%(dev)s 所在的存储池无法调整其卷的大小"
#: instances/views.py:1247
#: instances/views.py:1252
#, python-format
msgid "Disk is resized: %(dev)s"
msgstr "磁盘已调整大小:%(dev)s"
#: instances/views.py:1341
#: instances/views.py:1346
msgid "The VM's machine has no PCIe slots to add"
msgstr "该虚拟机的机器类型没有可添加的 PCIe 插槽"
#: instances/views.py:1346
#: instances/views.py:1351
#, python-format
msgid "%(count)s PCIe slots added"
msgstr "已添加 %(count)s 个 PCIe 插槽"
#: instances/views.py:1348
#: instances/views.py:1353
#, python-format
msgid "%(count)s PCIe slots added: the VM gets them at its next start"
msgstr "已添加 %(count)s 个 PCIe 插槽:虚拟机在下次启动时获得它们"
#: instances/views.py:1394
#: instances/views.py:1399
#, python-format
msgid "%(volume)s is already a disk of this VM"
msgstr "%(volume)s 已是此虚拟机的磁盘"
#: instances/views.py:1484
#: instances/views.py:1489
msgid "Volume changes are applied. But it will be activated after shutdown"
msgstr "卷更改已应用,但将在关机后生效"
#: instances/views.py:1489
#: instances/views.py:1494
msgid "Volume is changed successfully."
msgstr "卷已成功更改。"
#: instances/views.py:1507
#: instances/views.py:1512
#, python-format
msgid "Disk %(dev)s is not a storage volume of this instance"
msgstr "磁盘 %(dev)s 不是此虚拟机的存储卷"
#: instances/views.py:1514
#: instances/views.py:1519
#, python-format
msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down"
msgstr "磁盘 %(dev)s 有待生效的更改;请在虚拟机关机后删除它"
#: instances/views.py:1529
#: instances/views.py:1534
#, python-format
msgid "Volume %(vol)s is used by another VM; detach it instead"
msgstr "卷 %(vol)s 正被另一台虚拟机使用;请改为分离它"
#: instances/views.py:1541
#: instances/views.py:1546
#, python-format
msgid ""
"The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete "
"it from the storage pool once the VM is shut down."
msgstr "客户机尚未释放磁盘 %(dev)s;卷 %(vol)s 已保留。请在虚拟机关机后从存储池中删除它。"
#: instances/views.py:1552
#: instances/views.py:1557
#, python-format
msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s"
msgstr "磁盘 %(dev)s 已分离,但其卷已保留:%(err)s"
#: instances/views.py:1578
#: instances/views.py:1583
#, python-format
msgid "This VM cannot take a CD-ROM on the %(bus)s bus now"
msgstr "该虚拟机现在无法在 %(bus)s 总线上添加 CD-ROM"
#: instances/views.py:1581
#: instances/views.py:1586
msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive"
msgstr "USB CD-ROM 需要 ISO 镜像:libvirt 不支持空的 USB 驱动器"
#: instances/views.py:1586
#: instances/views.py:1591
#, python-format
msgid "%(image)s is already in a CD-ROM of this VM"
msgstr "%(image)s 已在此虚拟机的某个光驱中"
#: instances/views.py:1667
#: instances/views.py:1672
#, python-format
msgid "Pool %(pool)s was not read again: %(err)s"
msgstr "未重新读取存储池 %(pool)s:%(err)s"
#: instances/views.py:1688
#: instances/views.py:1693
#, python-format
msgid "Snapshot was not deleted: %(err)s"
msgstr "快照未删除:%(err)s"
#: instances/views.py:1803
#: instances/views.py:1808
msgid "Add at least one device to the boot order."
msgstr "请至少向启动顺序中添加一个设备。"
#: instances/views.py:1817
#: instances/views.py:1822
msgid "Boot order changed. It applies at the next start."
msgstr "启动顺序已更改,将在下次启动时生效。"
#: instances/views.py:1819
#: instances/views.py:1824
msgid "Boot order changed successfully."
msgstr "启动顺序已成功更改。"
#: instances/views.py:1839
#: instances/views.py:1844
msgid "The XML is empty"
msgstr "XML 为空"
#: instances/views.py:1843 instances/views.py:2468
#: instances/views.py:1848 instances/views.py:2473
#, python-format
msgid "The XML is not well-formed: %(error)s"
msgstr "XML 格式不正确:%(error)s"
#: instances/views.py:1845
#: instances/views.py:1850
#, python-format
msgid "The XML must keep the VM's UUID %(uuid)s."
msgstr "XML 必须保留虚拟机的 UUID %(uuid)s。"
#: instances/views.py:1849
#: instances/views.py:1854
msgid ""
"The definition has changed since the editor was opened. Reload the page to "
"edit the current one."
msgstr "自打开编辑器以来定义已被更改。请重新加载页面以编辑当前定义。"
#: instances/views.py:1861
#: instances/views.py:1866
msgid "The XML definition was saved."
msgstr "XML 定义已保存。"
#: instances/views.py:1863
#: instances/views.py:1868
msgid "The XML definition was saved; the VM uses it from its next start."
msgstr "XML 定义已保存;虚拟机从下次启动起使用它。"
#: instances/views.py:1944
#: instances/views.py:1949
msgid "Select one network interface to change"
msgstr "请选择一个要更改的网络接口"
#: instances/views.py:1982
#: instances/views.py:1987
msgid "Network Device Config is changed. Please shutdown instance to activate."
msgstr "网络设备配置已更改。请关闭虚拟机以使其生效。"
#: instances/views.py:1984
#: instances/views.py:1989
msgid "Network device changed"
msgstr "网络设备已更改"
#: instances/views.py:1996
#: instances/views.py:2001
msgid "No network selected"
msgstr "未选择网络"
#: instances/views.py:2001
#: instances/views.py:2006
#, python-format
msgid "The VM already has a network device with MAC %(mac)s"
msgstr "虚拟机已有 MAC 地址为 %(mac)s 的网络设备"
#: instances/views.py:2020
#: instances/views.py:2025
msgid ""
"The running VM has no free PCI slot for another network device: shut it down "
"and add the device then; Add PCIe slots on the Disks tab gives it free ones "
@ -5943,129 +5898,129 @@ msgid ""
msgstr ""
"运行中的虚拟机没有可用 PCI 插槽来添加网络设备:请关机后再添加设备。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。"
#: instances/views.py:2061 instances/views.py:2067
#: instances/views.py:2066 instances/views.py:2072
msgid "The VM has it"
msgstr "虚拟机已有此设备"
#: instances/views.py:2098
#: instances/views.py:2103
#, python-format
msgid "The host has no USB device %(device)s"
msgstr "主机上没有 USB 设备 %(device)s"
#: instances/views.py:2119
#: instances/views.py:2124
#, python-format
msgid "The host has no PCI device %(device)s"
msgstr "主机上没有 PCI 设备 %(device)s"
#: instances/views.py:2137
#: instances/views.py:2142
#, python-format
msgid ""
"Removal of PCI device %(address)s requested: the guest has not let it go yet;"
" it stays in the running VM until it does or the VM stops."
msgstr "已请求移除 PCI 设备 %(address)s:客户机尚未释放它;在客户机释放或虚拟机停止之前,它仍保留在运行中的虚拟机中。"
#: instances/views.py:2182 instances/views.py:2212
#: instances/views.py:2187 instances/views.py:2217
msgid "Select a network interface and a QoS direction"
msgstr "请选择网络接口和 QoS 方向"
#: instances/views.py:2185 vrtManager/network.py:454
#: instances/views.py:2190 vrtManager/network.py:454
msgid "QoS rates must be whole numbers"
msgstr "QoS 速率必须为整数"
#: instances/views.py:2192 networks/views.py:229
#: instances/views.py:2197 networks/views.py:229
#, python-format
msgid "%(qos_dir)s QoS is set"
msgstr "%(qos_dir)s QoS 已设置"
#: instances/views.py:2197
#: instances/views.py:2202
#, python-format
msgid ""
"%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on."
msgstr "%(qos_dir)s QoS 已设置。运行中的虚拟机需关机再开机后才能生效。"
#: instances/views.py:2219 networks/views.py:255
#: instances/views.py:2224 networks/views.py:255
#, python-format
msgid "%(qos_dir)s QoS is deleted"
msgstr "%(qos_dir)s QoS 已删除"
#: instances/views.py:2224
#: instances/views.py:2229
#, python-format
msgid ""
"%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is "
"powered off and on."
msgstr "%(qos_dir)s QoS 已删除。运行中的虚拟机在关机再开机之前保留旧的限制。"
#: instances/views.py:2252
#: instances/views.py:2257
msgid "Only one owner is allowed and the one already added"
msgstr "只允许一个所有者,且已添加"
#: instances/views.py:2254
#: instances/views.py:2259
#, python-format
msgid "%(user)s is already an owner"
msgstr "%(user)s 已是所有者"
#: instances/views.py:2299
#: instances/views.py:2304
#, python-format
msgid "Console settings were not saved: %(errors)s"
msgstr "控制台设置未保存:%(errors)s"
#: instances/views.py:2321
#: instances/views.py:2326
msgid ""
"Error setting console password. You should check that your instance have an "
"graphic device."
msgstr "设置控制台密码出错。请检查虚拟机是否有图形设备。"
#: instances/views.py:2368
#: instances/views.py:2373
msgid "Shut the VM down to change whether it is a template."
msgstr "请关闭虚拟机以更改其是否为模板。"
#: instances/views.py:2374
#: instances/views.py:2379
#, python-format
msgid "%(quota)s: '%(instance_name)s' stays a template."
msgstr "%(quota)s:“%(instance_name)s”仍为模板。"
#: instances/views.py:2456
#: instances/views.py:2461
msgid "The XML has no name"
msgstr "XML 中没有名称"
#: instances/views.py:2470 webvirtcloud/middleware.py:126
#: instances/views.py:2475 webvirtcloud/middleware.py:126
#, python-format
msgid "libvirt Error - %(exception)s"
msgstr "libvirt 错误 - %(exception)s"
#: instances/views.py:2477
#: instances/views.py:2482
msgid "An empty disk of the size you set"
msgstr "按设定大小创建的空磁盘"
#: instances/views.py:2478
#: instances/views.py:2483
msgid "Volumes already in a pool"
msgstr "存储池中已有的卷"
#: instances/views.py:2479
#: instances/views.py:2484
msgid "A copy of a template volume"
msgstr "模板卷的副本"
#: instances/views.py:2568
#: instances/views.py:2573
msgid "You haven't defined any storage pools"
msgstr "您尚未定义任何存储池"
#: instances/views.py:2570
#: instances/views.py:2575
msgid "You haven't defined any network pools"
msgstr "您尚未定义任何网络池"
#: instances/views.py:2633
#: instances/views.py:2638
msgid "Flavor Created"
msgstr "规格已创建"
#: instances/views.py:2641
#: instances/views.py:2646
msgid "Create Flavor"
msgstr "创建规格"
#: instances/views.py:2653
#: instances/views.py:2658
msgid "Flavor Deleted"
msgstr "规格已删除"
#: instances/views.py:2659
#: instances/views.py:2664
msgid "Only the size template goes; VMs made from it keep their size."
msgstr "仅删除此规格;由它创建的虚拟机保持其大小。"
@ -6132,23 +6087,6 @@ msgid ""
"VLAN"
msgstr "以太网接口用于配置本主机上不属于任何网桥、绑定或 VLAN 的设备"
#: interfaces/models.py:10
msgid "No interface name has been entered"
msgstr "未输入接口名称"
#: interfaces/models.py:12 networks/models.py:12 storages/models.py:12
#: storages/models.py:46
msgid "status"
msgstr "状态"
#: interfaces/models.py:13 networks/models.py:13
msgid "device"
msgstr "设备"
#: interfaces/models.py:14 networks/models.py:14
msgid "forward"
msgstr "转发"
#: interfaces/templates/create_iface_block.html:7
#: interfaces/templates/create_iface_block.html:17
msgid "New interface"
@ -6463,7 +6401,7 @@ msgstr "IPv4 网络前缀必须为 /30 或更短"
msgid "For libvirt, the IPv6 network prefix must be /64"
msgstr "libvirt 要求 IPv6 网络前缀为 /64"
#: networks/forms.py:36 storages/forms.py:27 storages/models.py:10
#: networks/forms.py:36 storages/forms.py:27
msgid "No pool name has been entered"
msgstr "未输入地址池名称"
@ -6501,10 +6439,6 @@ msgstr "此字段为必填项。"
msgid "Network %(net)s has %(subnet)s"
msgstr "网络 %(net)s 已使用 %(subnet)s"
#: networks/models.py:10
msgid "No network name has been entered"
msgstr "未输入网络名称"
#: networks/templates/add_network_qos.html:7
#, python-format
msgid "Bandwidth limit of eth%(nic)s"
@ -7641,42 +7575,6 @@ msgstr "未创建副本"
msgid "Upload ISO image"
msgstr "上传 ISO 镜像"
#: storages/models.py:13 storages/models.py:48
msgid "type"
msgstr "类型"
#: storages/models.py:14 storages/models.py:32 storages/models.py:44
msgid "size"
msgstr "大小"
#: storages/models.py:15
msgid "volumes"
msgstr "卷"
#: storages/models.py:27
msgid "format"
msgstr "格式"
#: storages/models.py:31
msgid "allocation"
msgstr "分配"
#: storages/models.py:43
msgid "state"
msgstr "状态"
#: storages/models.py:45
msgid "free"
msgstr "可用"
#: storages/models.py:47
msgid "path"
msgstr "路径"
#: storages/models.py:49
msgid "autostart"
msgstr "自动启动"
#: storages/templates/create_stg_block.html:7
msgid "New pool"
msgstr "新建存储池"
@ -9379,10 +9277,10 @@ msgstr "存储池 %(names)s"
msgid "Secret %(uuid)s is used by %(named)s; remove it from them first"
msgstr "机密 %(uuid)s 正被 %(named)s 使用;请先从中移除它"
#: webvirtcloud/settings.py:334
#: webvirtcloud/settings.py:319
msgid "Localhost"
msgstr "本机"
#: webvirtcloud/settings.py:335
#: webvirtcloud/settings.py:320
msgid "All interfaces"
msgstr "所有接口"

View file

@ -1,8 +1,10 @@
from networks.models import Networks
from rest_framework import serializers
class NetworksSerializer(serializers.ModelSerializer):
class Meta:
model = Networks
fields = ["name", "status", "device", "forward"]
class NetworksSerializer(serializers.Serializer):
"""A host network as the API lists it."""
name = serializers.CharField(max_length=20)
status = serializers.CharField(max_length=12)
device = serializers.CharField(max_length=100)
forward = serializers.CharField(max_length=24)

View file

@ -0,0 +1,16 @@
# Generated by Django 5.2.18 on 2026-11-06 08:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('networks', '0001_initial'),
]
operations = [
migrations.DeleteModel(
name='Networks',
),
]

View file

@ -1,17 +0,0 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
# Create your models here.
class Networks(models.Model):
name = models.CharField(
_("name"),
max_length=20,
error_messages={"required": _("No network name has been entered")},
)
status = models.CharField(_("status"), max_length=12)
device = models.CharField(_("device"), max_length=100)
forward = models.CharField(_("forward"), max_length=24)
class Meta:
managed = False

View file

@ -1,28 +1,35 @@
from rest_framework import serializers
from storages.models import Storages, Storage, Volume
class StoragesSerializer(serializers.ModelSerializer):
class StoragesSerializer(serializers.Serializer):
"""A storage pool as the API lists it."""
class Meta:
model = Storages
fields = ['name', 'status', 'type', 'size', 'volumes']
name = serializers.CharField(max_length=20)
status = serializers.IntegerField()
type = serializers.CharField(max_length=100)
size = serializers.IntegerField()
volumes = serializers.IntegerField()
class StorageSerializer(serializers.ModelSerializer):
volumes = serializers.ReadOnlyField()
class Meta:
model = Storage
fields = ['state', 'size', 'free', 'status', 'path', 'type', 'autostart', 'volumes']
class StorageSerializer(serializers.Serializer):
"""A storage pool's details."""
state = serializers.IntegerField()
size = serializers.IntegerField()
free = serializers.IntegerField()
status = serializers.CharField(max_length=128)
path = serializers.CharField(max_length=128)
type = serializers.CharField(max_length=128)
autostart = serializers.BooleanField()
# the pool's volumes (wvmStorage.update_volumes); none while it is stopped
volumes = serializers.ListField(child=serializers.DictField(), read_only=True, allow_null=True)
class VolumeSerializer(serializers.ModelSerializer):
class VolumeSerializer(serializers.Serializer):
# what the web form (storages.forms.CreateVolumeForm) takes
name = serializers.RegexField(r"^[a-zA-Z0-9._-]+$", max_length=120)
type = serializers.ChoiceField(choices=[("qcow2", "qcow2 (recommended)"), ("qcow", "qcow"), ("raw", "raw")],
label="Format")
allocation = serializers.IntegerField(read_only=True)
size = serializers.IntegerField(min_value=1) # GiB
allocation = serializers.ReadOnlyField()
meta_prealloc = serializers.BooleanField(write_only=True, default=False)
class Meta:
model = Volume
fields = ['name', 'type', 'allocation', 'size', 'meta_prealloc']

View file

@ -0,0 +1,22 @@
# Generated by Django 5.2.18 on 2026-11-06 08:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('storages', '0001_initial'),
]
operations = [
migrations.DeleteModel(
name='Storage',
),
migrations.DeleteModel(
name='Storages',
),
migrations.DeleteModel(
name='Volume',
),
]

View file

@ -1,58 +0,0 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
# Create your models here.
class Storages(models.Model):
name = models.CharField(
_("name"),
max_length=20,
error_messages={"required": _("No pool name has been entered")},
)
status = models.IntegerField(_("status"))
type = models.CharField(_("type"), max_length=100)
size = models.IntegerField(_("size"))
volumes = models.IntegerField(_("volumes"))
class Meta:
managed = False
def __str__(self):
return f"{self.name}"
class Volume(models.Model):
name = models.CharField(_("name"), max_length=128)
type = models.CharField(
_("format"),
max_length=12,
choices=(("qcow2", "qcow2 (recommended)"), ("qcow", "qcow"), ("raw", "raw")),
)
allocation = models.IntegerField(_("allocation"))
size = models.IntegerField(_("size"))
class Meta:
managed = False
verbose_name_plural = "Volumes"
def __str__(self):
return f"{self.name}"
class Storage(models.Model):
state = models.IntegerField(_("state"))
size = models.IntegerField(_("size"))
free = models.IntegerField(_("free"))
status = models.CharField(_("status"), max_length=128)
path = models.CharField(_("path"), max_length=128)
type = models.CharField(_("type"), max_length=128)
autostart = models.BooleanField(_("autostart"))
volumes = models.ForeignKey(
Volume, related_name="storage_volumes", on_delete=models.DO_NOTHING
)
class Meta:
managed = False
def __str__(self):
return f"{self.path}"