def listOptions
OptionParser.new do |opts|
opts.banner = "Usage: aeolus-image list [command options]"
opts.on('-i', '--images', 'Retrieve a list of images') do
@options[:subcommand] = :images
end
opts.on('-E', '--environment ENVIRONMENT', 'Limit image list to environment') do |environment|
@options[:environment] = environment
end
opts.on('-b', '--builds ID', 'Retrieve the builds of an image') do |id|
@options[:subcommand] = :builds
@options[:id] = id
end
opts.on('-t', '--targetimages ID', 'Retrieve the target images from a build') do |id|
@options[:subcommand] = :targetimages
@options[:id] = id
end
opts.on('-P', '--providerimages ID', 'Retrieve the provider images from a target image') do |id|
@options[:subcommand] = :providerimages
@options[:id] = id
end
opts.on('-g', '--targets', 'Retrieve the values available for the --target parameter') do
@options[:subcommand] = :targets
end
opts.on('-p', '--providers', 'Retrieve the values available for the --provider parameter') do
@options[:subcommand] = :providers
end
opts.on('-a', '--accounts', 'Retrieve the values available for the --account parameter') do
@options[:subcommand] = :accounts
end
opts.on('-c', '--environments', 'Retrieve the values available for the --environment parameter') do
@options[:subcommand] = :environments
end
opts.on( '-h', '--help', 'Get usage information for this command')
opts.separator ""
opts.separator "Examples:"
opts.separator "aeolus-image list --images # list available images"
opts.separator "aeolus-image list --images --environment $env # list available images for an environment"
opts.separator "aeolus-image list --builds $image_id # list the builds of an image"
opts.separator "aeolus-image list --targetimages $build_id # list the target images from a build"
opts.separator "aeolus-image list --providerimages $target_id # list the provider images from a target image"
opts.separator "aeolus-image list --targets # list the values available for the --target parameter"
opts.separator "aeolus-image list --providers # list the values available for the --provider parameter"
opts.separator "aeolus-image list --accounts # list the values available for the --account parameter"
opts.separator ""
opts.separator "N.B. Aeolus Credentials should be defined in the configuration file ~/.aeolus-cli"
end
end