From 8072555992599341109d0188b1426b88b42206ef Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Mon, 12 Sep 2016 13:01:21 +0200 Subject: [PATCH] F #4771: Allow onedb patch to accept arguments --- src/onedb/onedb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) mode change 100755 => 100644 src/onedb/onedb diff --git a/src/onedb/onedb b/src/onedb/onedb old mode 100755 new mode 100644 index 9e659f16a9..b24c54cc7a --- a/src/onedb/onedb +++ b/src/onedb/onedb @@ -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)