Coverage for sm/core/mpath_cli : 31%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Fake mpath cli module"""
util.SMlog("mpath cmd: %s" % cmd) (rc,stdout,stderr) = util.doexec(mpathcmd,cmd) if stdout != "multipathd> ok\nmultipathd> " \ and stdout != "multipathd> "+cmd+"\nok\nmultipathd> ": msg = 'rc: %d, stdout: %s, stderr: %s' % (ret, stdout, stderr) raise f_exceptions.XenError('MPCliFailure', msg)
mpexec("add path %s" % path)
mpexec("remove path %s" % path)
mpexec("remove map %s" % m)
mpexec("resize map %s" % m)
mpexec("reconfigure")
util.SMlog("mpath cmd: %s" % cmd) (rc,stdout,stderr) = util.doexec(mpathcmd,cmd) util.SMlog("mpath output: %s" % stdout) lines = stdout.split('\n')[:-1] if len(lines): m=regex2.search(lines[0]) lines[0]=str(m.group(2)) return lines
cmd="show map %s topology" % scsi_id return do_get_topology(cmd)
lines = get_topology(scsi_id) matches = [] for line in lines: m=regex.search(line) if(m): matches.append(m.group(1)) return matches |