diff --git a/src/sunstone/models/OpenNebulaJSON/ImageJSON.rb b/src/sunstone/models/OpenNebulaJSON/ImageJSON.rb index e2494351f9..06fa5fb4e7 100644 --- a/src/sunstone/models/OpenNebulaJSON/ImageJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/ImageJSON.rb @@ -63,8 +63,8 @@ module OpenNebulaJSON when "snapshot_flatten" then self.snapshot_flatten(action_hash['params']) when "snapshot_revert" then self.snapshot_revert(action_hash['params']) when "snapshot_delete" then self.snapshot_delete(action_hash['params']) - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() else error_msg = "#{action_hash['perform']} action not " << " available for this resource" @@ -137,13 +137,5 @@ module OpenNebulaJSON def snapshot_delete(params=Hash.new) super(params['snapshot_id'].to_i) end - - def lock(params=Hash.new) - super(params['level'].to_i) - end - - def unlock(params=Hash.new) - super() - end end end diff --git a/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb b/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb index 524ba0dede..62b4ff5644 100644 --- a/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb @@ -57,8 +57,8 @@ module OpenNebulaJSON when "rename" then self.rename(action_hash['params']) when "disable" then self.disable when "enable" then self.enable - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() when "vm.import" then self.app_vm_import(action_hash['params']) when "vm-template.import" then self.app_vm_import(action_hash['params']) when "service_template.import" then self.app_service_import(action_hash['params']) @@ -234,13 +234,5 @@ module OpenNebulaJSON def rename(params=Hash.new) super(params['name']) end - - def lock(params=Hash.new) - super(params['level'].to_i) - end - - def unlock(params=Hash.new) - super() - end end end diff --git a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb index 59dfe6fef0..a3e430562f 100644 --- a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb @@ -51,8 +51,8 @@ module OpenNebulaJSON when "clone" then self.clone(action_hash['params']) when "rename" then self.rename(action_hash['params']) when "delete_recursive" then self.delete_recursive(action_hash['params']) - when "lock" then self.lock_json(action_hash['params']) - when "unlock" then self.unlock_json(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() else error_msg = "#{action_hash['perform']} action not " << " available for this resource" @@ -143,13 +143,5 @@ module OpenNebulaJSON recursive = (params['recursive'] == true) self.delete(recursive) end - - def lock_json(params=Hash.new) - self.lock(params['level'].to_i) - end - - def unlock_json(params=Hash.new) - self.unlock - end end end diff --git a/src/sunstone/models/OpenNebulaJSON/VMGroupJSON.rb b/src/sunstone/models/OpenNebulaJSON/VMGroupJSON.rb index 9b6f53ab63..9c9617b41b 100644 --- a/src/sunstone/models/OpenNebulaJSON/VMGroupJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VMGroupJSON.rb @@ -47,8 +47,8 @@ module OpenNebulaJSON when "chmod" then self.chmod_octet(action_hash['params']) when "update" then self.update(action_hash['params']) when "rename" then self.rename(action_hash['params']) - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() else error_msg = "#{action_hash['perform']} action not " << " available for this resource" @@ -79,13 +79,5 @@ module OpenNebulaJSON def rename(params=Hash.new) super(params['name']) end - - def lock(params=Hash.new) - super(params['level'].to_i) - end - - def unlock(params=Hash.new) - super() - end end end diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb index 7cf2af4e2f..854fd4cacb 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb @@ -59,8 +59,8 @@ module OpenNebulaJSON when "add_ar" then self.add_ar(action_hash['params']) when "update_ar" then self.update_ar(action_hash['params']) when "reserve" then self.reserve(action_hash['params']) - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() else error_msg = "#{action_hash['perform']} action not " << " available for this resource" @@ -118,13 +118,5 @@ module OpenNebulaJSON super(params['name'], params['size'], params['ar_id'], params['addr'], params['vnet']) end - - def lock(params=Hash.new) - super(params['level'].to_i) - end - - def unlock(params=Hash.new) - super() - end end end diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualNetworkTemplateJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualNetworkTemplateJSON.rb index a2fb7eb83c..03a57aae7a 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualNetworkTemplateJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualNetworkTemplateJSON.rb @@ -50,8 +50,8 @@ module OpenNebulaJSON when "hold" then self.hold(action_hash['params']) when "release" then self.release(action_hash['params']) when "rename" then self.rename(action_hash['params']) - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() when "instantiate" then self.instantiate(action_hash['params']) else error_msg = "#{action_hash['perform']} action not " << diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb index 3c4f8ee690..98d07310da 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb @@ -51,8 +51,8 @@ module OpenNebulaJSON when "rename" then self.rename(action_hash['params']) when "attachnic" then self.nic_attach(action_hash['params']) when "detachnic" then self.nic_detach(action_hash['params']) - when "lock" then self.lock(action_hash['params']) - when "unlock" then self.unlock(action_hash['params']) + when "lock" then lock(action_hash['params']['level'].to_i) + when "unlock" then unlock() else error_msg = "#{action_hash['perform']} action not " << " available for this resource" @@ -115,13 +115,5 @@ module OpenNebulaJSON def nic_detach(params=Hash.new) super(params['nic_id'].to_i) end - - def lock(params=Hash.new) - super(params['level'].to_i) - end - - def unlock(params=Hash.new) - super() - end end end