[PATCH conductor 1/2] BZ 785198 - Do not build images for disabled providers

Jan Provaznik jprovazn at redhat.com
Mon Feb 6 12:04:25 UTC 2012


On 02/01/2012 06:43 PM, Matt Wagner wrote:
> ---
>   src/app/controllers/images_controller.rb |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
> index 997ab6a..2546c8f 100644
> --- a/src/app/controllers/images_controller.rb
> +++ b/src/app/controllers/images_controller.rb
> @@ -118,7 +118,7 @@ class ImagesController<  ApplicationController
>     def rebuild_all
>       @image = Aeolus::Image::Warehouse::Image.find(params[:id])
>       factory_image = Aeolus::Image::Factory::Image.new(:id =>  @image.id)
> -    factory_image.targets = Provider.list_for_user(current_user, Privilege::VIEW).map {|p| p.provider_type.deltacloud_driver}.uniq.join(',')
> +    factory_image.targets = Provider.enabled.list_for_user(current_user, Privilege::VIEW).map {|p| p.provider_type.deltacloud_driver}.uniq.join(',')
>       factory_image.template = @image.template_xml.to_s
>       factory_image.save!
>       redirect_to image_path(@image.id)

ACK



More information about the aeolus-devel mailing list