Cleanup code so that *most* test work again
Still need to solve the downgrade test
This commit is contained in:
parent
ecc9e6f734
commit
0b1c2cc168
8 changed files with 40 additions and 2254 deletions
|
|
@ -196,11 +196,27 @@ class ReverseDNSEntry(models.Model):
|
|||
|
||||
name = models.CharField(max_length=253, null=False)
|
||||
|
||||
@property
|
||||
def reverse_pointer(self):
|
||||
return ipaddress.ip_address(self.ip_address).reverse_pointer
|
||||
|
||||
def implement(self):
|
||||
"""
|
||||
The implement function implements the change
|
||||
"""
|
||||
|
||||
# Get all DNS entries (?) / update this DNS entry
|
||||
# convert to DNS name
|
||||
#
|
||||
pass
|
||||
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
# Product.objects.filter(config__parameters__contains='reverse_dns_network')
|
||||
# FIXME: check if order is still active / not replaced
|
||||
|
||||
allowed = False
|
||||
product = None
|
||||
|
||||
for order in Order.objects.filter(config__parameters__reverse_dns_network__isnull=False,
|
||||
owner=self.owner):
|
||||
|
|
@ -211,6 +227,7 @@ class ReverseDNSEntry(models.Model):
|
|||
|
||||
if addr in net:
|
||||
allowed = True
|
||||
product = order.product
|
||||
break
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue