mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Short name ap
This commit is contained in:
parent
d6cc00c9d7
commit
4e2f426c1d
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,7 @@ import itertools
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models.signals import post_save, post_delete
|
from django.db.models.signals import post_save, post_delete
|
||||||
|
from django.utils.functional import cached_property
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import IntegrityError
|
from django.db import IntegrityError
|
||||||
|
@ -123,6 +124,9 @@ class AccessPoint(AclMixin, Machine):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.interface_set.first())
|
return str(self.interface_set.first())
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def short_name(self):
|
||||||
|
return str(self.interface_set.first().domain.name)
|
||||||
|
|
||||||
class Switch(AclMixin, Machine):
|
class Switch(AclMixin, Machine):
|
||||||
""" Definition d'un switch. Contient un nombre de ports (number),
|
""" Definition d'un switch. Contient un nombre de ports (number),
|
||||||
|
|
Loading…
Reference in a new issue