GCE: Allow templating of image description

Expand the description template before passing it to gcloud
This commit is contained in:
Justin Santa Barbara 2016-04-17 12:00:44 -04:00
parent 3e3d59ddf1
commit 34ee0c1e8d

View file

@ -55,6 +55,7 @@ class RegisterImage(Task):
image_description = info._gce['lsb_description']
if 'description' in info.manifest.provider:
image_description = info.manifest.provider['description']
image_description = image_description.format(**info.manifest_vars)
log_check_call(['gcloud', 'compute', '--project=' + info.manifest.provider['gce_project'],
'images', 'create', info._gce['image_name'],
'--source-uri=' + info.manifest.provider['gcs_destination'] + info._gce['tarball_name'],