Add ping_retry function
Add ping_retry function

This patch cleans up the retry logic so that it is all
consolidated in the same function.

Change-Id: I003afe4963e2af8d55f11a4ae4867e563a22134f
Related-bug: #1567011

openstack/tripleo-heat-templates,trozet/opnfv-tht,openstack/tripleo-heat-templates,bcrochet/tripleo-heat-templates,dprince/tripleo-heat-templates,dprince/tripleo-heat-templates,trozet/opnfv-tht,bcrochet/tripleo-heat-templates,trozet/opnfv-tht,bcrochet/tripleo-heat-templates