Skip to content

Commit

Permalink
Merge pull request #32 from DanSheps/develop
Browse files Browse the repository at this point in the history
Update forms
  • Loading branch information
DanSheps authored Sep 16, 2024
2 parents d804766 + fe21838 commit 8c95959
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions netbox_routing/forms/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ class PrefixListForm(NetBoxModelForm):

class Meta:
model = PrefixList
fields = ('name',)
fields = ('name', 'description', 'comments', )


class PrefixListEntryForm(NetBoxModelForm):

class Meta:
model = PrefixListEntry
fields = ('prefix_list', 'sequence', 'type', 'prefix', 'le', 'ge')
fields = ('prefix_list', 'sequence', 'type', 'prefix', 'le', 'ge', 'description', 'comments', )


class RouteMapForm(NetBoxModelForm):

class Meta:
model = RouteMap
fields = ('name',)
fields = ('name', 'description', 'comments', )


class RouteMapEntryForm(NetBoxModelForm):

class Meta:
model = RouteMapEntry
fields = ('route_map', 'sequence', 'type')
fields = ('route_map', 'sequence', 'type', 'description', 'comments', )
9 changes: 6 additions & 3 deletions netbox_routing/forms/ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class OSPFInstanceForm(NetBoxModelForm):

class Meta:
model = OSPFInstance
fields = ('name', 'router_id', 'process_id', 'device')
fields = ('name', 'router_id', 'process_id', 'device', 'description', 'comments', )


class OSPFAreaForm(NetBoxModelForm):

class Meta:
model = OSPFArea
fields = ('area_id', )
fields = ('area_id', 'description', 'comments', )


class OSPFInterfaceForm(NetBoxModelForm):
Expand Down Expand Up @@ -71,7 +71,10 @@ class OSPFInterfaceForm(NetBoxModelForm):

class Meta:
model = OSPFInterface
fields = ('device', 'instance', 'area', 'interface', 'priority', 'bfd', 'authentication', 'passphrase')
fields = (
'device', 'instance', 'area', 'interface', 'priority', 'bfd', 'authentication', 'passphrase', 'description',
'comments',
)

widgets = {
'bfd': forms.Select(choices=BOOLEAN_WITH_BLANK_CHOICES),
Expand Down
2 changes: 1 addition & 1 deletion netbox_routing/forms/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StaticRouteForm(NetBoxModelForm):

class Meta:
model = StaticRoute
fields = ('devices', 'vrf', 'prefix', 'next_hop', 'name', 'metric', 'permanent')
fields = ('devices', 'vrf', 'prefix', 'next_hop', 'name', 'metric', 'permanent', 'description', 'comments', )

def __init__(self, data=None, instance=None, *args, **kwargs):
super().__init__(data=data, instance=instance, *args, **kwargs)
Expand Down

0 comments on commit 8c95959

Please sign in to comment.