-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add ServicePort model * Add ServicePort panel in Device page * Add "Add ServicePort" functionality * Add "Edit" and "Delete" Service port functionality * Add ServicePort API serializers * Rename ServicePort.type to ServicePort.protocol * Add IPv6 support for assigning a ServicePort to all device's IPs * Make ServicePort bound to Device and make IPAddres optional * Move ServicePort related urls and views from `ipam` to `dcim` * Move serviceport templates to `dcim` folder * Move ServicePort api serialization from `ipam` to `dcim` * Rename `serviceport_assign` to `serviceport_add` ...to keep consistency with the naming convention along the rest of device related components * Move ServicePort mode definition to `dcim` * add service port specific permissions
- Loading branch information
1 parent
6a9f26a
commit b821cd2
Showing
16 changed files
with
506 additions
and
8 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
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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10 on 2016-11-25 23:50 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ipam', '0010_ipaddress_help_texts'), | ||
('dcim', '0021_add_ff_flexstack'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ServicePort', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', models.DateField(auto_now_add=True)), | ||
('last_updated', models.DateTimeField(auto_now=True)), | ||
('protocol', models.PositiveSmallIntegerField(choices=[(6, b'TCP'), (17, b'UDP')], default=0)), | ||
('port', models.PositiveIntegerField()), | ||
('name', models.CharField(max_length=30)), | ||
('description', models.TextField(blank=True)), | ||
('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_ports', to='dcim.Device', verbose_name=b'device')), | ||
('ip_address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='service_ports', to='ipam.IPAddress', verbose_name=b'ip_address')), | ||
], | ||
options={ | ||
'ordering': ['device', 'ip_address', 'port'], | ||
'verbose_name': 'Service Port', | ||
'verbose_name_plural': 'Service Ports', | ||
}, | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='serviceport', | ||
unique_together={('device', 'ip_address', 'port', 'protocol')}, | ||
), | ||
] |
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
Oops, something went wrong.