ack
On 02/03/12 02:02, [email protected] wrote:
> From: David Lutterkort <[email protected]>
>
> ---
> .../drivers/rimuhosting/rimuhosting_client.rb | 17 +++++++++--------
> .../drivers/rimuhosting/rimuhosting_driver.rb | 2 +-
> 2 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
> b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
> index f44336a..58f8e1b 100644
> --- a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
> +++ b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
> @@ -41,16 +41,17 @@ class RimuHostingClient
> headers["Authorization"] = @auth
> end
> safely do
> - r = @service.send_request(method, @uri.path + resource, data, headers)
> - puts r.body
> - res = JSON.parse(r.body)
> - res = res[res.keys[0]]
> + r = @service.send_request(method, @uri.path + resource, data, headers)
> + puts r.body
> + res = JSON.parse(r.body)
> + res = res[res.keys[0]]
>
> - if(res['response_type'] == "ERROR" and (
> (res['error_info']['error_class'] == "PermissionException") or
> + if(res['response_type'] == "ERROR" and (
> (res['error_info']['error_class'] == "PermissionException") or
> (res['error_info']['error_class']
> == "LoginRequired") ))
> - raise "AuthFailure"
> + raise "AuthFailure"
> + end
> + res
> end
> - res
> end
>
> def list_images
> @@ -81,6 +82,6 @@ class RimuHostingClient
> end
> end
>
> - end
> end
> end
> +end
> diff --git a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
> b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
> index 9f786d0..6b61b8c 100644
> --- a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
> +++ b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
> @@ -131,7 +131,7 @@ class RimuHostingDriver < Deltacloud::BaseDriver
> :owner_id => "root",
> :instance_profile => InstanceProfile.new("none"),
> :actions => instance_actions_for("RUNNING"),
> - :public_addresses => [
> InstanceAddress.new(inst["allocated_ips"]["primary_ip"] ),
> + :public_addresses => [
> InstanceAddress.new(inst["allocated_ips"]["primary_ip"] ) ],
> :launch_time => inst["billing_info"]["order_date"]["iso_format"]
> })
> end