def run
if combo_implemented?
@options[:template_str] = read_file(@options[:template])
if @options[:template_str].nil?
puts "Cannot find specified file"
quit(1)
end
errors = validate_xml_document(File.dirname(__FILE__) + "/../../../examples/tdl.rng", @options[:template_str])
if errors.length > 0
puts "ERROR: The given Template does not conform to the TDL Schema, see below for specific details:"
errors.each do |error|
puts "- " + error.message
end
quit(1)
end
sleep(5)
@console.build(@options[:template_str], @options[:target], @options[:image], @options[:build]).each do |adaptor|
puts ""
puts "Target Image: #{adaptor.image_id}"
puts "Image: #{adaptor.image}"
puts "Build: #{adaptor.build}"
puts "Status: #{adaptor.status}"
puts "Percent Complete: #{adaptor.percent_complete}"
end
quit(0)
end
end