deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH] Reinstate the post /api call for changing provider in HTML UI /api when available (originally addressed in JIRA DTACLOUD-105 (EC2 Regions))
Date Thu, 24 May 2012 15:54:16 GMT
On 05/24/12, marios@redhat.com wrote:

ACK. Good catch!

 -- Michal


> From: marios <marios@redhat.com>
> 
> 
> Signed-off-by: marios <marios@redhat.com>
> ---
>  server/lib/deltacloud/server.rb |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
> index fced64b..0df76e9 100644
> --- a/server/lib/deltacloud/server.rb
> +++ b/server/lib/deltacloud/server.rb
> @@ -53,6 +53,15 @@ module Deltacloud
>        end
>      end
>  
> +    post Deltacloud[:root_url] + '/?' do
> +      provider = params["provider"]
> +      if provider && provider != "default"
> +        redirect "#{Deltacloud[:root_url]}\;provider=#{params['provider']}", 301
> +      else
> +        redirect settings.root_url, 301
> +      end
> +    end
> +
>    end
>  end
>  
> -- 
> 1.7.6.5
> 

-- 
Michal Fojtik
Sr. Software Engineer, Deltacloud API (http://deltacloud.org)

Mime
View raw message