def fetch_remote(host, username, password, cmd):
    """
    ssh to remote and execute command and return result
    """
    res = ssh_cmd(host, username, password, cmd, timeout=opts['timeout'], debug=opts['debug'])
    #print '==',res
    return res
def fetch_wanpc(cmd, timeout=None):
    """
    ssh to remote wan pc and execute command and return result
    """
    if not timeout:
        timeout = opts["timeout"]
    debug = opts["debug"]
    return ssh_cmd(
        os.environ["G_HOST_IP1"],
        os.environ["G_HOST_USR1"],
        os.environ["G_HOST_PWD1"],
        cmd,
        timeout=timeout,
        debug=debug,
    )