def start(self): if self.cidr_prefix_length is not None: start, end = ipu.cidr_to_range(self.first_ip, self.cidr_prefix_length) return start else: return ipu.to_number(self.first_ip)
def end(self): if self.last_ip is not None: return ipu.to_number(self.last_ip) if self.cidr_prefix_length is not None: start, end = ipu.cidr_to_range(self.first_ip, self.cidr_prefix_length) return end return self.start