mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F #4203: onehook CLI improvements
This commit is contained in:
parent
da969c5fd3
commit
41644b7ad4
@ -79,8 +79,12 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
:description => 'execution ID'
|
||||
}
|
||||
|
||||
set :format, :hookid, OpenNebulaHelper.rname_to_id_desc('HOOK') do |arg|
|
||||
OpenNebulaHelper.rname_to_id(arg, 'HOOK')
|
||||
set :format, :hookid, OneHookHelper.to_id_desc do |arg|
|
||||
helper.rname_to_id(arg)
|
||||
end
|
||||
|
||||
set :format, :hookid_list, OneHookHelper.list_to_id_desc do |arg|
|
||||
helper.list_to_id(arg)
|
||||
end
|
||||
|
||||
########################################################################
|
||||
@ -172,8 +176,8 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
EOT
|
||||
|
||||
command :delete, delete_desc, [:range, :hookid_list] do
|
||||
helper.perform_actions(args[0], options, 'deleted') do |t|
|
||||
t.delete
|
||||
helper.perform_actions(args[0], options, 'deleted') do |hook|
|
||||
hook.delete
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user