|
|
|
@ -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)
|
|
|
|
|