Добавлена переменная для определения типа MAC адреса

develop 3.6.6.4
parent 57f32415b5
commit e458e974f5

@ -317,6 +317,28 @@ class VariableOsInstallNetName(NetHelper, ReadonlyVariable):
self.Get('os_install_net_interfaces')))
class VariableOsInstallNetMacType(NetHelper, ReadonlyVariable):
"""
Net devices mac (Example: local/OUI)
"""
type = "list"
reLocal = re.compile("^.[2367abef]:.*$", re.I)
def init(self):
self.label = _("Mac type")
def _mactype(self, mac):
if not mac:
return ""
if not self.reLocal.match(mac):
return "OUI"
else:
return "local"
def get(self):
return map(self._mactype, self.Get('os_install_net_mac'))
class VariableOsInstallNetMac(NetHelper, ReadonlyVariable):
"""
Net devices mac (Example: 01:02:03:04:05:06)

Loading…
Cancel
Save