mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
9892 add supporting tests, form fields
This commit is contained in:
@@ -328,10 +328,10 @@ class FHRPGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||
|
||||
model = FHRPGroup
|
||||
fieldsets = (
|
||||
(None, ('protocol', 'group_id', 'description')),
|
||||
(None, ('protocol', 'group_id', 'name', 'description')),
|
||||
('Authentication', ('auth_type', 'auth_key')),
|
||||
)
|
||||
nullable_fields = ('auth_type', 'auth_key', 'description')
|
||||
nullable_fields = ('auth_type', 'auth_key', 'name', 'description')
|
||||
|
||||
|
||||
class VLANGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||
|
@@ -326,7 +326,7 @@ class FHRPGroupCSVForm(NetBoxModelCSVForm):
|
||||
|
||||
class Meta:
|
||||
model = FHRPGroup
|
||||
fields = ('protocol', 'group_id', 'auth_type', 'auth_key', 'description')
|
||||
fields = ('protocol', 'group_id', 'auth_type', 'auth_key', 'name', 'description')
|
||||
|
||||
|
||||
class VLANGroupCSVForm(NetBoxModelCSVForm):
|
||||
|
@@ -335,9 +335,12 @@ class FHRPGroupFilterForm(NetBoxModelFilterSetForm):
|
||||
model = FHRPGroup
|
||||
fieldsets = (
|
||||
(None, ('q', 'tag')),
|
||||
('Attributes', ('protocol', 'group_id')),
|
||||
('Attributes', ('name', 'protocol', 'group_id')),
|
||||
('Authentication', ('auth_type', 'auth_key')),
|
||||
)
|
||||
name = forms.CharField(
|
||||
required=False
|
||||
)
|
||||
protocol = MultipleChoiceField(
|
||||
choices=FHRPGroupProtocolChoices,
|
||||
required=False
|
||||
|
@@ -527,7 +527,7 @@ class FHRPGroupForm(NetBoxModelForm):
|
||||
)
|
||||
|
||||
fieldsets = (
|
||||
('FHRP Group', ('protocol', 'group_id', 'description', 'tags')),
|
||||
('FHRP Group', ('protocol', 'group_id', 'name', 'description', 'tags')),
|
||||
('Authentication', ('auth_type', 'auth_key')),
|
||||
('Virtual IP Address', ('ip_vrf', 'ip_address', 'ip_status'))
|
||||
)
|
||||
@@ -535,7 +535,7 @@ class FHRPGroupForm(NetBoxModelForm):
|
||||
class Meta:
|
||||
model = FHRPGroup
|
||||
fields = (
|
||||
'protocol', 'group_id', 'auth_type', 'auth_key', 'description', 'ip_vrf', 'ip_address', 'ip_status', 'tags',
|
||||
'protocol', 'group_id', 'auth_type', 'auth_key', 'name', 'description', 'ip_vrf', 'ip_address', 'ip_status', 'tags',
|
||||
)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user