From f6362fb4fd934127423896f386454b3ec3ad5e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20S=2E=20Montero?= Date: Fri, 23 Oct 2009 10:43:58 +0000 Subject: [PATCH] Better use the CloudClient namespace in EC2QueryClient git-svn-id: http://svn.opennebula.org/one/trunk@884 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/cloud/ec2/lib/EC2QueryClient.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/cloud/ec2/lib/EC2QueryClient.rb b/src/cloud/ec2/lib/EC2QueryClient.rb index 11dd9fd932..25e855b23f 100644 --- a/src/cloud/ec2/lib/EC2QueryClient.rb +++ b/src/cloud/ec2/lib/EC2QueryClient.rb @@ -33,8 +33,6 @@ module EC2QueryClient ########################################################################## class Client - include CloudClient - API_VERSION = '2008-12-01' ###################################################################### @@ -89,7 +87,7 @@ module EC2QueryClient begin response = @ec2_connection.describe_instances rescue Exception => e - error = Error.new(e.message) + error = CloudClient::Error.new(e.message) return error end @@ -109,7 +107,7 @@ module EC2QueryClient :instance_type => type ) rescue Exception => e - error = Error.new(e.message) + error = CloudClient::Error.new(e.message) return error end @@ -126,7 +124,7 @@ module EC2QueryClient :instance_id => instance_id ) rescue Exception => e - error = Error.new(e.message) + error = CloudClient::Error.new(e.message) return error end @@ -166,7 +164,7 @@ module EC2QueryClient if connection.response_code == 200 return AWS::Response.parse(:xml => connection.body_str) else - return Error.new(connection.body_str) + return CloudClient::Error.new(connection.body_str) end else params["Signature"]=sig @@ -185,7 +183,7 @@ module EC2QueryClient if res.code == '200' return AWS::Response.parse(:xml => res.body) else - return Error.new(res.body) + return CloudClient::Error.new(res.body) end end end @@ -200,7 +198,7 @@ module EC2QueryClient :image_location => image_id ) rescue Exception => e - error = Error.new(e.message) + error = CloudClient::Error.new(e.message) return error end @@ -216,7 +214,7 @@ module EC2QueryClient begin response = @ec2_connection.describe_images rescue Exception => e - error = Error.new(e.message) + error = CloudClient::Error.new(e.message) return error end