8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

Short name ap

This commit is contained in:
Gabriel Detraz 2018-04-18 21:26:57 +02:00 committed by chirac
parent d6cc00c9d7
commit 4e2f426c1d

View file

@ -41,6 +41,7 @@ import itertools
from django.db import models
from django.db.models.signals import post_save, post_delete
from django.utils.functional import cached_property
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.db import IntegrityError
@ -123,6 +124,9 @@ class AccessPoint(AclMixin, Machine):
def __str__(self):
return str(self.interface_set.first())
@cached_property
def short_name(self):
return str(self.interface_set.first().domain.name)
class Switch(AclMixin, Machine):
""" Definition d'un switch. Contient un nombre de ports (number),