|
|
@ -479,6 +479,15 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
|
|
|
|
samba_host = self.Get('sr_samba_host')
|
|
|
|
samba_host = self.Get('sr_samba_host')
|
|
|
|
ftp_host = convertEnv().getVar("ftp", "host")
|
|
|
|
ftp_host = convertEnv().getVar("ftp", "host")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def map_names(name):
|
|
|
|
|
|
|
|
name_dct = {'domain.dmz': 'Санкт-Петербург', 'domain.spb': 'Санкт-Петербург',
|
|
|
|
|
|
|
|
'domain.msk': 'Москва', 'domain.verevo': 'Производство'}
|
|
|
|
|
|
|
|
for i in name_dct:
|
|
|
|
|
|
|
|
if i in name:
|
|
|
|
|
|
|
|
return name_dct[i]
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return 'error'
|
|
|
|
|
|
|
|
|
|
|
|
def generate():
|
|
|
|
def generate():
|
|
|
|
yield (
|
|
|
|
yield (
|
|
|
|
"share", "share", path.join(self.Get('ur_home_path'), "Share"),
|
|
|
|
"share", "share", path.join(self.Get('ur_home_path'), "Share"),
|
|
|
@ -502,6 +511,15 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
|
|
|
|
self.Get('cl_replication_host'))
|
|
|
|
self.Get('cl_replication_host'))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
yield ("remote_profile", 'unix', '', '')
|
|
|
|
yield ("remote_profile", 'unix', '', '')
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
for host, mount_path in zip(self.Get('cl_share_hosts'), self.Get('cl_share_mounts')):
|
|
|
|
|
|
|
|
resource = host.split('/')[-1]
|
|
|
|
|
|
|
|
host = host.replace('//', '', 1).split(f"/{resource}")[0]
|
|
|
|
|
|
|
|
if mount_path.startswith('~/'):
|
|
|
|
|
|
|
|
mount_path = f"{path.join(self.Get('ur_home_path'), mount_path.replace('~/', '', 1))}"
|
|
|
|
|
|
|
|
yield (resource, resource, mount_path, host)
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
raise GeneratorExit
|
|
|
|
|
|
|
|
|
|
|
|
return list(generate())
|
|
|
|
return list(generate())
|
|
|
|
|
|
|
|
|
|
|
@ -551,6 +569,16 @@ class VariableClClientUserMountHost(FieldValue, ReadonlyVariable):
|
|
|
|
column = 3
|
|
|
|
column = 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClShareHosts(Variable):
|
|
|
|
|
|
|
|
type = "list"
|
|
|
|
|
|
|
|
value = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClShareMounts(Variable):
|
|
|
|
|
|
|
|
type = "list"
|
|
|
|
|
|
|
|
value = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SyncHelper():
|
|
|
|
class SyncHelper():
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Вспомогательный объект для определения статуса синхронизации и времени
|
|
|
|
Вспомогательный объект для определения статуса синхронизации и времени
|
|
|
|