From 6ab813aedf6923492e3d01d3fc47ae79d6593efa Mon Sep 17 00:00:00 2001 From: "Carlos J. Herrera" <37907824+carloshm91@users.noreply.github.com> Date: Fri, 5 Jul 2019 09:43:29 -0400 Subject: [PATCH] B #3439: polish onevcenter tool (#3475) * B #3439: polish the onevcenter tool Signed-off-by: Carlos J. Herrera Matos * B #3439: polish the onevcenter tool Signed-off-by: Carlos J. Herrera Matos * M #~: fix linter Signed-off-by: Carlos J. Herrera Matos (cherry picked from commit 35a6a8a72444ea05342326963bfcff9320e22b34) --- src/cli/onevcenter | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cli/onevcenter b/src/cli/onevcenter index b3b7126cfd..b77ef28273 100755 --- a/src/cli/onevcenter +++ b/src/cli/onevcenter @@ -181,6 +181,12 @@ CommandParser::CmdParser.new(ARGV) do importer.retrieve_resources(helper.parse_opts(options)) indexes = importer.get_indexes(args.first) + if indexes.nil? + raise "Could not get any unimported #{options[:object]}"\ + " resources info in host: #{options[:host]} with"\ + " this input: #{args.first}" + end + importer.process_import(indexes) do |object_info| helper.cli_dialogue(object_info) end