Code from openshift-origin-cartridge-mock