This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Description
Raise exception when user try to enable interface in a disabled switch.
Therefore, its necessary to change this code:
https://github.com/kytos/kytos/blob/master/kytos/core/interface.py#L144~#L150
def enable(self):
"""Enable this interface instance.
Also enable the switch instance this interface is attached to.
"""
self.switch.enable()
self._enabled = True
Suggestion:
def enable(self):
"""Enable this interface instance.
"""
if not self.switch.is_enabled():
raise KytosSwitchDisabled() # or another suitable exception
self._enabled = True