def METHOD_NAME(target_sat):
    shortname = gen_string('alpha')
    new_domain = gen_domain()
    target_sat.execute(
        f'echo "search {new_domain}" >> /etc/resolv.conf; hostnamectl set-hostname {shortname}'
    )
    yield shortname, new_domain
    target_sat.execute(f'hostnamectl set-hostname {target_sat.hostname}')