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

development: Changed casecmp? function by upcase and comparation

This commit is contained in:
juanmont 2018-10-29 16:54:47 +01:00 committed by Ruben S. Montero
parent 0f6d250585
commit 3859fed1cc

View File

@ -75,7 +75,7 @@ CommandParser::CmdParser.new(ARGV) do
if !arg.nil? &&
arg.class != Integer &&
arg.casecmp?('ALL')
arg.upcase == "ALL"
[0, Vdc::ALL_RESOURCES]
else
OpenNebulaHelper.rname_to_id(arg, 'CLUSTER')
@ -88,7 +88,7 @@ CommandParser::CmdParser.new(ARGV) do
if !arg.nil? &&
arg.class != Integer &&
arg.casecmp?('ALL')
arg.upcase == "ALL"
[0, Vdc::ALL_RESOURCES]
else
OpenNebulaHelper.rname_to_id(arg, 'HOST')
@ -101,7 +101,7 @@ CommandParser::CmdParser.new(ARGV) do
if !arg.nil? &&
arg.class != Integer &&
arg.casecmp?('ALL')
arg.upcase == "ALL"
[0, Vdc::ALL_RESOURCES]
else
OpenNebulaHelper.rname_to_id(arg, 'DATASTORE')
@ -114,7 +114,7 @@ CommandParser::CmdParser.new(ARGV) do
if !arg.nil? &&
arg.class != Integer &&
arg.casecmp?('ALL')
arg.upcase == "ALL"
[0, Vdc::ALL_RESOURCES]
else
OpenNebulaHelper.rname_to_id(arg, 'VNET')