From 3d764ba465d33b0733a0ae38a4af79714480033f Mon Sep 17 00:00:00 2001 From: Alejandro Huertas Herrero Date: Tue, 21 Jun 2022 12:41:33 +0200 Subject: [PATCH] F #5883: add JSON output to provision CLI (#2167) --- src/cli/oneprovision | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cli/oneprovision b/src/cli/oneprovision index e7619a77c7..552cc78faf 100755 --- a/src/cli/oneprovision +++ b/src/cli/oneprovision @@ -257,7 +257,8 @@ CommandParser::CmdParser.new(ARGV) do :options => [OneProvisionHelper::MODES, OneProvisionHelper::AMOUNT, OneProvisionHelper::HOSTNAMES, - OneProvisionHelper::HOST_PARAMS] do + OneProvisionHelper::HOST_PARAMS] + + [OpenNebulaHelper::FORMAT] do helper.add_hosts(args[0], options) end @@ -270,7 +271,8 @@ CommandParser::CmdParser.new(ARGV) do command [:host, :delete], host_delete_desc, [:range, :hostid_list], - :options => [OneProvisionHelper::MODES] do + :options => [OneProvisionHelper::MODES] + + [OpenNebulaHelper::FORMAT] do operation = { :operation => 'delete', :message => 'deleted' } helper.resources_operation(args, operation, options, 'HOST') @@ -285,7 +287,8 @@ CommandParser::CmdParser.new(ARGV) do command [:host, :configure], host_configure_desc, [:range, :hostid_list], - :options => [OneProvisionHelper::MODES] do + :options => [OneProvisionHelper::MODES] + + [OpenNebulaHelper::FORMAT] do operation = { :operation => 'configure', :message => 'enabled' } helper.resources_operation(args, operation, options, 'HOST')