Coverage for virtualization/forms/object_create.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-10 18:35 +0000

1from django.utils.translation import gettext_lazy as _ 

2 

3from utilities.forms.fields import ExpandableNameField 

4 

5from .model_forms import VirtualDiskForm, VMInterfaceForm 

6 

7__all__ = ( 

8 'VMInterfaceCreateForm', 

9 'VirtualDiskCreateForm', 

10) 

11 

12 

13class VMInterfaceCreateForm(VMInterfaceForm): 

14 name = ExpandableNameField( 

15 label=_('Name'), 

16 ) 

17 replication_fields = ('name',) 

18 

19 class Meta(VMInterfaceForm.Meta): 

20 exclude = ('name',) 

21 

22 

23class VirtualDiskCreateForm(VirtualDiskForm): 

24 name = ExpandableNameField( 

25 label=_('Name'), 

26 ) 

27 replication_fields = ('name',) 

28 

29 class Meta(VirtualDiskForm.Meta): 

30 exclude = ('name',)