Beispiel #1
0
def allocated_prefixes(obj):
    if obj.asn == 0:
        return ""
    r = []
    for p in Prefix.objects.filter(asn=obj).order_by("afi", "prefix"):
        r += [
            "<a href='%s'>%s</a>" % (site.reverse(
                "ip:ipam:vrf_index", p.vrf.id, p.afi, p.prefix), p.prefix)
        ]
    return ", ".join(r)
Beispiel #2
0
 def get_absolute_url(self):
     return site.reverse("ip:vrfgroup:change", self.id)
Beispiel #3
0
 def get_absolute_url(self):
     return site.reverse("ip:ipam:vrf_index", self.vrf.id, self.afi,
                         self.prefix.prefix)
Beispiel #4
0
 def get_absolute_url(self):
     return site.reverse("ip:addressrange:change", self.id)