def buildOptions
OptionParser.new do |opts|
opts.banner = "Usage: aeolus-image build [command options]"
opts.separator ""
opts.separator "Options:"
opts.on('-e', '--template FILE', 'path to file that contains template xml') do |file|
@options[:template] = file
end
opts.on('-z', '--no-validation', 'Do not validate the template against the TDL XML Schema') do |description|
@options[:validation] = false
end
opts.on('-T', '--target TARGET1,TARGET2', Array, 'provider type (ec2, rackspace, rhevm, etc)') do |name|
@options[:target] = name
end
opts.on('-E', '--environment ENVIRONMENT', 'environment to build for') do |environment|
@options[:environment] = environment
end
opts.on( '-h', '--help', 'Get usage information for this command')
opts.separator ""
opts.separator "Examples:"
opts.separator "aeolus-image build --target ec2 --template my.tmpl --environment default # build a new image for ec2 from based on the given template for the default environment"
opts.separator "aeolus-image build --target ec2,rhevm --template my.tmpl --environment default # build a new image for ec2 and for rhevm based on the given template for the default environment"
end
end