|
|
|
@ -382,6 +382,12 @@ class VariableClAutopartitionFactory(ReadonlyVariable):
|
|
|
|
|
sb = self.Get('cl_autopartition_scheme_builder')
|
|
|
|
|
if sb and sb.devices:
|
|
|
|
|
df.default_format = sb.default_format
|
|
|
|
|
root_purpose = partition.VolumesBuilder.Purpose.MainRoot
|
|
|
|
|
data_purpose = partition.VolumesBuilder.Purpose.Calculate
|
|
|
|
|
df.purpose_format[root_purpose] = \
|
|
|
|
|
self.Get('cl_autopartition_root_format')
|
|
|
|
|
df.purpose_format[data_purpose] = \
|
|
|
|
|
self.Get('cl_autopartition_calculate_format')
|
|
|
|
|
try:
|
|
|
|
|
sb.process(df)
|
|
|
|
|
except (partition.SchemeError, partition.VirtualDiskError):
|
|
|
|
@ -402,8 +408,38 @@ class VariableClAutopartitionDefaultFormat(Variable):
|
|
|
|
|
return FileSystemManager.defaultFS['hdd']
|
|
|
|
|
|
|
|
|
|
def choice(self):
|
|
|
|
|
return [k for k,v in FileSystemManager.supportFS.items()
|
|
|
|
|
if "hdd" in v.get('type',[])]
|
|
|
|
|
return list(sorted([k for k,v in FileSystemManager.supportFS.items()
|
|
|
|
|
if v.get('auto',True)]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClAutopartitionRootFormat(VariableClAutopartitionDefaultFormat):
|
|
|
|
|
"""
|
|
|
|
|
Формат файловой системы для корня
|
|
|
|
|
"""
|
|
|
|
|
opt = ["--root-fs"]
|
|
|
|
|
metavalue = "FS"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("Filesystem for root partition")
|
|
|
|
|
self.help = _("set filesystem for root partititon")
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
return self.Get('cl_autopartition_default_format')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClAutopartitionCalculateFormat(VariableClAutopartitionDefaultFormat):
|
|
|
|
|
"""
|
|
|
|
|
Формат файловой системы для calculate
|
|
|
|
|
"""
|
|
|
|
|
opt = ["--calculate-fs"]
|
|
|
|
|
metavalue = "FS"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("Filesystem for data partition")
|
|
|
|
|
self.help = _("set filesystem for data partititon")
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
return self.Get('cl_autopartition_default_format')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClAutopartitionCalculateSize(Variable):
|
|
|
|
|