Nack,
So, I think the bug fix is not anything to do with the "Add Account
Information Patch". Can you send these separately.
Also, for BZ750214 we actually do not support the "all" option in the
CLI, it was just a documentation error which is now fixed, what we
really want to do to fix this BZ, is return the correct response i.e.
404 TargetImageNotFound error. Since conductor can not find a
targetimage with id "all". We also make sure the error is displayed
properly in CLI Output.
Thanks
Martyn
On 11/30/2011 04:12 PM, mzatko(a)redhat.com wrote:
From: Maros Zatko<mzatko(a)redhat.com>
---
lib/aeolus_cli/command/list_command.rb | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/lib/aeolus_cli/command/list_command.rb
b/lib/aeolus_cli/command/list_command.rb
index fbc4ee4..deea9a2 100644
--- a/lib/aeolus_cli/command/list_command.rb
+++ b/lib/aeolus_cli/command/list_command.rb
@@ -40,7 +40,7 @@ module Aeolus
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")
+ collection = @options[:id] == 'all' ? 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
@@ -54,7 +54,7 @@ module Aeolus
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")
+ collection = @options[:id] == 'all' ? 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
@@ -70,7 +70,19 @@ module Aeolus
headers[:provider] = "Provider"
headers[:status] = "Status"
headers[:target_image] = "Target Image"
- 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")
+ headers[:account_name] = "Provider Name"
+ headers[:account_type] = "Provider Type"
+ collection = @options[:id] == 'all' ? 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