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

B #5200: lock and unlock action now use lockable_ext (#813)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2021-02-16 17:22:06 +01:00 committed by GitHub
parent a04648c13f
commit 12a520bba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,8 @@ module OpenNebulaJSON
when "recover" then self.recover(action_hash['params'])
when "save_as_template" then self.save_as_template(action_hash['params'])
when "disk_resize" then self.disk_resize(action_hash['params'])
when "lock" then self.lock(action_hash['params'])
when "unlock" then self.unlock(action_hash['params'])
when "lock" then self.lock(action_hash['params']['level'].to_i)
when "unlock" then self.unlock()
else
error_msg = "#{action_hash['perform']} action not " <<
" available for this resource"
@ -201,14 +201,6 @@ module OpenNebulaJSON
super(params['name'])
end
def lock(params=Hash.new)
super(params['level'].to_i)
end
def unlock(params=Hash.new)
super()
end
def recover(params=Hash.new)
super(params['result'].to_i)
end