1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #1190: Adapt old-style CLI to new EC2QueryClient class

This commit is contained in:
Ruben S. Montero 2012-09-26 12:10:06 +02:00
parent bf4dbddb9d
commit bb69c0b907
8 changed files with 8 additions and 32 deletions

View File

@ -84,7 +84,6 @@ headers = false
url = nil
access = nil
secret = nil
auth = nil
instance = nil
device = nil
@ -122,10 +121,8 @@ if !volume_id
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -77,7 +77,6 @@ headers = false
url = nil
access = nil
secret = nil
auth = nil
size = nil
begin
@ -110,10 +109,8 @@ if !size
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -75,7 +75,6 @@ headers = false
url = nil
access = nil
secret = nil
auth = nil
begin
opts.each do |opt, arg|
@ -107,10 +106,8 @@ if !volume_id
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -73,7 +73,6 @@ headers = false
url = nil
access = nil
secret = nil
auth = nil
begin
opts.each do |opt, arg|
@ -98,10 +97,8 @@ rescue Exception => e
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -85,7 +85,6 @@ headers = false
url = nil
access = nil
secret = nil
auth = nil
instance = nil
device = nil
@ -123,10 +122,8 @@ if !volume_id
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -71,7 +71,6 @@ opts = GetoptLong.new(
url = nil
access = nil
secret = nil
auth = nil
begin
opts.each do |opt, arg|
@ -103,10 +102,8 @@ if !instance
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -71,7 +71,6 @@ opts = GetoptLong.new(
url = nil
access = nil
secret = nil
auth = nil
begin
opts.each do |opt, arg|
@ -103,10 +102,8 @@ if !instance
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1

View File

@ -71,7 +71,6 @@ opts = GetoptLong.new(
url = nil
access = nil
secret = nil
auth = nil
begin
opts.each do |opt, arg|
@ -103,10 +102,8 @@ if !instance
exit -1
end
auth = "#{access}:#{secret}" if secret && access
begin
ec2_client = EC2QueryClient::Client.new(auth,url)
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1