-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Models update - validators on distance * updated migrations files * Included url in static route serializer fields * updated serializer view name * Verbose name change in init * Testing linkify * Updated link on prefix in table view * Changed next hop to arrayfield * Models update * Added bulk edit and delete views and updated README
- Loading branch information
1 parent
43da1d3
commit 6e6b8cb
Showing
12 changed files
with
120 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 4.0.4 on 2022-05-30 17:44 | ||
|
||
import django.contrib.postgres.fields | ||
import django.core.serializers.json | ||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import taggit.managers | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('dcim', '0153_created_datetimefield'), | ||
('extras', '0073_journalentry_tags_custom_fields'), | ||
('ipam', '0057_created_datetimefield'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='StaticRoute', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)), | ||
('created', models.DateTimeField(auto_now_add=True, null=True)), | ||
('last_updated', models.DateTimeField(auto_now=True, null=True)), | ||
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder)), | ||
('next_hop', django.contrib.postgres.fields.ArrayField(base_field=models.GenericIPAddressField(), null=True, size=None)), | ||
('distance', models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(255)])), | ||
('comments', models.TextField(blank=True)), | ||
('destination_prefix', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='ipam.prefix')), | ||
('device', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='dcim.device')), | ||
('site', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='%(class)s_related', to='dcim.site')), | ||
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')), | ||
('vrf', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.vrf')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Static Routes', | ||
'ordering': ('device', 'vrf', 'destination_prefix', 'next_hop'), | ||
'unique_together': {('device', 'vrf', 'destination_prefix')}, | ||
}, | ||
), | ||
] |
Binary file added
BIN
+2.02 KB
netbox_static_routes/migrations/__pycache__/0001_initial.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+641 Bytes
netbox_static_routes/migrations/__pycache__/0002_alter_staticroute_options.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+1.08 KB
...cache__/0003_alter_staticroute_device_alter_staticroute_distance_and_more.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+162 Bytes
netbox_static_routes/migrations/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1' | ||
__version__ = '0.0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters