Fixes #3954 - translate names to ids

Foreman part of https://github.com/theforeman/hammer-cli/pull/75