mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-24 16:03:47 +00:00
f0386df809
Switch conf json See merge request federez/re2o!180 (cherry picked from commita02e03ac71
)7ab0d656
add model PortProfileadc5757f
Merge branch 'switch_conf_json' of https://gitlab.federez.net/federez/re2o into switch_conf_json983b5620
Refactor port_profile7b49bd5
Pas de null sur manytomany92f30fbe
Ajout reglages sécurité + frontendd123ce92
Menu séparé pour les profils de ports447919a2
Ajout et transfert des anciennes données vers le nouveau système de profil de portse6b8c5c8
Finition, gestion du renvoie du profil par défaut du portb2d45d00
Adapte freeradius pour le nouveau système de profil de ports51793bde
Boolean direct pour désactiver un port + logo2e092b3f
Fix langue et 802.X radius + diversa07e0d92
Petit bug affichage vlanseefa0b4a
PEP8 mon amour + typosfeddc3f6
Conflicts fix switch_conf_json
44 lines
3.2 KiB
Python
44 lines
3.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.10.7 on 2018-06-26 16:37
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import re2o.mixins
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('machines', '0082_auto_20180525_2209'),
|
|
('topologie', '0060_server'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='PortProfile',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255, verbose_name='Name')),
|
|
('profil_default', models.CharField(blank=True, choices=[('room', 'room'), ('nothing', 'nothing'), ('accespoint', 'accesspoint'), ('uplink', 'uplink'), ('asso_machine', 'asso_machine')], max_length=32, null=True, unique=True, verbose_name='profil default')),
|
|
('radius_type', models.CharField(choices=[('NO', 'NO'), ('802.1X', '802.1X'), ('MAC-radius', 'MAC-radius')], max_length=32, verbose_name='RADIUS type')),
|
|
('radius_mode', models.CharField(choices=[('STRICT', 'STRICT'), ('COMMON', 'COMMON')], default='COMMON', max_length=32, verbose_name='RADIUS mode')),
|
|
('speed', models.CharField(choices=[('10-half', '10-half'), ('100-half', '100-half'), ('10-full', '10-full'), ('100-full', '100-full'), ('1000-full', '1000-full'), ('auto', 'auto'), ('auto-10', 'auto-10'), ('auto-100', 'auto-100')], default='auto', help_text='Mode de transmission et vitesse du port', max_length=32, verbose_name='Speed')),
|
|
('mac_limit', models.IntegerField(blank=True, help_text='Limit du nombre de mac sur le port', null=True, verbose_name='Mac limit')),
|
|
('flow_control', models.BooleanField(default=False, help_text='Gestion des débits', verbose_name='Flow control')),
|
|
('dhcp_snooping', models.BooleanField(default=False, help_text='Protection dhcp pirate', verbose_name='Dhcp snooping')),
|
|
('dhcpv6_snooping', models.BooleanField(default=False, help_text='Protection dhcpv6 pirate', verbose_name='Dhcpv6 snooping')),
|
|
('arp_protect', models.BooleanField(default=False, help_text="Verification assignation de l'IP par dhcp", verbose_name='Arp protect')),
|
|
('ra_guard', models.BooleanField(default=False, help_text='Protection contre ra pirate', verbose_name='Ra guard')),
|
|
('loop_protect', models.BooleanField(default=False, help_text='Protection contre les boucles', verbose_name='Loop Protect')),
|
|
('vlan_tagged', models.ManyToManyField(blank=True, related_name='vlan_tagged', to='machines.Vlan', verbose_name='VLAN(s) tagged')),
|
|
('vlan_untagged', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vlan_untagged', to='machines.Vlan', verbose_name='VLAN untagged')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Port profile',
|
|
'permissions': (('view_port_profile', 'Can view a port profile object'),),
|
|
'verbose_name_plural': 'Port profiles',
|
|
},
|
|
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
|
|
),
|
|
]
|