1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Initial work on #6235

This commit is contained in:
jeremystretch
2021-11-01 16:14:44 -04:00
parent e0230ed104
commit bb4f3e1789
33 changed files with 959 additions and 17 deletions

View File

@@ -12,6 +12,7 @@ from virtualization.models import VirtualMachine, VMInterface
__all__ = (
'AggregateCSVForm',
'FHRPGroupCSVForm',
'IPAddressCSVForm',
'IPRangeCSVForm',
'PrefixCSVForm',
@@ -283,6 +284,20 @@ class IPAddressCSVForm(CustomFieldModelCSVForm):
return ipaddress
class FHRPGroupCSVForm(CustomFieldModelCSVForm):
protocol = CSVChoiceField(
choices=FHRPGroupProtocolChoices
)
auth_type = CSVChoiceField(
choices=FHRPGroupAuthTypeChoices,
required=False
)
class Meta:
model = FHRPGroup
fields = ('protocol', 'group_id', 'auth_type', 'auth_key', 'description')
class VLANGroupCSVForm(CustomFieldModelCSVForm):
slug = SlugField()
scope_type = CSVContentTypeField(