mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Better use the CloudClient namespace in EC2QueryClient
git-svn-id: http://svn.opennebula.org/one/trunk@884 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
04171ed4dc
commit
f6362fb4fd
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user