mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 15:12:25 +00:00
Renvoie le mode plain ou ssl pour webmanagement
This commit is contained in:
parent
396853db0e
commit
54326a35b9
1 changed files with 15 additions and 0 deletions
|
@ -296,6 +296,21 @@ class Switch(AclMixin, Machine):
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
return self.name or self.main_interface().domain.name
|
return self.name or self.main_interface().domain.name
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def rest_enabled(self):
|
||||||
|
return OptionalTopologie.get_cached_value('switchs_rest_management') or self.automatic_provision
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def web_management_enabled(self):
|
||||||
|
sw_management = OptionalTopologie.get_cached_value('switchs_web_management')
|
||||||
|
sw_management_ssl = OptionalTopologie.get_cached_value('switchs_web_management_ssl')
|
||||||
|
if sw_management_ssl:
|
||||||
|
return "ssl"
|
||||||
|
elif sw_management:
|
||||||
|
return "plain"
|
||||||
|
else:
|
||||||
|
return self.automatic_provision
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def ipv4(self):
|
def ipv4(self):
|
||||||
"""Return the switch's management ipv4"""
|
"""Return the switch's management ipv4"""
|
||||||
|
|
Loading…
Reference in a new issue