summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/kickstarter17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/kickstarter b/tools/kickstarter
index 9deb24f..dd71b70 100755
--- a/tools/kickstarter
+++ b/tools/kickstarter
@@ -173,7 +173,8 @@ def create_xml(image_meta):
fp = file('%s/%s' %(path, f), 'r')
local = yaml.load(fp)
conf = ks.parse(local)
- image_xml(root,conf)
+ if conf.has_key('Active') and conf['Active']:
+ image_xml(root,conf)
str = etree.tostring(root, pretty_print=True)
return str
@@ -210,16 +211,22 @@ if __name__ == '__main__':
if image_meta.has_key('Configurations'):
for img in image_meta['Configurations']:
conf = ks.parse(img)
- print "Creating %s (%s.ks)" %(img['Name'], img['FileName'] )
- ks.process_files(conf, r)
+ if conf.has_key('Active') and conf['Active']:
+ print "Creating %s (%s.ks)" %(img['Name'], img['FileName'] )
+ ks.process_files(conf, r)
+ else:
+ print "%s is inactive, not generate %s this time" %(img['Name'], img['FileName'] )
for path in image_meta['ExternalConfigs']:
for f in os.listdir(path):
if f.endswith('.yaml'):
fp = file('%s/%s' %(path, f), 'r')
local = yaml.load(fp)
conf = ks.parse(local)
- print "Creating %s (%s.ks)" %(conf['Name'], conf['FileName'] )
- ks.process_files(conf, r)
+ if conf.has_key('Active') and conf['Active']:
+ print "Creating %s (%s.ks)" %(conf['Name'], conf['FileName'] )
+ ks.process_files(conf, r)
+ else:
+ print "%s is inactive, not generate %s this time" %(conf['Name'], conf['FileName'] )
else:
print "WARNING: File '%s' ignored." % (f)