Commit 029a83bd authored by Charlie Jacomme's avatar Charlie Jacomme Committed by Gabriel Detraz

Ajout dnssec reverse bool for iptypes

parent 8e8c10ce
......@@ -218,7 +218,8 @@ class IpTypeForm(FormRevMixin, ModelForm):
class Meta:
model = IpType
fields = ['type', 'extension', 'need_infra', 'domaine_ip_start',
'domaine_ip_stop', 'prefix_v6', 'vlan', 'ouverture_ports']
'domaine_ip_stop', 'dnssec_reverse_v4', 'prefix_v6',
'dnssec_reverse_v6', 'vlan', 'ouverture_ports']
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
......@@ -231,6 +232,7 @@ class EditIpTypeForm(IpTypeForm):
synchroniser les objets iplist"""
class Meta(IpTypeForm.Meta):
fields = ['extension', 'type', 'need_infra', 'prefix_v6', 'vlan',
'dnssec_reverse_v4', 'dnssec_reverse_v6',
'ouverture_ports']
......
......@@ -256,11 +256,19 @@ class IpType(RevMixin, AclMixin, models.Model):
need_infra = models.BooleanField(default=False)
domaine_ip_start = models.GenericIPAddressField(protocol='IPv4')
domaine_ip_stop = models.GenericIPAddressField(protocol='IPv4')
dnssec_reverse_v4 = models.BooleanField(
default=False,
help_text="Activer DNSSEC sur le reverse DNS IPv4",
)
prefix_v6 = models.GenericIPAddressField(
protocol='IPv6',
null=True,
blank=True
)
dnssec_reverse_v6 = models.BooleanField(
default=False,
help_text="Activer DNSSEC sur le reverse DNS IPv6",
)
vlan = models.ForeignKey(
'Vlan',
on_delete=models.PROTECT,
......
......@@ -34,11 +34,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>Extension</th>
<th>Nécessite l'autorisation infra</th>
<th>Plage ipv4</th>
<th>Préfixe v6</th>
<th>Préfixe v6</th>
<th>DNSSEC reverse v4/v6</th>
<th>Sur vlan</th>
<th>Ouverture ports par défault</th>
<th></th>
<th></th>
</tr>
</thead>
{% for type in iptype_list %}
......@@ -46,8 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ type.type }}</td>
<td>{{ type.extension }}</td>
<td>{{ type.need_infra|tick }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}</td>
<td>{{ type.prefix_v6 }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}</td>
<td>{{ type.prefix_v6 }}</td>
<td>{{ type.dnssec_reverse_v4|tick }}/{{ type.dnssec_reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment