[PATCH aeolus-image-rubygem] bug 786220 - Scope images to Pool Family

Matt Wagner matt.wagner at redhat.com
Wed Feb 15 22:03:51 UTC 2012


On Wed, Feb 15, 2012 at 01:51:36PM -0500, Scott Seago wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=786220
> ---
>  lib/aeolus_image/model/warehouse/image.rb |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/aeolus_image/model/warehouse/image.rb b/lib/aeolus_image/model/warehouse/image.rb
> index 7a06f0e..5bbc267 100644
> --- a/lib/aeolus_image/model/warehouse/image.rb
> +++ b/lib/aeolus_image/model/warehouse/image.rb
> @@ -93,6 +93,10 @@ module Aeolus
>            @description
>          end
>  
> +        def environment
> +          @environment
> +        end
> +
>          # Delete this image and all child objects
>          def delete!
>            begin
> @@ -115,6 +119,12 @@ module Aeolus
>            xml = template_xml
>            xml.present? ? xml.xpath(path).text : ""
>          end
> +
> +        class << self
> +          def by_environment(environment)
> +            self.where("($environment == \"" + environment + "\")")
> +          end
> +        end
>        end
>      end
>    end
> -- 
> 1.7.6.4

ACK to this file



More information about the aeolus-devel mailing list