def remote_exec(exec_instance_p, remote_shell_cmds_p, exec_cmd_shortcut_p,
    d_vars_p, ret_stdout=False, ret_stdoutFull=False):
    """Helper function with EXEC CLASS"""
    template = remote_shell_cmds_p[exec_cmd_shortcut_p]
    exec_instance_p.rexec(template % d_vars_p)
    if ret_stdoutFull:
        return exec_instance_p.stdout
    if ret_stdout:
        return exec_instance_p.stdout[0]
