Add breif params.

master3.3
Mike Hiretsky 13 years ago
parent 99cd12b323
commit fbb44b283e

@ -22,7 +22,7 @@ from soaplib.serializers.clazz import Array, ClassSerializer
from soaplib.service import rpc, DefinitionBase from soaplib.service import rpc, DefinitionBase
from calculate.api.server.api_types import ReturnedMessage from calculate.api.server.api_types import ReturnedMessage
from calculate.api.server.api_types import ChoiceValue, Table, Option, Field, \ from calculate.api.server.api_types import ChoiceValue, Table, Option, Field, \
GroupField, ViewInfo GroupField, ViewInfo, ViewParams
from calculate.lib.datavars import VariableError from calculate.lib.datavars import VariableError
#from cl_install import Install,DataVarsInstall #from cl_install import Install,DataVarsInstall
@ -166,6 +166,7 @@ class Wsdl:
expert_label=_("Click for autopartition settings")) expert_label=_("Click for autopartition settings"))
dv.addGroup(_("Choice of mount points"), dv.addGroup(_("Choice of mount points"),
normal=('os_location_data',), normal=('os_location_data',),
brief=('os_location_data','os_install_mbr'),
expert=('os_install_scratch','cl_uuid_set', expert=('os_install_scratch','cl_uuid_set',
'os_install_root_type','os_install_mbr', 'os_install_root_type','os_install_mbr',
'os_install_kernel_scheduler')) 'os_install_kernel_scheduler'))
@ -196,9 +197,9 @@ class Wsdl:
else: else:
return False return False
@rpc(Integer, Integer, Boolean,_returns = ViewInfo) @rpc(Integer, ViewParams, _returns = ViewInfo)
@catchExcept @catchExcept
def install_view (self, sid, step,expert): def install_view (self, sid, params):
dv = self.get_cache(sid,"install","vars") dv = self.get_cache(sid,"install","vars")
if not dv: if not dv:
dv = self.install_vars() dv = self.install_vars()
@ -208,8 +209,11 @@ class Wsdl:
lang = dv.Get('os_install_locale_lang') lang = dv.Get('os_install_locale_lang')
self.set_cache(sid,"install","lang",lang,smart=False) self.set_cache(sid,"install","lang",lang,smart=False)
dv.processRefresh() dv.processRefresh()
view = ViewInfo(dv,step,expert,allsteps=langChanged, view = ViewInfo(dv,step=params.step,
brief=_("Starting the installation")) expert=params.expert,
brief=params.brief,
allsteps=langChanged,
brief_label=_("Starting the installation"))
self.set_cache(sid, 'install', "vars",dv,smart=False) self.set_cache(sid, 'install', "vars",dv,smart=False)
return view return view
@ -236,14 +240,16 @@ class Wsdl:
return self.installCommon(sid,info,'install_flash', return self.installCommon(sid,info,'install_flash',
self.install_flash_vars) self.install_flash_vars)
@rpc(Integer, Integer, Boolean,_returns = ViewInfo) @rpc(Integer, ViewParams,_returns = ViewInfo)
@catchExcept @catchExcept
def install_flash_view (self, sid, step,expert): def install_flash_view (self, sid, params):
dv = self.get_cache(sid,"install_flash","vars") dv = self.get_cache(sid,"install_flash","vars")
if not dv: if not dv:
dv = self.install_flash_vars() dv = self.install_flash_vars()
else: else:
dv.processRefresh() dv.processRefresh()
view = ViewInfo(dv,step,expert) view = ViewInfo(dv,step=params.step,
expert=params.expert,
brief=params.brief)
self.set_cache(sid, 'install_flash', "vars",dv,smart=False) self.set_cache(sid, 'install_flash', "vars",dv,smart=False)
return view return view

@ -103,8 +103,8 @@ class DistroRepository(Linux):
return operator.eq,buf return operator.eq,buf
return None,None return None,None
def _getAvailableDistributives(self,dirs,system=None,shortname=None,march=None, def _getAvailableDistributives(self,dirs,system=None,shortname=None,
version=None,build=None): march=None,version=None,build=None):
"""Get all distributives by filter""" """Get all distributives by filter"""
def systemByName(name): def systemByName(name):
return self.dictNameSystem.get(name.upper(),"") return self.dictNameSystem.get(name.upper(),"")
@ -316,7 +316,7 @@ class VariableClImageArchMachine(Variable,DistroRepository):
type = 'choice' type = 'choice'
opt = ['--march'] opt = ['--march']
available_arch = ["i686","x86_64"] available_arch = ["i686","x86_64"]
def init(self): def init(self):
self.label = _("Preferred processor architecture") self.label = _("Preferred processor architecture")
self.help = _("select the processor architecture") self.help = _("select the processor architecture")
@ -329,20 +329,26 @@ class VariableClImageArchMachine(Variable,DistroRepository):
def choice(self): def choice(self):
return self.available_arch + ["auto"] return self.available_arch + ["auto"]
def humanReadable(self):
return self.Get() or _("Not used")
class VariableClImageLinuxShortname(Variable,Linux,DistroRepository): class VariableClImageLinuxShortname(Variable,Linux,DistroRepository):
""" """
Filter by shortname Filter by shortname
""" """
type = 'choice' type = 'choice'
opt = ['--os','-s'] opt = ['--os','-s']
def init(self): def init(self):
self.label = _("Distributive") self.label = _("Distributive")
self.help = _("select the operation system") self.help = _("select the operation system")
def choice(self): def choice(self):
return self.dictLinuxName.keys() return self.dictLinuxName.keys()
def humanReadable(self):
return self.Get() or _("Not used")
class VariableClImageLinuxVer(Variable,DistroRepository): class VariableClImageLinuxVer(Variable,DistroRepository):
""" """
Filter by version Filter by version
@ -353,6 +359,9 @@ class VariableClImageLinuxVer(Variable,DistroRepository):
self.label = _("Version") self.label = _("Version")
self.help = _("select the operation system by version") self.help = _("select the operation system by version")
def humanReadable(self):
return self.Get() or _("Not used")
class VariableClImageLinuxBuild(Variable,DistroRepository): class VariableClImageLinuxBuild(Variable,DistroRepository):
""" """
Filter by build Filter by build
@ -363,6 +372,9 @@ class VariableClImageLinuxBuild(Variable,DistroRepository):
self.label = _("Build") self.label = _("Build")
self.help = _("select the operation system by build") self.help = _("select the operation system by build")
def humanReadable(self):
return self.Get() or _("Not used")
class VariableClImagePath(ReadonlyVariable): class VariableClImagePath(ReadonlyVariable):
""" """
Image search path Image search path

Loading…
Cancel
Save