added support for virtual interfaces #12

This commit is contained in:
tomaae 2020-04-13 09:16:33 +02:00
parent 99d6d7c43b
commit cd4d0a09ee
3 changed files with 31 additions and 5 deletions

View file

@ -226,6 +226,8 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
"""Turn on the switch."""
path = "/interface"
param = "default-name"
if "-" in self._data["port-mac-address"]:
param = "name"
value = self._data[param]
mod_param = "disabled"
mod_value = False
@ -236,6 +238,8 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
"""Turn on the switch."""
path = "/interface"
param = "default-name"
if "-" in self._data["port-mac-address"]:
param = "name"
value = self._data[param]
mod_param = "disabled"
mod_value = True