def clean(self, *args, **kwargs): if 'update_reverse_domain' in kwargs: # TODO, clean this up urd = kwargs.pop('update_reverse_domain') self.clean_ip(update_reverse_domain=urd) else: self.clean_ip() self.data_domain = _name_to_domain(self.name)
def clean(self, *args, **kwargs): urd = kwargs.pop('update_reverse_domain', True) self.clean_ip(update_reverse_domain=urd) self.data_domain = _name_to_domain(self.name) # We need to check if there is an interface using our ip and name # because that interface will generate a ptr record. if (StaticInterface.objects.filter(fqdn=self.name, ip_upper=self.ip_upper, ip_lower=self.ip_lower).exists()): raise ValidationError("An Interface has already used this IP and " "Name.")
def clean(self, *args, **kwargs): super(CNAME, self).clean(*args, **kwargs) super(CNAME, self).check_for_delegation() """The RFC for DNS requires that a CName never be at the same level as an SOA, A, or MX record. Bind enforces this restriction. When creating a Cname, the UI needs to make sure that there are no records of those types that will clash. Likewise, when creating an SOA, A or MX, the UI needs to verify that there are no MX records at that level. """ # TODO ^ self.check_SOA_condition() self.data_domain = _name_to_domain(self.data) self.existing_node_check()
def clean(self, *args, **kwargs): super(CNAME, self).clean(*args, **kwargs) super(CNAME, self).check_for_delegation() self.check_SOA_condition() self.target_domain = _name_to_domain(self.target) self.existing_node_check()