# File lib/aeolus_cli/command/list_command.rb, line 18 def initialize(opts={}, logger=nil) super(opts, logger) end
# File lib/aeolus_cli/command/list_command.rb, line 120 def accounts begin headers = ActiveSupport::OrderedHash.new headers[:name] = "Name" headers[:provider] = "Provider" headers[:provider_type] = "Provider Type" print_collection(Aeolus::CLI::ProviderAccount.all, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 40 def builds begin headers = ActiveSupport::OrderedHash.new headers[:id] = "ID" headers[:image] = "Image" collection = @options[:id].nil? ? Aeolus::CLI::Build.all : Aeolus::CLI::Build.find(:all, :from => Aeolus::CLI::Base.site.path + "/images/" + @options[:id] + "/builds.xml") print_collection(collection, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 133 def environments begin headers = ActiveSupport::OrderedHash.new headers[:name] = "Name" print_collection(Aeolus::CLI::Environment.all, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 22 def images begin headers = ActiveSupport::OrderedHash.new headers[:id] = "ID" headers[:name] = "Name" headers[:environment] = "Environment" headers[:os] = "OS" headers[:os_version] = "OS Version" headers[:arch] = "Arch" headers[:description] = "Description" collection = @options[:environment].nil? ? Aeolus::CLI::Image.all : Aeolus::CLI::Image.find(:all, :from => Aeolus::CLI::Base.site.path + "/environments/" + @options[:environment] + "/images.xml") print_collection(collection, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 67 def providerimages begin headers = ActiveSupport::OrderedHash.new headers[:id] = "ID" headers[:target_identifier] = "Target Identifier" headers[:status] = "Status" headers[:target_image] = "Target Image" headers[:account_name] = "Account" headers[:provider] = "Provider" headers[:account_type] = "Provider Type" collection = @options[:id].nil? ? Aeolus::CLI::ProviderImage.all : Aeolus::CLI::ProviderImage.find(:all, :from => Aeolus::CLI::Base.site.path + "/target_images/" + @options[:id] + "/provider_images.xml") paccs = Aeolus::CLI::ProviderAccount.all.group_by(&:provider) collection.map! do |item| prov = item.attributes[:provider] item.attributes[:account_name] = paccs[prov].first.name item.attributes[:account_type] = paccs[prov].first.provider_type item end print_collection(collection, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 107 def providers begin headers = ActiveSupport::OrderedHash.new headers[:name] = "Name" headers[:provider_type] = "Type" headers[:deltacloud_provider] = "Target Reference" print_collection(Aeolus::CLI::Provider.all, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 53 def targetimages begin headers = ActiveSupport::OrderedHash.new headers[:id] = "ID" headers[:status] = "Status" headers[:build] = "Build" collection = @options[:id].nil? ? Aeolus::CLI::TargetImage.all : Aeolus::CLI::TargetImage.find(:all, :from => Aeolus::CLI::Base.site.path + "/builds/" + @options[:id] + "/target_images.xml") print_collection(collection, headers) quit(0) rescue => e handle_exception(e) end end
# File lib/aeolus_cli/command/list_command.rb, line 95 def targets begin headers = ActiveSupport::OrderedHash.new headers[:name] = "Name" headers[:deltacloud_driver] = "Reference" print_collection(Aeolus::CLI::ProviderType.all, headers) quit(0) rescue => e handle_exception(e) end end