Add grub template to cobbler for MAC-files
[armband.git] / patches / opnfv-fuel / 0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch
1 From: Josep Puigdemont <josep.puigdemont@enea.com>
2 Date: Tue, 17 May 2016 14:40:48 +0200
3 Subject: [PATCH] deploy.py: add a time stamp to the new ISO image
4
5 Add a time stamp to the newly create ISO image. This is to prevent name
6 collisions with other ISO images from earlier deploy jobs.
7
8 Ideally this will only be a temporary need, and releng will provide with
9 unique IDs for each job that we can use to this effect.
10
11 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
12 ---
13  deploy/deploy.py | 6 ++++--
14  1 file changed, 4 insertions(+), 2 deletions(-)
15
16 diff --git a/deploy/deploy.py b/deploy/deploy.py
17 index 041ba2f..cebef97 100755
18 --- a/deploy/deploy.py
19 +++ b/deploy/deploy.py
20 @@ -13,6 +13,7 @@ import os
21  import io
22  import re
23  import sys
24 +import time
25  import yaml
26  import errno
27  import signal
28 @@ -100,8 +101,9 @@ class AutoDeploy(object):
29  
30      def install_fuel_master(self):
31          log('Install Fuel Master')
32 -        new_iso = ('%s/deploy-%s'
33 -                   % (self.tmp_dir, os.path.basename(self.iso_file)))
34 +        stamp = time.strftime("%Y%m%d%H%M%S")
35 +        new_iso = ('%s/deploy-%s-%s'
36 +                   % (self.tmp_dir, stamp, os.path.basename(self.iso_file)))
37          self.patch_iso(new_iso)
38          self.iso_file = new_iso
39          self.install_iso()