8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +00:00

Ajout dnssec reverse bool for iptypes

This commit is contained in:
Charlie Jacomme 2018-06-25 17:15:48 +02:00 committed by Gabriel Detraz
parent 8e8c10ce68
commit 029a83bd33
3 changed files with 16 additions and 5 deletions

View file

@ -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']

View file

@ -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,

View file

@ -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">