|
|
|
@ -61,6 +61,8 @@ class InstallInfo(ClassSerializer):
|
|
|
|
|
os_install_net_data = Array(Array(String))
|
|
|
|
|
os_install_net_route_data = Array(Array(String))
|
|
|
|
|
os_install_net_conf = String
|
|
|
|
|
os_install_net_dns = String
|
|
|
|
|
os_install_net_dns_search = String
|
|
|
|
|
os_install_ntp = String
|
|
|
|
|
os_install_x11_video_drv = String
|
|
|
|
|
os_install_x11_resolution = String
|
|
|
|
@ -73,6 +75,8 @@ class InstallInfo(ClassSerializer):
|
|
|
|
|
cl_autopartition_table = String
|
|
|
|
|
cl_autopartition_root_size = String
|
|
|
|
|
|
|
|
|
|
cl_live = Boolean
|
|
|
|
|
|
|
|
|
|
os_install_pxe = Boolean
|
|
|
|
|
os_install_pxe_path = String
|
|
|
|
|
|
|
|
|
@ -149,11 +153,13 @@ class Wsdl:
|
|
|
|
|
return []
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('System'),title=__('System installing'),
|
|
|
|
|
image='drive-harddisk',gui=True,command='cl-install',
|
|
|
|
|
@core_method(category=__('Installation'),title=__('System installing'),
|
|
|
|
|
image='system-installer,applications-other,drive-harddisk',
|
|
|
|
|
gui=True,command='cl-install',
|
|
|
|
|
rights=['install'])
|
|
|
|
|
def install ( self, sid, info):
|
|
|
|
|
return self.installCommon(sid,info,'install',self.install_vars)
|
|
|
|
|
return self.installCommon(sid,info,'install',self.install_vars,
|
|
|
|
|
humanName=_('System installing'))
|
|
|
|
|
|
|
|
|
|
def install_vars(self,dv=None):
|
|
|
|
|
if not dv:
|
|
|
|
@ -181,13 +187,16 @@ class Wsdl:
|
|
|
|
|
dv.addGroup(_("Network settings"),
|
|
|
|
|
normal=('os_install_net_conf','os_install_net_data',
|
|
|
|
|
'os_install_net_fqdn','os_install_ntp'),
|
|
|
|
|
expert=('os_install_net_route_data',))
|
|
|
|
|
expert=('os_install_net_dns','os_install_net_dns_search',
|
|
|
|
|
'os_install_net_route_data',))
|
|
|
|
|
dv.addGroup(_("Users"),
|
|
|
|
|
normal=('cl_migrate_data','cl_autologin'))
|
|
|
|
|
normal=('cl_migrate_data','cl_autologin'),
|
|
|
|
|
hide=('cl_migrate_data',),
|
|
|
|
|
brief=('cl_migrate_user',))
|
|
|
|
|
dv.addGroup(_("Video"),
|
|
|
|
|
normal=('os_install_x11_video_drv','os_install_x11_composite',
|
|
|
|
|
'os_install_x11_resolution','os_install_fb_resolution'))
|
|
|
|
|
dv.addBrief(next_label=_("Install"),image="finish")
|
|
|
|
|
dv.addBrief(next_label=_("Installation"),image="finish")
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
def fixInstallLocalization(self,sid,dv):
|
|
|
|
@ -238,15 +247,16 @@ class Wsdl:
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('System'),title=__('Flash install'),
|
|
|
|
|
image='drive-removable-media-usb-pendrive,media-removable',
|
|
|
|
|
@core_method(category=__('Installation'),title=__('Flash install'),
|
|
|
|
|
image='drive-removable-media-usb-pendrive,media-flash',
|
|
|
|
|
gui=True, rights=['install'])
|
|
|
|
|
def install_flash ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Install to flash
|
|
|
|
|
"""
|
|
|
|
|
return self.installCommon(sid,info,'install_flash',
|
|
|
|
|
self.install_flash_vars)
|
|
|
|
|
self.install_flash_vars,
|
|
|
|
|
humanName=_('Flash install'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
@ -300,3 +310,205 @@ class Wsdl:
|
|
|
|
|
self.set_cache(sid, 'install_pxe', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|
|
|
|
|
|
def configure_network_vars(self):
|
|
|
|
|
dv = cl_install.DataVarsInstall()
|
|
|
|
|
dv.importInstall()
|
|
|
|
|
dv.flIniFile()
|
|
|
|
|
dv.Set('cl_action','merge',True)
|
|
|
|
|
dv.Set('cl_belong_pkg',[None],True)
|
|
|
|
|
dv.Set('cl_setup','network',True)
|
|
|
|
|
dv.addGroup(None,
|
|
|
|
|
normal=('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',),
|
|
|
|
|
next_label=_("Save"))
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('Configuration'),title=__('Network'),
|
|
|
|
|
image='network-idle,preferences-system-network',
|
|
|
|
|
command="cl-configure-network",
|
|
|
|
|
gui=True, rights=['configure'])
|
|
|
|
|
def configure_network ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Setup network
|
|
|
|
|
"""
|
|
|
|
|
print "OINRD",info.os_install_net_route_data
|
|
|
|
|
return self.installCommon(sid,info,'configure_network',
|
|
|
|
|
self.configure_network_vars,
|
|
|
|
|
installFunc="setupSystem",
|
|
|
|
|
humanName=_('Network'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
|
def configure_network_view (self, sid, params):
|
|
|
|
|
dv = self.get_cache(sid,"configure_network","vars")
|
|
|
|
|
if not dv:
|
|
|
|
|
dv = self.configure_network_vars()
|
|
|
|
|
else:
|
|
|
|
|
dv.processRefresh()
|
|
|
|
|
view = ViewInfo(dv,step=params.step,
|
|
|
|
|
expert=params.expert,
|
|
|
|
|
brief=params.brief)
|
|
|
|
|
self.set_cache(sid, 'configure_network', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|
|
|
|
|
|
def configure_video_vars(self):
|
|
|
|
|
dv = cl_install.DataVarsInstall()
|
|
|
|
|
dv.importInstall()
|
|
|
|
|
dv.flIniFile()
|
|
|
|
|
dv.Set('cl_action','merge',True)
|
|
|
|
|
dv.Set('cl_belong_pkg',[None],True)
|
|
|
|
|
dv.Set('cl_setup','video',True)
|
|
|
|
|
dv.addGroup(None,
|
|
|
|
|
normal=('os_install_x11_video_drv', 'os_install_x11_resolution',
|
|
|
|
|
'os_install_x11_composite', 'os_install_fb_resolution'),
|
|
|
|
|
next_label=_("Save"))
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('Configuration'),title=__('Video'),
|
|
|
|
|
image='gnome-multimedia,video-display',
|
|
|
|
|
command="cl-configure-video",
|
|
|
|
|
gui=True, rights=['configure'])
|
|
|
|
|
def configure_video ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Setup video
|
|
|
|
|
"""
|
|
|
|
|
return self.installCommon(sid,info,'configure_video',
|
|
|
|
|
self.configure_video_vars,
|
|
|
|
|
installFunc="setupSystem",
|
|
|
|
|
humanName=_('Video'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
|
def configure_video_view (self, sid, params):
|
|
|
|
|
dv = self.get_cache(sid,"configure_video","vars")
|
|
|
|
|
if not dv:
|
|
|
|
|
dv = self.configure_video_vars()
|
|
|
|
|
else:
|
|
|
|
|
dv.processRefresh()
|
|
|
|
|
view = ViewInfo(dv,step=params.step,
|
|
|
|
|
expert=params.expert,
|
|
|
|
|
brief=params.brief)
|
|
|
|
|
self.set_cache(sid, 'configure_video', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|
|
|
|
|
|
def configure_locale_vars(self):
|
|
|
|
|
dv = cl_install.DataVarsInstall()
|
|
|
|
|
dv.importInstall()
|
|
|
|
|
dv.flIniFile()
|
|
|
|
|
dv.Set('cl_action','merge',True)
|
|
|
|
|
dv.Set('cl_belong_pkg',[None],True)
|
|
|
|
|
dv.Set('cl_setup','locale',True)
|
|
|
|
|
dv.addGroup(None,
|
|
|
|
|
normal=('os_install_locale_lang',
|
|
|
|
|
'os_install_clock_timezone'),
|
|
|
|
|
next_label=_("Save"))
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('Configuration'),title=__('Locale'),
|
|
|
|
|
image='locale,preferences-desktop-locale',
|
|
|
|
|
command="cl-configure-locale",
|
|
|
|
|
gui=True, rights=['configure'])
|
|
|
|
|
def configure_locale ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Setup locale
|
|
|
|
|
"""
|
|
|
|
|
return self.installCommon(sid,info,'configure_locale',
|
|
|
|
|
self.configure_locale_vars,
|
|
|
|
|
installFunc="setupSystem",
|
|
|
|
|
humanName=_('Locale'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
|
def configure_locale_view (self, sid, params):
|
|
|
|
|
dv = self.get_cache(sid,"configure_locale","vars")
|
|
|
|
|
if not dv:
|
|
|
|
|
dv = self.configure_locale_vars()
|
|
|
|
|
else:
|
|
|
|
|
dv.processRefresh()
|
|
|
|
|
view = ViewInfo(dv,step=params.step,
|
|
|
|
|
expert=params.expert,
|
|
|
|
|
brief=params.brief)
|
|
|
|
|
self.set_cache(sid, 'configure_locale', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|
|
|
|
|
|
def configure_boot_vars(self):
|
|
|
|
|
dv = cl_install.DataVarsInstall()
|
|
|
|
|
dv.importInstall()
|
|
|
|
|
dv.flIniFile()
|
|
|
|
|
dv.Set('cl_action','merge',True)
|
|
|
|
|
dv.Set('cl_belong_pkg',[None],True)
|
|
|
|
|
dv.Set('cl_setup','boot',True)
|
|
|
|
|
dv.addGroup(None,
|
|
|
|
|
normal=('os_install_mbr',
|
|
|
|
|
'os_install_kernel_scheduler'),
|
|
|
|
|
next_label=_("Save"))
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('Configuration'),title=__('Boot'),
|
|
|
|
|
image='stock_save,drive-harddisk',command="cl-configure-boot",
|
|
|
|
|
gui=True, rights=['configure'])
|
|
|
|
|
def configure_boot ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Setup locale
|
|
|
|
|
"""
|
|
|
|
|
return self.installCommon(sid,info,'configure_boot',
|
|
|
|
|
self.configure_boot_vars,
|
|
|
|
|
installFunc="setupSystem",
|
|
|
|
|
humanName=_('Boot'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
|
def configure_boot_view (self, sid, params):
|
|
|
|
|
dv = self.get_cache(sid,"configure_boot","vars")
|
|
|
|
|
if not dv:
|
|
|
|
|
dv = self.configure_boot_vars()
|
|
|
|
|
else:
|
|
|
|
|
dv.processRefresh()
|
|
|
|
|
view = ViewInfo(dv,step=params.step,
|
|
|
|
|
expert=params.expert,
|
|
|
|
|
brief=params.brief)
|
|
|
|
|
self.set_cache(sid, 'configure_boot', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|
|
|
|
|
|
def configure_system_vars(self):
|
|
|
|
|
dv = cl_install.DataVarsInstall()
|
|
|
|
|
dv.importInstall()
|
|
|
|
|
dv.flIniFile()
|
|
|
|
|
dv.Set('cl_action','merge',True)
|
|
|
|
|
dv.addGroup(None,
|
|
|
|
|
normal=("cl_live",),
|
|
|
|
|
next_label=_("Reconfigure"))
|
|
|
|
|
return dv
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
|
|
|
|
@core_method(category=__('Configuration'),title=__('System'),
|
|
|
|
|
image='system,computer',command="cl-configure",
|
|
|
|
|
gui=True, rights=['configure'])
|
|
|
|
|
def configure_system ( self, sid, info):
|
|
|
|
|
"""
|
|
|
|
|
Setup locale
|
|
|
|
|
"""
|
|
|
|
|
return self.installCommon(sid,info,'configure_system',
|
|
|
|
|
self.configure_system_vars,
|
|
|
|
|
installFunc="setupSystem",
|
|
|
|
|
humanName=_('System'))
|
|
|
|
|
|
|
|
|
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
|
|
|
|
@catchExcept
|
|
|
|
|
def configure_system_view (self, sid, params):
|
|
|
|
|
dv = self.get_cache(sid,"configure_system","vars")
|
|
|
|
|
if not dv:
|
|
|
|
|
dv = self.configure_system_vars()
|
|
|
|
|
else:
|
|
|
|
|
dv.processRefresh()
|
|
|
|
|
view = ViewInfo(dv,step=params.step,
|
|
|
|
|
expert=params.expert,
|
|
|
|
|
brief=params.brief)
|
|
|
|
|
self.set_cache(sid, 'configure_system', "vars",dv,smart=False)
|
|
|
|
|
return view
|
|
|
|
|