These layer on top of the four patches on the list from Martyn, and correct a few
roadblocks I had while trying to get this integrated into Conductor.
Best,
Matt
Show replies by date
---
lib/aeolus_image/command/build_command.rb | 2 +-
lib/aeolus_image/model/image.rb | 4 ++--
lib/aeolus_image/model/image_build.rb | 2 +-
lib/aeolus_image/model/warehouse_client.rb | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/aeolus_image/command/build_command.rb
b/lib/aeolus_image/command/build_command.rb
index 07ced02..0a6601c 100644
--- a/lib/aeolus_image/command/build_command.rb
+++ b/lib/aeolus_image/command/build_command.rb
@@ -27,7 +27,7 @@ module Aeolus
end
# Validate XML against TDL Schema
- errors = validate_xml_document(File.dirname(__FILE__) +
"/../../examples/tdl.rng", @options[:template_str])
+ 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|
diff --git a/lib/aeolus_image/model/image.rb b/lib/aeolus_image/model/image.rb
index 244ba5c..ac0885e 100644
--- a/lib/aeolus_image/model/image.rb
+++ b/lib/aeolus_image/model/image.rb
@@ -34,7 +34,7 @@ module Aeolus
end
def image_builds
- ImageBuild.find_all_by_image_uuid(self.uuid)
+ ImageBuild.find_all_by_image_uuid(@uuid)
end
#TODO: We should get the image fields from the object body once we have it
defined.
@@ -63,4 +63,4 @@ module Aeolus
end
end
end
-end
\ No newline at end of file
+end
diff --git a/lib/aeolus_image/model/image_build.rb
b/lib/aeolus_image/model/image_build.rb
index f9ced0b..fae38e1 100644
--- a/lib/aeolus_image/model/image_build.rb
+++ b/lib/aeolus_image/model/image_build.rb
@@ -18,7 +18,7 @@ module Aeolus
def self.find_all_by_image_uuid(uuid)
self.set_warehouse_and_bucket if self.bucket.nil?
self.bucket.objects.map do |wh_object|
- if wh_object.attr('image')[1] == uuid
+ if wh_object.attr('image') == uuid
ImageBuild.new(wh_object.attrs(wh_object.attr_list))
end
end.compact
diff --git a/lib/aeolus_image/model/warehouse_client.rb
b/lib/aeolus_image/model/warehouse_client.rb
index 6b7dc1c..a6f0d11 100644
--- a/lib/aeolus_image/model/warehouse_client.rb
+++ b/lib/aeolus_image/model/warehouse_client.rb
@@ -49,7 +49,7 @@ module Aeolus
end
def attr(name)
- attrs([name]).first
+ attrs([name])[name]
end
def set_attrs(hash)
--
1.7.6