tripleo-quickstart-extras/roles/overcloud-prep-containers/templates/upload_images_to_local_registry.py.j2
Wes Hayutin 59735f853d Updates to the containers prep script
* do not assume src tripleo-common for containers
* fix some doc issues
* use curl vs. wget
* do not re-download images

Change-Id: I959f6e3384ef15588329bdcf29f6475d92b4fc8b
2017-01-03 20:10:42 -05:00

20 lines
452 B
Django/Jinja

# Upload images to local registry
import time
from tripleo_common.image.image_uploader import ImageUploadManager
mgr = ImageUploadManager(['{{ tripleo_common_dir }}/contrib/overcloud_containers.yaml'])
for i in range(0,3):
try:
mgr.upload()
print("The upload was successfull")
# this seems to break in various ways
except Exception as e:
print(str(e.args) + " retry attempt: " + str(i+1))
time.sleep(20)
continue
break