# -*- coding: utf-8 -*-

##############################################################
###以后部分数据为云桌面所用
##############################################################
SYSTYPE = "Linux"

CONFIG_DIR = "/mcos/dvclient/cfg/"
GRUB_DIR = "/mcos/dvclient/grub/"

CONFIG_PATH = "/mcos/dvclient/cfg/cdesktop.conf"

#日志文件的路径
LOG_DIR = "/mcos/dvclient/log/"
LOG_PATH = "/mcos/dvclient/log/dv_client.log"


CA_NAME = "/mcos/dvclient/cfg/.smep" #证书
CA_STORY_DIR = "/mcos/dvclient/cfg/.ca_storage" #证书
CA_COMPARE_RESULT = "/mcos/dvclient/cfg/caCompareResult.txt" #证书

HOSTS_FILE = "/etc/hosts" #域名映射


UPGRADE_DIR = "/mcos/dvclient/update/"

UPGRADE_CFG_NAME = "/mcos/dvclient/cfg/upgrade.conf" #更新
UPDATE_INDEX_SERVER = "/mcos/dvclient/update/update_index.xml"
UPDATE_INDEX_OLD = "/mcos/dvclient/cfg/update_index.xml"
UPDATE_PAK_SERVER = "/mcos/dvclient/update/upgrade.zip"
UPDATE_MD5_TEXT = "/mcos/dvclient/update/md5.text"
TMEP_DIR = "/mcos/dvclient/update/packet"
MASS_CLIENT_DIR = "/mcos/dvclient/"

X86_DIR = ":21/cclient/x86/" #ftp链接
ARM_DIR = ":21/cclient/arm/"


CHECK_UPGRADE_TIME = 3600*6

CA_STORY_DIR = "/mcos/dvclient/cfg/.ca_storage"
CA_NAME = "/mcos/dvclient/cfg/.smep"
    
#平台URL路径
VMS_CENTER_URL = "/massclouds-center/api/vms"
TERMINAL_LOGIN_CENTER_URL = "/massclouds-center/api/vms/vmid/login"
NTP_SERVER_CENTER_URL = "/massclouds-center/api/terminalManagerConfigs"
DOMAIN_CENTER_URL = "/massclouds-center/api/domains"
VM_CENTER_URL = "/massclouds-center/api/vms/vmid"
USER_ROLE_CENTER_URL = "/massclouds-center/api/vms/vmId/permissions"
VM_POOL_CENTER_URL = "/massclouds-center/api/vmpools"
OFFLINEVM_INFO_CENTER_URL = "/massclouds-center/api/vms/offvmid"
VM_DISK_INFO_CENTER_URL = "/massclouds-center/api/vms/vmid/disks"
VM_TEMPLATE_DISK_INFO_CENTER_URL = "/massclouds-center/api/templates/vmid/disks"
CONTROL_VM_ACTION_CENTER_URL = "/massclouds-center/api/vms/vmid/action"
TERMINAL_INFO_CENTER_URL = "/massclouds-center/api/terminals/registerid"
TERMINAL_STATE_CENTER_URL = "/massclouds-center/api/terminals/registerid/state"
VM_PASSWORD_CENTER_URL = "/massclouds-center/api/vms/vmid/ticket"
GET_USER_PASSWORD_CENTER_URL = "/massclouds-center/api/internalusers"
UPDATE_USER_PASSWORD_CENTER_URL = "/massclouds-center/api/internalusers/vmid/updateInternalUserPassword"
TERMINAL_VALIDATE_CENTER_URL = "/massclouds-center/api/terminals/registerid/validate"

#控制虚拟机动作
VM_ACTION_DATA = "<action><status></status><fault><reason></reason><detail></detail></fault></action>"

#请求获取虚拟机密码时发送的数据
VM_PASSWORD_DATA = "<action><ticket><expiry>2147483647</expiry></ticket></action>"

##############################################################
###以后部分数据为云桌面和终端虚拟化两部分共用
##############################################################

CFG_DEFAULT_VM = 'defaultvm'


##############################################################
###以后部分数据为终端虚拟化部分所用
##############################################################
LIBVIRT_XML_PATH = "/etc/libvirt/qemu/"
LIBVIRT_IMAGES_PATH = "/var/lib/libvirt/images/"
LIBVIRT_SNAPSHOT_XML_PATH = "/var/lib/libvirt/qemu/snapshot/"
LIBVIRT_SNAPSHOT_IMG_PATH = "/var/lib/libvirt/images/vms/"

IS_RSYNC_UPLOADING = False
SHUTDOWN_TERMINAL = False

DATA_PATH = '/var/lib/libvirt/images/'

CFG_USER_DOMAIN = 'userdomain'
CFG_USER_PASSWD = 'userpasswd'
CFG_VM_USER = 'vmuser'
CFG_VM_DISK = 'vmdisk'
CFG_DOWNLOADED_VM_UUID = 'downloadvmuuid'


######################rsync#######################
RSYNC = 'rsync -azvP '
RMOTE_USER = 'mcvda'
RMOTE_PASSWD = 'mcvda'
FILE_SYSTEM_STORAGE = 'file'
######################rsync#######################

######################bscp#######################
BLOCK_STORAGE = 'block'
BSCP_REMOTE_USER = ''
BSCP_REMOTE_PASSWD = ''
HOST_VG_PATH='/dev/HostVG/'
HOST_VG="HostVG"
######################bscp#######################