def _run_command(cmd):
    pipe = subprocess.PIPE
    proc = subprocess.Popen(cmd, stdin=pipe, stdout=pipe, stderr=pipe,
            close_fds=True)
    ret = proc.wait()
    err = proc.stderr.read()
    if err:
        raise pluginlib.PluginError(err)
    return (ret, proc.stdout.read())
Abstracts out the basics of issuing system commands. If the command
dataset/ETHPy150Open nii-cloud/dodai-compute/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py/_run_command