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

B #5475: remove XML option from flow cmds (#1448)

This commit is contained in:
Alejandro Huertas Herrero 2021-09-13 12:33:40 +02:00 committed by GitHub
parent e13dee2a9a
commit 846fe9619f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View File

@ -82,6 +82,8 @@ CommandParser::CmdParser.new(ARGV) do
:description => 'Force flow necover delete'
}
FORMAT = [OpenNebulaHelper::JSON, OpenNebulaHelper::YAML]
# create helper object
helper = OneFlowHelper.new
@ -122,7 +124,7 @@ CommandParser::CmdParser.new(ARGV) do
List the available services
EOT
command :list, list_desc, :options => OpenNebulaHelper::FORMAT do
command :list, list_desc, :options => FORMAT do
helper.list_service_pool(helper.client(options), options)
end
@ -146,10 +148,7 @@ CommandParser::CmdParser.new(ARGV) do
Show detailed information of a given service
EOT
command :show,
show_desc,
:service_id,
:options => OpenNebulaHelper::FORMAT do
command :show, show_desc, :service_id, :options => FORMAT do
helper.format_resource(helper.client(options), args[0], options)
end

View File

@ -104,6 +104,8 @@ CommandParser::CmdParser.new(ARGV) do
'deleting service template'
}
FORMAT = [OpenNebulaHelper::JSON, OpenNebulaHelper::YAML]
usage '`oneflow-template` <command> [<args>] [<options>]'
version OpenNebulaHelper::ONE_VERSION
@ -141,7 +143,7 @@ CommandParser::CmdParser.new(ARGV) do
List the available Service Templates
EOT
command :list, list_desc, :options => OpenNebulaHelper::FORMAT do
command :list, list_desc, :options => FORMAT do
helper.list_service_template_pool(helper.client(options), options)
end
@ -169,10 +171,7 @@ CommandParser::CmdParser.new(ARGV) do
Show detailed information of a given Service Template
EOT
command :show,
show_desc,
:templateid,
:options => OpenNebulaHelper::FORMAT do
command :show, show_desc, :templateid, :options => FORMAT do
helper.format_resource(helper.client(options), args[0], options)
end