2023-07-31 23:52:38 +07:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2023-04-14 10:33:53 -04:00
|
|
|
from utilities.forms.fields import ExpandableNameField
|
2023-11-17 12:02:56 -08:00
|
|
|
from .model_forms import VirtualDiskForm, VMInterfaceForm
|
2021-09-28 10:25:07 -04:00
|
|
|
|
|
|
|
__all__ = (
|
2023-11-17 12:02:56 -08:00
|
|
|
'VirtualDiskCreateForm',
|
2021-09-28 10:25:07 -04:00
|
|
|
'VMInterfaceCreateForm',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-09-15 10:10:32 -04:00
|
|
|
class VMInterfaceCreateForm(VMInterfaceForm):
|
2023-07-31 23:52:38 +07:00
|
|
|
name = ExpandableNameField(
|
|
|
|
label=_('Name'),
|
|
|
|
)
|
2022-09-15 10:10:32 -04:00
|
|
|
replication_fields = ('name',)
|
|
|
|
|
|
|
|
class Meta(VMInterfaceForm.Meta):
|
|
|
|
exclude = ('name',)
|
2023-11-17 12:02:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
class VirtualDiskCreateForm(VirtualDiskForm):
|
|
|
|
name = ExpandableNameField(
|
|
|
|
label=_('Name'),
|
|
|
|
)
|
|
|
|
replication_fields = ('name',)
|
|
|
|
|
|
|
|
class Meta(VirtualDiskForm.Meta):
|
|
|
|
exclude = ('name',)
|