• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python utils.DebugLog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中utils.DebugLog的典型用法代码示例。如果您正苦于以下问题:Python DebugLog类的具体用法?Python DebugLog怎么用?Python DebugLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DebugLog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: server_task_start

 def server_task_start(self, msg):
     '''
     For one click button to server installation task
     '''
     _cmd, _idx, _data = self.msg_coder.decodeMsg(msg)
     tmp = eval(_data)
     server_id = tmp[0]
     _bPause = tmp[1]
     server_details_info = self.getServerData(server_id)
     _server_cur_phase_str = server_details_info[PHASE]
     fsm_manager = self.fsm_manager[int(server_details_info[IDX_ID])]
     
     if _bPause:
         fsm_manager.auto_mode = False
         return 
     else:
         fsm_manager.auto_mode = True
     
     if CMDMsg.getCMD(INSTALL_VIOS_ONLY) == _cmd:
         fsm_manager.update_states_order()
         DebugLog.info_print("install vios only update states order")
         
     phase_state = fsm_manager.get_cur_state(_server_cur_phase_str)
     #phase = StateBase.get_state_const(PASSWORD_REQUIRED_STAT)
     phase = phase_state.get_next_state().get_state_name()
     
     progress = StateBase.get_state_progress_const_name(PRGRS_READY)
     DebugLog.info_print("Set Task %d as %s %s" % (server_id, phase, progress))
     #fsm_manager.setTaskState(phase, progress)
     self.start_server_in_fsm_manager(server_id, phase, progress)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:30,代码来源:SvrController.py


示例2: sendMsg

 def sendMsg(self, server_id, msg_type_id, bStop=False):
     DebugLog.info_print("Send Msg via button click with server_id: %d" % server_id)
     #server_data = self.getServerData(server_id)
     
     params = [server_id, bStop]
     msg = self.msgcoder.encodeMsg(CMDMsg.getCMD(msg_type_id), server_id, params)
     self.controller._sendMsg2CommCnt(msg)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:tablePanel.py


示例3: check_server_in_fsm_manager

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例4: updateData

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例5: get_asm_poweron_status

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例6: create_vios_lpar

 def create_vios_lpar(self, params_list):
     '''create vios lpar'''
     
     params = params_list
     if not isinstance(params_list, list):
         params = eval(params_list)
     server_name, server_sn, server_slots = params
     _name = server_sn
     _profile_name = '%sprf' % server_sn 
     self.chk_and_shutdown_remv_lpar(server_name, server_sn)
     time.sleep(1)
     cmd = 'mksyscfg -r lpar -m %s -i "name=%s,\
            profile_name=%s,lpar_env=vioserver,auto_start=1,\
            boot_mode=norm,mem_mode=ded,min_mem=2048,\
            desired_mem=4096,max_mem=8192,\
            proc_mode=shared,min_procs=2,desired_procs=4,\
            max_procs=8,min_proc_units=0.5,desired_proc_units=1,\
            max_proc_units=2,\
            sharing_mode=cap,max_virtual_slots=200,\
            \\"io_slots=%s//0\\""' % (server_name, 
                                  _name, 
                                  _profile_name,
                                  server_slots) 
     DebugLog.info_print("create vios lpar for %s " % server_name)
     self.remote_session.interactive_cmds(cmd, "~>  ~>", False)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:25,代码来源:hmccli_session.py


示例7: get_server_slots

 def get_server_slots(self, server_name):
     '''get slots info from hmc'''
     cmd = "lshwres -r io --rsubtype slot -m %s -F drc_index" % server_name
     DebugLog.info_print("get slots %s " % server_name)
     server_slots = self.remote_session.interactive_cmds(cmd, "~>  ~>", True)
     
     return server_slots
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:hmccli_session.py


示例8: login

 def login(self, driver, username, password):
     '''
     Use default configurations in shared_config file to login PD
     '''
         
     pd_browser_client = driver
 
     DebugLog.info_print("Login PowerDirector")
     assert "PowerDirector" in pd_browser_client.title
     DebugLog.info_print("Page title: " + pd_browser_client.title)
 
     pd_browser_client.implicitly_wait(30)
     uid_input = pd_browser_client.find_element_by_id("uid")
     uid_input.send_keys(username)
     p_input = pd_browser_client.find_element_by_id("pword")
     p_input.send_keys(password)
     login_button = pd_browser_client.find_element_by_xpath("/html/body/div/form/div/p[4]/input")
     login_button.click()
     expect_welcome_panel = pd_browser_client.find_element_by_id("user_panel")
     welcome_text = "PowerDirector"
 
     try:
         if welcome_text in expect_welcome_panel.text:
             print( expect_welcome_panel.text)
     except:
         raise Login_Error("Login fails")
         pd_browser_client.quit()
 
     return pd_browser_client
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:29,代码来源:OpenBrowser.py


示例9: check_poweroff_status

    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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:26,代码来源:hmceng.py


示例10: get_lpar_current_status

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例11: check_if_create_vios_lpar_state

    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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:26,代码来源:hmceng.py


示例12: check_poweron_status

    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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:34,代码来源:hmceng.py


示例13: get_nimserver_hosts_current_status

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例14: get_nimserver_assigned_resource_status

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例15: __init__

 def __init__(self):
     '''
     Constructor
     '''
     self.data_created = False
     self.data_empty = False
     
     self.file_name = "ippool.dat"
     records_dir_name = "records"
     if not os.path.exists(records_dir_name):
         os.mkdir(records_dir_name)
     self.file_name = os.path.join(records_dir_name, self.file_name)
     DebugLog.info_print("The ip pool file path: %s." % os.path.abspath(self.file_name))
     
     file_mode = "r+"
     if os.path.isfile(self.file_name):
         self.data_created = True
         file_mode = "r+"
     else:
         file_mode = "w+"
     
     self.file_handler = open(self.file_name, file_mode)
     if self.data_created:
         self.read_data(self.file_handler)
     else:
         self.init_data(self.file_handler)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:26,代码来源:NimIPPool.py


示例16: update_password

 def update_password(self, machine_name):
     '''
     update the password for the desired machine 
     '''
     DebugLog.info_print("update the password for the desired machine %s " % machine_name)
     resp = self._change_sys_pwd(machine_name)
     DebugLog.info_print("response: %s" % resp)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:hmccli_session.py


示例17: check_nim_resource_clean

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:SvrController.py


示例18: process_message

 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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:35,代码来源:hmceng.py


示例19: check_recover_profile_status

    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)
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:33,代码来源:hmceng.py


示例20: __del__

 def __del__(self):
     '''
     destructor for asmieng
     logout from asmi page
     '''
     DebugLog.info_print("asmi engine destructor")
     self.logout()
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:7,代码来源:asmi.py



注:本文中的utils.DebugLog类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.EXIF类代码示例发布时间:2022-05-26
下一篇:
Python utils.Data类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap