mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-28 15:42:25 +00:00
Fixing migrations is more a way of life than a way to have fun.
This commit is contained in:
parent
84f1c9d60a
commit
818e069b89
4 changed files with 39 additions and 21 deletions
|
@ -24,7 +24,7 @@ class Migration(migrations.Migration):
|
|||
|
||||
dependencies = [
|
||||
('machines', '0095_auto_20180919_2225'),
|
||||
('preferences', '0051_auto_20180919_2225'),
|
||||
('preferences', '0055_generaloption_main_site_url'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -89,6 +89,23 @@ class Migration(migrations.Migration):
|
|||
name='unknown_room',
|
||||
field=models.CharField(choices=[('REJECT', 'Reject the machine'), ('SET_VLAN', 'Place the machine on the VLAN')], default='REJECT', max_length=32, verbose_name='Policy for machine connecting from unregistered room (relevant on ports with STRICT radius mode)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='radiusoption',
|
||||
name='vlan_decision_ok',
|
||||
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='vlan_ok_option', to='machines.Vlan'),
|
||||
),
|
||||
|
||||
migrations.RunPython(create_radius_policy),
|
||||
migrations.RemoveField(
|
||||
model_name='optionaltopologie',
|
||||
name='radius_general_policy',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='optionaltopologie',
|
||||
name='vlan_decision_nok',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='optionaltopologie',
|
||||
name='vlan_decision_ok',
|
||||
),
|
||||
]
|
20
preferences/migrations/0057_auto_20181204_0757.py
Normal file
20
preferences/migrations/0057_auto_20181204_0757.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-12-04 13:57
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('preferences', '0056_radiusoption'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='radiusoption',
|
||||
name='unknown_port',
|
||||
field=models.CharField(choices=[('REJECT', 'Reject the machine'), ('SET_VLAN', 'Place the machine on the VLAN')], default='REJECT', max_length=32, verbose_name='Policy for unknown port'),
|
||||
),
|
||||
]
|
|
@ -611,7 +611,7 @@ class RadiusOption(AclMixin, models.Model):
|
|||
max_length=32,
|
||||
choices=CHOICE_POLICY,
|
||||
default=REJECT,
|
||||
verbose_name=_("Policy for unknown machines"),
|
||||
verbose_name=_("Policy for unknown port"),
|
||||
)
|
||||
unknown_port_vlan = models.ForeignKey(
|
||||
'machines.Vlan',
|
||||
|
|
|
@ -119,25 +119,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "General policy for VLAN setting" %}</th>
|
||||
<td>{{ topologieoptions.radius_general_policy }}</td>
|
||||
<th>{% trans "This setting defines the VLAN policy after acceptance by RADIUS: either on the IP range's VLAN of the machine, or a VLAN preset in 'VLAN for machines accepted by RADIUS'" %}</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "VLAN for machines accepted by RADIUS" %}</th>
|
||||
<td>{{ topologieoptions.vlan_decision_ok }}</td>
|
||||
<th>{% trans "VLAN for machines rejected by RADIUS" %}</th>
|
||||
<td>{{ topologieoptions.vlan_decision_nok }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "VLAN for non members machines" %}</th>
|
||||
<td>{{ topologieoptions.vlan_non_member }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h6>Clef radius</h6>
|
||||
{% can_create RadiusKey%}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-radiuskey' %}"><i class="fa fa-plus"></i> Ajouter une clef radius</a>
|
||||
|
|
Loading…
Reference in a new issue