コード例 #1
0
ファイル: mmsh.py プロジェクト: vaporting/FTVM_TA
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()
コード例 #2
0
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)
コード例 #3
0
ファイル: mmsh.py プロジェクト: vaporting/FTVM_TA
	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()