From 5c46707ea422bc0973e90754172388c0e243b875 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Mon, 9 May 2016 21:59:54 +0000 Subject: [PATCH] Add volume_id to /etc/iconograph --- server/build_image.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/build_image.py b/server/build_image.py index bc03e3b..aa51e95 100755 --- a/server/build_image.py +++ b/server/build_image.py @@ -225,9 +225,12 @@ class ImageBuilder(object): def _WriteVersion(self, chroot_path, timestamp): with open(os.path.join(chroot_path, 'etc', 'iconograph.json'), 'w') as fh: - json.dump({ + info = { 'timestamp': timestamp, - }, fh) + } + if FLAGS.volume_id: + info['volume_id'] = FLAGS.volume_id + json.dump(info, fh, sort_keys=True, indent=4) def _RunModules(self, chroot_path): for module in self._modules: