parent
4b8dce78c5
commit
095e8f908c
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,209 @@
|
|||||||
|
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import soaplib, sys, time, os
|
||||||
|
import threading
|
||||||
|
|
||||||
|
from soaplib.serializers.primitive import String, Integer, Any, Boolean
|
||||||
|
from soaplib.serializers.clazz import Array, ClassSerializer
|
||||||
|
from soaplib.service import rpc, DefinitionBase
|
||||||
|
from calculate.core.server.api_types import ReturnedMessage
|
||||||
|
from calculate.core.server.api_types import ChoiceValue, Table, Option, Field, \
|
||||||
|
GroupField, ViewInfo, ViewParams
|
||||||
|
from calculate.lib.datavars import VariableError,DataVarsError
|
||||||
|
from calculate.client.cl_client import ClientError
|
||||||
|
|
||||||
|
from cl_client import Client,DataVarsClient
|
||||||
|
import cl_client
|
||||||
|
from calculate.lib.cl_lang import setLocalTranslate,getLazyLocalTranslate
|
||||||
|
from calculate.core.server.decorators import Dec
|
||||||
|
from calculate.core.server.func import catchExcept
|
||||||
|
core_method = Dec.core_method
|
||||||
|
setLocalTranslate('cl_client3',sys.modules[__name__])
|
||||||
|
import traceback
|
||||||
|
from functools import wraps,WRAPPER_ASSIGNMENTS
|
||||||
|
|
||||||
|
__ = getLazyLocalTranslate(_)
|
||||||
|
|
||||||
|
class ClientInfo(ClassSerializer):
|
||||||
|
"""Parameters for method install"""
|
||||||
|
cl_localhost_set = Boolean
|
||||||
|
cl_remote_host_new = String
|
||||||
|
cl_remote_pw = String
|
||||||
|
cl_client_mount_set = Boolean
|
||||||
|
|
||||||
|
Default = Array(String)
|
||||||
|
CheckOnly = Boolean
|
||||||
|
CheckAll = Boolean
|
||||||
|
|
||||||
|
class SyncInfo(ClassSerializer):
|
||||||
|
"""Parameters for method install"""
|
||||||
|
ur_login = String
|
||||||
|
cl_client_sync = Boolean
|
||||||
|
|
||||||
|
Default = Array(String)
|
||||||
|
CheckOnly = Boolean
|
||||||
|
CheckAll = Boolean
|
||||||
|
|
||||||
|
|
||||||
|
clientCatchExcept = catchExcept(VariableError,DataVarsError,
|
||||||
|
ClientError)
|
||||||
|
|
||||||
|
class Wsdl:
|
||||||
|
"""
|
||||||
|
cl-client
|
||||||
|
"""
|
||||||
|
@rpc(Integer, ClientInfo, _returns = Array(ReturnedMessage))
|
||||||
|
@core_method(category=__('Client'),title=__('Domain'),
|
||||||
|
image='applications-other',
|
||||||
|
gui=True,command='cl-client',
|
||||||
|
rights=['domain'])
|
||||||
|
def client(self, sid, info):
|
||||||
|
return self.callMethod(sid,info,method_name="client",
|
||||||
|
logicClass=Client,
|
||||||
|
method="domain")
|
||||||
|
|
||||||
|
def client_vars(self,dv=None):
|
||||||
|
if not dv:
|
||||||
|
dv = DataVarsClient()
|
||||||
|
dv.importClient()
|
||||||
|
dv.flIniFile()
|
||||||
|
dv.Set('cl_action','domain',True)
|
||||||
|
dv.addGroup(None,
|
||||||
|
normal=('cl_localhost_set','cl_remote_host_new',
|
||||||
|
'cl_remote_pw'),
|
||||||
|
expert=('cl_client_mount_set',),
|
||||||
|
next_label=_("Configure"))
|
||||||
|
return dv
|
||||||
|
|
||||||
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
||||||
|
def client_view (self, sid, params):
|
||||||
|
dv = self.get_cache(sid,"client","vars")
|
||||||
|
if not dv:
|
||||||
|
dv = self.client_vars()
|
||||||
|
#if hasattr(params,"clienttype") and params.clienttype == "gui":
|
||||||
|
# if dv.Get('cl_remote_host') == '':
|
||||||
|
# dv.Set('cl_localhost_set',"on")
|
||||||
|
# else:
|
||||||
|
# dv.Set('cl_localhost_set',"off")
|
||||||
|
else:
|
||||||
|
dv.processRefresh()
|
||||||
|
view = ViewInfo(dv,viewparams=params)
|
||||||
|
self.set_cache(sid, 'client', "vars",dv,smart=False)
|
||||||
|
return view
|
||||||
|
|
||||||
|
"""
|
||||||
|
cl-client-sync-login
|
||||||
|
"""
|
||||||
|
@rpc(Integer, ClientInfo, _returns = Array(ReturnedMessage))
|
||||||
|
@core_method(category=__('Client'),title=__('Domain user login'),
|
||||||
|
image='applications-other',
|
||||||
|
gui=True,command='cl-client-sync-login',
|
||||||
|
rights=['domainuser'])
|
||||||
|
def client_sync_login(self, sid, info):
|
||||||
|
return self.callMethod(sid,info,method_name="client_sync_login",
|
||||||
|
logicClass=Client,
|
||||||
|
method="mountUserResAndSync")
|
||||||
|
|
||||||
|
def client_sync_login_vars(self,dv=None):
|
||||||
|
if not dv:
|
||||||
|
dv = DataVarsClient()
|
||||||
|
dv.importClient()
|
||||||
|
dv.flIniFile()
|
||||||
|
dv.Set('cl_action','login',True)
|
||||||
|
dv.addGroup(None,
|
||||||
|
normal=('ur_login','cl_client_sync'),
|
||||||
|
next_label=_("Configure"))
|
||||||
|
return dv
|
||||||
|
|
||||||
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
||||||
|
def client_sync_login_view (self, sid, params):
|
||||||
|
dv = self.get_cache(sid,"client_sync_login","vars")
|
||||||
|
if not dv:
|
||||||
|
dv = self.client_sync_login_vars()
|
||||||
|
else:
|
||||||
|
dv.processRefresh()
|
||||||
|
view = ViewInfo(dv,viewparams=params)
|
||||||
|
self.set_cache(sid, 'client_sync_login', "vars",dv,smart=False)
|
||||||
|
return view
|
||||||
|
|
||||||
|
"""
|
||||||
|
cl-client-sync-logout
|
||||||
|
"""
|
||||||
|
@rpc(Integer, ClientInfo, _returns = Array(ReturnedMessage))
|
||||||
|
@core_method(category=__('Client'),title=__('Domain user logout'),
|
||||||
|
image='applications-other',
|
||||||
|
gui=True,command='cl-client-sync-logout',
|
||||||
|
rights=['domainuser'])
|
||||||
|
def client_sync_logout(self, sid, info):
|
||||||
|
return self.callMethod(sid,info,method_name="client_sync_logout",
|
||||||
|
logicClass=Client,
|
||||||
|
method="umountUserResAndSync")
|
||||||
|
|
||||||
|
def client_sync_logout_vars(self,dv=None):
|
||||||
|
if not dv:
|
||||||
|
dv = DataVarsClient()
|
||||||
|
dv.importClient()
|
||||||
|
dv.flIniFile()
|
||||||
|
dv.Set('cl_action','logout',True)
|
||||||
|
dv.addGroup(None,
|
||||||
|
normal=('ur_login','cl_client_sync'),
|
||||||
|
next_label=_("Configure"))
|
||||||
|
return dv
|
||||||
|
|
||||||
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
||||||
|
def client_sync_logout_view (self, sid, params):
|
||||||
|
dv = self.get_cache(sid,"client_sync_logout","vars")
|
||||||
|
if not dv:
|
||||||
|
dv = self.client_sync_logout_vars()
|
||||||
|
else:
|
||||||
|
dv.processRefresh()
|
||||||
|
view = ViewInfo(dv,viewparams=params)
|
||||||
|
self.set_cache(sid, 'client_sync_logout', "vars",dv,smart=False)
|
||||||
|
return view
|
||||||
|
|
||||||
|
"""
|
||||||
|
cl-client-sync-test
|
||||||
|
"""
|
||||||
|
@rpc(Integer, ClientInfo, _returns = Array(ReturnedMessage))
|
||||||
|
@core_method(category=__('Client'),title=__('Test'),
|
||||||
|
image='applications-other',
|
||||||
|
gui=True,command='cl-client-sync-test',
|
||||||
|
rights=['domainuser'])
|
||||||
|
def clienttest(self, sid, info):
|
||||||
|
return self.callMethod(sid,info,method_name="clienttest",
|
||||||
|
logicClass=Client,
|
||||||
|
method="clienttest")
|
||||||
|
|
||||||
|
def clienttest_vars(self,dv=None):
|
||||||
|
if not dv:
|
||||||
|
dv = DataVarsClient()
|
||||||
|
dv.importClient()
|
||||||
|
dv.flIniFile()
|
||||||
|
dv.Set('cl_action','logout',True)
|
||||||
|
dv.addGroup(None,
|
||||||
|
normal=('ur_login','cl_client_sync'),
|
||||||
|
next_label=_("Configure"))
|
||||||
|
return dv
|
||||||
|
|
||||||
|
@rpc(Integer, ViewParams,_returns = ViewInfo)
|
||||||
|
def clienttest_view (self, sid, params):
|
||||||
|
dv = self.get_cache(sid,"clienttest","vars")
|
||||||
|
if not dv:
|
||||||
|
dv = self.clienttest_vars()
|
||||||
|
else:
|
||||||
|
dv.processRefresh()
|
||||||
|
view = ViewInfo(dv,viewparams=params)
|
||||||
|
self.set_cache(sid, 'clienttest', "vars",dv,smart=False)
|
||||||
|
return view
|
@ -0,0 +1,34 @@
|
|||||||
|
#-*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
__app__ = 'calculate-client'
|
||||||
|
__version__ = '3.1.0'
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from calculate.lib.datavars import DataVars
|
||||||
|
|
||||||
|
from calculate.lib.cl_lang import setLocalTranslate
|
||||||
|
setLocalTranslate('cl_client3',sys.modules[__name__])
|
||||||
|
|
||||||
|
class DataVarsClient(DataVars):
|
||||||
|
"""Variable class for client package"""
|
||||||
|
|
||||||
|
def importClient(self, **args):
|
||||||
|
"""Import client variables"""
|
||||||
|
self.importData()
|
||||||
|
self.importData('calculate.client.variables')
|
||||||
|
self.defaultModule = "client"
|
@ -0,0 +1,20 @@
|
|||||||
|
#-*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2008-2012 Calculate Ltd. http://www.calculate-linux.org
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import action
|
||||||
|
import client
|
||||||
|
|
||||||
|
section = "client"
|
@ -0,0 +1,165 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from os import path
|
||||||
|
from calculate.lib.datavars import Variable,VariableError,ReadonlyVariable
|
||||||
|
from calculate.lib.utils.files import readLinesFile
|
||||||
|
from calculate.lib.utils.common import getValueFromCmdLine
|
||||||
|
from calculate.lib.utils.ip import isOpenPort
|
||||||
|
|
||||||
|
from calculate.lib.cl_lang import setLocalTranslate
|
||||||
|
setLocalTranslate('cl_client3',sys.modules[__name__])
|
||||||
|
|
||||||
|
class VariableClRemoteHost(Variable):
|
||||||
|
"""
|
||||||
|
IP or domain name of CDS
|
||||||
|
"""
|
||||||
|
value = ""
|
||||||
|
|
||||||
|
class VariableClRemoteHostNew(Variable):
|
||||||
|
"""
|
||||||
|
IP or domain name of CDS
|
||||||
|
"""
|
||||||
|
opt = ["cl_remote_host_new"]
|
||||||
|
metavalue = "DOMAIN"
|
||||||
|
type = "choiceedit"
|
||||||
|
value = ""
|
||||||
|
untrusted = True
|
||||||
|
|
||||||
|
def init(self):
|
||||||
|
self.label = _("Domain IP")
|
||||||
|
self.help = _("domain")
|
||||||
|
|
||||||
|
def check(self,value):
|
||||||
|
if self.Get('cl_client_mount_set') == 'off':
|
||||||
|
if self.Get('cl_localhost_set') == 'off':
|
||||||
|
if self.Get('cl_remote_host') == '':
|
||||||
|
if not value:
|
||||||
|
raise VariableError(_("Need to specify domain"))
|
||||||
|
elif not isOpenPort(value,445):
|
||||||
|
raise VariableError(
|
||||||
|
_("Specified address is not available"))
|
||||||
|
|
||||||
|
class VariableClRemoteHostLive(ReadonlyVariable):
|
||||||
|
"""
|
||||||
|
Remote host from /proc/cmdline param domain
|
||||||
|
"""
|
||||||
|
def get(self):
|
||||||
|
return getValueFromCmdLine("calculate","domain") or ""
|
||||||
|
|
||||||
|
|
||||||
|
class VariableOsRemoteAuth(Variable):
|
||||||
|
"""
|
||||||
|
Client work mode (local or hostname)
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class VariableOsRemoteClient(Variable):
|
||||||
|
"""
|
||||||
|
Version which apply templates
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class VariableClRemotePw(Variable):
|
||||||
|
"""
|
||||||
|
Client password
|
||||||
|
"""
|
||||||
|
type = "password"
|
||||||
|
opt = ["--domain-password"]
|
||||||
|
|
||||||
|
def init(self):
|
||||||
|
self.label = _("Domain password")
|
||||||
|
self.help = _("specify domain password")
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
return getValueFromCmdLine("calculate","domain_pw") or ""
|
||||||
|
|
||||||
|
class VariableClMovedSkipPath(Variable):
|
||||||
|
"""
|
||||||
|
Skip "Moved" path
|
||||||
|
"""
|
||||||
|
type = "list"
|
||||||
|
value = ['Disks','Home','Moved','FTP','Desktop', 'Share']
|
||||||
|
|
||||||
|
class VariableClSyncSkipPath(Variable):
|
||||||
|
"""
|
||||||
|
Skip sync path
|
||||||
|
"""
|
||||||
|
type = "list"
|
||||||
|
value = [".googleearth", "Home", "Disks", "FTP",
|
||||||
|
'Share', ".local/share/akonadi/db_data", ".VirtualBox",
|
||||||
|
".mozilla/firefox/calculate.default/urlclassifier3.sqlite",
|
||||||
|
".local/share/mime/mime.cache", ".gvfs",
|
||||||
|
".kde4/share/apps/nepomuk/repository/main/data", ".logout",
|
||||||
|
".Xauthority", ".thumbnails", ".mozilla/firefox/*/Cache",
|
||||||
|
".kde4/socket-*", ".cache/", ".local/share/Trash"]
|
||||||
|
|
||||||
|
class VariableClSyncDelPath(Variable):
|
||||||
|
"""
|
||||||
|
Removed path on sync
|
||||||
|
"""
|
||||||
|
type = "list"
|
||||||
|
value = [".kde4/share/config/phonondevicesrc",
|
||||||
|
".kde4/cache-*", ".kde4/tmp-*"]
|
||||||
|
|
||||||
|
class VariableClProfileAllSet(Variable):
|
||||||
|
type = "bool"
|
||||||
|
value = "off"
|
||||||
|
|
||||||
|
class VariableClClientSync(Variable):
|
||||||
|
type = "bool"
|
||||||
|
value = "on"
|
||||||
|
metavalue = "ON/OFF"
|
||||||
|
|
||||||
|
opt = ["--sync"]
|
||||||
|
|
||||||
|
def init(self):
|
||||||
|
self.label = _("Synchronize user profile")
|
||||||
|
self.help = _("synchronize user preferences, used in "
|
||||||
|
"conjunction with 'login' or 'logout'")
|
||||||
|
|
||||||
|
class VariableClLocalhostSet(Variable):
|
||||||
|
"""
|
||||||
|
Using autopartition
|
||||||
|
"""
|
||||||
|
type = "bool"
|
||||||
|
element = "radio"
|
||||||
|
value = "off"
|
||||||
|
opt = ["-r"]
|
||||||
|
metavalue = "ON/OFF"
|
||||||
|
|
||||||
|
def init(self):
|
||||||
|
self.label = _("Computer role")
|
||||||
|
self.help = _("remove the settings for connecting to the domain")
|
||||||
|
|
||||||
|
def choice(self):
|
||||||
|
return [("off",_("Domain workstation")),
|
||||||
|
("on",_("Local workstation"))]
|
||||||
|
|
||||||
|
def check(self,value):
|
||||||
|
if self.Get('cl_remote_host') == '' and value == "on":
|
||||||
|
raise VariableError(_("The computer is not in the domain already"))
|
||||||
|
if self.Get('cl_remote_host') != '' and value == "off":
|
||||||
|
raise VariableError(_("The computer is already in the domain %s")
|
||||||
|
%self.Get('cl_remote_host') + "\n" +
|
||||||
|
_("Before joining the domain, "
|
||||||
|
"you need to remove it from the previous domain"))
|
||||||
|
|
||||||
|
#def get(self):
|
||||||
|
# if self.Get('cl_remote_host') == '':
|
||||||
|
# return "on"
|
||||||
|
# else:
|
||||||
|
# return "off"
|
||||||
|
|
||||||
|
class VariableClClientMountSet(Variable):
|
||||||
|
"""
|
||||||
|
Mount remote by configured domain information
|
||||||
|
"""
|
||||||
|
type = "bool"
|
||||||
|
value = "off"
|
||||||
|
metavalue = "ON/OFF"
|
||||||
|
opt = ["--mount"]
|
||||||
|
|
||||||
|
def init(self):
|
||||||
|
self.label = _("Only mount the domain resource")
|
||||||
|
self.help = _("only mount the [remote] domain resource")
|
File diff suppressed because it is too large
Load Diff
@ -1,80 +0,0 @@
|
|||||||
#-*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2010 Calculate Ltd. http://www.calculate-linux.org
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from cl_print import color_print
|
|
||||||
from cl_utils import _error
|
|
||||||
|
|
||||||
# Перевод сообщений для программы
|
|
||||||
from cl_lang import lang
|
|
||||||
lang().setLanguage(sys.modules[__name__])
|
|
||||||
|
|
||||||
class share_cmd(color_print, _error):
|
|
||||||
"""Класс общих методов обработки опций командной строки"""
|
|
||||||
|
|
||||||
def printVars(self, optObj):
|
|
||||||
"""Печать переменных"""
|
|
||||||
if optObj.v:
|
|
||||||
varsFilter = None
|
|
||||||
varsNames = []
|
|
||||||
format = "default"
|
|
||||||
# Фильтрование переменных
|
|
||||||
if optObj.filter:
|
|
||||||
optCmd = optObj.filter
|
|
||||||
if ',' in optCmd:
|
|
||||||
varsNames = optCmd.split(",")
|
|
||||||
else:
|
|
||||||
varsFilter = optCmd
|
|
||||||
if optObj.xml:
|
|
||||||
format = "xml"
|
|
||||||
try:
|
|
||||||
v = int(optObj.v)
|
|
||||||
except:
|
|
||||||
v = 1
|
|
||||||
self.logicObj.printVars(varsFilter, varsNames, outFormat=format,
|
|
||||||
verbose=v)
|
|
||||||
|
|
||||||
def setVars(self, optObj):
|
|
||||||
"""Установка переменных"""
|
|
||||||
if optObj.set:
|
|
||||||
for val in optObj.set:
|
|
||||||
k,o,v = val.partition('=')
|
|
||||||
if self.logicObj.clVars.exists(k):
|
|
||||||
if self.logicObj.clVars.SetWriteVar(k,v) == False:
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
self.printERROR(_('variable %s not found')%k)
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def writeVars(self, optObj):
|
|
||||||
"""Запись переменных"""
|
|
||||||
if optObj.set:
|
|
||||||
if not self.logicObj.clVars.WriteVars():
|
|
||||||
errMsg = self.getError()
|
|
||||||
if errMsg:
|
|
||||||
self.printERROR(errMsg.strip())
|
|
||||||
self.printERROR(_('Can not write template variables'))
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def setPrintNoColor(self, optObj):
|
|
||||||
"""Установка печати сообщений без цвета"""
|
|
||||||
if optObj.color and optObj.color=="never":
|
|
||||||
color_print.colorPrint = lambda *arg : sys.stdout.write(arg[-1]) or\
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
|||||||
#-*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2010 Calculate Ltd. http://www.calculate-linux.org
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
#Допустимые ключи
|
|
||||||
# mode - режим переменной r-не переназначается из командной строки,
|
|
||||||
# w-переназначается из командной строки
|
|
||||||
# type - тип переменной состоит из двух элементов(что это и для чего
|
|
||||||
# это)
|
|
||||||
# value - значение переменной по умолчанию
|
|
||||||
# hide - флаг того, что данная переменная служебная и не отображается
|
|
||||||
# при печати списка значений переменных
|
|
||||||
|
|
||||||
from cl_client import __version__
|
|
||||||
from cl_client import __app__
|
|
||||||
|
|
||||||
class Data:
|
|
||||||
# имя программы
|
|
||||||
cl_name = {'value':__app__}
|
|
||||||
|
|
||||||
# версия программы
|
|
||||||
cl_ver = {'value':__version__}
|
|
||||||
|
|
||||||
# variable for calculate-client and calculate-desktop packages
|
|
||||||
# ip or domain name of CDS
|
|
||||||
cl_remote_host = {'mode':'r'}
|
|
||||||
|
|
||||||
#Логин пользователя
|
|
||||||
ur_login = {'mode':"r"}
|
|
||||||
|
|
||||||
#Название группы пользователя
|
|
||||||
ur_group = {'mode':"r"}
|
|
||||||
|
|
||||||
#Полное имя пользователя
|
|
||||||
ur_fullname = {'mode':"r"}
|
|
||||||
|
|
||||||
# Jabber ID пользователя
|
|
||||||
ur_jid = {'mode':"r"}
|
|
||||||
|
|
||||||
# Почтовый адрес пользователя
|
|
||||||
ur_mail = {'mode':"r"}
|
|
||||||
|
|
||||||
# Домашняя директория пользователя
|
|
||||||
ur_home_path = {'mode':"r"}
|
|
||||||
|
|
||||||
# Режим работы клиента
|
|
||||||
# (local или имя хоста клиента)
|
|
||||||
os_remote_auth = {'mode':'w'}
|
|
||||||
|
|
||||||
# Версия программы которой были наложены шаблоны
|
|
||||||
os_remote_client = {'mode':'w'}
|
|
||||||
|
|
||||||
#Пароль пользователя client
|
|
||||||
cl_remote_pw = {'mode':'w'}
|
|
||||||
|
|
||||||
# Директории которые не переносятся в ~/Moved
|
|
||||||
cl_moved_skip_path = {'value':['Disks','Home','Moved','FTP','Desktop',
|
|
||||||
'Share']}
|
|
||||||
|
|
||||||
# Директории или файлы которые не переносятся
|
|
||||||
# при синхронизации профиля пользователя
|
|
||||||
cl_sync_skip_path = {'value':[".googleearth", "Home", "Disks", "FTP",
|
|
||||||
'Share', ".local/share/akonadi/db_data", ".VirtualBox",
|
|
||||||
".mozilla/firefox/calculate.default/urlclassifier3.sqlite",
|
|
||||||
".local/share/mime/mime.cache", ".gvfs",
|
|
||||||
".kde4/share/apps/nepomuk/repository/main/data", ".logout",
|
|
||||||
".Xauthority", ".thumbnails", ".mozilla/firefox/*/Cache",
|
|
||||||
".kde4/socket-*", ".cache/", ".local/share/Trash"]}
|
|
||||||
|
|
||||||
# Директории или файлы которые удаляются
|
|
||||||
# при синхронизации профиля пользователя
|
|
||||||
cl_sync_del_path = {'value':[".kde4/share/config/phonondevicesrc",
|
|
||||||
".kde4/cache-*", ".kde4/tmp-*"]}
|
|
||||||
|
|
||||||
# переключатель для шаблонов merge
|
|
||||||
ac_client_merge = {}
|
|
||||||
|
|
||||||
# переключатель для шаблонов входа и выхода из домена
|
|
||||||
ac_client_domain = {}
|
|
||||||
|
|
||||||
# One profile for all OS
|
|
||||||
cl_profile_all_set = {'mode':'w', 'value':'off'}
|
|
||||||
|
|
||||||
# lib vars
|
|
||||||
cl_env_path = {}
|
|
||||||
cl_env_server_path = {}
|
|
||||||
os_linux_shortname = {}
|
|
||||||
os_net_domain = {'mode':"w"}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
[install]
|
|
||||||
install-scripts=/usr/bin
|
|
||||||
install-purelib=/usr/lib/calculate-2.2
|
|
||||||
install-platlib=/usr/lib/calculate-2.2
|
|
||||||
#install-data=/usr/share/calculate/templates
|
|
Loading…
Reference in new issue