From 3036eb41c169c43e1ce43e3d045ff24b13e8a550 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sun, 17 Apr 2016 12:48:50 -0400 Subject: [PATCH] GCE: Name the image as specified in the manifest We were hard coding an image name format for GCE, but that doesn't match what other providers (e.g. AWS) do. Given that image upload did not work at all previously, no reason to preserve the existing unusual behaviour. --- bootstrapvz/providers/gce/tasks/image.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bootstrapvz/providers/gce/tasks/image.py b/bootstrapvz/providers/gce/tasks/image.py index 1fa6818..777e6d1 100644 --- a/bootstrapvz/providers/gce/tasks/image.py +++ b/bootstrapvz/providers/gce/tasks/image.py @@ -12,16 +12,8 @@ class CreateTarball(Task): @classmethod def run(cls, info): - import datetime image_name = info.manifest.name.format(**info.manifest_vars) filename = image_name + '.' + info.volume.extension - today = datetime.datetime.today() - name_suffix = today.strftime('%Y%m%d') - image_name_format = '{lsb_distribution}-{lsb_release}-{release}-v{name_suffix}' - image_name = image_name_format.format(lsb_distribution=info._gce['lsb_distribution'], - lsb_release=info._gce['lsb_release'], - release=info.manifest.system['release'], - name_suffix=name_suffix) # ensure that we do not use disallowed characters in image name image_name = image_name.lower() image_name = image_name.replace(".", "-")