[PATCH aeolus-image-rubygem] BZ#753917 Added Target to Builder

Martyn Taylor mtaylor at redhat.com
Tue Dec 13 16:18:30 UTC 2011


This patch depends on: [PATCH aeolus-image-rubygem] BZ#753917 Added 
Target to Builder

On 12/13/2011 04:05 PM, mtaylor at redhat.com wrote:
> From: Martyn Taylor<mtaylor at redhat.com>
>
> ---
>   lib/aeolus_image/model/factory/target_image.rb |   12 +++++++++++-
>   1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/lib/aeolus_image/model/factory/target_image.rb b/lib/aeolus_image/model/factory/target_image.rb
> index 7410b5b..bda78c7 100644
> --- a/lib/aeolus_image/model/factory/target_image.rb
> +++ b/lib/aeolus_image/model/factory/target_image.rb
> @@ -2,6 +2,8 @@ module Aeolus
>     module Image
>       module Factory
>         class TargetImage<  Base
> +        attr_accessor :target
> +
>           def self.status(id)
>             begin
>               Aeolus::Image::Factory::Builder.find(id).status
> @@ -9,7 +11,15 @@ module Aeolus
>               nil
>             end
>           end
> +
> +        def target
> +          begin
> +            @target = @target.nil? ? Aeolus::Image::Factory::Builder.find(id).target : @target
> +          rescue ActiveResource::ResourceNotFound
> +            nil
> +          end
> +        end
>         end
>       end
>     end
> -end
> \ No newline at end of file
> +end




More information about the aeolus-devel mailing list