예제 #1
0
 def host_load_module(self, i_module):
     try:
         l_res = self.host_run_command("modprobe %s" % i_module)
     except CommandFailed as c:
         l_msg = "Error in loading the module %s, modprobe failed: %s" % (i_module,str(c))
         raise OpTestError(l_msg)
     l_res = self.host_run_command("lsmod | grep -i --color=never %s" % i_module)
     if re.search(i_module, ''.join(l_res)):
         print "%s module is loaded" % i_module
         return BMC_CONST.FW_SUCCESS
     else:
         raise KernelModuleNotLoaded(i_module)
예제 #2
0
 def host_load_module(self, i_module, console=0):
     '''
     It will load the module using modprobe and verify whether it is loaded or not
     '''
     try:
         l_res = self.host_run_command("modprobe %s" % i_module, console=console)
     except CommandFailed as c:
         l_msg = "Error in loading the module %s, modprobe failed: %s" % (i_module,str(c))
         raise OpTestError(l_msg)
     l_res = self.host_run_command("lsmod | grep -i --color=never %s" % i_module, console=console)
     if re.search(i_module, ''.join(l_res)):
         log.debug("%s module is loaded" % i_module)
         return BMC_CONST.FW_SUCCESS
     else:
         raise KernelModuleNotLoaded(i_module)