def stateipmc(ipmc_name): """ execute stateipmc [ipmc_name] return start/stop """ cmd = cmd_mmsh.statewd_cmd(ipmc_name) status, error = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE).communicate() #print status.rstrip() return status.rstrip()
def stateshmgr(shmgr_name, ssh=None): """ execute stateshmgr [shmgr_name] :param host_name: host OS name :return: start/stop """ cmd = cmd_mmsh.statewd_cmd(shmgr_name) return remoteExec(cmd, ssh) if ssh else localExec(cmd)
execute stopwd [host_name] return success/[nothing] """ cmd = cmd_mmsh.startwd_cmd(host_name) status, error = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE).communicate() #print status.rstrip() return status.rstrip() def statewd(host_name): """ execute statewd [host_name] return start/stop """ cmd = cmd_mmsh.statewd_cmd(host_name) status, error = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE).communicate() #print status.rstrip() return status.rstrip() def stateshmgr(shmgr_name): """ execute stateshmgr [shmgr_name] return start/stop """ cmd = cmd_mmsh.statewd_cmd(shmgr_name) status, error = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE).communicate() #print status.rstrip() return status.rstrip()