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
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)