def bind_render_record(self, pk=False, **kwargs):
     self.rdtype_clob = kwargs.pop('rdtype', 'INTR')
     if kwargs.pop('reverse', False):
         self.template = self.PTR_template
         self.dns_ip = ip_to_dns_form(self.ip_str)
     else:
         self.template = self.A_template
     return super(StaticInterface, self).bind_render_record(pk=pk, **kwargs)
示例#2
0
    def bind_render_record(self, pk=False, **kwargs):
        rdtype = kwargs.pop('rdtype', 'SREG')
        if rdtype == 'A/AAAA':
            if self.ip_type == '6':
                self.rdtype_clob = 'AAAA'
            else:
                self.rdtype_clob = 'A'
        else:
            self.rdtype_clob = rdtype

        if kwargs.pop('reverse', False):
            self.template = self.PTR_template
            self.ip_name = ip_to_dns_form(self.ip_str)
        else:
            self.template = self.A_template

        return super(StaticReg, self).bind_render_record(pk=pk, **kwargs)
示例#3
0
    def bind_render_record(self, pk=False, **kwargs):
        rdtype = kwargs.pop('rdtype', 'SREG')
        if rdtype == 'A/AAAA':
            if self.ip_type == '6':
                self.rdtype_clob = 'AAAA'
            else:
                self.rdtype_clob = 'A'
        else:
            self.rdtype_clob = rdtype

        if kwargs.pop('reverse', False):
            self.template = self.PTR_template
            self.ip_name = ip_to_dns_form(self.ip_str)
        else:
            self.template = self.A_template

        return super(StaticReg, self).bind_render_record(pk=pk, **kwargs)
 def dns_name(self):
     """Return the cononical name of this ptr that can be placed in a
     reverse zone file."""
     return ip_to_dns_form(self.ip_str)
示例#5
0
 def dns_name(self):
     """
     Return the cononical name of this ptr that can be placed in a
     reverse zone file.
     """
     return ip_to_dns_form(self.ip_str)