Commit 75fd709e by Karsa Zoltán István

disk path

parent 07471700
......@@ -194,18 +194,23 @@ class Disk(object):
return False
def create_ci_disk(self, meta_data, user_data):
disk_path = self.get_path()
logger.info("Create CI iso to %s", disk_path)
with open(self.dir + '/meta-data', 'w') as f:
tmp_dir = self.dir + '/dir' + self.name
os.mkdir(tmp_dir)
meta_path = tmp_dir + '/meta-data'
user_path = tmp_dir + '/user-data'
with open(meta_path, 'w') as f:
f.write(meta_data)
with open(self.dir + '/user-data', 'w') as f:
with open(user_path, 'w') as f:
f.write(user_data)
cmdline = ['genisoimage',
'-output', self.get_path(),
'-V', 'cidata', '-r', '-J',
self.dir + '/meta-data',
self.dir + '/user-data']
meta_path,
user_path]
subprocess.check_output(cmdline)
os.remove(meta_path)
os.remove(user_path)
os.removedirs(tmp_dir)
self.size = Disk.get(self.dir, self.name).size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment