本文整理汇总了Python中utils.DebugLog.debug_print_level1方法的典型用法代码示例。如果您正苦于以下问题:Python DebugLog.debug_print_level1方法的具体用法?Python DebugLog.debug_print_level1怎么用?Python DebugLog.debug_print_level1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.DebugLog
的用法示例。
在下文中一共展示了DebugLog.debug_print_level1方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_asm_poweron_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_asm_poweron_status(self, server_id):
DebugLog.debug_print_level1("in server controller get_vios_installation_status")
server_data = self.getServerData(server_id)
params = [server_data[IP_FOR_NIMINSTALL]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKASM_POWERON), server_data[IDX_ID], params) #"UPDATE_PASSWD"
self._sendMsg2CommCnt(msg)
示例2: process_message
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def process_message(self, msg):
DebugLog.debug_print_level1("Got the command tranfering in hmc engine")
cmd, _server_id, data = self.msg_decoder.decodeMsg(msg)
if CMDMsg.getCMD(SERVERSCAN) == cmd:
self.server_scan()
elif CMDMsg.getCMD(UPDATEPASSWD) == cmd:
self.update_password(_server_id, data)
elif CMDMsg.getCMD(CHECKUPDATEPASSWD) == cmd:
self.check_UpdatePassword_Status(_server_id, data)
elif CMDMsg.getCMD(REMVSERVER) == cmd:
self.remove_server_from_hmc(_server_id, data)
elif CMDMsg.getCMD(POWEROFFSERVER) == cmd:
self.poweroffserver(_server_id, data)
elif CMDMsg.getCMD(CHECKPOWEROFFSERVER) == cmd:
self.check_poweroff_status(_server_id, data)
elif CMDMsg.getCMD(GETSTATUS) == cmd:
self.getstatus()
elif CMDMsg.getCMD(RECOVERPROFILE) == cmd:
self.recover_server_profile(_server_id, data)
#CHECKRECOVERPROFILE
elif CMDMsg.getCMD(CHECKRECOVERPROFILE) == cmd:
self.check_recover_profile_status(_server_id, data)
elif CMDMsg.getCMD(POWERONSERVER) == cmd:
self.poweronserver(_server_id, data)
elif CMDMsg.getCMD(CHECKPOWERONSERVER) == cmd:
self.check_poweron_status(_server_id, data)
elif CMDMsg.getCMD(CREATEVIOSLPAR) == cmd:
self.createvioslpar(_server_id, data)
elif CMDMsg.getCMD(INSTALLVIOS) == cmd:
self.install_vios(_server_id, data)
elif CMDMsg.getCMD(CHECKCREATEVIOSLPAR) == cmd:
_server_name, _server_sn = eval(data)
self.check_if_create_vios_lpar_state(_server_id,
_server_name,
_server_sn)
示例3: check_if_create_vios_lpar_state
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_if_create_vios_lpar_state(self, server_id, server_name, server_sn):
'''
'''
hmc_cli = HMC_CLI(self.hmc_ip, self.hmc_passwd)
ret = hmc_cli.check_if_create_vios_lpar_finished(server_name,
server_sn)
resp_state = None
count = 1
# while not ret:
#
if ret:
resp_state = [StateBase.get_state_const(CREATEVIOSLPAR_STAT),
StateBase.get_state_progress_const_name(PRGRS_FINISHED)]
else:
resp_state = [StateBase.get_state_const(CREATEVIOSLPAR_STAT),
StateBase.get_state_progress_const_name(PRGRS_INPROGRESS)]
#count = (count + 1) % 4
msg = self.msg_decoder.encodeMsg(CMDMsg.getCMD(CHECKCREATEVIOSLPAR),
server_id,
resp_state)
DebugLog.debug_print_level1(msg)
self.vd_comm_cnt.postMessage(msg)
示例4: check_recover_profile_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_recover_profile_status(self, _server_id, data):
hmc_cli = HMC_CLI(self.hmc_ip, self.hmc_passwd)
data = eval(data)
_server_name = data[0]
status_ret = hmc_cli.get_server_status(_server_name)
recoverprofile_check_status_list = [
StateBase.get_state_const(POWEROFF_STAT),
StateBase.get_state_const(OPERATING_STAT),
StateBase.get_state_const(STANDBY_STAT),
]
recover_profile_finished = False
if status_ret[0] in recoverprofile_check_status_list:
recover_profile_finished = True
if recover_profile_finished:
resp_state = [StateBase.get_state_const(RECOVERPROFILE_STAT),
StateBase.get_state_progress_const_name(PRGRS_FINISHED)]
else:
resp_state = [StateBase.get_state_const(RECOVERPROFILE_STAT),
StateBase.get_state_progress_const_name(PRGRS_INPROGRESS)]
#count = (count + 1) % 4
msg = self.msg_decoder.encodeMsg(CMDMsg.getCMD(RECOVERPROFILE),
_server_id,
resp_state)
DebugLog.debug_print_level1(msg)
self.vd_comm_cnt.postMessage(msg)
if recover_profile_finished:
self.get_server_hmc_status(_server_id, _server_name)
示例5: check_poweroff_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_poweroff_status(self, server_id, data):
hmc_cli = HMC_CLI(self.hmc_ip, self.hmc_passwd)
data = eval(data)
_server_name = data[0]
status_ret = hmc_cli.get_server_status(_server_name)
poweroff_status_list = [StateBase.get_state_const(POWEROFF_STAT),
]
poweroff_val = False
if status_ret[0] in poweroff_status_list:
poweroff_val = True
if poweroff_val:
resp_state = [StateBase.get_state_const(POWEROFFSERVER_STAT),
StateBase.get_state_progress_const_name(PRGRS_FINISHED)]
else:
resp_state = [StateBase.get_state_const(POWEROFFSERVER_STAT),
StateBase.get_state_progress_const_name(PRGRS_INPROGRESS)]
msg = self.msg_decoder.encodeMsg(CMDMsg.getCMD(POWEROFFSERVER),
server_id,
resp_state)
DebugLog.debug_print_level1(msg)
self.vd_comm_cnt.postMessage(msg)
示例6: check_nim_resource_clean
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_nim_resource_clean(self, server_id):
DebugLog.debug_print_level1("in server controller check_nim_resource_clean")
server_data = self.getServerData(server_id)
params = [server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKCLEANSTATUS), server_data[IDX_ID], params)
self._sendMsg2CommCnt(msg)
示例7: check_poweron_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_poweron_status(self, server_id, data):
hmc_cli = HMC_CLI(self.hmc_ip, self.hmc_passwd)
data = eval(data)
_server_name = data[0]
status_ret = hmc_cli.get_server_status(_server_name)
poweron_status_list = [StateBase.get_state_const(PASSWORD_REQUIRED_STAT),
StateBase.get_state_const(FAILED_AUTH_STAT),
StateBase.get_state_const(UPDATEPASSWD_STAT),
StateBase.get_state_const(RECOVERY_STAT),
StateBase.get_state_const(OPERATING_STAT),
StateBase.get_state_const(STANDBY_STAT),
]
poweron_val = False
if status_ret[0] in poweron_status_list:
poweron_val = True
if poweron_val:
resp_state = [StateBase.get_state_const(POWERONSERVER_STAT),
StateBase.get_state_progress_const_name(PRGRS_FINISHED)]
else:
resp_state = [StateBase.get_state_const(POWERONSERVER_STAT),
StateBase.get_state_progress_const_name(PRGRS_INPROGRESS)]
msg = self.msg_decoder.encodeMsg(CMDMsg.getCMD(POWERONSERVER),
server_id,
resp_state)
DebugLog.debug_print_level1(msg)
self.vd_comm_cnt.postMessage(msg)
if poweron_val:
self.get_server_hmc_status(server_id, _server_name)
示例8: check_server_in_fsm_manager
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def check_server_in_fsm_manager(self):
for server_manager_indx in range(len(self.fsm_manager)):
phase, state = self.dataentity.get_data_status_key(server_manager_indx)
fsm_manager = self.fsm_manager[server_manager_indx]
DebugLog.debug_print_level1('state name : %s' % state)
#if not fsm_manager.inprogress:
fsm_manager.setTaskState(phase, state, first=True)
示例9: updateData
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def updateData(self, msg):
DebugLog.debug_print_level1("in updateData function in controller")
self.dataentity.savedata(msg)
_cmd_key, _server_id, data = self.msg_coder.decodeMsg(msg)
if CMDMsg.getCMD(UPDATEPASSWD) == _cmd_key:
self.b_server_removed_frm_hmc_flg = True
self.setServerTaskState(_cmd_key, _server_id, data)
示例10: get_lpar_current_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_lpar_current_status(self, server_id):
DebugLog.debug_print_level1("in server controller get_lpar_current_status")
server_data = self.getServerData(server_id)
params = [server_data[NAME_ID], server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKCREATEVIOSLPAR), server_data[IDX_ID], params) #"UPDATE_PASSWD"
self._sendMsg2CommCnt(msg)
示例11: get_nimserver_hosts_current_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_nimserver_hosts_current_status(self, server_id):
DebugLog.debug_print_level1("in server controller get_lpar_current_status")
server_data = self.getServerData(server_id)
params = [server_data[IP_FOR_NIMINSTALL], server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKHOSTSFILE), server_data[IDX_ID], params) #"UPDATE_PASSWD"
self._sendMsg2CommCnt(msg)
示例12: get_nimserver_assigned_resource_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_nimserver_assigned_resource_status(self, server_id):
DebugLog.debug_print_level1("in server controller get_nimserver_assigned_resource_status")
server_data = self.getServerData(server_id)
params = [server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKASSIGNEDRESOURCE), server_data[IDX_ID], params) #"UPDATE_PASSWD"
self._sendMsg2CommCnt(msg)
示例13: nimserver_define_nim_host
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def nimserver_define_nim_host(self, server_id):
DebugLog.debug_print_level1("in server controller createvioslpar")
# ckecked_items_id_list = self.getCheckedItemsIdList()
# for item_id in range(len(ckecked_items_id_list)):
server_data = self.getServerData(server_id)
params = [server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(DEFINESERVER), server_data[IDX_ID], params) #"POWERON"
self._sendMsg2CommCnt(msg)
示例14: get_server_poweron_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_server_poweron_status(self, server_id):
'''get current status'''
DebugLog.debug_print_level1("in server controller get_server_poweron_status")
server_data = self.getServerData(server_id)
params = [server_data[NAME_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKPOWERONSERVER), server_data[IDX_ID], params) #"GET_STATUS"
self._sendMsg2CommCnt(msg)
示例15: get_update_password_status
# 需要导入模块: from utils import DebugLog [as 别名]
# 或者: from utils.DebugLog import debug_print_level1 [as 别名]
def get_update_password_status(self, server_id):
'''
check update password status
'''
DebugLog.debug_print_level1("in server controller get_update_password_status")
server_data = self.getServerData(server_id)
params = [server_data[SN_ID]]
msg = self.msg_coder.encodeMsg(CMDMsg.getCMD(CHECKUPDATEPASSWD), server_data[IDX_ID], params) #"GET_STATUS"
self._sendMsg2CommCnt(msg)