mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Update comments models.py
This commit is contained in:
parent
383aaf3132
commit
c5dca80703
1 changed files with 11 additions and 0 deletions
|
@ -366,6 +366,11 @@ class Switch(Machine):
|
|||
|
||||
@cached_property
|
||||
def get_radius_servers_objects(self):
|
||||
"""Return radius servers objects for Switchs provisioning, via REST API.
|
||||
|
||||
Returns :
|
||||
Interfaces objects query_set for the Role type radius-server
|
||||
"""
|
||||
return Role.all_interfaces_for_roletype("radius-server").filter(
|
||||
machine_type__in=MachineType.objects.filter(
|
||||
interface__in=self.interface_set.all()
|
||||
|
@ -374,6 +379,12 @@ class Switch(Machine):
|
|||
|
||||
@cached_property
|
||||
def get_radius_servers(self):
|
||||
"""Return radius servers string, ipv4 and ipv6 for Switchs provisioning,
|
||||
via REST API.
|
||||
|
||||
Returns :
|
||||
Ip dict of interfaces for the Role type radius-server
|
||||
"""
|
||||
def return_ips_dict(interfaces):
|
||||
return {
|
||||
"ipv4": [str(interface.ipv4) for interface in interfaces],
|
||||
|
|
Loading…
Reference in a new issue