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

F #4771: Allow onedb patch to accept arguments

This commit is contained in:
Jaime Melis 2016-09-12 13:01:21 +02:00
parent 32afd27e18
commit 8072555992

14
src/onedb/onedb Executable file → Normal file
View File

@ -207,6 +207,18 @@ SLAVE_BACKUP={
:format => String
}
###############################################################################
# Extra options
###############################################################################
EXTRA={
:name => "extra",
:large => "--extra arg",
:description => "Extra args",
:format => Array
}
cmd=CommandParser::CmdParser.new(ARGV) do
description <<-EOT.unindent
This command enables the user to manage the OpenNebula database. It
@ -347,7 +359,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Applies a database patch file
EOT
command :patch , patch_desc, :file, :options=>[BACKUP] do
command :patch , patch_desc, :file, :options=>[BACKUP, EXTRA] do
begin
helper = OneDB.new(options)
helper.patch(args[0], options)