Convert subprocess to a reusable method
Convert subprocess to a reusable method

We were calling subprocess numerous times throught this script
using mostly copy and paste code. This change updates the
script to use a reusable method.

Change-Id: I0531fdb2e9c07767dbd11919cefc8e7f8ff59262
Signed-off-by: Kevin Carter <1d9a750a4fc7026fb02029431dc8a87d24487135@redhat.com>

openstack/tripleo-heat-templates,openstack/tripleo-heat-templates