mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
This commit is contained in:
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user