Add two useful functions

Leftovers from the docker plugin, which is now hosted externally.

Change-Id: I4c4465067d72030e60eae7e2327c85c0607e8ebc
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>