diff --git a/preferences/migrations/0015_optionaltopologie_radius_general_policy.py b/preferences/migrations/0015_optionaltopologie_radius_general_policy.py new file mode 100644 index 00000000..d07ac378 --- /dev/null +++ b/preferences/migrations/0015_optionaltopologie_radius_general_policy.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-09-02 13:16 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0014_generaloption_email_from'), + ] + + operations = [ + migrations.AddField( + model_name='optionaltopologie', + name='radius_general_policy', + field=models.CharField(choices=[('MACHINE', 'Sur le vlan de la plage ip machine'), ('DEFINED', 'Prédéfini')], default='DEFINED', max_length=32), + ), + ] diff --git a/preferences/migrations/0016_auto_20170902_1520.py b/preferences/migrations/0016_auto_20170902_1520.py new file mode 100644 index 00000000..1779d712 --- /dev/null +++ b/preferences/migrations/0016_auto_20170902_1520.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-09-02 13:20 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0015_optionaltopologie_radius_general_policy'), + ] + + operations = [ + migrations.AlterField( + model_name='optionaltopologie', + name='radius_general_policy', + field=models.CharField(choices=[('MACHINE', 'Sur le vlan de la plage ip machine'), ('DEFINED', 'Prédéfini dans "Vlan où placer les machines après acceptation RADIUS"')], default='DEFINED', max_length=32), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index 001b7c27..92822190 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -46,7 +46,14 @@ class OptionalMachine(models.Model): class OptionalTopologie(models.Model): PRETTY_NAME = "Options topologie" + MACHINE = 'MACHINE' + DEFINED = 'DEFINED' + CHOICE_RADIUS = ( + (MACHINE, 'Sur le vlan de la plage ip machine'), + (DEFINED, 'Prédéfini dans "Vlan où placer les machines après acceptation RADIUS"'), + ) + radius_general_policy = models.CharField(max_length=32, choices=CHOICE_RADIUS, default='DEFINED') vlan_decision_ok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_ok', blank=True, null=True) vlan_decision_nok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_nok', blank=True, null=True) diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 96d3a910..394a4714 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -80,6 +80,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Politique générale de placement de vlan | +{{ topologieoptions.radius_general_policy }} | +Ce réglage défini la politique vlan après acceptation radius : soit sur le vlan de la plage d'ip de la machine, soit sur un vlan prédéfini dans "Vlan où placer les machines après acceptation RADIUS" | ++ |
---|---|---|---|
Vlan où placer les machines après acceptation RADIUS | {{ topologieoptions.vlan_decision_ok }} |