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

B : Change in onegate client to ensure compatibility with old servers ()

This commit is contained in:
Alejandro Huertas Herrero 2019-09-06 13:32:00 +02:00 committed by Ruben S. Montero
parent 819669442e
commit 4ccf7f0c72

@ -529,7 +529,8 @@ OptionParser.new do |opts|
end
opts.on("-e", "--erase DATA", "Data to be removed from the VM") do |data|
options[:erase] = data
options[:data] = data
options[:type] = 2
end
opts.on("-r", "--role ROLE", "Service role") do |role|
@ -578,18 +579,12 @@ when "vm"
exit -1
end
data = {}
if options[:data]
data[:data] = options[:data]
data[:type] = 1
if options[:type]
data = URI.encode_www_form(options)
else
data[:data] = options[:erase]
data[:type] = 2
data = options[:data]
end
data = URI.encode_www_form(data)
if ARGV[2]
response = client.put("/vms/" + ARGV[2], data)
else