Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 54326a35 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by grizzly

Renvoie le mode plain ou ssl pour webmanagement

parent 396853db
......@@ -296,6 +296,21 @@ class Switch(AclMixin, Machine):
def get_name(self):
return self.name or self.main_interface().domain.name
def rest_enabled(self):
return OptionalTopologie.get_cached_value('switchs_rest_management') or self.automatic_provision
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"
return self.automatic_provision
def ipv4(self):
"""Return the switch's management ipv4"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment