Изменены параметры для настройки сети и авторазметки

* в консоли удалён параметра -p, теперь для использование авторазметки
определяется по использованию параметров -d, -D
develop
parent 264c8a66e5
commit b8c38a7aa2

@ -410,7 +410,6 @@ class VariableClAutopartitionSet(Variable):
"""
type = "bool"
element = "radio"
opt = ["--autopartition", "-p"]
def init(self):
self.label = _("Allocate drive space")
@ -422,6 +421,10 @@ class VariableClAutopartitionSet(Variable):
("off", _("Use the current partitions"))]
def get(self):
if self.is_console_set("os_location_data"):
return "off"
elif self.is_console_set("cl_autopartition_device"):
return "on"
if self.Get('os_root_type_ext') in (RootType.Value.LiveCD,
RootType.Value.LiveFlash,
RootType.Value.IsoScanFlash,

@ -22,6 +22,7 @@ from calculate.lib.datavars import (Variable, VariableError, ReadonlyVariable,
VariableInterface, HumanReadable)
from calculate.lib.cl_lang import setLocalTranslate, _
from calculate.lib.variables.system import RootType
setLocalTranslate('cl_install3', sys.modules[__name__])
@ -57,9 +58,55 @@ class NetHelper(VariableInterface):
_notin=('off', 'dhcp'), limit=1):
return _("Network routing configuration is not available if all "
"interfaces are set to DHCP")
if self.Get('cl_network_migrate_set') == 'on':
return _("Network settings unavailable with use settings migration")
return ""
class VariableClNetworkConfigureSet(ReadonlyVariable):
"""
Выполнять ли настройку сети шаблонами
"""
type = "bool"
def get(self):
if (self.Get('os_root_type_ext') in RootType.Live and
self.GetBool('cl_system_boot_set')):
return "on"
if self.GetBool("cl_network_migrate_set"):
return "off"
else:
return "on"
class VariableClNetworkMigrateSet(Variable):
"""
Использовать миграцию для переноса настроек
"""
type = "bool"
element = "radio"
def init(self):
self.label = _("Network")
self.help = _("use the network migration")
def choice(self):
return [("on", _("Migrate network settings")),
("off", _("Manually network configuration"))]
def get(self):
for manvar in ("os_install_net_conf",
"os_install_net_data",
"os_install_net_fqdn",
"os_install_ntp",
"os_install_net_dns",
"os_install_net_dns_search",
"os_install_net_route_data"):
if self.is_console_set(manvar):
return "off"
else:
return "on"
class VariableOsInstallNtp(NetHelper, Variable):
"""
NTP server for system

@ -102,12 +102,16 @@ class Wsdl(WsdlBase):
'os_install_uefi')),
lambda group: group(_("Network settings"),
normal=(
'os_install_net_conf',
'cl_network_migrate_set',),
expert=('os_install_net_conf',
'os_install_net_data',
'os_install_net_fqdn', 'os_install_ntp'),
expert=('os_install_net_dns',
'os_install_net_dns_search',
'os_install_net_route_data')),
'os_install_net_fqdn', 'os_install_ntp',
'os_install_net_dns',
'os_install_net_dns_search',
'os_install_net_route_data'),
expert_label=_(
"Click to select network settings")
),
lambda group: group(_("Users"),
normal=(
'cl_migrate_root_pwd_plain',
@ -238,6 +242,7 @@ class Wsdl(WsdlBase):
'native_error': (
VariableError, DataVarsError, install.InstallError),
'setvars': {'cl_action!': 'merge', 'cl_merge_pkg!': [None],
'cl_network_migrate_set': 'off',
'cl_merge_set!': "on", 'cl_setup': 'network'},
'groups': [
lambda group: group(_("Network"),

Loading…
Cancel
Save