Switch conf json
See merge request federez/re2o!180
(cherry picked from commit a02e03ac71)
7ab0d656 add model PortProfile
adc5757f Merge branch 'switch_conf_json' of https://gitlab.federez.net/federez/re2o into switch_conf_json
983b5620 Refactor port_profil
e7b49bd5 Pas de null sur manytomany
92f30fbe Ajout reglages sécurité + frontend
d123ce92 Menu séparé pour les profils de ports
447919a2 Ajout et transfert des anciennes données vers le nouveau système de profil de ports
e6b8c5c8 Finition, gestion du renvoie du profil par défaut du port
b2d45d00 Adapte freeradius pour le nouveau système de profil de ports
51793bde Boolean direct pour désactiver un port + logo
2e092b3f Fix langue et 802.X radius + divers
a07e0d92 Petit bug affichage vlans
eefa0b4a PEP8 mon amour + typos
feddc3f6 Conflicts fix switch_conf_json
('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')),
field=models.CharField(choices=[('STRICT','STRICT'),('COMMON','COMMON')],default='COMMON',help_text="En cas d'auth par mac, auth common ou strcit sur le port",max_length=32,verbose_name='RADIUS mode'),
),
migrations.AlterField(
model_name='portprofile',
name='radius_type',
field=models.CharField(choices=[('NO','NO'),('802.1X','802.1X'),('MAC-radius','MAC-radius')],help_text="Choix du type d'authentification radius : non actif, mac ou 802.1X",max_length=32,verbose_name='RADIUS type'),
field=models.BooleanField(default=False,help_text='Protect again loop',verbose_name='Loop Protect'),
),
migrations.AlterField(
model_name='portprofile',
name='mac_limit',
field=models.IntegerField(blank=True,help_text='Limit of mac-address on this port',null=True,verbose_name='Mac limit'),
),
migrations.AlterField(
model_name='portprofile',
name='ra_guard',
field=models.BooleanField(default=False,help_text='Protect against rogue ra',verbose_name='Ra guard'),
),
migrations.AlterField(
model_name='portprofile',
name='radius_mode',
field=models.CharField(choices=[('STRICT','STRICT'),('COMMON','COMMON')],default='COMMON',help_text='In case of mac-auth : mode common or strict on this port',max_length=32,verbose_name='RADIUS mode'),
),
migrations.AlterField(
model_name='portprofile',
name='radius_type',
field=models.CharField(choices=[('NO','NO'),('802.1X','802.1X'),('MAC-radius','MAC-radius')],help_text='Type of radius auth : inactive, mac-address or 802.1X',max_length=32,verbose_name='RADIUS type'),
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load bootstrap3 %}
{% load acl %}
{% load i18n %}
{% block title %}Switchs{% endblock %}
{% block content %}
<h2>{% trans "Port profiles" %}</h2>
{% can_create PortProfile %}
<aclass="btn btn-primary btn-sm"role="button"href="{% url 'topologie:new-port-profile' %}"><iclass="fa fa-plus"></i>{% trans " Add a port profile" %}</a>
<hr>
{% acl_end %}
{% include "topologie/aff_port_profile.html" with port_profile_list=port_profile_list %}
links_return=[]# list of dictionaries of the links to be detected
links_return=[]# list of dictionaries of the links to be detected
forportinswitch_start.ports.filter(related__isnull=False):# create links to every switchs below
# create links to every switchs below
ifport.related.switch!=switch_beforeandport.related.switch!=port.switchandport.related.switchnotindetected:# Not the switch that we come from, not the current switch